commit 99d8b0868375a08770f90a2ebbdd35870c962b31 Author: Ben Date: Wed May 15 11:29:04 2024 -0700 init diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..00ad71f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules\\typescript\\lib" +} \ No newline at end of file diff --git a/lib/cjs/Utils.d.ts b/lib/cjs/Utils.d.ts new file mode 100644 index 0000000..d934a45 --- /dev/null +++ b/lib/cjs/Utils.d.ts @@ -0,0 +1,2 @@ +export declare function undef(): A | undefined; +export declare function memoize(fn: () => A): () => A; diff --git a/lib/cjs/Utils.js b/lib/cjs/Utils.js new file mode 100644 index 0000000..06f2cd5 --- /dev/null +++ b/lib/cjs/Utils.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.memoize = exports.undef = void 0; +function undef() { + return undefined; +} +exports.undef = undef; +function memoize(fn) { + let memo; + return () => { + if (memo === undefined) { + memo = fn(); + } + return memo; + }; +} +exports.memoize = memoize; diff --git a/lib/cjs/hermesclient/client.d.ts b/lib/cjs/hermesclient/client.d.ts new file mode 100644 index 0000000..3b30240 --- /dev/null +++ b/lib/cjs/hermesclient/client.d.ts @@ -0,0 +1,75 @@ +import { ContentType, Message, MessageFromClient, CreateMailboxResponse, KeyValPair, MessageEnvelope, SendReceipt } from "./proto/wsmessages"; +export interface ContentTypeHandler { + readonly webSocketUrlPath: string; + sendMessageFromClient(mfc: MessageFromClient, ws: WebSocket): void; +} +export declare const ContentTypeHandler: { + Json: ContentTypeHandler; + Protobuf: ContentTypeHandler; +}; +export declare function newHermesClient(rootUrl: string, contentTypeHandler: ContentTypeHandler): HermesClient; +export interface ChangeDataCaptureEvent { + id: string; + schema: string; + table: string; + action: string; + data: any; + commitTime: string; +} +interface RawRpcRequest { + to: string; + endPoint: string; + body?: Uint8Array; + contentType?: ContentType; + headers?: KeyValPair[]; + state?: Uint8Array; +} +export declare class RpcRequestResponse { + correlationId: string; + sendReceiptEnvelope: MessageEnvelope | undefined; + sendReceipt: SendReceipt | undefined; + sentMessage: Message | undefined; + inboxEnvelope: MessageEnvelope | undefined; + inboxMessage: Message | undefined; + constructor(correlationId: string); + role(): string | undefined; + contentType(): ContentType; + isProtobuf(): boolean; + isJson(): boolean; + isClient(): boolean | undefined; + hasRequestAndResponse(): boolean; + timeStarted(): Date | undefined; + timeStartedL(): number | undefined; + timeCompleted(): Date | undefined; + durationInMillis(): number | undefined; + endPoint(): string | undefined; + requestMessage(): Message | undefined; + requestEnvelope(): MessageEnvelope | undefined; + responseMessage(): Message | undefined; + responseEnvelope(): MessageEnvelope | undefined; + status(): string; + processSchema(reqOrResp: "request" | "response", data?: Uint8Array): Promise; + responseObj(): Promise; + requestObj(): Promise; +} +declare const GlobalClient: { + get: () => HermesClient; +}; +export default GlobalClient; +export declare function runHermesClientTest(): void; +export declare function runHermesClientTest2(): void; +export interface CdcSubscription { + tables: CdcTable[]; + startSeq?: string; +} +export interface CdcTable { + database: string; + table: string; +} +export interface HermesClient { + readonly rootUrl: string; + mailbox(): Promise; + rawRpcCall(request: RawRpcRequest): Promise; + cdcSubscribe(cdcs: CdcSubscription, listener: (cdcEvent: ChangeDataCaptureEvent, a: A) => void): void; + rpcObserverSubscribe(readerKey: string, listener: (correlation: RpcRequestResponse) => void): void; +} diff --git a/lib/cjs/hermesclient/client.js b/lib/cjs/hermesclient/client.js new file mode 100644 index 0000000..e105444 --- /dev/null +++ b/lib/cjs/hermesclient/client.js @@ -0,0 +1,689 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.runHermesClientTest2 = exports.runHermesClientTest = exports.RpcRequestResponse = exports.newHermesClient = exports.ContentTypeHandler = void 0; +const wsmessages_1 = require("./proto/wsmessages"); +const Utils_1 = require("../Utils"); +const JsonContentTypeHandler = { + webSocketUrlPath: "/api/ws/send_receive_json", + sendMessageFromClient(mfc, ws) { + const obj = wsmessages_1.MessageFromClient.toJSON(mfc); + const jsonStr = JSON.stringify(obj); + ws.send(jsonStr); + } +}; +const ProtobufContentTypeHandler = { + webSocketUrlPath: "/api/ws/send_receive_proto", + sendMessageFromClient(mfc, ws) { + const bytes = wsmessages_1.MessageFromClient.encode(mfc).finish(); + ws.send(bytes); + } +}; +exports.ContentTypeHandler = { + Json: JsonContentTypeHandler, + Protobuf: ProtobufContentTypeHandler, +}; +function newHermesClient(rootUrl, contentTypeHandler) { + const hci = new HermesClientImpl(rootUrl, contentTypeHandler); + hci.mailbox().then((mbox) => { + const correlations = hci.correlations; + hci.channelMessageSubscribe({ + id: "rpc-inbox", + state: "rpc-inbox", + readerKey: mbox.readerKey, + channel: "rpc-inbox", + startSeq: "all" + }, (me, msg) => { + var _a, _b, _c, _d, _e, _f; + if (me.messageBytes) { + try { + const msg = wsmessages_1.Message.decode(me.messageBytes); + const endPoint = (_b = (_a = msg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.endPoint; + if (((_d = (_c = msg.header) === null || _c === void 0 ? void 0 : _c.rpcHeader) === null || _d === void 0 ? void 0 : _d.frameType) === wsmessages_1.RpcFrameType.Request && endPoint == "ping") { + hci.sendPongResponse(mbox, msg, endPoint); + } + else { + const correlationId = (_f = (_e = msg.header) === null || _e === void 0 ? void 0 : _e.rpcHeader) === null || _f === void 0 ? void 0 : _f.correlationId; + if (correlationId) { + const resolve = correlations.get(correlationId); + if (resolve !== undefined) { + resolve(msg); + } + correlations.delete(correlationId); + } + } + } + catch (e) { + console.error("error decoding message", e); + } + } + // noop since we are only interested in the correlationId for rpc and that happens in onMessage + }); + }); + // send ping every 30 seconds + setInterval(() => hci.sendPing(), 30 * 1000); + return hci; +} +exports.newHermesClient = newHermesClient; +/** + * Create the mailbox + * @param channels + * @param rootUrl + * @returns + */ +async function createMailbox(channels, rootUrl) { + const mbox = { + channels: channels, + privateMetadata: {}, + publicMetadata: {}, + purgeTimeoutInMillis: 0, + closeTimeoutInMillis: 0, + extraData: {}, + }; + const mboxObj = wsmessages_1.CreateMailboxRequest.toJSON(mbox); + const mboxJson = JSON.stringify(mboxObj); + let mailboxResponse = undefined; + const response = await fetch(`${rootUrl}/api/create_mailbox`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: mboxJson, + }); + if (response.ok) { + const responseJsonStr = await response.text(); + mailboxResponse = wsmessages_1.CreateMailboxResponse.fromJSON(JSON.parse(responseJsonStr)); + } + else { + throw new Error(`createMailbox failed with status ${response.status}`); + } + return mailboxResponse; +} +class Constants { +} +Constants.rpcInboxChannelName = "rpc-inbox"; +Constants.rpcSentChannelName = "rpc-sent"; +class HermesConnection { + constructor(clientImpl, mailbox, webSocket) { + this.clientImpl = clientImpl; + this.mailbox = mailbox; + this.webSocket = webSocket; + const self = this; + webSocket.onmessage = function (event) { + if (event.data instanceof ArrayBuffer) { + self.onWebSocketBinaryMessage(event.data); + } + else { + self.onWebSocketTextMessage(event.data); + } + }; + webSocket.onclose = function (event) { + console.log("HermesConnection websocket closed", event); + clientImpl.reconnect(); + }; + // resend un ack'ed messages + clientImpl.sentMessagesWaitingForAck.forEach((smr, idempotentId) => { + self.sendSendMessageRequest(smr, false); + }); + } + onWebSocketTextMessage(message) { + const jsonObj = JSON.parse(message); + const m2c = wsmessages_1.MessageToClient.fromJSON(jsonObj); + this.onMessageToClient(m2c); + } + onWebSocketBinaryMessage(message) { + const m2c = wsmessages_1.MessageToClient.decode(new Uint8Array(message)); + this.onMessageToClient(m2c); + } + onMessageToClient(m2c) { + var _a, _b, _c; + if (m2c.notification !== undefined) { + console.log("hermes client received notification " + m2c.notification, m2c.notification); + } + else if (m2c.messageEnvelope !== undefined) { + const me = m2c.messageEnvelope; + if (me.messageBytes === undefined) { + console.log("hermes client received empty messageEnvelope", m2c.messageEnvelope); + } + else { + const subscriptionId = (_a = me.serverEnvelope) === null || _a === void 0 ? void 0 : _a.subscriptionId; + if (subscriptionId) { + const activeSub = this.clientImpl.activeSubscriptions.get(subscriptionId); + if (activeSub) { + const startSeq = (_b = me.serverEnvelope) === null || _b === void 0 ? void 0 : _b.sequence; + if (startSeq) { + activeSub.protoRawSubscription.startSeq = String(startSeq); + } + activeSub.onMessageEvent(me); + } + } + } + } + else if (m2c.sendMessageResponse !== undefined) { + const id = (_c = m2c.sendMessageResponse) === null || _c === void 0 ? void 0 : _c.idempotentId; + if (id) { + this.clientImpl.sentMessagesWaitingForAck.delete(id); + } + console.log("hermes client received SendMessageResponse", m2c.sendMessageResponse); + } + else if (m2c.subscribeResponse !== undefined) { + console.log("hermes client received subscribeResponse", m2c.subscribeResponse); + } + else if (m2c.ping !== undefined) { + this.webSocket.send(JSON.stringify({ pong: {} })); + } + else if (m2c.pong !== undefined) { + console.log("hermes client received pong"); + } + } + sendMessageFromClient(mfc) { + console.log("sending websocket message", mfc); + this.clientImpl.contentTypeHandler.sendMessageFromClient(mfc, this.webSocket); + } + addActiveSubscription(activeSub) { + const listeners = this.clientImpl.activeSubscriptions.get(activeSub.subscriptionId); + if (listeners) { + throw Error(`subscriptionId ${activeSub.subscriptionId} is already subscribed`); + } + else { + this.clientImpl.activeSubscriptions.set(activeSub.subscriptionId, activeSub); + } + } + cdcSubscribe(cdcs, listener) { + const subscriptionId = "cdc-" + cdcs.tables.map((t) => t.database + "." + t.table).join("-"); + const protoCdcs = { + id: subscriptionId, + matchers: cdcs.tables, + startSeq: cdcs.startSeq, + }; + this.sendMessageFromClient({ subscribeRequest: { subscriptions: [{ changeDataCapture: protoCdcs }] } }); + function onMessage(msg) { + const json = new TextDecoder().decode(msg.messageBytes); + const cdcEvent = JSON.parse(json); + listener(cdcEvent, cdcEvent.data); + } + this.addActiveSubscription({ + subscriptionId: subscriptionId, + protoRawSubscription: protoCdcs, + onMessageEvent: onMessage, + protoSubscription: { changeDataCapture: protoCdcs } + }); + } + channelMessageSubscribe(ms, listener) { + this.rawChannelSubscribe(ms, wsmessages_1.Message.decode, listener); + } + channelSendReceiptSubscribe(ms, listener) { + this.rawChannelSubscribe(ms, wsmessages_1.SendReceipt.decode, listener); + } + rawChannelSubscribe(ms, decoder, listener) { + const subscriptionId = ms.id; + if (!subscriptionId) { + throw new Error("MailboxSubscription id is undefined"); + } + function onMessage(msg) { + if (msg.messageBytes === undefined) { + console.error("MessageEnvelope.messageBytes is undefined"); + return; + } + const a = decoder(msg.messageBytes); + listener(msg, a); + } + this.sendMessageFromClient({ subscribeRequest: { subscriptions: [{ mailbox: ms }] } }); + this.addActiveSubscription({ + subscriptionId: subscriptionId, + onMessageEvent: onMessage, + protoRawSubscription: ms, + protoSubscription: { mailbox: ms } + }); + } + sendPing() { + this.sendMessageFromClient({ ping: {} }); + } + sendSendMessageRequest(smr, registerForAck) { + if (registerForAck && smr.idempotentId) { + this.clientImpl.sentMessagesWaitingForAck.set(smr.idempotentId, smr); + } + this.sendMessageFromClient({ sendMessageRequest: smr }); + } + rawRpcCall(request) { + var _a; + const emptyBytes = new Uint8Array(0); + const correlationId = ((_a = this.mailbox.address) !== null && _a !== void 0 ? _a : "") + "-" + this.clientImpl.correlationIdCounter++; + const idempotentId = this.mailbox.address + correlationId; + const smr = { + channel: Constants.rpcInboxChannelName, + to: [request.to], + idempotentId: idempotentId, + message: { + header: { + rpcHeader: { + correlationId: correlationId, + endPoint: request.endPoint, + frameType: wsmessages_1.RpcFrameType.Request, + errorInfo: undefined, + }, + sender: this.mailbox.address, + contentType: request.contentType, + extraHeaders: request.headers, + senderSequence: 0, + }, + serverEnvelope: undefined, + senderEnvelope: { + created: Date.now(), + }, + data: request.body !== undefined ? request.body : emptyBytes, + }, + }; + const promise = new Promise((resolve, reject) => { + this.clientImpl.correlations.set(correlationId, resolve); + }); + this.sendSendMessageRequest(smr, true); + return promise; + } + rpcObserverSubscribe(readerKey, listener) { + console.log("rpcObserverSubscribe", readerKey); + const correlations = new Map(); + const msInbox = { + id: "rpc-inbox-" + readerKey, + readerKey: readerKey, + channel: "rpc-inbox", + startSeq: "first", + }; + this.channelMessageSubscribe(msInbox, (me, msg) => { + var _a, _b; + const correlationId = (_b = (_a = msg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.correlationId; + if (correlationId) { + var correlation = correlations.get(correlationId); + if (!correlation) { + correlation = new RpcRequestResponse(correlationId); + correlations.set(correlationId, correlation); + } + correlation.inboxEnvelope = me; + correlation.inboxMessage = msg; + listener(correlation); + } + }); + const msSent = { + id: "rpc-sent-" + readerKey, + readerKey: readerKey, + channel: "rpc-sent", + startSeq: "first", + }; + this.channelSendReceiptSubscribe(msSent, (me, sr) => { + var _a, _b, _c, _d, _e; + const msg = (_a = sr.request) === null || _a === void 0 ? void 0 : _a.message; + const correlationId = (_e = (_d = (_c = (_b = sr.request) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.rpcHeader) === null || _e === void 0 ? void 0 : _e.correlationId; + if (correlationId !== undefined) { + var correlation = correlations.get(correlationId); + if (correlation === undefined) { + correlation = new RpcRequestResponse(correlationId); + correlations.set(correlationId, correlation); + } + correlation.sentMessage = msg; + correlation.sendReceiptEnvelope = me; + correlation.sendReceipt = sr; + listener(correlation); + } + }); + } +} +class HermesClientImpl { + constructor(rootUrl, contentTypeHandler) { + this.correlationIdCounter = 0; + this.correlations = new Map(); + this.activeSubscriptions = new Map(); + this.sentMessagesWaitingForAck = new Map(); + const thisHermesClientImpl = this; + this.rootUrl = rootUrl; + this.contentTypeHandler = contentTypeHandler; + this.mailboxResponseP = createMailbox([Constants.rpcInboxChannelName, Constants.rpcSentChannelName], rootUrl); + var tempMailboxResponseP = this.mailboxResponseP; + var tempWsUrl = new URL(rootUrl); + tempWsUrl.protocol = tempWsUrl.protocol.replace("http", "ws"); + tempWsUrl.pathname = contentTypeHandler.webSocketUrlPath; + this.wsUrl = tempWsUrl.toString(); + this.currentConn = this.newHermesConnection(); + } + sendPongResponse(mbox, pingMsg, endPoint) { + var _a, _b, _c, _d, _e, _f; + const correlationId = (_b = (_a = pingMsg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.correlationId; + const sender = (_c = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _c === void 0 ? void 0 : _c.sender; + const contentType = (_e = (_d = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _d === void 0 ? void 0 : _d.contentType) !== null && _e !== void 0 ? _e : wsmessages_1.ContentType.UnspecifiedCT; + if (correlationId !== undefined && sender !== undefined) { + var ping = {}; + if (pingMsg.data !== undefined) { + if (contentType == wsmessages_1.ContentType.Json) { + ping = wsmessages_1.Ping.fromJSON(pingMsg.data); + } + else { + ping = wsmessages_1.Ping.decode(pingMsg.data); + } + } + const pong = { payload: ping.payload }; + var data; + if (contentType == wsmessages_1.ContentType.Json) { + data = new TextEncoder().encode(JSON.stringify(wsmessages_1.Pong.toJSON(pong))); + } + else { + data = wsmessages_1.Pong.encode(pong).finish(); + } + const idempotentId = mbox.address + correlationId; + const smr = { + channel: Constants.rpcInboxChannelName, + to: [sender], + idempotentId: idempotentId, + message: { + header: { + rpcHeader: { + correlationId: correlationId, + endPoint: endPoint, + frameType: wsmessages_1.RpcFrameType.SuccessResponse, + errorInfo: undefined, + }, + sender: mbox.address, + contentType: (_f = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _f === void 0 ? void 0 : _f.contentType, + }, + serverEnvelope: undefined, + senderEnvelope: { + created: Date.now(), + }, + data: data, + }, + }; + this.withConn((conn) => { + conn.sendSendMessageRequest(smr, true); + }); + } + else { + console.log("ignoring ping no correlation id", pingMsg); + } + } + reconnect() { + this.currentConn = this.newHermesConnection(); + } + newHermesConnection() { + const outerThis = this; + return new Promise((resolve, reject) => { + this.mailboxResponseP.then((mbox) => { + var webSocket = new WebSocket(this.wsUrl); + webSocket.binaryType = "arraybuffer"; + webSocket.onopen = function (event) { + console.log("hermes client websocket opened, sending first message"); + const resubscriptions = Object.values(outerThis.activeSubscriptions).map((as) => { return as.protoSubscription; }); + // send first message + const firstMessage = { + senderInfo: { + readerKey: mbox.readerKey, + address: mbox.address, + }, + subscriptions: resubscriptions, + mailboxTimeoutInMs: 2 * 60 * 1000, // 2 minutes + }; + const mfc = { + firstMessage: firstMessage, + }; + console.log("sending first message"); + outerThis.contentTypeHandler.sendMessageFromClient(mfc, webSocket); + console.log("resolving promise"); + resolve(new HermesConnection(outerThis, mbox, webSocket)); + }; + }); + }); + } + mailbox() { + return this.mailboxResponseP; + } + async withConn(fn) { + return this.currentConn.then((conn) => fn(conn)); + } + async withConnP(fn) { + return this.currentConn.then((conn) => fn(conn)); + } + rawRpcCall(request) { + return this.withConnP((conn) => { + return conn.rawRpcCall(request); + }); + } + cdcSubscribe(cdcs, listener) { + this.withConn((conn) => { + conn.cdcSubscribe(cdcs, listener); + }); + } + rpcObserverSubscribe(readerKey, listener) { + console.log("outer rpcObserverSubscribe", readerKey); + this.withConn((conn) => { + console.log("inner rpcObserverSubscribe", readerKey); + conn.rpcObserverSubscribe(readerKey, listener); + }); + } + channelMessageSubscribe(ms, listener) { + this.withConn((conn) => { + conn.channelMessageSubscribe(ms, listener); + }); + } + channelSendReceiptSubscribe(ms, listener) { + this.withConn((conn) => { + conn.channelSendReceiptSubscribe(ms, listener); + }); + } + sendPing() { + this.withConn((conn) => { + conn.sendPing(); + }); + } +} +class RpcRequestResponse { + constructor(correlationId) { + this.correlationId = correlationId; + } + role() { + const ic = this.isClient(); + if (ic) { + return "client"; + } + else if (ic === false) { + return "server"; + } + } + contentType() { + var _a, _b, _c, _d, _e, _f; + const contentType = (_f = (_c = (_b = (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.contentType) !== null && _c !== void 0 ? _c : (_e = (_d = this.responseMessage()) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.contentType) !== null && _f !== void 0 ? _f : wsmessages_1.ContentType.UnspecifiedCT; + return contentType; + } + isProtobuf() { + return this.contentType() === wsmessages_1.ContentType.Protobuf; + } + isJson() { + return this.contentType() === wsmessages_1.ContentType.Json; + } + isClient() { + var _a, _b, _c, _d, _e, _f; + const inboxFrameType = (_c = (_b = (_a = this.inboxMessage) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.frameType; + const sentFrameType = (_f = (_e = (_d = this.sentMessage) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.rpcHeader) === null || _f === void 0 ? void 0 : _f.frameType; + if (sentFrameType === wsmessages_1.RpcFrameType.Request) { + return true; + } + else if (inboxFrameType === wsmessages_1.RpcFrameType.Request) { + return false; + } + } + hasRequestAndResponse() { + return this.sendReceiptEnvelope && this.inboxEnvelope ? true : false; + } + timeStarted() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = (0, Utils_1.undef)(); + if (ic === true) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === false) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + if (time) { + return new Date(time); + } + } + timeStartedL() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = (0, Utils_1.undef)(); + if (ic === true) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === false) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + return time; + } + timeCompleted() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = undefined; + if (ic === false) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === true) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + if (time) { + return new Date(time); + } + } + durationInMillis() { + var _a, _b; + const ts = (_a = this.timeStarted()) === null || _a === void 0 ? void 0 : _a.getTime(); + const tc = (_b = this.timeCompleted()) === null || _b === void 0 ? void 0 : _b.getTime(); + if (ts && tc) { + return tc - ts; + } + } + endPoint() { + var _a, _b, _c; + return (_c = (_b = (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.endPoint; + } + requestMessage() { + const ic = this.isClient(); + if (ic === true) { + return this.sentMessage; + } + else if (ic === false) { + return this.inboxMessage; + } + } + requestEnvelope() { + const ic = this.isClient(); + if (ic === true) { + return this.sendReceiptEnvelope; + } + else if (ic === false) { + return this.inboxEnvelope; + } + } + responseMessage() { + const ic = this.isClient(); + if (ic === true) { + return this.inboxMessage; + } + else if (ic === false) { + return this.sentMessage; + } + } + responseEnvelope() { + const ic = this.isClient(); + if (ic === true) { + return this.inboxEnvelope; + } + else if (ic === false) { + return this.sendReceiptEnvelope; + } + } + status() { + var _a, _b, _c; + const frameType = (_c = (_b = (_a = this.responseMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.frameType; + if (!frameType) { + return ""; + } + else if (frameType === wsmessages_1.RpcFrameType.ErrorResponse) { + return "error"; + } + else if (frameType === wsmessages_1.RpcFrameType.SuccessResponse) { + return "success"; + } + else { + return `Unexpected frame types ${frameType}`; + } + } + async processSchema(reqOrResp, data) { + if (this.isJson()) { + const jsonStr = new TextDecoder().decode(data); + return JSON.parse(jsonStr); + } + else { + const endPoint = this.endPoint(); + if (endPoint === undefined) { + return { + "error": "no endpoint" + }; + } + if (data === undefined) { + return {}; + } + return protobufToJson(endPoint, reqOrResp, data); + } + } + async responseObj() { + var _a; + return this.processSchema("response", (_a = this.responseMessage()) === null || _a === void 0 ? void 0 : _a.data); + } + async requestObj() { + var _a; + return this.processSchema("request", (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.data); + } +} +exports.RpcRequestResponse = RpcRequestResponse; +const GlobalClient = { + get: (0, Utils_1.memoize)(() => newHermesClient("https://hermes-go.ahsrcm.com", JsonContentTypeHandler)) +}; +exports.default = GlobalClient; +function runHermesClientTest() { +} +exports.runHermesClientTest = runHermesClientTest; +function runHermesClientTest2() { + // const hc = newHermesClient("https://hermes-go.ahsrcm.com", ContentType.Protobuf); + const hc = newHermesClient("https://hermes-go.ahsrcm.com", JsonContentTypeHandler); + hc.mailbox().then((mbox) => { + const cdcs = { + tables: [ + { + database: "nefario", + table: "service", + }, + ], + startSeq: "new", + }; + hc.cdcSubscribe(cdcs, (cdcEvent, a) => { + console.log("cdcEvent", cdcEvent); + }); + }); + // hc.correlatedRpcReader("rrb07167144dc644a0be22a85301afea7e" , (correlation) => { + // console.log("correlation", correlation); + // }); +} +exports.runHermesClientTest2 = runHermesClientTest2; +async function protobufToJson(schemaName, frametype, bytes) { + // const mboxObj = CreateMailboxRequest.toJSON(mbox); + // const mboxJson = JSON.stringify(mboxObj); + // let mailboxResponse: CreateMailboxResponse | undefined = undefined; + const rootUrl = GlobalClient.get().rootUrl; + const response = await fetch(`${rootUrl}/api/proto_to_json?schema=${schemaName}&frametype=${frametype}`, { + method: "POST", + body: bytes, + }); + if (response.ok) { + const jsonStr = await response.text(); + return JSON.parse(jsonStr); + } + else { + throw new Error(`proto_to_json failed with status ${response.status}`); + } +} diff --git a/lib/cjs/hermesclient/google/protobuf/struct.d.ts b/lib/cjs/hermesclient/google/protobuf/struct.d.ts new file mode 100644 index 0000000..d5036c3 --- /dev/null +++ b/lib/cjs/hermesclient/google/protobuf/struct.d.ts @@ -0,0 +1,201 @@ +import * as _m0 from "protobufjs/minimal"; +export declare const protobufPackage = "google.protobuf"; +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + */ +export declare enum NullValue { + /** NULL_VALUE - Null value. */ + NULL_VALUE = 0, + UNRECOGNIZED = -1 +} +export declare function nullValueFromJSON(object: any): NullValue; +export declare function nullValueToJSON(object: NullValue): string; +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + */ +export interface Struct { + /** Unordered map of dynamically typed values. */ + fields: { + [key: string]: any | undefined; + }; +} +export interface Struct_FieldsEntry { + key: string; + value: any | undefined; +} +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of these + * variants. Absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + */ +export interface Value { + /** Represents a null value. */ + nullValue?: NullValue | undefined; + /** Represents a double value. */ + numberValue?: number | undefined; + /** Represents a string value. */ + stringValue?: string | undefined; + /** Represents a boolean value. */ + boolValue?: boolean | undefined; + /** Represents a structured value. */ + structValue?: { + [key: string]: any; + } | undefined; + /** Represents a repeated `Value`. */ + listValue?: Array | undefined; +} +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + */ +export interface ListValue { + /** Repeated field of dynamically typed values. */ + values: any[]; +} +export declare const Struct: { + encode(message: Struct, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Struct; + fromJSON(object: any): Struct; + toJSON(message: Struct): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): Struct; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): Struct; + wrap(object: { + [key: string]: any; + } | undefined): Struct; + unwrap(message: Struct): { + [key: string]: any; + }; +}; +export declare const Struct_FieldsEntry: { + encode(message: Struct_FieldsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry; + fromJSON(object: any): Struct_FieldsEntry; + toJSON(message: Struct_FieldsEntry): unknown; + create]: never; }>(base?: I): Struct_FieldsEntry; + fromPartial]: never; }>(object: I_1): Struct_FieldsEntry; +}; +export declare const Value: { + encode(message: Value, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Value; + fromJSON(object: any): Value; + toJSON(message: Value): unknown; + create]: never; }) | undefined; + listValue?: (any[] & any[] & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }>(base?: I): Value; + fromPartial]: never; }) | undefined; + listValue?: (any[] & any[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }>(object: I_1): Value; + wrap(value: any): Value; + unwrap(message: any): string | number | boolean | Object | null | Array | undefined; +}; +export declare const ListValue: { + encode(message: ListValue, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListValue; + fromJSON(object: any): ListValue; + toJSON(message: ListValue): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): ListValue; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): ListValue; + wrap(array: Array | undefined): ListValue; + unwrap(message: ListValue): Array; +}; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P : P & { + [K in keyof P]: Exact; +} & { + [K in Exclude>]: never; +}; +export {}; diff --git a/lib/cjs/hermesclient/google/protobuf/struct.js b/lib/cjs/hermesclient/google/protobuf/struct.js new file mode 100644 index 0000000..adbdc91 --- /dev/null +++ b/lib/cjs/hermesclient/google/protobuf/struct.js @@ -0,0 +1,469 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.nullValueToJSON = exports.nullValueFromJSON = exports.NullValue = exports.protobufPackage = void 0; +/* eslint-disable */ +const _m0 = __importStar(require("protobufjs/minimal")); +exports.protobufPackage = "google.protobuf"; +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + */ +var NullValue; +(function (NullValue) { + /** NULL_VALUE - Null value. */ + NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE"; + NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(NullValue || (exports.NullValue = NullValue = {})); +function nullValueFromJSON(object) { + switch (object) { + case 0: + case "NULL_VALUE": + return NullValue.NULL_VALUE; + case -1: + case "UNRECOGNIZED": + default: + return NullValue.UNRECOGNIZED; + } +} +exports.nullValueFromJSON = nullValueFromJSON; +function nullValueToJSON(object) { + switch (object) { + case NullValue.NULL_VALUE: + return "NULL_VALUE"; + case NullValue.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +exports.nullValueToJSON = nullValueToJSON; +function createBaseStruct() { + return { fields: {} }; +} +exports.Struct = { + encode(message, writer = _m0.Writer.create()) { + Object.entries(message.fields).forEach(([key, value]) => { + if (value !== undefined) { + exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim(); + } + }); + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStruct(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32()); + if (entry1.value !== undefined) { + message.fields[entry1.key] = entry1.value; + } + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce((acc, [key, value]) => { + acc[key] = value; + return acc; + }, {}) + : {}, + }; + }, + toJSON(message) { + const obj = {}; + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = v; + }); + } + } + return obj; + }, + create(base) { + return exports.Struct.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseStruct(); + message.fields = Object.entries((_a = object.fields) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => { + if (value !== undefined) { + acc[key] = value; + } + return acc; + }, {}); + return message; + }, + wrap(object) { + const struct = createBaseStruct(); + if (object !== undefined) { + Object.keys(object).forEach((key) => { + struct.fields[key] = object[key]; + }); + } + return struct; + }, + unwrap(message) { + const object = {}; + if (message.fields) { + Object.keys(message.fields).forEach((key) => { + object[key] = message.fields[key]; + }); + } + return object; + }, +}; +function createBaseStruct_FieldsEntry() { + return { key: "", value: undefined }; +} +exports.Struct_FieldsEntry = { + encode(message, writer = _m0.Writer.create()) { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStruct_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object === null || object === void 0 ? void 0 : object.value) ? object.value : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = message.value; + } + return obj; + }, + create(base) { + return exports.Struct_FieldsEntry.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseStruct_FieldsEntry(); + message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; + message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined; + return message; + }, +}; +function createBaseValue() { + return { + nullValue: undefined, + numberValue: undefined, + stringValue: undefined, + boolValue: undefined, + structValue: undefined, + listValue: undefined, + }; +} +exports.Value = { + encode(message, writer = _m0.Writer.create()) { + if (message.nullValue !== undefined) { + writer.uint32(8).int32(message.nullValue); + } + if (message.numberValue !== undefined) { + writer.uint32(17).double(message.numberValue); + } + if (message.stringValue !== undefined) { + writer.uint32(26).string(message.stringValue); + } + if (message.boolValue !== undefined) { + writer.uint32(32).bool(message.boolValue); + } + if (message.structValue !== undefined) { + exports.Struct.encode(exports.Struct.wrap(message.structValue), writer.uint32(42).fork()).ldelim(); + } + if (message.listValue !== undefined) { + exports.ListValue.encode(exports.ListValue.wrap(message.listValue), writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseValue(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.nullValue = reader.int32(); + continue; + case 2: + if (tag !== 17) { + break; + } + message.numberValue = reader.double(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.stringValue = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + message.boolValue = reader.bool(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.structValue = exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 50) { + break; + } + message.listValue = exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined, + numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : undefined, + stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined, + boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined, + structValue: isObject(object.structValue) ? object.structValue : undefined, + listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.nullValue !== undefined) { + obj.nullValue = nullValueToJSON(message.nullValue); + } + if (message.numberValue !== undefined) { + obj.numberValue = message.numberValue; + } + if (message.stringValue !== undefined) { + obj.stringValue = message.stringValue; + } + if (message.boolValue !== undefined) { + obj.boolValue = message.boolValue; + } + if (message.structValue !== undefined) { + obj.structValue = message.structValue; + } + if (message.listValue !== undefined) { + obj.listValue = message.listValue; + } + return obj; + }, + create(base) { + return exports.Value.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e, _f; + const message = createBaseValue(); + message.nullValue = (_a = object.nullValue) !== null && _a !== void 0 ? _a : undefined; + message.numberValue = (_b = object.numberValue) !== null && _b !== void 0 ? _b : undefined; + message.stringValue = (_c = object.stringValue) !== null && _c !== void 0 ? _c : undefined; + message.boolValue = (_d = object.boolValue) !== null && _d !== void 0 ? _d : undefined; + message.structValue = (_e = object.structValue) !== null && _e !== void 0 ? _e : undefined; + message.listValue = (_f = object.listValue) !== null && _f !== void 0 ? _f : undefined; + return message; + }, + wrap(value) { + const result = createBaseValue(); + if (value === null) { + result.nullValue = NullValue.NULL_VALUE; + } + else if (typeof value === "boolean") { + result.boolValue = value; + } + else if (typeof value === "number") { + result.numberValue = value; + } + else if (typeof value === "string") { + result.stringValue = value; + } + else if (globalThis.Array.isArray(value)) { + result.listValue = value; + } + else if (typeof value === "object") { + result.structValue = value; + } + else if (typeof value !== "undefined") { + throw new globalThis.Error("Unsupported any value type: " + typeof value); + } + return result; + }, + unwrap(message) { + if (message.stringValue !== undefined) { + return message.stringValue; + } + else if ((message === null || message === void 0 ? void 0 : message.numberValue) !== undefined) { + return message.numberValue; + } + else if ((message === null || message === void 0 ? void 0 : message.boolValue) !== undefined) { + return message.boolValue; + } + else if ((message === null || message === void 0 ? void 0 : message.structValue) !== undefined) { + return message.structValue; + } + else if ((message === null || message === void 0 ? void 0 : message.listValue) !== undefined) { + return message.listValue; + } + else if ((message === null || message === void 0 ? void 0 : message.nullValue) !== undefined) { + return null; + } + return undefined; + }, +}; +function createBaseListValue() { + return { values: [] }; +} +exports.ListValue = { + encode(message, writer = _m0.Writer.create()) { + for (const v of message.values) { + exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListValue(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()))); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { values: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.values) ? [...object.values] : [] }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.values) === null || _a === void 0 ? void 0 : _a.length) { + obj.values = message.values; + } + return obj; + }, + create(base) { + return exports.ListValue.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseListValue(); + message.values = ((_a = object.values) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + return message; + }, + wrap(array) { + const result = createBaseListValue(); + result.values = array !== null && array !== void 0 ? array : []; + return result; + }, + unwrap(message) { + if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("values")) && globalThis.Array.isArray(message.values)) { + return message.values; + } + else { + return message; + } + }, +}; +function isObject(value) { + return typeof value === "object" && value !== null; +} +function isSet(value) { + return value !== null && value !== undefined; +} diff --git a/lib/cjs/hermesclient/proto/wsmessages.d.ts b/lib/cjs/hermesclient/proto/wsmessages.d.ts new file mode 100644 index 0000000..7cc1789 --- /dev/null +++ b/lib/cjs/hermesclient/proto/wsmessages.d.ts @@ -0,0 +1,4566 @@ +import * as _m0 from "protobufjs/minimal"; +import { Observable } from "rxjs"; +export declare const protobufPackage = "hermes"; +export declare enum RpcFrameType { + UnspecifiedRFT = 0, + Request = 1, + SuccessResponse = 2, + ErrorResponse = 3, + UNRECOGNIZED = -1 +} +export declare function rpcFrameTypeFromJSON(object: any): RpcFrameType; +export declare function rpcFrameTypeToJSON(object: RpcFrameType): string; +export declare enum ContentType { + UnspecifiedCT = 0, + Protobuf = 1, + Json = 2, + Binary = 3, + Text = 4, + UNRECOGNIZED = -1 +} +export declare function contentTypeFromJSON(object: any): ContentType; +export declare function contentTypeToJSON(object: ContentType): string; +export interface MessageFromClient { + sendMessageRequest?: SendMessageRequest | undefined; + firstMessage?: FirstMessage | undefined; + ping?: Ping | undefined; + pong?: Pong | undefined; + notification?: Notification | undefined; + subscribeRequest?: SubscribeRequest | undefined; +} +export interface Notification { + message?: string | undefined; +} +export interface MessageToClient { + messageEnvelope?: MessageEnvelope | undefined; + sendMessageResponse?: SendMessageResponse | undefined; + ping?: Ping | undefined; + pong?: Pong | undefined; + notification?: Notification | undefined; + subscribeResponse?: SubscribeResponse | undefined; +} +export interface Ping { + payload?: Uint8Array | undefined; +} +export interface Pong { + payload?: Uint8Array | undefined; +} +export interface MessageHeader { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: RpcHeader | undefined; + senderSequence?: number | undefined; + extraHeaders?: KeyValPair[] | undefined; +} +export interface SenderEnvelope { + created?: number | undefined; +} +export interface ServerEnvelope { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; +} +export interface KeyValPair { + key?: string | undefined; + val?: string | undefined; +} +export interface RpcHeader { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: RpcErrorInfo | undefined; +} +export interface RpcErrorInfo { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; +} +export interface Message { + header?: MessageHeader | undefined; + senderEnvelope?: SenderEnvelope | undefined; + serverEnvelope?: ServerEnvelope | undefined; + data?: Uint8Array | undefined; +} +export interface MessageEnvelope { + messageBytes?: Uint8Array | undefined; + serverEnvelope?: ServerEnvelope | undefined; +} +export interface SendMessageRequest { + to?: string[] | undefined; + message?: Message | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; +} +export interface SendMessageResponse { + errors?: SendMessageError[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; +} +export interface SendReceipt { + request?: SendMessageRequest | undefined; + response?: SendMessageResponse | undefined; + serverEnvelope?: ServerEnvelope | undefined; +} +export interface SendMessageError { + message?: string | undefined; + to?: string | undefined; +} +export interface FirstMessage { + senderInfo?: SenderInfo | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: Subscription[] | undefined; +} +export interface SenderInfo { + readerKey?: string | undefined; + address?: string | undefined; +} +export interface SubscribeRequest { + subscriptions?: Subscription[] | undefined; +} +export interface SubscribeResponse { + succeeded?: string[] | undefined; + errors?: SubscribeError[] | undefined; +} +export interface SubscribeError { + state?: string | undefined; + message?: string | undefined; +} +export interface Subscription { + mailbox?: MailboxSubscription | undefined; + nefario?: NefarioSubscription | undefined; + changeDataCapture?: ChangeDataCaptureSubscription | undefined; + unsubscribe?: Unsubscribe | undefined; +} +export interface MailboxSubscription { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; +} +export interface ChangeDataCaptureSubscription { + id?: string | undefined; + state?: string | undefined; + matchers?: RecordMatcher[] | undefined; + startSeq?: string | undefined; +} +export interface RecordMatcher { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; +} +export interface NefarioSubscription { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; +} +export interface Unsubscribe { + id?: string | undefined; +} +export interface CreateMailboxRequest { + channels?: string[] | undefined; + privateMetadata?: { + [key: string]: any; + } | undefined; + publicMetadata?: { + [key: string]: any; + } | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: { + [key: string]: any; + } | undefined; +} +export interface CreateMailboxResponse { + adminKey?: string | undefined; + address?: string | undefined; + readerKey?: string | undefined; + channels?: string[] | undefined; +} +export interface AddChannelRequest { + adminKey?: string | undefined; + channels?: string[] | undefined; +} +export interface AddChannelResponse { +} +export declare const MessageFromClient: { + encode(message: MessageFromClient, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageFromClient; + fromJSON(object: any): MessageFromClient; + toJSON(message: MessageFromClient): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + firstMessage?: ({ + senderInfo?: { + readerKey?: string | undefined; + address?: string | undefined; + } | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + senderInfo?: ({ + readerKey?: string | undefined; + address?: string | undefined; + } & { + readerKey?: string | undefined; + address?: string | undefined; + } & { [K_10 in Exclude]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_13 in Exclude]: never; }) | undefined; + } & { [K_14 in Exclude]: never; })[] & { [K_15 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + } & { [K_18 in Exclude]: never; })[] & { [K_19 in Exclude]: never; }) | undefined; + } & { [K_20 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_23 in Exclude]: never; }) | undefined; + subscribeRequest?: ({ + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_24 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_25 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_26 in Exclude]: never; }) | undefined; + } & { [K_27 in Exclude]: never; })[] & { [K_28 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_29 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_30 in Exclude]: never; }) | undefined; + } & { [K_31 in Exclude]: never; })[] & { [K_32 in Exclude]: never; }) | undefined; + } & { [K_33 in Exclude]: never; }) | undefined; + } & { [K_34 in Exclude]: never; }>(base?: I): MessageFromClient; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_36 in Exclude]: never; }) | undefined; + } & { [K_37 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_38 in Exclude]: never; })[] & { [K_39 in Exclude]: never; }) | undefined; + } & { [K_40 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_41 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_42 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_43 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_44 in Exclude]: never; }) | undefined; + firstMessage?: ({ + senderInfo?: { + readerKey?: string | undefined; + address?: string | undefined; + } | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + senderInfo?: ({ + readerKey?: string | undefined; + address?: string | undefined; + } & { + readerKey?: string | undefined; + address?: string | undefined; + } & { [K_45 in Exclude]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_46 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_47 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_48 in Exclude]: never; }) | undefined; + } & { [K_49 in Exclude]: never; })[] & { [K_50 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_51 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_52 in Exclude]: never; }) | undefined; + } & { [K_53 in Exclude]: never; })[] & { [K_54 in Exclude]: never; }) | undefined; + } & { [K_55 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_56 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_57 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_58 in Exclude]: never; }) | undefined; + subscribeRequest?: ({ + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_59 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_60 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_61 in Exclude]: never; }) | undefined; + } & { [K_62 in Exclude]: never; })[] & { [K_63 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_64 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_65 in Exclude]: never; }) | undefined; + } & { [K_66 in Exclude]: never; })[] & { [K_67 in Exclude]: never; }) | undefined; + } & { [K_68 in Exclude]: never; }) | undefined; + } & { [K_69 in Exclude]: never; }>(object: I_1): MessageFromClient; +}; +export declare const Notification: { + encode(message: Notification, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Notification; + fromJSON(object: any): Notification; + toJSON(message: Notification): unknown; + create]: never; }>(base?: I): Notification; + fromPartial]: never; }>(object: I_1): Notification; +}; +export declare const MessageToClient: { + encode(message: MessageToClient, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageToClient; + fromJSON(object: any): MessageToClient; + toJSON(message: MessageToClient): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + sendMessageResponse?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_4 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + subscribeResponse?: ({ + succeeded?: string[] | undefined; + errors?: { + state?: string | undefined; + message?: string | undefined; + }[] | undefined; + } & { + succeeded?: (string[] & string[] & { [K_9 in Exclude]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + } & { [K_13 in Exclude]: never; }>(base?: I): MessageToClient; + fromPartial]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + sendMessageResponse?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_16 in Exclude]: never; })[] & { [K_17 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_18 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_19 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_20 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + subscribeResponse?: ({ + succeeded?: string[] | undefined; + errors?: { + state?: string | undefined; + message?: string | undefined; + }[] | undefined; + } & { + succeeded?: (string[] & string[] & { [K_23 in Exclude]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_24 in Exclude]: never; })[] & { [K_25 in Exclude]: never; }) | undefined; + } & { [K_26 in Exclude]: never; }) | undefined; + } & { [K_27 in Exclude]: never; }>(object: I_1): MessageToClient; +}; +export declare const Ping: { + encode(message: Ping, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Ping; + fromJSON(object: any): Ping; + toJSON(message: Ping): unknown; + create]: never; }>(base?: I): Ping; + fromPartial]: never; }>(object: I_1): Ping; +}; +export declare const Pong: { + encode(message: Pong, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Pong; + fromJSON(object: any): Pong; + toJSON(message: Pong): unknown; + create]: never; }>(base?: I): Pong; + fromPartial]: never; }>(object: I_1): Pong; +}; +export declare const MessageHeader: { + encode(message: MessageHeader, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageHeader; + fromJSON(object: any): MessageHeader; + toJSON(message: MessageHeader): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }>(base?: I): MessageHeader; + fromPartial]: never; }) | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_7 in Exclude]: never; })[] & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(object: I_1): MessageHeader; +}; +export declare const SenderEnvelope: { + encode(message: SenderEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SenderEnvelope; + fromJSON(object: any): SenderEnvelope; + toJSON(message: SenderEnvelope): unknown; + create]: never; }>(base?: I): SenderEnvelope; + fromPartial]: never; }>(object: I_1): SenderEnvelope; +}; +export declare const ServerEnvelope: { + encode(message: ServerEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ServerEnvelope; + fromJSON(object: any): ServerEnvelope; + toJSON(message: ServerEnvelope): unknown; + create]: never; }>(base?: I): ServerEnvelope; + fromPartial]: never; }>(object: I_1): ServerEnvelope; +}; +export declare const KeyValPair: { + encode(message: KeyValPair, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): KeyValPair; + fromJSON(object: any): KeyValPair; + toJSON(message: KeyValPair): unknown; + create]: never; }>(base?: I): KeyValPair; + fromPartial]: never; }>(object: I_1): KeyValPair; +}; +export declare const RpcHeader: { + encode(message: RpcHeader, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RpcHeader; + fromJSON(object: any): RpcHeader; + toJSON(message: RpcHeader): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): RpcHeader; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): RpcHeader; +}; +export declare const RpcErrorInfo: { + encode(message: RpcErrorInfo, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RpcErrorInfo; + fromJSON(object: any): RpcErrorInfo; + toJSON(message: RpcErrorInfo): unknown; + create]: never; }>(base?: I): RpcErrorInfo; + fromPartial]: never; }>(object: I_1): RpcErrorInfo; +}; +export declare const Message: { + encode(message: Message, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Message; + fromJSON(object: any): Message; + toJSON(message: Message): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_7 in Exclude]: never; }>(base?: I): Message; + fromPartial]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_15 in Exclude]: never; }>(object: I_1): Message; +}; +export declare const MessageEnvelope: { + encode(message: MessageEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageEnvelope; + fromJSON(object: any): MessageEnvelope; + toJSON(message: MessageEnvelope): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): MessageEnvelope; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): MessageEnvelope; +}; +export declare const SendMessageRequest: { + encode(message: SendMessageRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageRequest; + fromJSON(object: any): SendMessageRequest; + toJSON(message: SendMessageRequest): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }>(base?: I): SendMessageRequest; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_13 in Exclude]: never; })[] & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_19 in Exclude]: never; }>(object: I_1): SendMessageRequest; +}; +export declare const SendMessageResponse: { + encode(message: SendMessageResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageResponse; + fromJSON(object: any): SendMessageResponse; + toJSON(message: SendMessageResponse): unknown; + create]: never; })[] & { [K_1 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_2 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): SendMessageResponse; + fromPartial]: never; })[] & { [K_5 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_6 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): SendMessageResponse; +}; +export declare const SendReceipt: { + encode(message: SendReceipt, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendReceipt; + fromJSON(object: any): SendReceipt; + toJSON(message: SendReceipt): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + response?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_12 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }>(base?: I): SendReceipt; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_19 in Exclude]: never; })[] & { [K_20 in Exclude]: never; }) | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_23 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_24 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_25 in Exclude]: never; }) | undefined; + response?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_26 in Exclude]: never; })[] & { [K_27 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_28 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_29 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_30 in Exclude]: never; }) | undefined; + } & { [K_31 in Exclude]: never; }>(object: I_1): SendReceipt; +}; +export declare const SendMessageError: { + encode(message: SendMessageError, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageError; + fromJSON(object: any): SendMessageError; + toJSON(message: SendMessageError): unknown; + create]: never; }>(base?: I): SendMessageError; + fromPartial]: never; }>(object: I_1): SendMessageError; +}; +export declare const FirstMessage: { + encode(message: FirstMessage, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): FirstMessage; + fromJSON(object: any): FirstMessage; + toJSON(message: FirstMessage): unknown; + create]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; })[] & { [K_5 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + } & { [K_8 in Exclude]: never; })[] & { [K_9 in Exclude]: never; }) | undefined; + } & { [K_10 in Exclude]: never; }>(base?: I): FirstMessage; + fromPartial]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; })[] & { [K_16 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + } & { [K_19 in Exclude]: never; })[] & { [K_20 in Exclude]: never; }) | undefined; + } & { [K_21 in Exclude]: never; }>(object: I_1): FirstMessage; +}; +export declare const SenderInfo: { + encode(message: SenderInfo, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SenderInfo; + fromJSON(object: any): SenderInfo; + toJSON(message: SenderInfo): unknown; + create]: never; }>(base?: I): SenderInfo; + fromPartial]: never; }>(object: I_1): SenderInfo; +}; +export declare const SubscribeRequest: { + encode(message: SubscribeRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest; + fromJSON(object: any): SubscribeRequest; + toJSON(message: SubscribeRequest): unknown; + create]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; })[] & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(base?: I): SubscribeRequest; + fromPartial]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_12 in Exclude]: never; }) | undefined; + } & { [K_13 in Exclude]: never; })[] & { [K_14 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + } & { [K_17 in Exclude]: never; })[] & { [K_18 in Exclude]: never; }) | undefined; + } & { [K_19 in Exclude]: never; }>(object: I_1): SubscribeRequest; +}; +export declare const SubscribeResponse: { + encode(message: SubscribeResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeResponse; + fromJSON(object: any): SubscribeResponse; + toJSON(message: SubscribeResponse): unknown; + create]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_1 in Exclude]: never; })[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): SubscribeResponse; + fromPartial]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_5 in Exclude]: never; })[] & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): SubscribeResponse; +}; +export declare const SubscribeError: { + encode(message: SubscribeError, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeError; + fromJSON(object: any): SubscribeError; + toJSON(message: SubscribeError): unknown; + create]: never; }>(base?: I): SubscribeError; + fromPartial]: never; }>(object: I_1): SubscribeError; +}; +export declare const Subscription: { + encode(message: Subscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Subscription; + fromJSON(object: any): Subscription; + toJSON(message: Subscription): unknown; + create]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; }>(base?: I): Subscription; + fromPartial]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_10 in Exclude]: never; }) | undefined; + } & { [K_11 in Exclude]: never; })[] & { [K_12 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }>(object: I_1): Subscription; +}; +export declare const MailboxSubscription: { + encode(message: MailboxSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MailboxSubscription; + fromJSON(object: any): MailboxSubscription; + toJSON(message: MailboxSubscription): unknown; + create]: never; }>(base?: I): MailboxSubscription; + fromPartial]: never; }>(object: I_1): MailboxSubscription; +}; +export declare const ChangeDataCaptureSubscription: { + encode(message: ChangeDataCaptureSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChangeDataCaptureSubscription; + fromJSON(object: any): ChangeDataCaptureSubscription; + toJSON(message: ChangeDataCaptureSubscription): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; })[] & { [K_2 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): ChangeDataCaptureSubscription; + fromPartial]: never; }) | undefined; + } & { [K_5 in Exclude]: never; })[] & { [K_6 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): ChangeDataCaptureSubscription; +}; +export declare const RecordMatcher: { + encode(message: RecordMatcher, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RecordMatcher; + fromJSON(object: any): RecordMatcher; + toJSON(message: RecordMatcher): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): RecordMatcher; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): RecordMatcher; +}; +export declare const NefarioSubscription: { + encode(message: NefarioSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): NefarioSubscription; + fromJSON(object: any): NefarioSubscription; + toJSON(message: NefarioSubscription): unknown; + create]: never; }>(base?: I): NefarioSubscription; + fromPartial]: never; }>(object: I_1): NefarioSubscription; +}; +export declare const Unsubscribe: { + encode(message: Unsubscribe, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Unsubscribe; + fromJSON(object: any): Unsubscribe; + toJSON(message: Unsubscribe): unknown; + create]: never; }>(base?: I): Unsubscribe; + fromPartial]: never; }>(object: I_1): Unsubscribe; +}; +export declare const CreateMailboxRequest: { + encode(message: CreateMailboxRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): CreateMailboxRequest; + fromJSON(object: any): CreateMailboxRequest; + toJSON(message: CreateMailboxRequest): unknown; + create]: never; }) | undefined; + privateMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_1 in Exclude]: never; }) | undefined; + publicMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_2 in Exclude]: never; }) | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }>(base?: I): CreateMailboxRequest; + fromPartial]: never; }) | undefined; + privateMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_6 in Exclude]: never; }) | undefined; + publicMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_7 in Exclude]: never; }) | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(object: I_1): CreateMailboxRequest; +}; +export declare const CreateMailboxResponse: { + encode(message: CreateMailboxResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): CreateMailboxResponse; + fromJSON(object: any): CreateMailboxResponse; + toJSON(message: CreateMailboxResponse): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): CreateMailboxResponse; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): CreateMailboxResponse; +}; +export declare const AddChannelRequest: { + encode(message: AddChannelRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddChannelRequest; + fromJSON(object: any): AddChannelRequest; + toJSON(message: AddChannelRequest): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): AddChannelRequest; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): AddChannelRequest; +}; +export declare const AddChannelResponse: { + encode(_: AddChannelResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddChannelResponse; + fromJSON(_: any): AddChannelResponse; + toJSON(_: AddChannelResponse): unknown; + create]: never; }>(base?: I): AddChannelResponse; + fromPartial]: never; }>(_: I_1): AddChannelResponse; +}; +export interface HermesService { + SendReceive(request: Observable): Observable; + CreateMailbox(request: CreateMailboxRequest): Promise; + AddChannel(request: AddChannelRequest): Promise; +} +export declare const HermesServiceServiceName = "hermes.HermesService"; +export declare class HermesServiceClientImpl implements HermesService { + private readonly rpc; + private readonly service; + constructor(rpc: Rpc, opts?: { + service?: string; + }); + SendReceive(request: Observable): Observable; + CreateMailbox(request: CreateMailboxRequest): Promise; + AddChannel(request: AddChannelRequest): Promise; +} +interface Rpc { + request(service: string, method: string, data: Uint8Array): Promise; + clientStreamingRequest(service: string, method: string, data: Observable): Promise; + serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; + bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; +} +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P : P & { + [K in keyof P]: Exact; +} & { + [K in Exclude>]: never; +}; +export {}; diff --git a/lib/cjs/hermesclient/proto/wsmessages.js b/lib/cjs/hermesclient/proto/wsmessages.js new file mode 100644 index 0000000..7616e5f --- /dev/null +++ b/lib/cjs/hermesclient/proto/wsmessages.js @@ -0,0 +1,2914 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HermesServiceClientImpl = exports.HermesServiceServiceName = exports.AddChannelResponse = exports.AddChannelRequest = exports.CreateMailboxResponse = exports.CreateMailboxRequest = exports.Unsubscribe = exports.NefarioSubscription = exports.RecordMatcher = exports.ChangeDataCaptureSubscription = exports.MailboxSubscription = exports.Subscription = exports.SubscribeError = exports.SubscribeResponse = exports.SubscribeRequest = exports.SenderInfo = exports.FirstMessage = exports.SendMessageError = exports.SendReceipt = exports.SendMessageResponse = exports.SendMessageRequest = exports.MessageEnvelope = exports.Message = exports.RpcErrorInfo = exports.RpcHeader = exports.KeyValPair = exports.ServerEnvelope = exports.SenderEnvelope = exports.MessageHeader = exports.Pong = exports.Ping = exports.MessageToClient = exports.Notification = exports.MessageFromClient = exports.contentTypeToJSON = exports.contentTypeFromJSON = exports.ContentType = exports.rpcFrameTypeToJSON = exports.rpcFrameTypeFromJSON = exports.RpcFrameType = exports.protobufPackage = void 0; +/* eslint-disable */ +const _m0 = __importStar(require("protobufjs/minimal")); +const operators_1 = require("rxjs/operators"); +const struct_1 = require("../google/protobuf/struct"); +const long_1 = __importDefault(require("long")); +exports.protobufPackage = "hermes"; +var RpcFrameType; +(function (RpcFrameType) { + RpcFrameType[RpcFrameType["UnspecifiedRFT"] = 0] = "UnspecifiedRFT"; + RpcFrameType[RpcFrameType["Request"] = 1] = "Request"; + RpcFrameType[RpcFrameType["SuccessResponse"] = 2] = "SuccessResponse"; + RpcFrameType[RpcFrameType["ErrorResponse"] = 3] = "ErrorResponse"; + RpcFrameType[RpcFrameType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(RpcFrameType || (exports.RpcFrameType = RpcFrameType = {})); +function rpcFrameTypeFromJSON(object) { + switch (object) { + case 0: + case "UnspecifiedRFT": + return RpcFrameType.UnspecifiedRFT; + case 1: + case "Request": + return RpcFrameType.Request; + case 2: + case "SuccessResponse": + return RpcFrameType.SuccessResponse; + case 3: + case "ErrorResponse": + return RpcFrameType.ErrorResponse; + case -1: + case "UNRECOGNIZED": + default: + return RpcFrameType.UNRECOGNIZED; + } +} +exports.rpcFrameTypeFromJSON = rpcFrameTypeFromJSON; +function rpcFrameTypeToJSON(object) { + switch (object) { + case RpcFrameType.UnspecifiedRFT: + return "UnspecifiedRFT"; + case RpcFrameType.Request: + return "Request"; + case RpcFrameType.SuccessResponse: + return "SuccessResponse"; + case RpcFrameType.ErrorResponse: + return "ErrorResponse"; + case RpcFrameType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +exports.rpcFrameTypeToJSON = rpcFrameTypeToJSON; +var ContentType; +(function (ContentType) { + ContentType[ContentType["UnspecifiedCT"] = 0] = "UnspecifiedCT"; + ContentType[ContentType["Protobuf"] = 1] = "Protobuf"; + ContentType[ContentType["Json"] = 2] = "Json"; + ContentType[ContentType["Binary"] = 3] = "Binary"; + ContentType[ContentType["Text"] = 4] = "Text"; + ContentType[ContentType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(ContentType || (exports.ContentType = ContentType = {})); +function contentTypeFromJSON(object) { + switch (object) { + case 0: + case "UnspecifiedCT": + return ContentType.UnspecifiedCT; + case 1: + case "Protobuf": + return ContentType.Protobuf; + case 2: + case "Json": + return ContentType.Json; + case 3: + case "Binary": + return ContentType.Binary; + case 4: + case "Text": + return ContentType.Text; + case -1: + case "UNRECOGNIZED": + default: + return ContentType.UNRECOGNIZED; + } +} +exports.contentTypeFromJSON = contentTypeFromJSON; +function contentTypeToJSON(object) { + switch (object) { + case ContentType.UnspecifiedCT: + return "UnspecifiedCT"; + case ContentType.Protobuf: + return "Protobuf"; + case ContentType.Json: + return "Json"; + case ContentType.Binary: + return "Binary"; + case ContentType.Text: + return "Text"; + case ContentType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +exports.contentTypeToJSON = contentTypeToJSON; +function createBaseMessageFromClient() { + return { + sendMessageRequest: undefined, + firstMessage: undefined, + ping: undefined, + pong: undefined, + notification: undefined, + subscribeRequest: undefined, + }; +} +exports.MessageFromClient = { + encode(message, writer = _m0.Writer.create()) { + if (message.sendMessageRequest !== undefined) { + exports.SendMessageRequest.encode(message.sendMessageRequest, writer.uint32(10).fork()).ldelim(); + } + if (message.firstMessage !== undefined) { + exports.FirstMessage.encode(message.firstMessage, writer.uint32(18).fork()).ldelim(); + } + if (message.ping !== undefined) { + exports.Ping.encode(message.ping, writer.uint32(26).fork()).ldelim(); + } + if (message.pong !== undefined) { + exports.Pong.encode(message.pong, writer.uint32(34).fork()).ldelim(); + } + if (message.notification !== undefined) { + exports.Notification.encode(message.notification, writer.uint32(42).fork()).ldelim(); + } + if (message.subscribeRequest !== undefined) { + exports.SubscribeRequest.encode(message.subscribeRequest, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageFromClient(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.sendMessageRequest = exports.SendMessageRequest.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.firstMessage = exports.FirstMessage.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.ping = exports.Ping.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.pong = exports.Pong.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + message.notification = exports.Notification.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.subscribeRequest = exports.SubscribeRequest.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sendMessageRequest: isSet(object.sendMessageRequest) + ? exports.SendMessageRequest.fromJSON(object.sendMessageRequest) + : undefined, + firstMessage: isSet(object.firstMessage) ? exports.FirstMessage.fromJSON(object.firstMessage) : undefined, + ping: isSet(object.ping) ? exports.Ping.fromJSON(object.ping) : undefined, + pong: isSet(object.pong) ? exports.Pong.fromJSON(object.pong) : undefined, + notification: isSet(object.notification) ? exports.Notification.fromJSON(object.notification) : undefined, + subscribeRequest: isSet(object.subscribeRequest) ? exports.SubscribeRequest.fromJSON(object.subscribeRequest) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.sendMessageRequest !== undefined) { + obj.sendMessageRequest = exports.SendMessageRequest.toJSON(message.sendMessageRequest); + } + if (message.firstMessage !== undefined) { + obj.firstMessage = exports.FirstMessage.toJSON(message.firstMessage); + } + if (message.ping !== undefined) { + obj.ping = exports.Ping.toJSON(message.ping); + } + if (message.pong !== undefined) { + obj.pong = exports.Pong.toJSON(message.pong); + } + if (message.notification !== undefined) { + obj.notification = exports.Notification.toJSON(message.notification); + } + if (message.subscribeRequest !== undefined) { + obj.subscribeRequest = exports.SubscribeRequest.toJSON(message.subscribeRequest); + } + return obj; + }, + create(base) { + return exports.MessageFromClient.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseMessageFromClient(); + message.sendMessageRequest = (object.sendMessageRequest !== undefined && object.sendMessageRequest !== null) + ? exports.SendMessageRequest.fromPartial(object.sendMessageRequest) + : undefined; + message.firstMessage = (object.firstMessage !== undefined && object.firstMessage !== null) + ? exports.FirstMessage.fromPartial(object.firstMessage) + : undefined; + message.ping = (object.ping !== undefined && object.ping !== null) ? exports.Ping.fromPartial(object.ping) : undefined; + message.pong = (object.pong !== undefined && object.pong !== null) ? exports.Pong.fromPartial(object.pong) : undefined; + message.notification = (object.notification !== undefined && object.notification !== null) + ? exports.Notification.fromPartial(object.notification) + : undefined; + message.subscribeRequest = (object.subscribeRequest !== undefined && object.subscribeRequest !== null) + ? exports.SubscribeRequest.fromPartial(object.subscribeRequest) + : undefined; + return message; + }, +}; +function createBaseNotification() { + return { message: "" }; +} +exports.Notification = { + encode(message, writer = _m0.Writer.create()) { + if (message.message !== undefined && message.message !== "") { + writer.uint32(10).string(message.message); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNotification(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { message: isSet(object.message) ? globalThis.String(object.message) : "" }; + }, + toJSON(message) { + const obj = {}; + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + return obj; + }, + create(base) { + return exports.Notification.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseNotification(); + message.message = (_a = object.message) !== null && _a !== void 0 ? _a : ""; + return message; + }, +}; +function createBaseMessageToClient() { + return { + messageEnvelope: undefined, + sendMessageResponse: undefined, + ping: undefined, + pong: undefined, + notification: undefined, + subscribeResponse: undefined, + }; +} +exports.MessageToClient = { + encode(message, writer = _m0.Writer.create()) { + if (message.messageEnvelope !== undefined) { + exports.MessageEnvelope.encode(message.messageEnvelope, writer.uint32(10).fork()).ldelim(); + } + if (message.sendMessageResponse !== undefined) { + exports.SendMessageResponse.encode(message.sendMessageResponse, writer.uint32(18).fork()).ldelim(); + } + if (message.ping !== undefined) { + exports.Ping.encode(message.ping, writer.uint32(26).fork()).ldelim(); + } + if (message.pong !== undefined) { + exports.Pong.encode(message.pong, writer.uint32(34).fork()).ldelim(); + } + if (message.notification !== undefined) { + exports.Notification.encode(message.notification, writer.uint32(42).fork()).ldelim(); + } + if (message.subscribeResponse !== undefined) { + exports.SubscribeResponse.encode(message.subscribeResponse, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageToClient(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.messageEnvelope = exports.MessageEnvelope.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.sendMessageResponse = exports.SendMessageResponse.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.ping = exports.Ping.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.pong = exports.Pong.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + message.notification = exports.Notification.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.subscribeResponse = exports.SubscribeResponse.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + messageEnvelope: isSet(object.messageEnvelope) ? exports.MessageEnvelope.fromJSON(object.messageEnvelope) : undefined, + sendMessageResponse: isSet(object.sendMessageResponse) + ? exports.SendMessageResponse.fromJSON(object.sendMessageResponse) + : undefined, + ping: isSet(object.ping) ? exports.Ping.fromJSON(object.ping) : undefined, + pong: isSet(object.pong) ? exports.Pong.fromJSON(object.pong) : undefined, + notification: isSet(object.notification) ? exports.Notification.fromJSON(object.notification) : undefined, + subscribeResponse: isSet(object.subscribeResponse) + ? exports.SubscribeResponse.fromJSON(object.subscribeResponse) + : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.messageEnvelope !== undefined) { + obj.messageEnvelope = exports.MessageEnvelope.toJSON(message.messageEnvelope); + } + if (message.sendMessageResponse !== undefined) { + obj.sendMessageResponse = exports.SendMessageResponse.toJSON(message.sendMessageResponse); + } + if (message.ping !== undefined) { + obj.ping = exports.Ping.toJSON(message.ping); + } + if (message.pong !== undefined) { + obj.pong = exports.Pong.toJSON(message.pong); + } + if (message.notification !== undefined) { + obj.notification = exports.Notification.toJSON(message.notification); + } + if (message.subscribeResponse !== undefined) { + obj.subscribeResponse = exports.SubscribeResponse.toJSON(message.subscribeResponse); + } + return obj; + }, + create(base) { + return exports.MessageToClient.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseMessageToClient(); + message.messageEnvelope = (object.messageEnvelope !== undefined && object.messageEnvelope !== null) + ? exports.MessageEnvelope.fromPartial(object.messageEnvelope) + : undefined; + message.sendMessageResponse = (object.sendMessageResponse !== undefined && object.sendMessageResponse !== null) + ? exports.SendMessageResponse.fromPartial(object.sendMessageResponse) + : undefined; + message.ping = (object.ping !== undefined && object.ping !== null) ? exports.Ping.fromPartial(object.ping) : undefined; + message.pong = (object.pong !== undefined && object.pong !== null) ? exports.Pong.fromPartial(object.pong) : undefined; + message.notification = (object.notification !== undefined && object.notification !== null) + ? exports.Notification.fromPartial(object.notification) + : undefined; + message.subscribeResponse = (object.subscribeResponse !== undefined && object.subscribeResponse !== null) + ? exports.SubscribeResponse.fromPartial(object.subscribeResponse) + : undefined; + return message; + }, +}; +function createBasePing() { + return { payload: new Uint8Array(0) }; +} +exports.Ping = { + encode(message, writer = _m0.Writer.create()) { + if (message.payload !== undefined && message.payload.length !== 0) { + writer.uint32(10).bytes(message.payload); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePing(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) }; + }, + toJSON(message) { + const obj = {}; + if (message.payload !== undefined && message.payload.length !== 0) { + obj.payload = base64FromBytes(message.payload); + } + return obj; + }, + create(base) { + return exports.Ping.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBasePing(); + message.payload = (_a = object.payload) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBasePong() { + return { payload: new Uint8Array(0) }; +} +exports.Pong = { + encode(message, writer = _m0.Writer.create()) { + if (message.payload !== undefined && message.payload.length !== 0) { + writer.uint32(10).bytes(message.payload); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePong(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) }; + }, + toJSON(message) { + const obj = {}; + if (message.payload !== undefined && message.payload.length !== 0) { + obj.payload = base64FromBytes(message.payload); + } + return obj; + }, + create(base) { + return exports.Pong.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBasePong(); + message.payload = (_a = object.payload) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBaseMessageHeader() { + return { sender: "", contentType: 0, rpcHeader: undefined, senderSequence: 0, extraHeaders: [] }; +} +exports.MessageHeader = { + encode(message, writer = _m0.Writer.create()) { + if (message.sender !== undefined && message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contentType !== undefined && message.contentType !== 0) { + writer.uint32(16).int32(message.contentType); + } + if (message.rpcHeader !== undefined) { + exports.RpcHeader.encode(message.rpcHeader, writer.uint32(26).fork()).ldelim(); + } + if (message.senderSequence !== undefined && message.senderSequence !== 0) { + writer.uint32(32).int64(message.senderSequence); + } + if (message.extraHeaders !== undefined && message.extraHeaders.length !== 0) { + for (const v of message.extraHeaders) { + exports.KeyValPair.encode(v, writer.uint32(1602).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageHeader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.sender = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + message.contentType = reader.int32(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.rpcHeader = exports.RpcHeader.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 32) { + break; + } + message.senderSequence = longToNumber(reader.int64()); + continue; + case 200: + if (tag !== 1602) { + break; + } + message.extraHeaders.push(exports.KeyValPair.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sender: isSet(object.sender) ? globalThis.String(object.sender) : "", + contentType: isSet(object.contentType) ? contentTypeFromJSON(object.contentType) : 0, + rpcHeader: isSet(object.rpcHeader) ? exports.RpcHeader.fromJSON(object.rpcHeader) : undefined, + senderSequence: isSet(object.senderSequence) ? globalThis.Number(object.senderSequence) : 0, + extraHeaders: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.extraHeaders) + ? object.extraHeaders.map((e) => exports.KeyValPair.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.sender !== undefined && message.sender !== "") { + obj.sender = message.sender; + } + if (message.contentType !== undefined && message.contentType !== 0) { + obj.contentType = contentTypeToJSON(message.contentType); + } + if (message.rpcHeader !== undefined) { + obj.rpcHeader = exports.RpcHeader.toJSON(message.rpcHeader); + } + if (message.senderSequence !== undefined && message.senderSequence !== 0) { + obj.senderSequence = Math.round(message.senderSequence); + } + if ((_a = message.extraHeaders) === null || _a === void 0 ? void 0 : _a.length) { + obj.extraHeaders = message.extraHeaders.map((e) => exports.KeyValPair.toJSON(e)); + } + return obj; + }, + create(base) { + return exports.MessageHeader.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseMessageHeader(); + message.sender = (_a = object.sender) !== null && _a !== void 0 ? _a : ""; + message.contentType = (_b = object.contentType) !== null && _b !== void 0 ? _b : 0; + message.rpcHeader = (object.rpcHeader !== undefined && object.rpcHeader !== null) + ? exports.RpcHeader.fromPartial(object.rpcHeader) + : undefined; + message.senderSequence = (_c = object.senderSequence) !== null && _c !== void 0 ? _c : 0; + message.extraHeaders = ((_d = object.extraHeaders) === null || _d === void 0 ? void 0 : _d.map((e) => exports.KeyValPair.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSenderEnvelope() { + return { created: 0 }; +} +exports.SenderEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.created !== undefined && message.created !== 0) { + writer.uint32(8).int64(message.created); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSenderEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.created = longToNumber(reader.int64()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { created: isSet(object.created) ? globalThis.Number(object.created) : 0 }; + }, + toJSON(message) { + const obj = {}; + if (message.created !== undefined && message.created !== 0) { + obj.created = Math.round(message.created); + } + return obj; + }, + create(base) { + return exports.SenderEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseSenderEnvelope(); + message.created = (_a = object.created) !== null && _a !== void 0 ? _a : 0; + return message; + }, +}; +function createBaseServerEnvelope() { + return { sequence: 0, created: 0, channel: "", subscriptionId: "" }; +} +exports.ServerEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.sequence !== undefined && message.sequence !== 0) { + writer.uint32(8).uint64(message.sequence); + } + if (message.created !== undefined && message.created !== 0) { + writer.uint32(16).int64(message.created); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(26).string(message.channel); + } + if (message.subscriptionId !== undefined && message.subscriptionId !== "") { + writer.uint32(34).string(message.subscriptionId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.sequence = longToNumber(reader.uint64()); + continue; + case 2: + if (tag !== 16) { + break; + } + message.created = longToNumber(reader.int64()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.channel = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.subscriptionId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0, + created: isSet(object.created) ? globalThis.Number(object.created) : 0, + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + subscriptionId: isSet(object.subscriptionId) ? globalThis.String(object.subscriptionId) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.sequence !== undefined && message.sequence !== 0) { + obj.sequence = Math.round(message.sequence); + } + if (message.created !== undefined && message.created !== 0) { + obj.created = Math.round(message.created); + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.subscriptionId !== undefined && message.subscriptionId !== "") { + obj.subscriptionId = message.subscriptionId; + } + return obj; + }, + create(base) { + return exports.ServerEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseServerEnvelope(); + message.sequence = (_a = object.sequence) !== null && _a !== void 0 ? _a : 0; + message.created = (_b = object.created) !== null && _b !== void 0 ? _b : 0; + message.channel = (_c = object.channel) !== null && _c !== void 0 ? _c : ""; + message.subscriptionId = (_d = object.subscriptionId) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseKeyValPair() { + return { key: "", val: "" }; +} +exports.KeyValPair = { + encode(message, writer = _m0.Writer.create()) { + if (message.key !== undefined && message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.val !== undefined && message.val !== "") { + writer.uint32(18).string(message.val); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseKeyValPair(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.val = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + val: isSet(object.val) ? globalThis.String(object.val) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.key !== undefined && message.key !== "") { + obj.key = message.key; + } + if (message.val !== undefined && message.val !== "") { + obj.val = message.val; + } + return obj; + }, + create(base) { + return exports.KeyValPair.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseKeyValPair(); + message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; + message.val = (_b = object.val) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseRpcHeader() { + return { correlationId: "", endPoint: "", frameType: 0, errorInfo: undefined }; +} +exports.RpcHeader = { + encode(message, writer = _m0.Writer.create()) { + if (message.correlationId !== undefined && message.correlationId !== "") { + writer.uint32(18).string(message.correlationId); + } + if (message.endPoint !== undefined && message.endPoint !== "") { + writer.uint32(26).string(message.endPoint); + } + if (message.frameType !== undefined && message.frameType !== 0) { + writer.uint32(32).int32(message.frameType); + } + if (message.errorInfo !== undefined) { + exports.RpcErrorInfo.encode(message.errorInfo, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRpcHeader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + message.correlationId = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.endPoint = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + message.frameType = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.errorInfo = exports.RpcErrorInfo.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + correlationId: isSet(object.correlationId) ? globalThis.String(object.correlationId) : "", + endPoint: isSet(object.endPoint) ? globalThis.String(object.endPoint) : "", + frameType: isSet(object.frameType) ? rpcFrameTypeFromJSON(object.frameType) : 0, + errorInfo: isSet(object.errorInfo) ? exports.RpcErrorInfo.fromJSON(object.errorInfo) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.correlationId !== undefined && message.correlationId !== "") { + obj.correlationId = message.correlationId; + } + if (message.endPoint !== undefined && message.endPoint !== "") { + obj.endPoint = message.endPoint; + } + if (message.frameType !== undefined && message.frameType !== 0) { + obj.frameType = rpcFrameTypeToJSON(message.frameType); + } + if (message.errorInfo !== undefined) { + obj.errorInfo = exports.RpcErrorInfo.toJSON(message.errorInfo); + } + return obj; + }, + create(base) { + return exports.RpcHeader.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRpcHeader(); + message.correlationId = (_a = object.correlationId) !== null && _a !== void 0 ? _a : ""; + message.endPoint = (_b = object.endPoint) !== null && _b !== void 0 ? _b : ""; + message.frameType = (_c = object.frameType) !== null && _c !== void 0 ? _c : 0; + message.errorInfo = (object.errorInfo !== undefined && object.errorInfo !== null) + ? exports.RpcErrorInfo.fromPartial(object.errorInfo) + : undefined; + return message; + }, +}; +function createBaseRpcErrorInfo() { + return { errorCode: 0, message: "", stackTrace: "" }; +} +exports.RpcErrorInfo = { + encode(message, writer = _m0.Writer.create()) { + if (message.errorCode !== undefined && message.errorCode !== 0) { + writer.uint32(8).uint32(message.errorCode); + } + if (message.message !== undefined && message.message !== "") { + writer.uint32(18).string(message.message); + } + if (message.stackTrace !== undefined && message.stackTrace !== "") { + writer.uint32(26).string(message.stackTrace); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRpcErrorInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.errorCode = reader.uint32(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.message = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.stackTrace = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + errorCode: isSet(object.errorCode) ? globalThis.Number(object.errorCode) : 0, + message: isSet(object.message) ? globalThis.String(object.message) : "", + stackTrace: isSet(object.stackTrace) ? globalThis.String(object.stackTrace) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.errorCode !== undefined && message.errorCode !== 0) { + obj.errorCode = Math.round(message.errorCode); + } + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + if (message.stackTrace !== undefined && message.stackTrace !== "") { + obj.stackTrace = message.stackTrace; + } + return obj; + }, + create(base) { + return exports.RpcErrorInfo.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRpcErrorInfo(); + message.errorCode = (_a = object.errorCode) !== null && _a !== void 0 ? _a : 0; + message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; + message.stackTrace = (_c = object.stackTrace) !== null && _c !== void 0 ? _c : ""; + return message; + }, +}; +function createBaseMessage() { + return { header: undefined, senderEnvelope: undefined, serverEnvelope: undefined, data: new Uint8Array(0) }; +} +exports.Message = { + encode(message, writer = _m0.Writer.create()) { + if (message.header !== undefined) { + exports.MessageHeader.encode(message.header, writer.uint32(10).fork()).ldelim(); + } + if (message.senderEnvelope !== undefined) { + exports.SenderEnvelope.encode(message.senderEnvelope, writer.uint32(18).fork()).ldelim(); + } + if (message.serverEnvelope !== undefined) { + exports.ServerEnvelope.encode(message.serverEnvelope, writer.uint32(26).fork()).ldelim(); + } + if (message.data !== undefined && message.data.length !== 0) { + writer.uint32(34).bytes(message.data); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessage(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.header = exports.MessageHeader.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.senderEnvelope = exports.SenderEnvelope.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.serverEnvelope = exports.ServerEnvelope.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.data = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + header: isSet(object.header) ? exports.MessageHeader.fromJSON(object.header) : undefined, + senderEnvelope: isSet(object.senderEnvelope) ? exports.SenderEnvelope.fromJSON(object.senderEnvelope) : undefined, + serverEnvelope: isSet(object.serverEnvelope) ? exports.ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), + }; + }, + toJSON(message) { + const obj = {}; + if (message.header !== undefined) { + obj.header = exports.MessageHeader.toJSON(message.header); + } + if (message.senderEnvelope !== undefined) { + obj.senderEnvelope = exports.SenderEnvelope.toJSON(message.senderEnvelope); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = exports.ServerEnvelope.toJSON(message.serverEnvelope); + } + if (message.data !== undefined && message.data.length !== 0) { + obj.data = base64FromBytes(message.data); + } + return obj; + }, + create(base) { + return exports.Message.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseMessage(); + message.header = (object.header !== undefined && object.header !== null) + ? exports.MessageHeader.fromPartial(object.header) + : undefined; + message.senderEnvelope = (object.senderEnvelope !== undefined && object.senderEnvelope !== null) + ? exports.SenderEnvelope.fromPartial(object.senderEnvelope) + : undefined; + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? exports.ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + message.data = (_a = object.data) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBaseMessageEnvelope() { + return { messageBytes: new Uint8Array(0), serverEnvelope: undefined }; +} +exports.MessageEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.messageBytes !== undefined && message.messageBytes.length !== 0) { + writer.uint32(10).bytes(message.messageBytes); + } + if (message.serverEnvelope !== undefined) { + exports.ServerEnvelope.encode(message.serverEnvelope, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.messageBytes = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.serverEnvelope = exports.ServerEnvelope.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + messageBytes: isSet(object.messageBytes) ? bytesFromBase64(object.messageBytes) : new Uint8Array(0), + serverEnvelope: isSet(object.serverEnvelope) ? exports.ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.messageBytes !== undefined && message.messageBytes.length !== 0) { + obj.messageBytes = base64FromBytes(message.messageBytes); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = exports.ServerEnvelope.toJSON(message.serverEnvelope); + } + return obj; + }, + create(base) { + return exports.MessageEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseMessageEnvelope(); + message.messageBytes = (_a = object.messageBytes) !== null && _a !== void 0 ? _a : new Uint8Array(0); + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? exports.ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + return message; + }, +}; +function createBaseSendMessageRequest() { + return { to: [], message: undefined, channel: "", idempotentId: "" }; +} +exports.SendMessageRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.to !== undefined && message.to.length !== 0) { + for (const v of message.to) { + writer.uint32(10).string(v); + } + } + if (message.message !== undefined) { + exports.Message.encode(message.message, writer.uint32(18).fork()).ldelim(); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(26).string(message.channel); + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + writer.uint32(34).string(message.idempotentId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.to.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.message = exports.Message.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.channel = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.idempotentId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + to: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.to) ? object.to.map((e) => globalThis.String(e)) : [], + message: isSet(object.message) ? exports.Message.fromJSON(object.message) : undefined, + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + idempotentId: isSet(object.idempotentId) ? globalThis.String(object.idempotentId) : "", + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.to) === null || _a === void 0 ? void 0 : _a.length) { + obj.to = message.to; + } + if (message.message !== undefined) { + obj.message = exports.Message.toJSON(message.message); + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + obj.idempotentId = message.idempotentId; + } + return obj; + }, + create(base) { + return exports.SendMessageRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseSendMessageRequest(); + message.to = ((_a = object.to) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.message = (object.message !== undefined && object.message !== null) + ? exports.Message.fromPartial(object.message) + : undefined; + message.channel = (_b = object.channel) !== null && _b !== void 0 ? _b : ""; + message.idempotentId = (_c = object.idempotentId) !== null && _c !== void 0 ? _c : ""; + return message; + }, +}; +function createBaseSendMessageResponse() { + return { errors: [], duplicates: [], idempotentId: "", correlationId: "" }; +} +exports.SendMessageResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.errors !== undefined && message.errors.length !== 0) { + for (const v of message.errors) { + exports.SendMessageError.encode(v, writer.uint32(10).fork()).ldelim(); + } + } + if (message.duplicates !== undefined && message.duplicates.length !== 0) { + for (const v of message.duplicates) { + writer.uint32(18).string(v); + } + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + writer.uint32(26).string(message.idempotentId); + } + if (message.correlationId !== undefined && message.correlationId !== "") { + writer.uint32(34).string(message.correlationId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.errors.push(exports.SendMessageError.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 18) { + break; + } + message.duplicates.push(reader.string()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.idempotentId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.correlationId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + errors: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.errors) + ? object.errors.map((e) => exports.SendMessageError.fromJSON(e)) + : [], + duplicates: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.duplicates) + ? object.duplicates.map((e) => globalThis.String(e)) + : [], + idempotentId: isSet(object.idempotentId) ? globalThis.String(object.idempotentId) : "", + correlationId: isSet(object.correlationId) ? globalThis.String(object.correlationId) : "", + }; + }, + toJSON(message) { + var _a, _b; + const obj = {}; + if ((_a = message.errors) === null || _a === void 0 ? void 0 : _a.length) { + obj.errors = message.errors.map((e) => exports.SendMessageError.toJSON(e)); + } + if ((_b = message.duplicates) === null || _b === void 0 ? void 0 : _b.length) { + obj.duplicates = message.duplicates; + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + obj.idempotentId = message.idempotentId; + } + if (message.correlationId !== undefined && message.correlationId !== "") { + obj.correlationId = message.correlationId; + } + return obj; + }, + create(base) { + return exports.SendMessageResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseSendMessageResponse(); + message.errors = ((_a = object.errors) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SendMessageError.fromPartial(e))) || []; + message.duplicates = ((_b = object.duplicates) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || []; + message.idempotentId = (_c = object.idempotentId) !== null && _c !== void 0 ? _c : ""; + message.correlationId = (_d = object.correlationId) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseSendReceipt() { + return { request: undefined, response: undefined, serverEnvelope: undefined }; +} +exports.SendReceipt = { + encode(message, writer = _m0.Writer.create()) { + if (message.request !== undefined) { + exports.SendMessageRequest.encode(message.request, writer.uint32(10).fork()).ldelim(); + } + if (message.response !== undefined) { + exports.SendMessageResponse.encode(message.response, writer.uint32(18).fork()).ldelim(); + } + if (message.serverEnvelope !== undefined) { + exports.ServerEnvelope.encode(message.serverEnvelope, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendReceipt(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.request = exports.SendMessageRequest.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.response = exports.SendMessageResponse.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.serverEnvelope = exports.ServerEnvelope.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + request: isSet(object.request) ? exports.SendMessageRequest.fromJSON(object.request) : undefined, + response: isSet(object.response) ? exports.SendMessageResponse.fromJSON(object.response) : undefined, + serverEnvelope: isSet(object.serverEnvelope) ? exports.ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.request !== undefined) { + obj.request = exports.SendMessageRequest.toJSON(message.request); + } + if (message.response !== undefined) { + obj.response = exports.SendMessageResponse.toJSON(message.response); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = exports.ServerEnvelope.toJSON(message.serverEnvelope); + } + return obj; + }, + create(base) { + return exports.SendReceipt.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseSendReceipt(); + message.request = (object.request !== undefined && object.request !== null) + ? exports.SendMessageRequest.fromPartial(object.request) + : undefined; + message.response = (object.response !== undefined && object.response !== null) + ? exports.SendMessageResponse.fromPartial(object.response) + : undefined; + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? exports.ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + return message; + }, +}; +function createBaseSendMessageError() { + return { message: "", to: "" }; +} +exports.SendMessageError = { + encode(message, writer = _m0.Writer.create()) { + if (message.message !== undefined && message.message !== "") { + writer.uint32(10).string(message.message); + } + if (message.to !== undefined && message.to !== "") { + writer.uint32(18).string(message.to); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageError(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.message = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.to = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + message: isSet(object.message) ? globalThis.String(object.message) : "", + to: isSet(object.to) ? globalThis.String(object.to) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + if (message.to !== undefined && message.to !== "") { + obj.to = message.to; + } + return obj; + }, + create(base) { + return exports.SendMessageError.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSendMessageError(); + message.message = (_a = object.message) !== null && _a !== void 0 ? _a : ""; + message.to = (_b = object.to) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseFirstMessage() { + return { senderInfo: undefined, mailboxTimeoutInMs: 0, subscriptions: [] }; +} +exports.FirstMessage = { + encode(message, writer = _m0.Writer.create()) { + if (message.senderInfo !== undefined) { + exports.SenderInfo.encode(message.senderInfo, writer.uint32(10).fork()).ldelim(); + } + if (message.mailboxTimeoutInMs !== undefined && message.mailboxTimeoutInMs !== 0) { + writer.uint32(16).uint32(message.mailboxTimeoutInMs); + } + if (message.subscriptions !== undefined && message.subscriptions.length !== 0) { + for (const v of message.subscriptions) { + exports.Subscription.encode(v, writer.uint32(26).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFirstMessage(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.senderInfo = exports.SenderInfo.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 16) { + break; + } + message.mailboxTimeoutInMs = reader.uint32(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.subscriptions.push(exports.Subscription.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + senderInfo: isSet(object.senderInfo) ? exports.SenderInfo.fromJSON(object.senderInfo) : undefined, + mailboxTimeoutInMs: isSet(object.mailboxTimeoutInMs) ? globalThis.Number(object.mailboxTimeoutInMs) : 0, + subscriptions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.subscriptions) + ? object.subscriptions.map((e) => exports.Subscription.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.senderInfo !== undefined) { + obj.senderInfo = exports.SenderInfo.toJSON(message.senderInfo); + } + if (message.mailboxTimeoutInMs !== undefined && message.mailboxTimeoutInMs !== 0) { + obj.mailboxTimeoutInMs = Math.round(message.mailboxTimeoutInMs); + } + if ((_a = message.subscriptions) === null || _a === void 0 ? void 0 : _a.length) { + obj.subscriptions = message.subscriptions.map((e) => exports.Subscription.toJSON(e)); + } + return obj; + }, + create(base) { + return exports.FirstMessage.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseFirstMessage(); + message.senderInfo = (object.senderInfo !== undefined && object.senderInfo !== null) + ? exports.SenderInfo.fromPartial(object.senderInfo) + : undefined; + message.mailboxTimeoutInMs = (_a = object.mailboxTimeoutInMs) !== null && _a !== void 0 ? _a : 0; + message.subscriptions = ((_b = object.subscriptions) === null || _b === void 0 ? void 0 : _b.map((e) => exports.Subscription.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSenderInfo() { + return { readerKey: "", address: "" }; +} +exports.SenderInfo = { + encode(message, writer = _m0.Writer.create()) { + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(10).string(message.readerKey); + } + if (message.address !== undefined && message.address !== "") { + writer.uint32(18).string(message.address); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSenderInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.readerKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.address = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + address: isSet(object.address) ? globalThis.String(object.address) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if (message.address !== undefined && message.address !== "") { + obj.address = message.address; + } + return obj; + }, + create(base) { + return exports.SenderInfo.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSenderInfo(); + message.readerKey = (_a = object.readerKey) !== null && _a !== void 0 ? _a : ""; + message.address = (_b = object.address) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseSubscribeRequest() { + return { subscriptions: [] }; +} +exports.SubscribeRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.subscriptions !== undefined && message.subscriptions.length !== 0) { + for (const v of message.subscriptions) { + exports.Subscription.encode(v, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.subscriptions.push(exports.Subscription.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + subscriptions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.subscriptions) + ? object.subscriptions.map((e) => exports.Subscription.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.subscriptions) === null || _a === void 0 ? void 0 : _a.length) { + obj.subscriptions = message.subscriptions.map((e) => exports.Subscription.toJSON(e)); + } + return obj; + }, + create(base) { + return exports.SubscribeRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseSubscribeRequest(); + message.subscriptions = ((_a = object.subscriptions) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Subscription.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSubscribeResponse() { + return { succeeded: [], errors: [] }; +} +exports.SubscribeResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.succeeded !== undefined && message.succeeded.length !== 0) { + for (const v of message.succeeded) { + writer.uint32(10).string(v); + } + } + if (message.errors !== undefined && message.errors.length !== 0) { + for (const v of message.errors) { + exports.SubscribeError.encode(v, writer.uint32(18).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.succeeded.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.errors.push(exports.SubscribeError.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + succeeded: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.succeeded) + ? object.succeeded.map((e) => globalThis.String(e)) + : [], + errors: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.errors) ? object.errors.map((e) => exports.SubscribeError.fromJSON(e)) : [], + }; + }, + toJSON(message) { + var _a, _b; + const obj = {}; + if ((_a = message.succeeded) === null || _a === void 0 ? void 0 : _a.length) { + obj.succeeded = message.succeeded; + } + if ((_b = message.errors) === null || _b === void 0 ? void 0 : _b.length) { + obj.errors = message.errors.map((e) => exports.SubscribeError.toJSON(e)); + } + return obj; + }, + create(base) { + return exports.SubscribeResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSubscribeResponse(); + message.succeeded = ((_a = object.succeeded) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.errors = ((_b = object.errors) === null || _b === void 0 ? void 0 : _b.map((e) => exports.SubscribeError.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSubscribeError() { + return { state: "", message: "" }; +} +exports.SubscribeError = { + encode(message, writer = _m0.Writer.create()) { + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.message !== undefined && message.message !== "") { + writer.uint32(26).string(message.message); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeError(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + state: isSet(object.state) ? globalThis.String(object.state) : "", + message: isSet(object.message) ? globalThis.String(object.message) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + return obj; + }, + create(base) { + return exports.SubscribeError.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSubscribeError(); + message.state = (_a = object.state) !== null && _a !== void 0 ? _a : ""; + message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseSubscription() { + return { mailbox: undefined, nefario: undefined, changeDataCapture: undefined, unsubscribe: undefined }; +} +exports.Subscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.mailbox !== undefined) { + exports.MailboxSubscription.encode(message.mailbox, writer.uint32(10).fork()).ldelim(); + } + if (message.nefario !== undefined) { + exports.NefarioSubscription.encode(message.nefario, writer.uint32(18).fork()).ldelim(); + } + if (message.changeDataCapture !== undefined) { + exports.ChangeDataCaptureSubscription.encode(message.changeDataCapture, writer.uint32(26).fork()).ldelim(); + } + if (message.unsubscribe !== undefined) { + exports.Unsubscribe.encode(message.unsubscribe, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.mailbox = exports.MailboxSubscription.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.nefario = exports.NefarioSubscription.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.changeDataCapture = exports.ChangeDataCaptureSubscription.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.unsubscribe = exports.Unsubscribe.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + mailbox: isSet(object.mailbox) ? exports.MailboxSubscription.fromJSON(object.mailbox) : undefined, + nefario: isSet(object.nefario) ? exports.NefarioSubscription.fromJSON(object.nefario) : undefined, + changeDataCapture: isSet(object.changeDataCapture) + ? exports.ChangeDataCaptureSubscription.fromJSON(object.changeDataCapture) + : undefined, + unsubscribe: isSet(object.unsubscribe) ? exports.Unsubscribe.fromJSON(object.unsubscribe) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.mailbox !== undefined) { + obj.mailbox = exports.MailboxSubscription.toJSON(message.mailbox); + } + if (message.nefario !== undefined) { + obj.nefario = exports.NefarioSubscription.toJSON(message.nefario); + } + if (message.changeDataCapture !== undefined) { + obj.changeDataCapture = exports.ChangeDataCaptureSubscription.toJSON(message.changeDataCapture); + } + if (message.unsubscribe !== undefined) { + obj.unsubscribe = exports.Unsubscribe.toJSON(message.unsubscribe); + } + return obj; + }, + create(base) { + return exports.Subscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseSubscription(); + message.mailbox = (object.mailbox !== undefined && object.mailbox !== null) + ? exports.MailboxSubscription.fromPartial(object.mailbox) + : undefined; + message.nefario = (object.nefario !== undefined && object.nefario !== null) + ? exports.NefarioSubscription.fromPartial(object.nefario) + : undefined; + message.changeDataCapture = (object.changeDataCapture !== undefined && object.changeDataCapture !== null) + ? exports.ChangeDataCaptureSubscription.fromPartial(object.changeDataCapture) + : undefined; + message.unsubscribe = (object.unsubscribe !== undefined && object.unsubscribe !== null) + ? exports.Unsubscribe.fromPartial(object.unsubscribe) + : undefined; + return message; + }, +}; +function createBaseMailboxSubscription() { + return { id: "", state: "", readerKey: "", channel: "", startSeq: "" }; +} +exports.MailboxSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(26).string(message.readerKey); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(34).string(message.channel); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(42).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMailboxSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.readerKey = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channel = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return exports.MailboxSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e; + const message = createBaseMailboxSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.readerKey = (_c = object.readerKey) !== null && _c !== void 0 ? _c : ""; + message.channel = (_d = object.channel) !== null && _d !== void 0 ? _d : ""; + message.startSeq = (_e = object.startSeq) !== null && _e !== void 0 ? _e : ""; + return message; + }, +}; +function createBaseChangeDataCaptureSubscription() { + return { id: "", state: "", matchers: [], startSeq: "" }; +} +exports.ChangeDataCaptureSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.matchers !== undefined && message.matchers.length !== 0) { + for (const v of message.matchers) { + exports.RecordMatcher.encode(v, writer.uint32(26).fork()).ldelim(); + } + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(34).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseChangeDataCaptureSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.matchers.push(exports.RecordMatcher.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 34) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + matchers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.matchers) + ? object.matchers.map((e) => exports.RecordMatcher.fromJSON(e)) + : [], + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if ((_a = message.matchers) === null || _a === void 0 ? void 0 : _a.length) { + obj.matchers = message.matchers.map((e) => exports.RecordMatcher.toJSON(e)); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return exports.ChangeDataCaptureSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseChangeDataCaptureSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.matchers = ((_c = object.matchers) === null || _c === void 0 ? void 0 : _c.map((e) => exports.RecordMatcher.fromPartial(e))) || []; + message.startSeq = (_d = object.startSeq) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseRecordMatcher() { + return { database: "", table: "", primaryKeys: [] }; +} +exports.RecordMatcher = { + encode(message, writer = _m0.Writer.create()) { + if (message.database !== undefined && message.database !== "") { + writer.uint32(10).string(message.database); + } + if (message.table !== undefined && message.table !== "") { + writer.uint32(18).string(message.table); + } + if (message.primaryKeys !== undefined && message.primaryKeys.length !== 0) { + for (const v of message.primaryKeys) { + struct_1.Value.encode(struct_1.Value.wrap(v), writer.uint32(26).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRecordMatcher(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.database = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.table = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.primaryKeys.push(struct_1.Value.unwrap(struct_1.Value.decode(reader, reader.uint32()))); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + database: isSet(object.database) ? globalThis.String(object.database) : "", + table: isSet(object.table) ? globalThis.String(object.table) : "", + primaryKeys: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.primaryKeys) ? [...object.primaryKeys] : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.database !== undefined && message.database !== "") { + obj.database = message.database; + } + if (message.table !== undefined && message.table !== "") { + obj.table = message.table; + } + if ((_a = message.primaryKeys) === null || _a === void 0 ? void 0 : _a.length) { + obj.primaryKeys = message.primaryKeys; + } + return obj; + }, + create(base) { + return exports.RecordMatcher.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRecordMatcher(); + message.database = (_a = object.database) !== null && _a !== void 0 ? _a : ""; + message.table = (_b = object.table) !== null && _b !== void 0 ? _b : ""; + message.primaryKeys = ((_c = object.primaryKeys) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || []; + return message; + }, +}; +function createBaseNefarioSubscription() { + return { id: "", state: "", processUid: "", channel: "", startSeq: "" }; +} +exports.NefarioSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.processUid !== undefined && message.processUid !== "") { + writer.uint32(26).string(message.processUid); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(34).string(message.channel); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(42).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNefarioSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.processUid = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channel = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + processUid: isSet(object.processUid) ? globalThis.String(object.processUid) : "", + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.processUid !== undefined && message.processUid !== "") { + obj.processUid = message.processUid; + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return exports.NefarioSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e; + const message = createBaseNefarioSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.processUid = (_c = object.processUid) !== null && _c !== void 0 ? _c : ""; + message.channel = (_d = object.channel) !== null && _d !== void 0 ? _d : ""; + message.startSeq = (_e = object.startSeq) !== null && _e !== void 0 ? _e : ""; + return message; + }, +}; +function createBaseUnsubscribe() { + return { id: "" }; +} +exports.Unsubscribe = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnsubscribe(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { id: isSet(object.id) ? globalThis.String(object.id) : "" }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + create(base) { + return exports.Unsubscribe.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseUnsubscribe(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + return message; + }, +}; +function createBaseCreateMailboxRequest() { + return { + channels: [], + privateMetadata: undefined, + publicMetadata: undefined, + purgeTimeoutInMillis: 0, + closeTimeoutInMillis: 0, + extraData: undefined, + }; +} +exports.CreateMailboxRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(10).string(v); + } + } + if (message.privateMetadata !== undefined) { + struct_1.Struct.encode(struct_1.Struct.wrap(message.privateMetadata), writer.uint32(18).fork()).ldelim(); + } + if (message.publicMetadata !== undefined) { + struct_1.Struct.encode(struct_1.Struct.wrap(message.publicMetadata), writer.uint32(26).fork()).ldelim(); + } + if (message.purgeTimeoutInMillis !== undefined && message.purgeTimeoutInMillis !== 0) { + writer.uint32(32).int64(message.purgeTimeoutInMillis); + } + if (message.closeTimeoutInMillis !== undefined && message.closeTimeoutInMillis !== 0) { + writer.uint32(40).int64(message.closeTimeoutInMillis); + } + if (message.extraData !== undefined) { + struct_1.Struct.encode(struct_1.Struct.wrap(message.extraData), writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateMailboxRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.channels.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.privateMetadata = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + message.publicMetadata = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 32) { + break; + } + message.purgeTimeoutInMillis = longToNumber(reader.int64()); + continue; + case 5: + if (tag !== 40) { + break; + } + message.closeTimeoutInMillis = longToNumber(reader.int64()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.extraData = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + privateMetadata: isObject(object.privateMetadata) ? object.privateMetadata : undefined, + publicMetadata: isObject(object.publicMetadata) ? object.publicMetadata : undefined, + purgeTimeoutInMillis: isSet(object.purgeTimeoutInMillis) ? globalThis.Number(object.purgeTimeoutInMillis) : 0, + closeTimeoutInMillis: isSet(object.closeTimeoutInMillis) ? globalThis.Number(object.closeTimeoutInMillis) : 0, + extraData: isObject(object.extraData) ? object.extraData : undefined, + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + if (message.privateMetadata !== undefined) { + obj.privateMetadata = message.privateMetadata; + } + if (message.publicMetadata !== undefined) { + obj.publicMetadata = message.publicMetadata; + } + if (message.purgeTimeoutInMillis !== undefined && message.purgeTimeoutInMillis !== 0) { + obj.purgeTimeoutInMillis = Math.round(message.purgeTimeoutInMillis); + } + if (message.closeTimeoutInMillis !== undefined && message.closeTimeoutInMillis !== 0) { + obj.closeTimeoutInMillis = Math.round(message.closeTimeoutInMillis); + } + if (message.extraData !== undefined) { + obj.extraData = message.extraData; + } + return obj; + }, + create(base) { + return exports.CreateMailboxRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e, _f; + const message = createBaseCreateMailboxRequest(); + message.channels = ((_a = object.channels) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.privateMetadata = (_b = object.privateMetadata) !== null && _b !== void 0 ? _b : undefined; + message.publicMetadata = (_c = object.publicMetadata) !== null && _c !== void 0 ? _c : undefined; + message.purgeTimeoutInMillis = (_d = object.purgeTimeoutInMillis) !== null && _d !== void 0 ? _d : 0; + message.closeTimeoutInMillis = (_e = object.closeTimeoutInMillis) !== null && _e !== void 0 ? _e : 0; + message.extraData = (_f = object.extraData) !== null && _f !== void 0 ? _f : undefined; + return message; + }, +}; +function createBaseCreateMailboxResponse() { + return { adminKey: "", address: "", readerKey: "", channels: [] }; +} +exports.CreateMailboxResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.adminKey !== undefined && message.adminKey !== "") { + writer.uint32(10).string(message.adminKey); + } + if (message.address !== undefined && message.address !== "") { + writer.uint32(18).string(message.address); + } + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(26).string(message.readerKey); + } + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(34).string(v); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateMailboxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.adminKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.address = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.readerKey = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channels.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + adminKey: isSet(object.adminKey) ? globalThis.String(object.adminKey) : "", + address: isSet(object.address) ? globalThis.String(object.address) : "", + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.adminKey !== undefined && message.adminKey !== "") { + obj.adminKey = message.adminKey; + } + if (message.address !== undefined && message.address !== "") { + obj.address = message.address; + } + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + return obj; + }, + create(base) { + return exports.CreateMailboxResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseCreateMailboxResponse(); + message.adminKey = (_a = object.adminKey) !== null && _a !== void 0 ? _a : ""; + message.address = (_b = object.address) !== null && _b !== void 0 ? _b : ""; + message.readerKey = (_c = object.readerKey) !== null && _c !== void 0 ? _c : ""; + message.channels = ((_d = object.channels) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || []; + return message; + }, +}; +function createBaseAddChannelRequest() { + return { adminKey: "", channels: [] }; +} +exports.AddChannelRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.adminKey !== undefined && message.adminKey !== "") { + writer.uint32(10).string(message.adminKey); + } + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(18).string(v); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddChannelRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.adminKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.channels.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + adminKey: isSet(object.adminKey) ? globalThis.String(object.adminKey) : "", + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.adminKey !== undefined && message.adminKey !== "") { + obj.adminKey = message.adminKey; + } + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + return obj; + }, + create(base) { + return exports.AddChannelRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseAddChannelRequest(); + message.adminKey = (_a = object.adminKey) !== null && _a !== void 0 ? _a : ""; + message.channels = ((_b = object.channels) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || []; + return message; + }, +}; +function createBaseAddChannelResponse() { + return {}; +} +exports.AddChannelResponse = { + encode(_, writer = _m0.Writer.create()) { + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddChannelResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(_) { + return {}; + }, + toJSON(_) { + const obj = {}; + return obj; + }, + create(base) { + return exports.AddChannelResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(_) { + const message = createBaseAddChannelResponse(); + return message; + }, +}; +exports.HermesServiceServiceName = "hermes.HermesService"; +class HermesServiceClientImpl { + constructor(rpc, opts) { + this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || exports.HermesServiceServiceName; + this.rpc = rpc; + this.SendReceive = this.SendReceive.bind(this); + this.CreateMailbox = this.CreateMailbox.bind(this); + this.AddChannel = this.AddChannel.bind(this); + } + SendReceive(request) { + const data = request.pipe((0, operators_1.map)((request) => exports.MessageFromClient.encode(request).finish())); + const result = this.rpc.bidirectionalStreamingRequest(this.service, "SendReceive", data); + return result.pipe((0, operators_1.map)((data) => exports.MessageToClient.decode(_m0.Reader.create(data)))); + } + CreateMailbox(request) { + const data = exports.CreateMailboxRequest.encode(request).finish(); + const promise = this.rpc.request(this.service, "CreateMailbox", data); + return promise.then((data) => exports.CreateMailboxResponse.decode(_m0.Reader.create(data))); + } + AddChannel(request) { + const data = exports.AddChannelRequest.encode(request).finish(); + const promise = this.rpc.request(this.service, "AddChannel", data); + return promise.then((data) => exports.AddChannelResponse.decode(_m0.Reader.create(data))); + } +} +exports.HermesServiceClientImpl = HermesServiceClientImpl; +function bytesFromBase64(b64) { + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } + else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} +function base64FromBytes(arr) { + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } + else { + const bin = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} +function longToNumber(long) { + if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} +if (_m0.util.Long !== long_1.default) { + _m0.util.Long = long_1.default; + _m0.configure(); +} +function isObject(value) { + return typeof value === "object" && value !== null; +} +function isSet(value) { + return value !== null && value !== undefined; +} diff --git a/lib/esm/Utils.d.ts b/lib/esm/Utils.d.ts new file mode 100644 index 0000000..d934a45 --- /dev/null +++ b/lib/esm/Utils.d.ts @@ -0,0 +1,2 @@ +export declare function undef(): A | undefined; +export declare function memoize(fn: () => A): () => A; diff --git a/lib/esm/Utils.js b/lib/esm/Utils.js new file mode 100644 index 0000000..551f6f4 --- /dev/null +++ b/lib/esm/Utils.js @@ -0,0 +1,12 @@ +export function undef() { + return undefined; +} +export function memoize(fn) { + let memo; + return () => { + if (memo === undefined) { + memo = fn(); + } + return memo; + }; +} diff --git a/lib/esm/hermesclient/client.d.ts b/lib/esm/hermesclient/client.d.ts new file mode 100644 index 0000000..3b30240 --- /dev/null +++ b/lib/esm/hermesclient/client.d.ts @@ -0,0 +1,75 @@ +import { ContentType, Message, MessageFromClient, CreateMailboxResponse, KeyValPair, MessageEnvelope, SendReceipt } from "./proto/wsmessages"; +export interface ContentTypeHandler { + readonly webSocketUrlPath: string; + sendMessageFromClient(mfc: MessageFromClient, ws: WebSocket): void; +} +export declare const ContentTypeHandler: { + Json: ContentTypeHandler; + Protobuf: ContentTypeHandler; +}; +export declare function newHermesClient(rootUrl: string, contentTypeHandler: ContentTypeHandler): HermesClient; +export interface ChangeDataCaptureEvent { + id: string; + schema: string; + table: string; + action: string; + data: any; + commitTime: string; +} +interface RawRpcRequest { + to: string; + endPoint: string; + body?: Uint8Array; + contentType?: ContentType; + headers?: KeyValPair[]; + state?: Uint8Array; +} +export declare class RpcRequestResponse { + correlationId: string; + sendReceiptEnvelope: MessageEnvelope | undefined; + sendReceipt: SendReceipt | undefined; + sentMessage: Message | undefined; + inboxEnvelope: MessageEnvelope | undefined; + inboxMessage: Message | undefined; + constructor(correlationId: string); + role(): string | undefined; + contentType(): ContentType; + isProtobuf(): boolean; + isJson(): boolean; + isClient(): boolean | undefined; + hasRequestAndResponse(): boolean; + timeStarted(): Date | undefined; + timeStartedL(): number | undefined; + timeCompleted(): Date | undefined; + durationInMillis(): number | undefined; + endPoint(): string | undefined; + requestMessage(): Message | undefined; + requestEnvelope(): MessageEnvelope | undefined; + responseMessage(): Message | undefined; + responseEnvelope(): MessageEnvelope | undefined; + status(): string; + processSchema(reqOrResp: "request" | "response", data?: Uint8Array): Promise; + responseObj(): Promise; + requestObj(): Promise; +} +declare const GlobalClient: { + get: () => HermesClient; +}; +export default GlobalClient; +export declare function runHermesClientTest(): void; +export declare function runHermesClientTest2(): void; +export interface CdcSubscription { + tables: CdcTable[]; + startSeq?: string; +} +export interface CdcTable { + database: string; + table: string; +} +export interface HermesClient { + readonly rootUrl: string; + mailbox(): Promise; + rawRpcCall(request: RawRpcRequest): Promise; + cdcSubscribe(cdcs: CdcSubscription, listener: (cdcEvent: ChangeDataCaptureEvent, a: A) => void): void; + rpcObserverSubscribe(readerKey: string, listener: (correlation: RpcRequestResponse) => void): void; +} diff --git a/lib/esm/hermesclient/client.js b/lib/esm/hermesclient/client.js new file mode 100644 index 0000000..89bfec5 --- /dev/null +++ b/lib/esm/hermesclient/client.js @@ -0,0 +1,682 @@ +import { ContentType, Message, MessageFromClient, MessageToClient, CreateMailboxResponse, CreateMailboxRequest, RpcFrameType, SendReceipt, Ping, Pong, } from "./proto/wsmessages"; +import { memoize, undef } from "../Utils"; +const JsonContentTypeHandler = { + webSocketUrlPath: "/api/ws/send_receive_json", + sendMessageFromClient(mfc, ws) { + const obj = MessageFromClient.toJSON(mfc); + const jsonStr = JSON.stringify(obj); + ws.send(jsonStr); + } +}; +const ProtobufContentTypeHandler = { + webSocketUrlPath: "/api/ws/send_receive_proto", + sendMessageFromClient(mfc, ws) { + const bytes = MessageFromClient.encode(mfc).finish(); + ws.send(bytes); + } +}; +export const ContentTypeHandler = { + Json: JsonContentTypeHandler, + Protobuf: ProtobufContentTypeHandler, +}; +export function newHermesClient(rootUrl, contentTypeHandler) { + const hci = new HermesClientImpl(rootUrl, contentTypeHandler); + hci.mailbox().then((mbox) => { + const correlations = hci.correlations; + hci.channelMessageSubscribe({ + id: "rpc-inbox", + state: "rpc-inbox", + readerKey: mbox.readerKey, + channel: "rpc-inbox", + startSeq: "all" + }, (me, msg) => { + var _a, _b, _c, _d, _e, _f; + if (me.messageBytes) { + try { + const msg = Message.decode(me.messageBytes); + const endPoint = (_b = (_a = msg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.endPoint; + if (((_d = (_c = msg.header) === null || _c === void 0 ? void 0 : _c.rpcHeader) === null || _d === void 0 ? void 0 : _d.frameType) === RpcFrameType.Request && endPoint == "ping") { + hci.sendPongResponse(mbox, msg, endPoint); + } + else { + const correlationId = (_f = (_e = msg.header) === null || _e === void 0 ? void 0 : _e.rpcHeader) === null || _f === void 0 ? void 0 : _f.correlationId; + if (correlationId) { + const resolve = correlations.get(correlationId); + if (resolve !== undefined) { + resolve(msg); + } + correlations.delete(correlationId); + } + } + } + catch (e) { + console.error("error decoding message", e); + } + } + // noop since we are only interested in the correlationId for rpc and that happens in onMessage + }); + }); + // send ping every 30 seconds + setInterval(() => hci.sendPing(), 30 * 1000); + return hci; +} +/** + * Create the mailbox + * @param channels + * @param rootUrl + * @returns + */ +async function createMailbox(channels, rootUrl) { + const mbox = { + channels: channels, + privateMetadata: {}, + publicMetadata: {}, + purgeTimeoutInMillis: 0, + closeTimeoutInMillis: 0, + extraData: {}, + }; + const mboxObj = CreateMailboxRequest.toJSON(mbox); + const mboxJson = JSON.stringify(mboxObj); + let mailboxResponse = undefined; + const response = await fetch(`${rootUrl}/api/create_mailbox`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: mboxJson, + }); + if (response.ok) { + const responseJsonStr = await response.text(); + mailboxResponse = CreateMailboxResponse.fromJSON(JSON.parse(responseJsonStr)); + } + else { + throw new Error(`createMailbox failed with status ${response.status}`); + } + return mailboxResponse; +} +class Constants { +} +Constants.rpcInboxChannelName = "rpc-inbox"; +Constants.rpcSentChannelName = "rpc-sent"; +class HermesConnection { + constructor(clientImpl, mailbox, webSocket) { + this.clientImpl = clientImpl; + this.mailbox = mailbox; + this.webSocket = webSocket; + const self = this; + webSocket.onmessage = function (event) { + if (event.data instanceof ArrayBuffer) { + self.onWebSocketBinaryMessage(event.data); + } + else { + self.onWebSocketTextMessage(event.data); + } + }; + webSocket.onclose = function (event) { + console.log("HermesConnection websocket closed", event); + clientImpl.reconnect(); + }; + // resend un ack'ed messages + clientImpl.sentMessagesWaitingForAck.forEach((smr, idempotentId) => { + self.sendSendMessageRequest(smr, false); + }); + } + onWebSocketTextMessage(message) { + const jsonObj = JSON.parse(message); + const m2c = MessageToClient.fromJSON(jsonObj); + this.onMessageToClient(m2c); + } + onWebSocketBinaryMessage(message) { + const m2c = MessageToClient.decode(new Uint8Array(message)); + this.onMessageToClient(m2c); + } + onMessageToClient(m2c) { + var _a, _b, _c; + if (m2c.notification !== undefined) { + console.log("hermes client received notification " + m2c.notification, m2c.notification); + } + else if (m2c.messageEnvelope !== undefined) { + const me = m2c.messageEnvelope; + if (me.messageBytes === undefined) { + console.log("hermes client received empty messageEnvelope", m2c.messageEnvelope); + } + else { + const subscriptionId = (_a = me.serverEnvelope) === null || _a === void 0 ? void 0 : _a.subscriptionId; + if (subscriptionId) { + const activeSub = this.clientImpl.activeSubscriptions.get(subscriptionId); + if (activeSub) { + const startSeq = (_b = me.serverEnvelope) === null || _b === void 0 ? void 0 : _b.sequence; + if (startSeq) { + activeSub.protoRawSubscription.startSeq = String(startSeq); + } + activeSub.onMessageEvent(me); + } + } + } + } + else if (m2c.sendMessageResponse !== undefined) { + const id = (_c = m2c.sendMessageResponse) === null || _c === void 0 ? void 0 : _c.idempotentId; + if (id) { + this.clientImpl.sentMessagesWaitingForAck.delete(id); + } + console.log("hermes client received SendMessageResponse", m2c.sendMessageResponse); + } + else if (m2c.subscribeResponse !== undefined) { + console.log("hermes client received subscribeResponse", m2c.subscribeResponse); + } + else if (m2c.ping !== undefined) { + this.webSocket.send(JSON.stringify({ pong: {} })); + } + else if (m2c.pong !== undefined) { + console.log("hermes client received pong"); + } + } + sendMessageFromClient(mfc) { + console.log("sending websocket message", mfc); + this.clientImpl.contentTypeHandler.sendMessageFromClient(mfc, this.webSocket); + } + addActiveSubscription(activeSub) { + const listeners = this.clientImpl.activeSubscriptions.get(activeSub.subscriptionId); + if (listeners) { + throw Error(`subscriptionId ${activeSub.subscriptionId} is already subscribed`); + } + else { + this.clientImpl.activeSubscriptions.set(activeSub.subscriptionId, activeSub); + } + } + cdcSubscribe(cdcs, listener) { + const subscriptionId = "cdc-" + cdcs.tables.map((t) => t.database + "." + t.table).join("-"); + const protoCdcs = { + id: subscriptionId, + matchers: cdcs.tables, + startSeq: cdcs.startSeq, + }; + this.sendMessageFromClient({ subscribeRequest: { subscriptions: [{ changeDataCapture: protoCdcs }] } }); + function onMessage(msg) { + const json = new TextDecoder().decode(msg.messageBytes); + const cdcEvent = JSON.parse(json); + listener(cdcEvent, cdcEvent.data); + } + this.addActiveSubscription({ + subscriptionId: subscriptionId, + protoRawSubscription: protoCdcs, + onMessageEvent: onMessage, + protoSubscription: { changeDataCapture: protoCdcs } + }); + } + channelMessageSubscribe(ms, listener) { + this.rawChannelSubscribe(ms, Message.decode, listener); + } + channelSendReceiptSubscribe(ms, listener) { + this.rawChannelSubscribe(ms, SendReceipt.decode, listener); + } + rawChannelSubscribe(ms, decoder, listener) { + const subscriptionId = ms.id; + if (!subscriptionId) { + throw new Error("MailboxSubscription id is undefined"); + } + function onMessage(msg) { + if (msg.messageBytes === undefined) { + console.error("MessageEnvelope.messageBytes is undefined"); + return; + } + const a = decoder(msg.messageBytes); + listener(msg, a); + } + this.sendMessageFromClient({ subscribeRequest: { subscriptions: [{ mailbox: ms }] } }); + this.addActiveSubscription({ + subscriptionId: subscriptionId, + onMessageEvent: onMessage, + protoRawSubscription: ms, + protoSubscription: { mailbox: ms } + }); + } + sendPing() { + this.sendMessageFromClient({ ping: {} }); + } + sendSendMessageRequest(smr, registerForAck) { + if (registerForAck && smr.idempotentId) { + this.clientImpl.sentMessagesWaitingForAck.set(smr.idempotentId, smr); + } + this.sendMessageFromClient({ sendMessageRequest: smr }); + } + rawRpcCall(request) { + var _a; + const emptyBytes = new Uint8Array(0); + const correlationId = ((_a = this.mailbox.address) !== null && _a !== void 0 ? _a : "") + "-" + this.clientImpl.correlationIdCounter++; + const idempotentId = this.mailbox.address + correlationId; + const smr = { + channel: Constants.rpcInboxChannelName, + to: [request.to], + idempotentId: idempotentId, + message: { + header: { + rpcHeader: { + correlationId: correlationId, + endPoint: request.endPoint, + frameType: RpcFrameType.Request, + errorInfo: undefined, + }, + sender: this.mailbox.address, + contentType: request.contentType, + extraHeaders: request.headers, + senderSequence: 0, + }, + serverEnvelope: undefined, + senderEnvelope: { + created: Date.now(), + }, + data: request.body !== undefined ? request.body : emptyBytes, + }, + }; + const promise = new Promise((resolve, reject) => { + this.clientImpl.correlations.set(correlationId, resolve); + }); + this.sendSendMessageRequest(smr, true); + return promise; + } + rpcObserverSubscribe(readerKey, listener) { + console.log("rpcObserverSubscribe", readerKey); + const correlations = new Map(); + const msInbox = { + id: "rpc-inbox-" + readerKey, + readerKey: readerKey, + channel: "rpc-inbox", + startSeq: "first", + }; + this.channelMessageSubscribe(msInbox, (me, msg) => { + var _a, _b; + const correlationId = (_b = (_a = msg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.correlationId; + if (correlationId) { + var correlation = correlations.get(correlationId); + if (!correlation) { + correlation = new RpcRequestResponse(correlationId); + correlations.set(correlationId, correlation); + } + correlation.inboxEnvelope = me; + correlation.inboxMessage = msg; + listener(correlation); + } + }); + const msSent = { + id: "rpc-sent-" + readerKey, + readerKey: readerKey, + channel: "rpc-sent", + startSeq: "first", + }; + this.channelSendReceiptSubscribe(msSent, (me, sr) => { + var _a, _b, _c, _d, _e; + const msg = (_a = sr.request) === null || _a === void 0 ? void 0 : _a.message; + const correlationId = (_e = (_d = (_c = (_b = sr.request) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.header) === null || _d === void 0 ? void 0 : _d.rpcHeader) === null || _e === void 0 ? void 0 : _e.correlationId; + if (correlationId !== undefined) { + var correlation = correlations.get(correlationId); + if (correlation === undefined) { + correlation = new RpcRequestResponse(correlationId); + correlations.set(correlationId, correlation); + } + correlation.sentMessage = msg; + correlation.sendReceiptEnvelope = me; + correlation.sendReceipt = sr; + listener(correlation); + } + }); + } +} +class HermesClientImpl { + constructor(rootUrl, contentTypeHandler) { + this.correlationIdCounter = 0; + this.correlations = new Map(); + this.activeSubscriptions = new Map(); + this.sentMessagesWaitingForAck = new Map(); + const thisHermesClientImpl = this; + this.rootUrl = rootUrl; + this.contentTypeHandler = contentTypeHandler; + this.mailboxResponseP = createMailbox([Constants.rpcInboxChannelName, Constants.rpcSentChannelName], rootUrl); + var tempMailboxResponseP = this.mailboxResponseP; + var tempWsUrl = new URL(rootUrl); + tempWsUrl.protocol = tempWsUrl.protocol.replace("http", "ws"); + tempWsUrl.pathname = contentTypeHandler.webSocketUrlPath; + this.wsUrl = tempWsUrl.toString(); + this.currentConn = this.newHermesConnection(); + } + sendPongResponse(mbox, pingMsg, endPoint) { + var _a, _b, _c, _d, _e, _f; + const correlationId = (_b = (_a = pingMsg.header) === null || _a === void 0 ? void 0 : _a.rpcHeader) === null || _b === void 0 ? void 0 : _b.correlationId; + const sender = (_c = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _c === void 0 ? void 0 : _c.sender; + const contentType = (_e = (_d = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _d === void 0 ? void 0 : _d.contentType) !== null && _e !== void 0 ? _e : ContentType.UnspecifiedCT; + if (correlationId !== undefined && sender !== undefined) { + var ping = {}; + if (pingMsg.data !== undefined) { + if (contentType == ContentType.Json) { + ping = Ping.fromJSON(pingMsg.data); + } + else { + ping = Ping.decode(pingMsg.data); + } + } + const pong = { payload: ping.payload }; + var data; + if (contentType == ContentType.Json) { + data = new TextEncoder().encode(JSON.stringify(Pong.toJSON(pong))); + } + else { + data = Pong.encode(pong).finish(); + } + const idempotentId = mbox.address + correlationId; + const smr = { + channel: Constants.rpcInboxChannelName, + to: [sender], + idempotentId: idempotentId, + message: { + header: { + rpcHeader: { + correlationId: correlationId, + endPoint: endPoint, + frameType: RpcFrameType.SuccessResponse, + errorInfo: undefined, + }, + sender: mbox.address, + contentType: (_f = pingMsg === null || pingMsg === void 0 ? void 0 : pingMsg.header) === null || _f === void 0 ? void 0 : _f.contentType, + }, + serverEnvelope: undefined, + senderEnvelope: { + created: Date.now(), + }, + data: data, + }, + }; + this.withConn((conn) => { + conn.sendSendMessageRequest(smr, true); + }); + } + else { + console.log("ignoring ping no correlation id", pingMsg); + } + } + reconnect() { + this.currentConn = this.newHermesConnection(); + } + newHermesConnection() { + const outerThis = this; + return new Promise((resolve, reject) => { + this.mailboxResponseP.then((mbox) => { + var webSocket = new WebSocket(this.wsUrl); + webSocket.binaryType = "arraybuffer"; + webSocket.onopen = function (event) { + console.log("hermes client websocket opened, sending first message"); + const resubscriptions = Object.values(outerThis.activeSubscriptions).map((as) => { return as.protoSubscription; }); + // send first message + const firstMessage = { + senderInfo: { + readerKey: mbox.readerKey, + address: mbox.address, + }, + subscriptions: resubscriptions, + mailboxTimeoutInMs: 2 * 60 * 1000, // 2 minutes + }; + const mfc = { + firstMessage: firstMessage, + }; + console.log("sending first message"); + outerThis.contentTypeHandler.sendMessageFromClient(mfc, webSocket); + console.log("resolving promise"); + resolve(new HermesConnection(outerThis, mbox, webSocket)); + }; + }); + }); + } + mailbox() { + return this.mailboxResponseP; + } + async withConn(fn) { + return this.currentConn.then((conn) => fn(conn)); + } + async withConnP(fn) { + return this.currentConn.then((conn) => fn(conn)); + } + rawRpcCall(request) { + return this.withConnP((conn) => { + return conn.rawRpcCall(request); + }); + } + cdcSubscribe(cdcs, listener) { + this.withConn((conn) => { + conn.cdcSubscribe(cdcs, listener); + }); + } + rpcObserverSubscribe(readerKey, listener) { + console.log("outer rpcObserverSubscribe", readerKey); + this.withConn((conn) => { + console.log("inner rpcObserverSubscribe", readerKey); + conn.rpcObserverSubscribe(readerKey, listener); + }); + } + channelMessageSubscribe(ms, listener) { + this.withConn((conn) => { + conn.channelMessageSubscribe(ms, listener); + }); + } + channelSendReceiptSubscribe(ms, listener) { + this.withConn((conn) => { + conn.channelSendReceiptSubscribe(ms, listener); + }); + } + sendPing() { + this.withConn((conn) => { + conn.sendPing(); + }); + } +} +export class RpcRequestResponse { + constructor(correlationId) { + this.correlationId = correlationId; + } + role() { + const ic = this.isClient(); + if (ic) { + return "client"; + } + else if (ic === false) { + return "server"; + } + } + contentType() { + var _a, _b, _c, _d, _e, _f; + const contentType = (_f = (_c = (_b = (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.contentType) !== null && _c !== void 0 ? _c : (_e = (_d = this.responseMessage()) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.contentType) !== null && _f !== void 0 ? _f : ContentType.UnspecifiedCT; + return contentType; + } + isProtobuf() { + return this.contentType() === ContentType.Protobuf; + } + isJson() { + return this.contentType() === ContentType.Json; + } + isClient() { + var _a, _b, _c, _d, _e, _f; + const inboxFrameType = (_c = (_b = (_a = this.inboxMessage) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.frameType; + const sentFrameType = (_f = (_e = (_d = this.sentMessage) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.rpcHeader) === null || _f === void 0 ? void 0 : _f.frameType; + if (sentFrameType === RpcFrameType.Request) { + return true; + } + else if (inboxFrameType === RpcFrameType.Request) { + return false; + } + } + hasRequestAndResponse() { + return this.sendReceiptEnvelope && this.inboxEnvelope ? true : false; + } + timeStarted() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = undef(); + if (ic === true) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === false) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + if (time) { + return new Date(time); + } + } + timeStartedL() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = undef(); + if (ic === true) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === false) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + return time; + } + timeCompleted() { + var _a, _b, _c, _d; + const ic = this.isClient(); + var time = undefined; + if (ic === false) { + time = (_b = (_a = this.sendReceiptEnvelope) === null || _a === void 0 ? void 0 : _a.serverEnvelope) === null || _b === void 0 ? void 0 : _b.created; + } + else if (ic === true) { + time = (_d = (_c = this.inboxEnvelope) === null || _c === void 0 ? void 0 : _c.serverEnvelope) === null || _d === void 0 ? void 0 : _d.created; + } + if (time) { + return new Date(time); + } + } + durationInMillis() { + var _a, _b; + const ts = (_a = this.timeStarted()) === null || _a === void 0 ? void 0 : _a.getTime(); + const tc = (_b = this.timeCompleted()) === null || _b === void 0 ? void 0 : _b.getTime(); + if (ts && tc) { + return tc - ts; + } + } + endPoint() { + var _a, _b, _c; + return (_c = (_b = (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.endPoint; + } + requestMessage() { + const ic = this.isClient(); + if (ic === true) { + return this.sentMessage; + } + else if (ic === false) { + return this.inboxMessage; + } + } + requestEnvelope() { + const ic = this.isClient(); + if (ic === true) { + return this.sendReceiptEnvelope; + } + else if (ic === false) { + return this.inboxEnvelope; + } + } + responseMessage() { + const ic = this.isClient(); + if (ic === true) { + return this.inboxMessage; + } + else if (ic === false) { + return this.sentMessage; + } + } + responseEnvelope() { + const ic = this.isClient(); + if (ic === true) { + return this.inboxEnvelope; + } + else if (ic === false) { + return this.sendReceiptEnvelope; + } + } + status() { + var _a, _b, _c; + const frameType = (_c = (_b = (_a = this.responseMessage()) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.rpcHeader) === null || _c === void 0 ? void 0 : _c.frameType; + if (!frameType) { + return ""; + } + else if (frameType === RpcFrameType.ErrorResponse) { + return "error"; + } + else if (frameType === RpcFrameType.SuccessResponse) { + return "success"; + } + else { + return `Unexpected frame types ${frameType}`; + } + } + async processSchema(reqOrResp, data) { + if (this.isJson()) { + const jsonStr = new TextDecoder().decode(data); + return JSON.parse(jsonStr); + } + else { + const endPoint = this.endPoint(); + if (endPoint === undefined) { + return { + "error": "no endpoint" + }; + } + if (data === undefined) { + return {}; + } + return protobufToJson(endPoint, reqOrResp, data); + } + } + async responseObj() { + var _a; + return this.processSchema("response", (_a = this.responseMessage()) === null || _a === void 0 ? void 0 : _a.data); + } + async requestObj() { + var _a; + return this.processSchema("request", (_a = this.requestMessage()) === null || _a === void 0 ? void 0 : _a.data); + } +} +const GlobalClient = { + get: memoize(() => newHermesClient("https://hermes-go.ahsrcm.com", JsonContentTypeHandler)) +}; +export default GlobalClient; +export function runHermesClientTest() { +} +export function runHermesClientTest2() { + // const hc = newHermesClient("https://hermes-go.ahsrcm.com", ContentType.Protobuf); + const hc = newHermesClient("https://hermes-go.ahsrcm.com", JsonContentTypeHandler); + hc.mailbox().then((mbox) => { + const cdcs = { + tables: [ + { + database: "nefario", + table: "service", + }, + ], + startSeq: "new", + }; + hc.cdcSubscribe(cdcs, (cdcEvent, a) => { + console.log("cdcEvent", cdcEvent); + }); + }); + // hc.correlatedRpcReader("rrb07167144dc644a0be22a85301afea7e" , (correlation) => { + // console.log("correlation", correlation); + // }); +} +async function protobufToJson(schemaName, frametype, bytes) { + // const mboxObj = CreateMailboxRequest.toJSON(mbox); + // const mboxJson = JSON.stringify(mboxObj); + // let mailboxResponse: CreateMailboxResponse | undefined = undefined; + const rootUrl = GlobalClient.get().rootUrl; + const response = await fetch(`${rootUrl}/api/proto_to_json?schema=${schemaName}&frametype=${frametype}`, { + method: "POST", + body: bytes, + }); + if (response.ok) { + const jsonStr = await response.text(); + return JSON.parse(jsonStr); + } + else { + throw new Error(`proto_to_json failed with status ${response.status}`); + } +} diff --git a/lib/esm/hermesclient/google/protobuf/struct.d.ts b/lib/esm/hermesclient/google/protobuf/struct.d.ts new file mode 100644 index 0000000..d5036c3 --- /dev/null +++ b/lib/esm/hermesclient/google/protobuf/struct.d.ts @@ -0,0 +1,201 @@ +import * as _m0 from "protobufjs/minimal"; +export declare const protobufPackage = "google.protobuf"; +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + */ +export declare enum NullValue { + /** NULL_VALUE - Null value. */ + NULL_VALUE = 0, + UNRECOGNIZED = -1 +} +export declare function nullValueFromJSON(object: any): NullValue; +export declare function nullValueToJSON(object: NullValue): string; +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + */ +export interface Struct { + /** Unordered map of dynamically typed values. */ + fields: { + [key: string]: any | undefined; + }; +} +export interface Struct_FieldsEntry { + key: string; + value: any | undefined; +} +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of these + * variants. Absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + */ +export interface Value { + /** Represents a null value. */ + nullValue?: NullValue | undefined; + /** Represents a double value. */ + numberValue?: number | undefined; + /** Represents a string value. */ + stringValue?: string | undefined; + /** Represents a boolean value. */ + boolValue?: boolean | undefined; + /** Represents a structured value. */ + structValue?: { + [key: string]: any; + } | undefined; + /** Represents a repeated `Value`. */ + listValue?: Array | undefined; +} +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + */ +export interface ListValue { + /** Repeated field of dynamically typed values. */ + values: any[]; +} +export declare const Struct: { + encode(message: Struct, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Struct; + fromJSON(object: any): Struct; + toJSON(message: Struct): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): Struct; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): Struct; + wrap(object: { + [key: string]: any; + } | undefined): Struct; + unwrap(message: Struct): { + [key: string]: any; + }; +}; +export declare const Struct_FieldsEntry: { + encode(message: Struct_FieldsEntry, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry; + fromJSON(object: any): Struct_FieldsEntry; + toJSON(message: Struct_FieldsEntry): unknown; + create]: never; }>(base?: I): Struct_FieldsEntry; + fromPartial]: never; }>(object: I_1): Struct_FieldsEntry; +}; +export declare const Value: { + encode(message: Value, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Value; + fromJSON(object: any): Value; + toJSON(message: Value): unknown; + create]: never; }) | undefined; + listValue?: (any[] & any[] & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }>(base?: I): Value; + fromPartial]: never; }) | undefined; + listValue?: (any[] & any[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }>(object: I_1): Value; + wrap(value: any): Value; + unwrap(message: any): string | number | boolean | Object | null | Array | undefined; +}; +export declare const ListValue: { + encode(message: ListValue, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ListValue; + fromJSON(object: any): ListValue; + toJSON(message: ListValue): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): ListValue; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): ListValue; + wrap(array: Array | undefined): ListValue; + unwrap(message: ListValue): Array; +}; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P : P & { + [K in keyof P]: Exact; +} & { + [K in Exclude>]: never; +}; +export {}; diff --git a/lib/esm/hermesclient/google/protobuf/struct.js b/lib/esm/hermesclient/google/protobuf/struct.js new file mode 100644 index 0000000..ac40ba6 --- /dev/null +++ b/lib/esm/hermesclient/google/protobuf/struct.js @@ -0,0 +1,441 @@ +/* eslint-disable */ +import * as _m0 from "protobufjs/minimal"; +export const protobufPackage = "google.protobuf"; +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + */ +export var NullValue; +(function (NullValue) { + /** NULL_VALUE - Null value. */ + NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE"; + NullValue[NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(NullValue || (NullValue = {})); +export function nullValueFromJSON(object) { + switch (object) { + case 0: + case "NULL_VALUE": + return NullValue.NULL_VALUE; + case -1: + case "UNRECOGNIZED": + default: + return NullValue.UNRECOGNIZED; + } +} +export function nullValueToJSON(object) { + switch (object) { + case NullValue.NULL_VALUE: + return "NULL_VALUE"; + case NullValue.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +function createBaseStruct() { + return { fields: {} }; +} +export const Struct = { + encode(message, writer = _m0.Writer.create()) { + Object.entries(message.fields).forEach(([key, value]) => { + if (value !== undefined) { + Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim(); + } + }); + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStruct(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32()); + if (entry1.value !== undefined) { + message.fields[entry1.key] = entry1.value; + } + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + fields: isObject(object.fields) + ? Object.entries(object.fields).reduce((acc, [key, value]) => { + acc[key] = value; + return acc; + }, {}) + : {}, + }; + }, + toJSON(message) { + const obj = {}; + if (message.fields) { + const entries = Object.entries(message.fields); + if (entries.length > 0) { + obj.fields = {}; + entries.forEach(([k, v]) => { + obj.fields[k] = v; + }); + } + } + return obj; + }, + create(base) { + return Struct.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseStruct(); + message.fields = Object.entries((_a = object.fields) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => { + if (value !== undefined) { + acc[key] = value; + } + return acc; + }, {}); + return message; + }, + wrap(object) { + const struct = createBaseStruct(); + if (object !== undefined) { + Object.keys(object).forEach((key) => { + struct.fields[key] = object[key]; + }); + } + return struct; + }, + unwrap(message) { + const object = {}; + if (message.fields) { + Object.keys(message.fields).forEach((key) => { + object[key] = message.fields[key]; + }); + } + return object; + }, +}; +function createBaseStruct_FieldsEntry() { + return { key: "", value: undefined }; +} +export const Struct_FieldsEntry = { + encode(message, writer = _m0.Writer.create()) { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStruct_FieldsEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object === null || object === void 0 ? void 0 : object.value) ? object.value : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== undefined) { + obj.value = message.value; + } + return obj; + }, + create(base) { + return Struct_FieldsEntry.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseStruct_FieldsEntry(); + message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; + message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined; + return message; + }, +}; +function createBaseValue() { + return { + nullValue: undefined, + numberValue: undefined, + stringValue: undefined, + boolValue: undefined, + structValue: undefined, + listValue: undefined, + }; +} +export const Value = { + encode(message, writer = _m0.Writer.create()) { + if (message.nullValue !== undefined) { + writer.uint32(8).int32(message.nullValue); + } + if (message.numberValue !== undefined) { + writer.uint32(17).double(message.numberValue); + } + if (message.stringValue !== undefined) { + writer.uint32(26).string(message.stringValue); + } + if (message.boolValue !== undefined) { + writer.uint32(32).bool(message.boolValue); + } + if (message.structValue !== undefined) { + Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).ldelim(); + } + if (message.listValue !== undefined) { + ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseValue(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.nullValue = reader.int32(); + continue; + case 2: + if (tag !== 17) { + break; + } + message.numberValue = reader.double(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.stringValue = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + message.boolValue = reader.bool(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32())); + continue; + case 6: + if (tag !== 50) { + break; + } + message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined, + numberValue: isSet(object.numberValue) ? globalThis.Number(object.numberValue) : undefined, + stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined, + boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined, + structValue: isObject(object.structValue) ? object.structValue : undefined, + listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.nullValue !== undefined) { + obj.nullValue = nullValueToJSON(message.nullValue); + } + if (message.numberValue !== undefined) { + obj.numberValue = message.numberValue; + } + if (message.stringValue !== undefined) { + obj.stringValue = message.stringValue; + } + if (message.boolValue !== undefined) { + obj.boolValue = message.boolValue; + } + if (message.structValue !== undefined) { + obj.structValue = message.structValue; + } + if (message.listValue !== undefined) { + obj.listValue = message.listValue; + } + return obj; + }, + create(base) { + return Value.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e, _f; + const message = createBaseValue(); + message.nullValue = (_a = object.nullValue) !== null && _a !== void 0 ? _a : undefined; + message.numberValue = (_b = object.numberValue) !== null && _b !== void 0 ? _b : undefined; + message.stringValue = (_c = object.stringValue) !== null && _c !== void 0 ? _c : undefined; + message.boolValue = (_d = object.boolValue) !== null && _d !== void 0 ? _d : undefined; + message.structValue = (_e = object.structValue) !== null && _e !== void 0 ? _e : undefined; + message.listValue = (_f = object.listValue) !== null && _f !== void 0 ? _f : undefined; + return message; + }, + wrap(value) { + const result = createBaseValue(); + if (value === null) { + result.nullValue = NullValue.NULL_VALUE; + } + else if (typeof value === "boolean") { + result.boolValue = value; + } + else if (typeof value === "number") { + result.numberValue = value; + } + else if (typeof value === "string") { + result.stringValue = value; + } + else if (globalThis.Array.isArray(value)) { + result.listValue = value; + } + else if (typeof value === "object") { + result.structValue = value; + } + else if (typeof value !== "undefined") { + throw new globalThis.Error("Unsupported any value type: " + typeof value); + } + return result; + }, + unwrap(message) { + if (message.stringValue !== undefined) { + return message.stringValue; + } + else if ((message === null || message === void 0 ? void 0 : message.numberValue) !== undefined) { + return message.numberValue; + } + else if ((message === null || message === void 0 ? void 0 : message.boolValue) !== undefined) { + return message.boolValue; + } + else if ((message === null || message === void 0 ? void 0 : message.structValue) !== undefined) { + return message.structValue; + } + else if ((message === null || message === void 0 ? void 0 : message.listValue) !== undefined) { + return message.listValue; + } + else if ((message === null || message === void 0 ? void 0 : message.nullValue) !== undefined) { + return null; + } + return undefined; + }, +}; +function createBaseListValue() { + return { values: [] }; +} +export const ListValue = { + encode(message, writer = _m0.Writer.create()) { + for (const v of message.values) { + Value.encode(Value.wrap(v), writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListValue(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.values.push(Value.unwrap(Value.decode(reader, reader.uint32()))); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { values: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.values) ? [...object.values] : [] }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.values) === null || _a === void 0 ? void 0 : _a.length) { + obj.values = message.values; + } + return obj; + }, + create(base) { + return ListValue.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseListValue(); + message.values = ((_a = object.values) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + return message; + }, + wrap(array) { + const result = createBaseListValue(); + result.values = array !== null && array !== void 0 ? array : []; + return result; + }, + unwrap(message) { + if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("values")) && globalThis.Array.isArray(message.values)) { + return message.values; + } + else { + return message; + } + }, +}; +function isObject(value) { + return typeof value === "object" && value !== null; +} +function isSet(value) { + return value !== null && value !== undefined; +} diff --git a/lib/esm/hermesclient/proto/wsmessages.d.ts b/lib/esm/hermesclient/proto/wsmessages.d.ts new file mode 100644 index 0000000..7cc1789 --- /dev/null +++ b/lib/esm/hermesclient/proto/wsmessages.d.ts @@ -0,0 +1,4566 @@ +import * as _m0 from "protobufjs/minimal"; +import { Observable } from "rxjs"; +export declare const protobufPackage = "hermes"; +export declare enum RpcFrameType { + UnspecifiedRFT = 0, + Request = 1, + SuccessResponse = 2, + ErrorResponse = 3, + UNRECOGNIZED = -1 +} +export declare function rpcFrameTypeFromJSON(object: any): RpcFrameType; +export declare function rpcFrameTypeToJSON(object: RpcFrameType): string; +export declare enum ContentType { + UnspecifiedCT = 0, + Protobuf = 1, + Json = 2, + Binary = 3, + Text = 4, + UNRECOGNIZED = -1 +} +export declare function contentTypeFromJSON(object: any): ContentType; +export declare function contentTypeToJSON(object: ContentType): string; +export interface MessageFromClient { + sendMessageRequest?: SendMessageRequest | undefined; + firstMessage?: FirstMessage | undefined; + ping?: Ping | undefined; + pong?: Pong | undefined; + notification?: Notification | undefined; + subscribeRequest?: SubscribeRequest | undefined; +} +export interface Notification { + message?: string | undefined; +} +export interface MessageToClient { + messageEnvelope?: MessageEnvelope | undefined; + sendMessageResponse?: SendMessageResponse | undefined; + ping?: Ping | undefined; + pong?: Pong | undefined; + notification?: Notification | undefined; + subscribeResponse?: SubscribeResponse | undefined; +} +export interface Ping { + payload?: Uint8Array | undefined; +} +export interface Pong { + payload?: Uint8Array | undefined; +} +export interface MessageHeader { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: RpcHeader | undefined; + senderSequence?: number | undefined; + extraHeaders?: KeyValPair[] | undefined; +} +export interface SenderEnvelope { + created?: number | undefined; +} +export interface ServerEnvelope { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; +} +export interface KeyValPair { + key?: string | undefined; + val?: string | undefined; +} +export interface RpcHeader { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: RpcErrorInfo | undefined; +} +export interface RpcErrorInfo { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; +} +export interface Message { + header?: MessageHeader | undefined; + senderEnvelope?: SenderEnvelope | undefined; + serverEnvelope?: ServerEnvelope | undefined; + data?: Uint8Array | undefined; +} +export interface MessageEnvelope { + messageBytes?: Uint8Array | undefined; + serverEnvelope?: ServerEnvelope | undefined; +} +export interface SendMessageRequest { + to?: string[] | undefined; + message?: Message | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; +} +export interface SendMessageResponse { + errors?: SendMessageError[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; +} +export interface SendReceipt { + request?: SendMessageRequest | undefined; + response?: SendMessageResponse | undefined; + serverEnvelope?: ServerEnvelope | undefined; +} +export interface SendMessageError { + message?: string | undefined; + to?: string | undefined; +} +export interface FirstMessage { + senderInfo?: SenderInfo | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: Subscription[] | undefined; +} +export interface SenderInfo { + readerKey?: string | undefined; + address?: string | undefined; +} +export interface SubscribeRequest { + subscriptions?: Subscription[] | undefined; +} +export interface SubscribeResponse { + succeeded?: string[] | undefined; + errors?: SubscribeError[] | undefined; +} +export interface SubscribeError { + state?: string | undefined; + message?: string | undefined; +} +export interface Subscription { + mailbox?: MailboxSubscription | undefined; + nefario?: NefarioSubscription | undefined; + changeDataCapture?: ChangeDataCaptureSubscription | undefined; + unsubscribe?: Unsubscribe | undefined; +} +export interface MailboxSubscription { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; +} +export interface ChangeDataCaptureSubscription { + id?: string | undefined; + state?: string | undefined; + matchers?: RecordMatcher[] | undefined; + startSeq?: string | undefined; +} +export interface RecordMatcher { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; +} +export interface NefarioSubscription { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; +} +export interface Unsubscribe { + id?: string | undefined; +} +export interface CreateMailboxRequest { + channels?: string[] | undefined; + privateMetadata?: { + [key: string]: any; + } | undefined; + publicMetadata?: { + [key: string]: any; + } | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: { + [key: string]: any; + } | undefined; +} +export interface CreateMailboxResponse { + adminKey?: string | undefined; + address?: string | undefined; + readerKey?: string | undefined; + channels?: string[] | undefined; +} +export interface AddChannelRequest { + adminKey?: string | undefined; + channels?: string[] | undefined; +} +export interface AddChannelResponse { +} +export declare const MessageFromClient: { + encode(message: MessageFromClient, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageFromClient; + fromJSON(object: any): MessageFromClient; + toJSON(message: MessageFromClient): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + firstMessage?: ({ + senderInfo?: { + readerKey?: string | undefined; + address?: string | undefined; + } | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + senderInfo?: ({ + readerKey?: string | undefined; + address?: string | undefined; + } & { + readerKey?: string | undefined; + address?: string | undefined; + } & { [K_10 in Exclude]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_13 in Exclude]: never; }) | undefined; + } & { [K_14 in Exclude]: never; })[] & { [K_15 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + } & { [K_18 in Exclude]: never; })[] & { [K_19 in Exclude]: never; }) | undefined; + } & { [K_20 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_23 in Exclude]: never; }) | undefined; + subscribeRequest?: ({ + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_24 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_25 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_26 in Exclude]: never; }) | undefined; + } & { [K_27 in Exclude]: never; })[] & { [K_28 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_29 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_30 in Exclude]: never; }) | undefined; + } & { [K_31 in Exclude]: never; })[] & { [K_32 in Exclude]: never; }) | undefined; + } & { [K_33 in Exclude]: never; }) | undefined; + } & { [K_34 in Exclude]: never; }>(base?: I): MessageFromClient; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_36 in Exclude]: never; }) | undefined; + } & { [K_37 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_38 in Exclude]: never; })[] & { [K_39 in Exclude]: never; }) | undefined; + } & { [K_40 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_41 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_42 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_43 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_44 in Exclude]: never; }) | undefined; + firstMessage?: ({ + senderInfo?: { + readerKey?: string | undefined; + address?: string | undefined; + } | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + senderInfo?: ({ + readerKey?: string | undefined; + address?: string | undefined; + } & { + readerKey?: string | undefined; + address?: string | undefined; + } & { [K_45 in Exclude]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_46 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_47 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_48 in Exclude]: never; }) | undefined; + } & { [K_49 in Exclude]: never; })[] & { [K_50 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_51 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_52 in Exclude]: never; }) | undefined; + } & { [K_53 in Exclude]: never; })[] & { [K_54 in Exclude]: never; }) | undefined; + } & { [K_55 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_56 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_57 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_58 in Exclude]: never; }) | undefined; + subscribeRequest?: ({ + subscriptions?: { + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] | undefined; + } & { + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_59 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_60 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_61 in Exclude]: never; }) | undefined; + } & { [K_62 in Exclude]: never; })[] & { [K_63 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_64 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_65 in Exclude]: never; }) | undefined; + } & { [K_66 in Exclude]: never; })[] & { [K_67 in Exclude]: never; }) | undefined; + } & { [K_68 in Exclude]: never; }) | undefined; + } & { [K_69 in Exclude]: never; }>(object: I_1): MessageFromClient; +}; +export declare const Notification: { + encode(message: Notification, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Notification; + fromJSON(object: any): Notification; + toJSON(message: Notification): unknown; + create]: never; }>(base?: I): Notification; + fromPartial]: never; }>(object: I_1): Notification; +}; +export declare const MessageToClient: { + encode(message: MessageToClient, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageToClient; + fromJSON(object: any): MessageToClient; + toJSON(message: MessageToClient): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + sendMessageResponse?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_4 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + subscribeResponse?: ({ + succeeded?: string[] | undefined; + errors?: { + state?: string | undefined; + message?: string | undefined; + }[] | undefined; + } & { + succeeded?: (string[] & string[] & { [K_9 in Exclude]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + } & { [K_13 in Exclude]: never; }>(base?: I): MessageToClient; + fromPartial]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + sendMessageResponse?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_16 in Exclude]: never; })[] & { [K_17 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_18 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_19 in Exclude]: never; }) | undefined; + ping?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_20 in Exclude]: never; }) | undefined; + pong?: ({ + payload?: Uint8Array | undefined; + } & { + payload?: Uint8Array | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + notification?: ({ + message?: string | undefined; + } & { + message?: string | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + subscribeResponse?: ({ + succeeded?: string[] | undefined; + errors?: { + state?: string | undefined; + message?: string | undefined; + }[] | undefined; + } & { + succeeded?: (string[] & string[] & { [K_23 in Exclude]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_24 in Exclude]: never; })[] & { [K_25 in Exclude]: never; }) | undefined; + } & { [K_26 in Exclude]: never; }) | undefined; + } & { [K_27 in Exclude]: never; }>(object: I_1): MessageToClient; +}; +export declare const Ping: { + encode(message: Ping, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Ping; + fromJSON(object: any): Ping; + toJSON(message: Ping): unknown; + create]: never; }>(base?: I): Ping; + fromPartial]: never; }>(object: I_1): Ping; +}; +export declare const Pong: { + encode(message: Pong, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Pong; + fromJSON(object: any): Pong; + toJSON(message: Pong): unknown; + create]: never; }>(base?: I): Pong; + fromPartial]: never; }>(object: I_1): Pong; +}; +export declare const MessageHeader: { + encode(message: MessageHeader, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageHeader; + fromJSON(object: any): MessageHeader; + toJSON(message: MessageHeader): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }>(base?: I): MessageHeader; + fromPartial]: never; }) | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_7 in Exclude]: never; })[] & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(object: I_1): MessageHeader; +}; +export declare const SenderEnvelope: { + encode(message: SenderEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SenderEnvelope; + fromJSON(object: any): SenderEnvelope; + toJSON(message: SenderEnvelope): unknown; + create]: never; }>(base?: I): SenderEnvelope; + fromPartial]: never; }>(object: I_1): SenderEnvelope; +}; +export declare const ServerEnvelope: { + encode(message: ServerEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ServerEnvelope; + fromJSON(object: any): ServerEnvelope; + toJSON(message: ServerEnvelope): unknown; + create]: never; }>(base?: I): ServerEnvelope; + fromPartial]: never; }>(object: I_1): ServerEnvelope; +}; +export declare const KeyValPair: { + encode(message: KeyValPair, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): KeyValPair; + fromJSON(object: any): KeyValPair; + toJSON(message: KeyValPair): unknown; + create]: never; }>(base?: I): KeyValPair; + fromPartial]: never; }>(object: I_1): KeyValPair; +}; +export declare const RpcHeader: { + encode(message: RpcHeader, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RpcHeader; + fromJSON(object: any): RpcHeader; + toJSON(message: RpcHeader): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): RpcHeader; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): RpcHeader; +}; +export declare const RpcErrorInfo: { + encode(message: RpcErrorInfo, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RpcErrorInfo; + fromJSON(object: any): RpcErrorInfo; + toJSON(message: RpcErrorInfo): unknown; + create]: never; }>(base?: I): RpcErrorInfo; + fromPartial]: never; }>(object: I_1): RpcErrorInfo; +}; +export declare const Message: { + encode(message: Message, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Message; + fromJSON(object: any): Message; + toJSON(message: Message): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_2 in Exclude]: never; })[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_7 in Exclude]: never; }>(base?: I): Message; + fromPartial]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_15 in Exclude]: never; }>(object: I_1): Message; +}; +export declare const MessageEnvelope: { + encode(message: MessageEnvelope, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MessageEnvelope; + fromJSON(object: any): MessageEnvelope; + toJSON(message: MessageEnvelope): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): MessageEnvelope; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): MessageEnvelope; +}; +export declare const SendMessageRequest: { + encode(message: SendMessageRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageRequest; + fromJSON(object: any): SendMessageRequest; + toJSON(message: SendMessageRequest): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }>(base?: I): SendMessageRequest; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_13 in Exclude]: never; })[] & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_19 in Exclude]: never; }>(object: I_1): SendMessageRequest; +}; +export declare const SendMessageResponse: { + encode(message: SendMessageResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageResponse; + fromJSON(object: any): SendMessageResponse; + toJSON(message: SendMessageResponse): unknown; + create]: never; })[] & { [K_1 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_2 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): SendMessageResponse; + fromPartial]: never; })[] & { [K_5 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_6 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): SendMessageResponse; +}; +export declare const SendReceipt: { + encode(message: SendReceipt, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendReceipt; + fromJSON(object: any): SendReceipt; + toJSON(message: SendReceipt): unknown; + create]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_8 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + response?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_10 in Exclude]: never; })[] & { [K_11 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_12 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }>(base?: I): SendReceipt; + fromPartial]: never; }) | undefined; + message?: ({ + header?: { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } | undefined; + senderEnvelope?: { + created?: number | undefined; + } | undefined; + serverEnvelope?: { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } | undefined; + data?: Uint8Array | undefined; + } & { + header?: ({ + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } | undefined; + senderSequence?: number | undefined; + extraHeaders?: { + key?: string | undefined; + val?: string | undefined; + }[] | undefined; + } & { + sender?: string | undefined; + contentType?: ContentType | undefined; + rpcHeader?: ({ + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } | undefined; + } & { + correlationId?: string | undefined; + endPoint?: string | undefined; + frameType?: RpcFrameType | undefined; + errorInfo?: ({ + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { + errorCode?: number | undefined; + message?: string | undefined; + stackTrace?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + senderSequence?: number | undefined; + extraHeaders?: ({ + key?: string | undefined; + val?: string | undefined; + }[] & ({ + key?: string | undefined; + val?: string | undefined; + } & { + key?: string | undefined; + val?: string | undefined; + } & { [K_19 in Exclude]: never; })[] & { [K_20 in Exclude]: never; }) | undefined; + } & { [K_21 in Exclude]: never; }) | undefined; + senderEnvelope?: ({ + created?: number | undefined; + } & { + created?: number | undefined; + } & { [K_22 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_23 in Exclude]: never; }) | undefined; + data?: Uint8Array | undefined; + } & { [K_24 in Exclude]: never; }) | undefined; + channel?: string | undefined; + idempotentId?: string | undefined; + } & { [K_25 in Exclude]: never; }) | undefined; + response?: ({ + errors?: { + message?: string | undefined; + to?: string | undefined; + }[] | undefined; + duplicates?: string[] | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { + errors?: ({ + message?: string | undefined; + to?: string | undefined; + }[] & ({ + message?: string | undefined; + to?: string | undefined; + } & { + message?: string | undefined; + to?: string | undefined; + } & { [K_26 in Exclude]: never; })[] & { [K_27 in Exclude]: never; }) | undefined; + duplicates?: (string[] & string[] & { [K_28 in Exclude]: never; }) | undefined; + idempotentId?: string | undefined; + correlationId?: string | undefined; + } & { [K_29 in Exclude]: never; }) | undefined; + serverEnvelope?: ({ + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { + sequence?: number | undefined; + created?: number | undefined; + channel?: string | undefined; + subscriptionId?: string | undefined; + } & { [K_30 in Exclude]: never; }) | undefined; + } & { [K_31 in Exclude]: never; }>(object: I_1): SendReceipt; +}; +export declare const SendMessageError: { + encode(message: SendMessageError, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SendMessageError; + fromJSON(object: any): SendMessageError; + toJSON(message: SendMessageError): unknown; + create]: never; }>(base?: I): SendMessageError; + fromPartial]: never; }>(object: I_1): SendMessageError; +}; +export declare const FirstMessage: { + encode(message: FirstMessage, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): FirstMessage; + fromJSON(object: any): FirstMessage; + toJSON(message: FirstMessage): unknown; + create]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_2 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; })[] & { [K_5 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_7 in Exclude]: never; }) | undefined; + } & { [K_8 in Exclude]: never; })[] & { [K_9 in Exclude]: never; }) | undefined; + } & { [K_10 in Exclude]: never; }>(base?: I): FirstMessage; + fromPartial]: never; }) | undefined; + mailboxTimeoutInMs?: number | undefined; + subscriptions?: ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + }[] & ({ + mailbox?: { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + nefario?: { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } | undefined; + changeDataCapture?: { + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } | undefined; + unsubscribe?: { + id?: string | undefined; + } | undefined; + } & { + mailbox?: ({ + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + readerKey?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_12 in Exclude]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; })[] & { [K_16 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_17 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_18 in Exclude]: never; }) | undefined; + } & { [K_19 in Exclude]: never; })[] & { [K_20 in Exclude]: never; }) | undefined; + } & { [K_21 in Exclude]: never; }>(object: I_1): FirstMessage; +}; +export declare const SenderInfo: { + encode(message: SenderInfo, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SenderInfo; + fromJSON(object: any): SenderInfo; + toJSON(message: SenderInfo): unknown; + create]: never; }>(base?: I): SenderInfo; + fromPartial]: never; }>(object: I_1): SenderInfo; +}; +export declare const SubscribeRequest: { + encode(message: SubscribeRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeRequest; + fromJSON(object: any): SubscribeRequest; + toJSON(message: SubscribeRequest): unknown; + create]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; })[] & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(base?: I): SubscribeRequest; + fromPartial]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_11 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_12 in Exclude]: never; }) | undefined; + } & { [K_13 in Exclude]: never; })[] & { [K_14 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_15 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_16 in Exclude]: never; }) | undefined; + } & { [K_17 in Exclude]: never; })[] & { [K_18 in Exclude]: never; }) | undefined; + } & { [K_19 in Exclude]: never; }>(object: I_1): SubscribeRequest; +}; +export declare const SubscribeResponse: { + encode(message: SubscribeResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeResponse; + fromJSON(object: any): SubscribeResponse; + toJSON(message: SubscribeResponse): unknown; + create]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_1 in Exclude]: never; })[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): SubscribeResponse; + fromPartial]: never; }) | undefined; + errors?: ({ + state?: string | undefined; + message?: string | undefined; + }[] & ({ + state?: string | undefined; + message?: string | undefined; + } & { + state?: string | undefined; + message?: string | undefined; + } & { [K_5 in Exclude]: never; })[] & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): SubscribeResponse; +}; +export declare const SubscribeError: { + encode(message: SubscribeError, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): SubscribeError; + fromJSON(object: any): SubscribeError; + toJSON(message: SubscribeError): unknown; + create]: never; }>(base?: I): SubscribeError; + fromPartial]: never; }>(object: I_1): SubscribeError; +}; +export declare const Subscription: { + encode(message: Subscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Subscription; + fromJSON(object: any): Subscription; + toJSON(message: Subscription): unknown; + create]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_1 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_2 in Exclude]: never; }) | undefined; + } & { [K_3 in Exclude]: never; })[] & { [K_4 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_5 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_6 in Exclude]: never; }) | undefined; + } & { [K_7 in Exclude]: never; }>(base?: I): Subscription; + fromPartial]: never; }) | undefined; + nefario?: ({ + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + processUid?: string | undefined; + channel?: string | undefined; + startSeq?: string | undefined; + } & { [K_9 in Exclude]: never; }) | undefined; + changeDataCapture?: ({ + id?: string | undefined; + state?: string | undefined; + matchers?: { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] | undefined; + startSeq?: string | undefined; + } & { + id?: string | undefined; + state?: string | undefined; + matchers?: ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + }[] & ({ + database?: string | undefined; + table?: string | undefined; + primaryKeys?: any[] | undefined; + } & { + database?: string | undefined; + table?: string | undefined; + primaryKeys?: (any[] & any[] & { [K_10 in Exclude]: never; }) | undefined; + } & { [K_11 in Exclude]: never; })[] & { [K_12 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_13 in Exclude]: never; }) | undefined; + unsubscribe?: ({ + id?: string | undefined; + } & { + id?: string | undefined; + } & { [K_14 in Exclude]: never; }) | undefined; + } & { [K_15 in Exclude]: never; }>(object: I_1): Subscription; +}; +export declare const MailboxSubscription: { + encode(message: MailboxSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): MailboxSubscription; + fromJSON(object: any): MailboxSubscription; + toJSON(message: MailboxSubscription): unknown; + create]: never; }>(base?: I): MailboxSubscription; + fromPartial]: never; }>(object: I_1): MailboxSubscription; +}; +export declare const ChangeDataCaptureSubscription: { + encode(message: ChangeDataCaptureSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): ChangeDataCaptureSubscription; + fromJSON(object: any): ChangeDataCaptureSubscription; + toJSON(message: ChangeDataCaptureSubscription): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; })[] & { [K_2 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_3 in Exclude]: never; }>(base?: I): ChangeDataCaptureSubscription; + fromPartial]: never; }) | undefined; + } & { [K_5 in Exclude]: never; })[] & { [K_6 in Exclude]: never; }) | undefined; + startSeq?: string | undefined; + } & { [K_7 in Exclude]: never; }>(object: I_1): ChangeDataCaptureSubscription; +}; +export declare const RecordMatcher: { + encode(message: RecordMatcher, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): RecordMatcher; + fromJSON(object: any): RecordMatcher; + toJSON(message: RecordMatcher): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): RecordMatcher; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): RecordMatcher; +}; +export declare const NefarioSubscription: { + encode(message: NefarioSubscription, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): NefarioSubscription; + fromJSON(object: any): NefarioSubscription; + toJSON(message: NefarioSubscription): unknown; + create]: never; }>(base?: I): NefarioSubscription; + fromPartial]: never; }>(object: I_1): NefarioSubscription; +}; +export declare const Unsubscribe: { + encode(message: Unsubscribe, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): Unsubscribe; + fromJSON(object: any): Unsubscribe; + toJSON(message: Unsubscribe): unknown; + create]: never; }>(base?: I): Unsubscribe; + fromPartial]: never; }>(object: I_1): Unsubscribe; +}; +export declare const CreateMailboxRequest: { + encode(message: CreateMailboxRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): CreateMailboxRequest; + fromJSON(object: any): CreateMailboxRequest; + toJSON(message: CreateMailboxRequest): unknown; + create]: never; }) | undefined; + privateMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_1 in Exclude]: never; }) | undefined; + publicMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_2 in Exclude]: never; }) | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_3 in Exclude]: never; }) | undefined; + } & { [K_4 in Exclude]: never; }>(base?: I): CreateMailboxRequest; + fromPartial]: never; }) | undefined; + privateMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_6 in Exclude]: never; }) | undefined; + publicMetadata?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_7 in Exclude]: never; }) | undefined; + purgeTimeoutInMillis?: number | undefined; + closeTimeoutInMillis?: number | undefined; + extraData?: ({ + [x: string]: any; + } & { + [x: string]: any; + } & { [K_8 in Exclude]: never; }) | undefined; + } & { [K_9 in Exclude]: never; }>(object: I_1): CreateMailboxRequest; +}; +export declare const CreateMailboxResponse: { + encode(message: CreateMailboxResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): CreateMailboxResponse; + fromJSON(object: any): CreateMailboxResponse; + toJSON(message: CreateMailboxResponse): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): CreateMailboxResponse; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): CreateMailboxResponse; +}; +export declare const AddChannelRequest: { + encode(message: AddChannelRequest, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddChannelRequest; + fromJSON(object: any): AddChannelRequest; + toJSON(message: AddChannelRequest): unknown; + create]: never; }) | undefined; + } & { [K_1 in Exclude]: never; }>(base?: I): AddChannelRequest; + fromPartial]: never; }) | undefined; + } & { [K_3 in Exclude]: never; }>(object: I_1): AddChannelRequest; +}; +export declare const AddChannelResponse: { + encode(_: AddChannelResponse, writer?: _m0.Writer): _m0.Writer; + decode(input: _m0.Reader | Uint8Array, length?: number): AddChannelResponse; + fromJSON(_: any): AddChannelResponse; + toJSON(_: AddChannelResponse): unknown; + create]: never; }>(base?: I): AddChannelResponse; + fromPartial]: never; }>(_: I_1): AddChannelResponse; +}; +export interface HermesService { + SendReceive(request: Observable): Observable; + CreateMailbox(request: CreateMailboxRequest): Promise; + AddChannel(request: AddChannelRequest): Promise; +} +export declare const HermesServiceServiceName = "hermes.HermesService"; +export declare class HermesServiceClientImpl implements HermesService { + private readonly rpc; + private readonly service; + constructor(rpc: Rpc, opts?: { + service?: string; + }); + SendReceive(request: Observable): Observable; + CreateMailbox(request: CreateMailboxRequest): Promise; + AddChannel(request: AddChannelRequest): Promise; +} +interface Rpc { + request(service: string, method: string, data: Uint8Array): Promise; + clientStreamingRequest(service: string, method: string, data: Observable): Promise; + serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; + bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; +} +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { + [K in keyof T]?: DeepPartial; +} : Partial; +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P : P & { + [K in keyof P]: Exact; +} & { + [K in Exclude>]: never; +}; +export {}; diff --git a/lib/esm/hermesclient/proto/wsmessages.js b/lib/esm/hermesclient/proto/wsmessages.js new file mode 100644 index 0000000..a0247cd --- /dev/null +++ b/lib/esm/hermesclient/proto/wsmessages.js @@ -0,0 +1,2880 @@ +/* eslint-disable */ +import * as _m0 from "protobufjs/minimal"; +import { map } from "rxjs/operators"; +import { Struct, Value } from "../google/protobuf/struct"; +import Long from "long"; +export const protobufPackage = "hermes"; +export var RpcFrameType; +(function (RpcFrameType) { + RpcFrameType[RpcFrameType["UnspecifiedRFT"] = 0] = "UnspecifiedRFT"; + RpcFrameType[RpcFrameType["Request"] = 1] = "Request"; + RpcFrameType[RpcFrameType["SuccessResponse"] = 2] = "SuccessResponse"; + RpcFrameType[RpcFrameType["ErrorResponse"] = 3] = "ErrorResponse"; + RpcFrameType[RpcFrameType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(RpcFrameType || (RpcFrameType = {})); +export function rpcFrameTypeFromJSON(object) { + switch (object) { + case 0: + case "UnspecifiedRFT": + return RpcFrameType.UnspecifiedRFT; + case 1: + case "Request": + return RpcFrameType.Request; + case 2: + case "SuccessResponse": + return RpcFrameType.SuccessResponse; + case 3: + case "ErrorResponse": + return RpcFrameType.ErrorResponse; + case -1: + case "UNRECOGNIZED": + default: + return RpcFrameType.UNRECOGNIZED; + } +} +export function rpcFrameTypeToJSON(object) { + switch (object) { + case RpcFrameType.UnspecifiedRFT: + return "UnspecifiedRFT"; + case RpcFrameType.Request: + return "Request"; + case RpcFrameType.SuccessResponse: + return "SuccessResponse"; + case RpcFrameType.ErrorResponse: + return "ErrorResponse"; + case RpcFrameType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +export var ContentType; +(function (ContentType) { + ContentType[ContentType["UnspecifiedCT"] = 0] = "UnspecifiedCT"; + ContentType[ContentType["Protobuf"] = 1] = "Protobuf"; + ContentType[ContentType["Json"] = 2] = "Json"; + ContentType[ContentType["Binary"] = 3] = "Binary"; + ContentType[ContentType["Text"] = 4] = "Text"; + ContentType[ContentType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED"; +})(ContentType || (ContentType = {})); +export function contentTypeFromJSON(object) { + switch (object) { + case 0: + case "UnspecifiedCT": + return ContentType.UnspecifiedCT; + case 1: + case "Protobuf": + return ContentType.Protobuf; + case 2: + case "Json": + return ContentType.Json; + case 3: + case "Binary": + return ContentType.Binary; + case 4: + case "Text": + return ContentType.Text; + case -1: + case "UNRECOGNIZED": + default: + return ContentType.UNRECOGNIZED; + } +} +export function contentTypeToJSON(object) { + switch (object) { + case ContentType.UnspecifiedCT: + return "UnspecifiedCT"; + case ContentType.Protobuf: + return "Protobuf"; + case ContentType.Json: + return "Json"; + case ContentType.Binary: + return "Binary"; + case ContentType.Text: + return "Text"; + case ContentType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} +function createBaseMessageFromClient() { + return { + sendMessageRequest: undefined, + firstMessage: undefined, + ping: undefined, + pong: undefined, + notification: undefined, + subscribeRequest: undefined, + }; +} +export const MessageFromClient = { + encode(message, writer = _m0.Writer.create()) { + if (message.sendMessageRequest !== undefined) { + SendMessageRequest.encode(message.sendMessageRequest, writer.uint32(10).fork()).ldelim(); + } + if (message.firstMessage !== undefined) { + FirstMessage.encode(message.firstMessage, writer.uint32(18).fork()).ldelim(); + } + if (message.ping !== undefined) { + Ping.encode(message.ping, writer.uint32(26).fork()).ldelim(); + } + if (message.pong !== undefined) { + Pong.encode(message.pong, writer.uint32(34).fork()).ldelim(); + } + if (message.notification !== undefined) { + Notification.encode(message.notification, writer.uint32(42).fork()).ldelim(); + } + if (message.subscribeRequest !== undefined) { + SubscribeRequest.encode(message.subscribeRequest, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageFromClient(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.sendMessageRequest = SendMessageRequest.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.firstMessage = FirstMessage.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.ping = Ping.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.pong = Pong.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + message.notification = Notification.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.subscribeRequest = SubscribeRequest.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sendMessageRequest: isSet(object.sendMessageRequest) + ? SendMessageRequest.fromJSON(object.sendMessageRequest) + : undefined, + firstMessage: isSet(object.firstMessage) ? FirstMessage.fromJSON(object.firstMessage) : undefined, + ping: isSet(object.ping) ? Ping.fromJSON(object.ping) : undefined, + pong: isSet(object.pong) ? Pong.fromJSON(object.pong) : undefined, + notification: isSet(object.notification) ? Notification.fromJSON(object.notification) : undefined, + subscribeRequest: isSet(object.subscribeRequest) ? SubscribeRequest.fromJSON(object.subscribeRequest) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.sendMessageRequest !== undefined) { + obj.sendMessageRequest = SendMessageRequest.toJSON(message.sendMessageRequest); + } + if (message.firstMessage !== undefined) { + obj.firstMessage = FirstMessage.toJSON(message.firstMessage); + } + if (message.ping !== undefined) { + obj.ping = Ping.toJSON(message.ping); + } + if (message.pong !== undefined) { + obj.pong = Pong.toJSON(message.pong); + } + if (message.notification !== undefined) { + obj.notification = Notification.toJSON(message.notification); + } + if (message.subscribeRequest !== undefined) { + obj.subscribeRequest = SubscribeRequest.toJSON(message.subscribeRequest); + } + return obj; + }, + create(base) { + return MessageFromClient.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseMessageFromClient(); + message.sendMessageRequest = (object.sendMessageRequest !== undefined && object.sendMessageRequest !== null) + ? SendMessageRequest.fromPartial(object.sendMessageRequest) + : undefined; + message.firstMessage = (object.firstMessage !== undefined && object.firstMessage !== null) + ? FirstMessage.fromPartial(object.firstMessage) + : undefined; + message.ping = (object.ping !== undefined && object.ping !== null) ? Ping.fromPartial(object.ping) : undefined; + message.pong = (object.pong !== undefined && object.pong !== null) ? Pong.fromPartial(object.pong) : undefined; + message.notification = (object.notification !== undefined && object.notification !== null) + ? Notification.fromPartial(object.notification) + : undefined; + message.subscribeRequest = (object.subscribeRequest !== undefined && object.subscribeRequest !== null) + ? SubscribeRequest.fromPartial(object.subscribeRequest) + : undefined; + return message; + }, +}; +function createBaseNotification() { + return { message: "" }; +} +export const Notification = { + encode(message, writer = _m0.Writer.create()) { + if (message.message !== undefined && message.message !== "") { + writer.uint32(10).string(message.message); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNotification(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { message: isSet(object.message) ? globalThis.String(object.message) : "" }; + }, + toJSON(message) { + const obj = {}; + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + return obj; + }, + create(base) { + return Notification.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseNotification(); + message.message = (_a = object.message) !== null && _a !== void 0 ? _a : ""; + return message; + }, +}; +function createBaseMessageToClient() { + return { + messageEnvelope: undefined, + sendMessageResponse: undefined, + ping: undefined, + pong: undefined, + notification: undefined, + subscribeResponse: undefined, + }; +} +export const MessageToClient = { + encode(message, writer = _m0.Writer.create()) { + if (message.messageEnvelope !== undefined) { + MessageEnvelope.encode(message.messageEnvelope, writer.uint32(10).fork()).ldelim(); + } + if (message.sendMessageResponse !== undefined) { + SendMessageResponse.encode(message.sendMessageResponse, writer.uint32(18).fork()).ldelim(); + } + if (message.ping !== undefined) { + Ping.encode(message.ping, writer.uint32(26).fork()).ldelim(); + } + if (message.pong !== undefined) { + Pong.encode(message.pong, writer.uint32(34).fork()).ldelim(); + } + if (message.notification !== undefined) { + Notification.encode(message.notification, writer.uint32(42).fork()).ldelim(); + } + if (message.subscribeResponse !== undefined) { + SubscribeResponse.encode(message.subscribeResponse, writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageToClient(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.messageEnvelope = MessageEnvelope.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.sendMessageResponse = SendMessageResponse.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.ping = Ping.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.pong = Pong.decode(reader, reader.uint32()); + continue; + case 5: + if (tag !== 42) { + break; + } + message.notification = Notification.decode(reader, reader.uint32()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.subscribeResponse = SubscribeResponse.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + messageEnvelope: isSet(object.messageEnvelope) ? MessageEnvelope.fromJSON(object.messageEnvelope) : undefined, + sendMessageResponse: isSet(object.sendMessageResponse) + ? SendMessageResponse.fromJSON(object.sendMessageResponse) + : undefined, + ping: isSet(object.ping) ? Ping.fromJSON(object.ping) : undefined, + pong: isSet(object.pong) ? Pong.fromJSON(object.pong) : undefined, + notification: isSet(object.notification) ? Notification.fromJSON(object.notification) : undefined, + subscribeResponse: isSet(object.subscribeResponse) + ? SubscribeResponse.fromJSON(object.subscribeResponse) + : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.messageEnvelope !== undefined) { + obj.messageEnvelope = MessageEnvelope.toJSON(message.messageEnvelope); + } + if (message.sendMessageResponse !== undefined) { + obj.sendMessageResponse = SendMessageResponse.toJSON(message.sendMessageResponse); + } + if (message.ping !== undefined) { + obj.ping = Ping.toJSON(message.ping); + } + if (message.pong !== undefined) { + obj.pong = Pong.toJSON(message.pong); + } + if (message.notification !== undefined) { + obj.notification = Notification.toJSON(message.notification); + } + if (message.subscribeResponse !== undefined) { + obj.subscribeResponse = SubscribeResponse.toJSON(message.subscribeResponse); + } + return obj; + }, + create(base) { + return MessageToClient.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseMessageToClient(); + message.messageEnvelope = (object.messageEnvelope !== undefined && object.messageEnvelope !== null) + ? MessageEnvelope.fromPartial(object.messageEnvelope) + : undefined; + message.sendMessageResponse = (object.sendMessageResponse !== undefined && object.sendMessageResponse !== null) + ? SendMessageResponse.fromPartial(object.sendMessageResponse) + : undefined; + message.ping = (object.ping !== undefined && object.ping !== null) ? Ping.fromPartial(object.ping) : undefined; + message.pong = (object.pong !== undefined && object.pong !== null) ? Pong.fromPartial(object.pong) : undefined; + message.notification = (object.notification !== undefined && object.notification !== null) + ? Notification.fromPartial(object.notification) + : undefined; + message.subscribeResponse = (object.subscribeResponse !== undefined && object.subscribeResponse !== null) + ? SubscribeResponse.fromPartial(object.subscribeResponse) + : undefined; + return message; + }, +}; +function createBasePing() { + return { payload: new Uint8Array(0) }; +} +export const Ping = { + encode(message, writer = _m0.Writer.create()) { + if (message.payload !== undefined && message.payload.length !== 0) { + writer.uint32(10).bytes(message.payload); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePing(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) }; + }, + toJSON(message) { + const obj = {}; + if (message.payload !== undefined && message.payload.length !== 0) { + obj.payload = base64FromBytes(message.payload); + } + return obj; + }, + create(base) { + return Ping.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBasePing(); + message.payload = (_a = object.payload) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBasePong() { + return { payload: new Uint8Array(0) }; +} +export const Pong = { + encode(message, writer = _m0.Writer.create()) { + if (message.payload !== undefined && message.payload.length !== 0) { + writer.uint32(10).bytes(message.payload); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBasePong(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.payload = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { payload: isSet(object.payload) ? bytesFromBase64(object.payload) : new Uint8Array(0) }; + }, + toJSON(message) { + const obj = {}; + if (message.payload !== undefined && message.payload.length !== 0) { + obj.payload = base64FromBytes(message.payload); + } + return obj; + }, + create(base) { + return Pong.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBasePong(); + message.payload = (_a = object.payload) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBaseMessageHeader() { + return { sender: "", contentType: 0, rpcHeader: undefined, senderSequence: 0, extraHeaders: [] }; +} +export const MessageHeader = { + encode(message, writer = _m0.Writer.create()) { + if (message.sender !== undefined && message.sender !== "") { + writer.uint32(10).string(message.sender); + } + if (message.contentType !== undefined && message.contentType !== 0) { + writer.uint32(16).int32(message.contentType); + } + if (message.rpcHeader !== undefined) { + RpcHeader.encode(message.rpcHeader, writer.uint32(26).fork()).ldelim(); + } + if (message.senderSequence !== undefined && message.senderSequence !== 0) { + writer.uint32(32).int64(message.senderSequence); + } + if (message.extraHeaders !== undefined && message.extraHeaders.length !== 0) { + for (const v of message.extraHeaders) { + KeyValPair.encode(v, writer.uint32(1602).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageHeader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.sender = reader.string(); + continue; + case 2: + if (tag !== 16) { + break; + } + message.contentType = reader.int32(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.rpcHeader = RpcHeader.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 32) { + break; + } + message.senderSequence = longToNumber(reader.int64()); + continue; + case 200: + if (tag !== 1602) { + break; + } + message.extraHeaders.push(KeyValPair.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sender: isSet(object.sender) ? globalThis.String(object.sender) : "", + contentType: isSet(object.contentType) ? contentTypeFromJSON(object.contentType) : 0, + rpcHeader: isSet(object.rpcHeader) ? RpcHeader.fromJSON(object.rpcHeader) : undefined, + senderSequence: isSet(object.senderSequence) ? globalThis.Number(object.senderSequence) : 0, + extraHeaders: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.extraHeaders) + ? object.extraHeaders.map((e) => KeyValPair.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.sender !== undefined && message.sender !== "") { + obj.sender = message.sender; + } + if (message.contentType !== undefined && message.contentType !== 0) { + obj.contentType = contentTypeToJSON(message.contentType); + } + if (message.rpcHeader !== undefined) { + obj.rpcHeader = RpcHeader.toJSON(message.rpcHeader); + } + if (message.senderSequence !== undefined && message.senderSequence !== 0) { + obj.senderSequence = Math.round(message.senderSequence); + } + if ((_a = message.extraHeaders) === null || _a === void 0 ? void 0 : _a.length) { + obj.extraHeaders = message.extraHeaders.map((e) => KeyValPair.toJSON(e)); + } + return obj; + }, + create(base) { + return MessageHeader.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseMessageHeader(); + message.sender = (_a = object.sender) !== null && _a !== void 0 ? _a : ""; + message.contentType = (_b = object.contentType) !== null && _b !== void 0 ? _b : 0; + message.rpcHeader = (object.rpcHeader !== undefined && object.rpcHeader !== null) + ? RpcHeader.fromPartial(object.rpcHeader) + : undefined; + message.senderSequence = (_c = object.senderSequence) !== null && _c !== void 0 ? _c : 0; + message.extraHeaders = ((_d = object.extraHeaders) === null || _d === void 0 ? void 0 : _d.map((e) => KeyValPair.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSenderEnvelope() { + return { created: 0 }; +} +export const SenderEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.created !== undefined && message.created !== 0) { + writer.uint32(8).int64(message.created); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSenderEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.created = longToNumber(reader.int64()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { created: isSet(object.created) ? globalThis.Number(object.created) : 0 }; + }, + toJSON(message) { + const obj = {}; + if (message.created !== undefined && message.created !== 0) { + obj.created = Math.round(message.created); + } + return obj; + }, + create(base) { + return SenderEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseSenderEnvelope(); + message.created = (_a = object.created) !== null && _a !== void 0 ? _a : 0; + return message; + }, +}; +function createBaseServerEnvelope() { + return { sequence: 0, created: 0, channel: "", subscriptionId: "" }; +} +export const ServerEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.sequence !== undefined && message.sequence !== 0) { + writer.uint32(8).uint64(message.sequence); + } + if (message.created !== undefined && message.created !== 0) { + writer.uint32(16).int64(message.created); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(26).string(message.channel); + } + if (message.subscriptionId !== undefined && message.subscriptionId !== "") { + writer.uint32(34).string(message.subscriptionId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseServerEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.sequence = longToNumber(reader.uint64()); + continue; + case 2: + if (tag !== 16) { + break; + } + message.created = longToNumber(reader.int64()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.channel = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.subscriptionId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0, + created: isSet(object.created) ? globalThis.Number(object.created) : 0, + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + subscriptionId: isSet(object.subscriptionId) ? globalThis.String(object.subscriptionId) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.sequence !== undefined && message.sequence !== 0) { + obj.sequence = Math.round(message.sequence); + } + if (message.created !== undefined && message.created !== 0) { + obj.created = Math.round(message.created); + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.subscriptionId !== undefined && message.subscriptionId !== "") { + obj.subscriptionId = message.subscriptionId; + } + return obj; + }, + create(base) { + return ServerEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseServerEnvelope(); + message.sequence = (_a = object.sequence) !== null && _a !== void 0 ? _a : 0; + message.created = (_b = object.created) !== null && _b !== void 0 ? _b : 0; + message.channel = (_c = object.channel) !== null && _c !== void 0 ? _c : ""; + message.subscriptionId = (_d = object.subscriptionId) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseKeyValPair() { + return { key: "", val: "" }; +} +export const KeyValPair = { + encode(message, writer = _m0.Writer.create()) { + if (message.key !== undefined && message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.val !== undefined && message.val !== "") { + writer.uint32(18).string(message.val); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseKeyValPair(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.key = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.val = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + val: isSet(object.val) ? globalThis.String(object.val) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.key !== undefined && message.key !== "") { + obj.key = message.key; + } + if (message.val !== undefined && message.val !== "") { + obj.val = message.val; + } + return obj; + }, + create(base) { + return KeyValPair.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseKeyValPair(); + message.key = (_a = object.key) !== null && _a !== void 0 ? _a : ""; + message.val = (_b = object.val) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseRpcHeader() { + return { correlationId: "", endPoint: "", frameType: 0, errorInfo: undefined }; +} +export const RpcHeader = { + encode(message, writer = _m0.Writer.create()) { + if (message.correlationId !== undefined && message.correlationId !== "") { + writer.uint32(18).string(message.correlationId); + } + if (message.endPoint !== undefined && message.endPoint !== "") { + writer.uint32(26).string(message.endPoint); + } + if (message.frameType !== undefined && message.frameType !== 0) { + writer.uint32(32).int32(message.frameType); + } + if (message.errorInfo !== undefined) { + RpcErrorInfo.encode(message.errorInfo, writer.uint32(42).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRpcHeader(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + message.correlationId = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.endPoint = reader.string(); + continue; + case 4: + if (tag !== 32) { + break; + } + message.frameType = reader.int32(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.errorInfo = RpcErrorInfo.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + correlationId: isSet(object.correlationId) ? globalThis.String(object.correlationId) : "", + endPoint: isSet(object.endPoint) ? globalThis.String(object.endPoint) : "", + frameType: isSet(object.frameType) ? rpcFrameTypeFromJSON(object.frameType) : 0, + errorInfo: isSet(object.errorInfo) ? RpcErrorInfo.fromJSON(object.errorInfo) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.correlationId !== undefined && message.correlationId !== "") { + obj.correlationId = message.correlationId; + } + if (message.endPoint !== undefined && message.endPoint !== "") { + obj.endPoint = message.endPoint; + } + if (message.frameType !== undefined && message.frameType !== 0) { + obj.frameType = rpcFrameTypeToJSON(message.frameType); + } + if (message.errorInfo !== undefined) { + obj.errorInfo = RpcErrorInfo.toJSON(message.errorInfo); + } + return obj; + }, + create(base) { + return RpcHeader.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRpcHeader(); + message.correlationId = (_a = object.correlationId) !== null && _a !== void 0 ? _a : ""; + message.endPoint = (_b = object.endPoint) !== null && _b !== void 0 ? _b : ""; + message.frameType = (_c = object.frameType) !== null && _c !== void 0 ? _c : 0; + message.errorInfo = (object.errorInfo !== undefined && object.errorInfo !== null) + ? RpcErrorInfo.fromPartial(object.errorInfo) + : undefined; + return message; + }, +}; +function createBaseRpcErrorInfo() { + return { errorCode: 0, message: "", stackTrace: "" }; +} +export const RpcErrorInfo = { + encode(message, writer = _m0.Writer.create()) { + if (message.errorCode !== undefined && message.errorCode !== 0) { + writer.uint32(8).uint32(message.errorCode); + } + if (message.message !== undefined && message.message !== "") { + writer.uint32(18).string(message.message); + } + if (message.stackTrace !== undefined && message.stackTrace !== "") { + writer.uint32(26).string(message.stackTrace); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRpcErrorInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 8) { + break; + } + message.errorCode = reader.uint32(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.message = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.stackTrace = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + errorCode: isSet(object.errorCode) ? globalThis.Number(object.errorCode) : 0, + message: isSet(object.message) ? globalThis.String(object.message) : "", + stackTrace: isSet(object.stackTrace) ? globalThis.String(object.stackTrace) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.errorCode !== undefined && message.errorCode !== 0) { + obj.errorCode = Math.round(message.errorCode); + } + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + if (message.stackTrace !== undefined && message.stackTrace !== "") { + obj.stackTrace = message.stackTrace; + } + return obj; + }, + create(base) { + return RpcErrorInfo.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRpcErrorInfo(); + message.errorCode = (_a = object.errorCode) !== null && _a !== void 0 ? _a : 0; + message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; + message.stackTrace = (_c = object.stackTrace) !== null && _c !== void 0 ? _c : ""; + return message; + }, +}; +function createBaseMessage() { + return { header: undefined, senderEnvelope: undefined, serverEnvelope: undefined, data: new Uint8Array(0) }; +} +export const Message = { + encode(message, writer = _m0.Writer.create()) { + if (message.header !== undefined) { + MessageHeader.encode(message.header, writer.uint32(10).fork()).ldelim(); + } + if (message.senderEnvelope !== undefined) { + SenderEnvelope.encode(message.senderEnvelope, writer.uint32(18).fork()).ldelim(); + } + if (message.serverEnvelope !== undefined) { + ServerEnvelope.encode(message.serverEnvelope, writer.uint32(26).fork()).ldelim(); + } + if (message.data !== undefined && message.data.length !== 0) { + writer.uint32(34).bytes(message.data); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessage(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.header = MessageHeader.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.senderEnvelope = SenderEnvelope.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.serverEnvelope = ServerEnvelope.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.data = reader.bytes(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + header: isSet(object.header) ? MessageHeader.fromJSON(object.header) : undefined, + senderEnvelope: isSet(object.senderEnvelope) ? SenderEnvelope.fromJSON(object.senderEnvelope) : undefined, + serverEnvelope: isSet(object.serverEnvelope) ? ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), + }; + }, + toJSON(message) { + const obj = {}; + if (message.header !== undefined) { + obj.header = MessageHeader.toJSON(message.header); + } + if (message.senderEnvelope !== undefined) { + obj.senderEnvelope = SenderEnvelope.toJSON(message.senderEnvelope); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = ServerEnvelope.toJSON(message.serverEnvelope); + } + if (message.data !== undefined && message.data.length !== 0) { + obj.data = base64FromBytes(message.data); + } + return obj; + }, + create(base) { + return Message.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseMessage(); + message.header = (object.header !== undefined && object.header !== null) + ? MessageHeader.fromPartial(object.header) + : undefined; + message.senderEnvelope = (object.senderEnvelope !== undefined && object.senderEnvelope !== null) + ? SenderEnvelope.fromPartial(object.senderEnvelope) + : undefined; + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + message.data = (_a = object.data) !== null && _a !== void 0 ? _a : new Uint8Array(0); + return message; + }, +}; +function createBaseMessageEnvelope() { + return { messageBytes: new Uint8Array(0), serverEnvelope: undefined }; +} +export const MessageEnvelope = { + encode(message, writer = _m0.Writer.create()) { + if (message.messageBytes !== undefined && message.messageBytes.length !== 0) { + writer.uint32(10).bytes(message.messageBytes); + } + if (message.serverEnvelope !== undefined) { + ServerEnvelope.encode(message.serverEnvelope, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMessageEnvelope(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.messageBytes = reader.bytes(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.serverEnvelope = ServerEnvelope.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + messageBytes: isSet(object.messageBytes) ? bytesFromBase64(object.messageBytes) : new Uint8Array(0), + serverEnvelope: isSet(object.serverEnvelope) ? ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.messageBytes !== undefined && message.messageBytes.length !== 0) { + obj.messageBytes = base64FromBytes(message.messageBytes); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = ServerEnvelope.toJSON(message.serverEnvelope); + } + return obj; + }, + create(base) { + return MessageEnvelope.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseMessageEnvelope(); + message.messageBytes = (_a = object.messageBytes) !== null && _a !== void 0 ? _a : new Uint8Array(0); + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + return message; + }, +}; +function createBaseSendMessageRequest() { + return { to: [], message: undefined, channel: "", idempotentId: "" }; +} +export const SendMessageRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.to !== undefined && message.to.length !== 0) { + for (const v of message.to) { + writer.uint32(10).string(v); + } + } + if (message.message !== undefined) { + Message.encode(message.message, writer.uint32(18).fork()).ldelim(); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(26).string(message.channel); + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + writer.uint32(34).string(message.idempotentId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.to.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.message = Message.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.channel = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.idempotentId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + to: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.to) ? object.to.map((e) => globalThis.String(e)) : [], + message: isSet(object.message) ? Message.fromJSON(object.message) : undefined, + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + idempotentId: isSet(object.idempotentId) ? globalThis.String(object.idempotentId) : "", + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.to) === null || _a === void 0 ? void 0 : _a.length) { + obj.to = message.to; + } + if (message.message !== undefined) { + obj.message = Message.toJSON(message.message); + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + obj.idempotentId = message.idempotentId; + } + return obj; + }, + create(base) { + return SendMessageRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseSendMessageRequest(); + message.to = ((_a = object.to) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.message = (object.message !== undefined && object.message !== null) + ? Message.fromPartial(object.message) + : undefined; + message.channel = (_b = object.channel) !== null && _b !== void 0 ? _b : ""; + message.idempotentId = (_c = object.idempotentId) !== null && _c !== void 0 ? _c : ""; + return message; + }, +}; +function createBaseSendMessageResponse() { + return { errors: [], duplicates: [], idempotentId: "", correlationId: "" }; +} +export const SendMessageResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.errors !== undefined && message.errors.length !== 0) { + for (const v of message.errors) { + SendMessageError.encode(v, writer.uint32(10).fork()).ldelim(); + } + } + if (message.duplicates !== undefined && message.duplicates.length !== 0) { + for (const v of message.duplicates) { + writer.uint32(18).string(v); + } + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + writer.uint32(26).string(message.idempotentId); + } + if (message.correlationId !== undefined && message.correlationId !== "") { + writer.uint32(34).string(message.correlationId); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.errors.push(SendMessageError.decode(reader, reader.uint32())); + continue; + case 2: + if (tag !== 18) { + break; + } + message.duplicates.push(reader.string()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.idempotentId = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.correlationId = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + errors: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.errors) + ? object.errors.map((e) => SendMessageError.fromJSON(e)) + : [], + duplicates: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.duplicates) + ? object.duplicates.map((e) => globalThis.String(e)) + : [], + idempotentId: isSet(object.idempotentId) ? globalThis.String(object.idempotentId) : "", + correlationId: isSet(object.correlationId) ? globalThis.String(object.correlationId) : "", + }; + }, + toJSON(message) { + var _a, _b; + const obj = {}; + if ((_a = message.errors) === null || _a === void 0 ? void 0 : _a.length) { + obj.errors = message.errors.map((e) => SendMessageError.toJSON(e)); + } + if ((_b = message.duplicates) === null || _b === void 0 ? void 0 : _b.length) { + obj.duplicates = message.duplicates; + } + if (message.idempotentId !== undefined && message.idempotentId !== "") { + obj.idempotentId = message.idempotentId; + } + if (message.correlationId !== undefined && message.correlationId !== "") { + obj.correlationId = message.correlationId; + } + return obj; + }, + create(base) { + return SendMessageResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseSendMessageResponse(); + message.errors = ((_a = object.errors) === null || _a === void 0 ? void 0 : _a.map((e) => SendMessageError.fromPartial(e))) || []; + message.duplicates = ((_b = object.duplicates) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || []; + message.idempotentId = (_c = object.idempotentId) !== null && _c !== void 0 ? _c : ""; + message.correlationId = (_d = object.correlationId) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseSendReceipt() { + return { request: undefined, response: undefined, serverEnvelope: undefined }; +} +export const SendReceipt = { + encode(message, writer = _m0.Writer.create()) { + if (message.request !== undefined) { + SendMessageRequest.encode(message.request, writer.uint32(10).fork()).ldelim(); + } + if (message.response !== undefined) { + SendMessageResponse.encode(message.response, writer.uint32(18).fork()).ldelim(); + } + if (message.serverEnvelope !== undefined) { + ServerEnvelope.encode(message.serverEnvelope, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendReceipt(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.request = SendMessageRequest.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.response = SendMessageResponse.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.serverEnvelope = ServerEnvelope.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + request: isSet(object.request) ? SendMessageRequest.fromJSON(object.request) : undefined, + response: isSet(object.response) ? SendMessageResponse.fromJSON(object.response) : undefined, + serverEnvelope: isSet(object.serverEnvelope) ? ServerEnvelope.fromJSON(object.serverEnvelope) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.request !== undefined) { + obj.request = SendMessageRequest.toJSON(message.request); + } + if (message.response !== undefined) { + obj.response = SendMessageResponse.toJSON(message.response); + } + if (message.serverEnvelope !== undefined) { + obj.serverEnvelope = ServerEnvelope.toJSON(message.serverEnvelope); + } + return obj; + }, + create(base) { + return SendReceipt.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseSendReceipt(); + message.request = (object.request !== undefined && object.request !== null) + ? SendMessageRequest.fromPartial(object.request) + : undefined; + message.response = (object.response !== undefined && object.response !== null) + ? SendMessageResponse.fromPartial(object.response) + : undefined; + message.serverEnvelope = (object.serverEnvelope !== undefined && object.serverEnvelope !== null) + ? ServerEnvelope.fromPartial(object.serverEnvelope) + : undefined; + return message; + }, +}; +function createBaseSendMessageError() { + return { message: "", to: "" }; +} +export const SendMessageError = { + encode(message, writer = _m0.Writer.create()) { + if (message.message !== undefined && message.message !== "") { + writer.uint32(10).string(message.message); + } + if (message.to !== undefined && message.to !== "") { + writer.uint32(18).string(message.to); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSendMessageError(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.message = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.to = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + message: isSet(object.message) ? globalThis.String(object.message) : "", + to: isSet(object.to) ? globalThis.String(object.to) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + if (message.to !== undefined && message.to !== "") { + obj.to = message.to; + } + return obj; + }, + create(base) { + return SendMessageError.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSendMessageError(); + message.message = (_a = object.message) !== null && _a !== void 0 ? _a : ""; + message.to = (_b = object.to) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseFirstMessage() { + return { senderInfo: undefined, mailboxTimeoutInMs: 0, subscriptions: [] }; +} +export const FirstMessage = { + encode(message, writer = _m0.Writer.create()) { + if (message.senderInfo !== undefined) { + SenderInfo.encode(message.senderInfo, writer.uint32(10).fork()).ldelim(); + } + if (message.mailboxTimeoutInMs !== undefined && message.mailboxTimeoutInMs !== 0) { + writer.uint32(16).uint32(message.mailboxTimeoutInMs); + } + if (message.subscriptions !== undefined && message.subscriptions.length !== 0) { + for (const v of message.subscriptions) { + Subscription.encode(v, writer.uint32(26).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFirstMessage(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.senderInfo = SenderInfo.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 16) { + break; + } + message.mailboxTimeoutInMs = reader.uint32(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.subscriptions.push(Subscription.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + senderInfo: isSet(object.senderInfo) ? SenderInfo.fromJSON(object.senderInfo) : undefined, + mailboxTimeoutInMs: isSet(object.mailboxTimeoutInMs) ? globalThis.Number(object.mailboxTimeoutInMs) : 0, + subscriptions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.subscriptions) + ? object.subscriptions.map((e) => Subscription.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.senderInfo !== undefined) { + obj.senderInfo = SenderInfo.toJSON(message.senderInfo); + } + if (message.mailboxTimeoutInMs !== undefined && message.mailboxTimeoutInMs !== 0) { + obj.mailboxTimeoutInMs = Math.round(message.mailboxTimeoutInMs); + } + if ((_a = message.subscriptions) === null || _a === void 0 ? void 0 : _a.length) { + obj.subscriptions = message.subscriptions.map((e) => Subscription.toJSON(e)); + } + return obj; + }, + create(base) { + return FirstMessage.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseFirstMessage(); + message.senderInfo = (object.senderInfo !== undefined && object.senderInfo !== null) + ? SenderInfo.fromPartial(object.senderInfo) + : undefined; + message.mailboxTimeoutInMs = (_a = object.mailboxTimeoutInMs) !== null && _a !== void 0 ? _a : 0; + message.subscriptions = ((_b = object.subscriptions) === null || _b === void 0 ? void 0 : _b.map((e) => Subscription.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSenderInfo() { + return { readerKey: "", address: "" }; +} +export const SenderInfo = { + encode(message, writer = _m0.Writer.create()) { + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(10).string(message.readerKey); + } + if (message.address !== undefined && message.address !== "") { + writer.uint32(18).string(message.address); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSenderInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.readerKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.address = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + address: isSet(object.address) ? globalThis.String(object.address) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if (message.address !== undefined && message.address !== "") { + obj.address = message.address; + } + return obj; + }, + create(base) { + return SenderInfo.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSenderInfo(); + message.readerKey = (_a = object.readerKey) !== null && _a !== void 0 ? _a : ""; + message.address = (_b = object.address) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseSubscribeRequest() { + return { subscriptions: [] }; +} +export const SubscribeRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.subscriptions !== undefined && message.subscriptions.length !== 0) { + for (const v of message.subscriptions) { + Subscription.encode(v, writer.uint32(10).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.subscriptions.push(Subscription.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + subscriptions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.subscriptions) + ? object.subscriptions.map((e) => Subscription.fromJSON(e)) + : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.subscriptions) === null || _a === void 0 ? void 0 : _a.length) { + obj.subscriptions = message.subscriptions.map((e) => Subscription.toJSON(e)); + } + return obj; + }, + create(base) { + return SubscribeRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseSubscribeRequest(); + message.subscriptions = ((_a = object.subscriptions) === null || _a === void 0 ? void 0 : _a.map((e) => Subscription.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSubscribeResponse() { + return { succeeded: [], errors: [] }; +} +export const SubscribeResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.succeeded !== undefined && message.succeeded.length !== 0) { + for (const v of message.succeeded) { + writer.uint32(10).string(v); + } + } + if (message.errors !== undefined && message.errors.length !== 0) { + for (const v of message.errors) { + SubscribeError.encode(v, writer.uint32(18).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.succeeded.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.errors.push(SubscribeError.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + succeeded: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.succeeded) + ? object.succeeded.map((e) => globalThis.String(e)) + : [], + errors: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.errors) ? object.errors.map((e) => SubscribeError.fromJSON(e)) : [], + }; + }, + toJSON(message) { + var _a, _b; + const obj = {}; + if ((_a = message.succeeded) === null || _a === void 0 ? void 0 : _a.length) { + obj.succeeded = message.succeeded; + } + if ((_b = message.errors) === null || _b === void 0 ? void 0 : _b.length) { + obj.errors = message.errors.map((e) => SubscribeError.toJSON(e)); + } + return obj; + }, + create(base) { + return SubscribeResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSubscribeResponse(); + message.succeeded = ((_a = object.succeeded) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.errors = ((_b = object.errors) === null || _b === void 0 ? void 0 : _b.map((e) => SubscribeError.fromPartial(e))) || []; + return message; + }, +}; +function createBaseSubscribeError() { + return { state: "", message: "" }; +} +export const SubscribeError = { + encode(message, writer = _m0.Writer.create()) { + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.message !== undefined && message.message !== "") { + writer.uint32(26).string(message.message); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscribeError(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.message = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + state: isSet(object.state) ? globalThis.String(object.state) : "", + message: isSet(object.message) ? globalThis.String(object.message) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.message !== undefined && message.message !== "") { + obj.message = message.message; + } + return obj; + }, + create(base) { + return SubscribeError.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseSubscribeError(); + message.state = (_a = object.state) !== null && _a !== void 0 ? _a : ""; + message.message = (_b = object.message) !== null && _b !== void 0 ? _b : ""; + return message; + }, +}; +function createBaseSubscription() { + return { mailbox: undefined, nefario: undefined, changeDataCapture: undefined, unsubscribe: undefined }; +} +export const Subscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.mailbox !== undefined) { + MailboxSubscription.encode(message.mailbox, writer.uint32(10).fork()).ldelim(); + } + if (message.nefario !== undefined) { + NefarioSubscription.encode(message.nefario, writer.uint32(18).fork()).ldelim(); + } + if (message.changeDataCapture !== undefined) { + ChangeDataCaptureSubscription.encode(message.changeDataCapture, writer.uint32(26).fork()).ldelim(); + } + if (message.unsubscribe !== undefined) { + Unsubscribe.encode(message.unsubscribe, writer.uint32(34).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.mailbox = MailboxSubscription.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.nefario = NefarioSubscription.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 26) { + break; + } + message.changeDataCapture = ChangeDataCaptureSubscription.decode(reader, reader.uint32()); + continue; + case 4: + if (tag !== 34) { + break; + } + message.unsubscribe = Unsubscribe.decode(reader, reader.uint32()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + mailbox: isSet(object.mailbox) ? MailboxSubscription.fromJSON(object.mailbox) : undefined, + nefario: isSet(object.nefario) ? NefarioSubscription.fromJSON(object.nefario) : undefined, + changeDataCapture: isSet(object.changeDataCapture) + ? ChangeDataCaptureSubscription.fromJSON(object.changeDataCapture) + : undefined, + unsubscribe: isSet(object.unsubscribe) ? Unsubscribe.fromJSON(object.unsubscribe) : undefined, + }; + }, + toJSON(message) { + const obj = {}; + if (message.mailbox !== undefined) { + obj.mailbox = MailboxSubscription.toJSON(message.mailbox); + } + if (message.nefario !== undefined) { + obj.nefario = NefarioSubscription.toJSON(message.nefario); + } + if (message.changeDataCapture !== undefined) { + obj.changeDataCapture = ChangeDataCaptureSubscription.toJSON(message.changeDataCapture); + } + if (message.unsubscribe !== undefined) { + obj.unsubscribe = Unsubscribe.toJSON(message.unsubscribe); + } + return obj; + }, + create(base) { + return Subscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + const message = createBaseSubscription(); + message.mailbox = (object.mailbox !== undefined && object.mailbox !== null) + ? MailboxSubscription.fromPartial(object.mailbox) + : undefined; + message.nefario = (object.nefario !== undefined && object.nefario !== null) + ? NefarioSubscription.fromPartial(object.nefario) + : undefined; + message.changeDataCapture = (object.changeDataCapture !== undefined && object.changeDataCapture !== null) + ? ChangeDataCaptureSubscription.fromPartial(object.changeDataCapture) + : undefined; + message.unsubscribe = (object.unsubscribe !== undefined && object.unsubscribe !== null) + ? Unsubscribe.fromPartial(object.unsubscribe) + : undefined; + return message; + }, +}; +function createBaseMailboxSubscription() { + return { id: "", state: "", readerKey: "", channel: "", startSeq: "" }; +} +export const MailboxSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(26).string(message.readerKey); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(34).string(message.channel); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(42).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMailboxSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.readerKey = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channel = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return MailboxSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e; + const message = createBaseMailboxSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.readerKey = (_c = object.readerKey) !== null && _c !== void 0 ? _c : ""; + message.channel = (_d = object.channel) !== null && _d !== void 0 ? _d : ""; + message.startSeq = (_e = object.startSeq) !== null && _e !== void 0 ? _e : ""; + return message; + }, +}; +function createBaseChangeDataCaptureSubscription() { + return { id: "", state: "", matchers: [], startSeq: "" }; +} +export const ChangeDataCaptureSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.matchers !== undefined && message.matchers.length !== 0) { + for (const v of message.matchers) { + RecordMatcher.encode(v, writer.uint32(26).fork()).ldelim(); + } + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(34).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseChangeDataCaptureSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.matchers.push(RecordMatcher.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 34) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + matchers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.matchers) + ? object.matchers.map((e) => RecordMatcher.fromJSON(e)) + : [], + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if ((_a = message.matchers) === null || _a === void 0 ? void 0 : _a.length) { + obj.matchers = message.matchers.map((e) => RecordMatcher.toJSON(e)); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return ChangeDataCaptureSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseChangeDataCaptureSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.matchers = ((_c = object.matchers) === null || _c === void 0 ? void 0 : _c.map((e) => RecordMatcher.fromPartial(e))) || []; + message.startSeq = (_d = object.startSeq) !== null && _d !== void 0 ? _d : ""; + return message; + }, +}; +function createBaseRecordMatcher() { + return { database: "", table: "", primaryKeys: [] }; +} +export const RecordMatcher = { + encode(message, writer = _m0.Writer.create()) { + if (message.database !== undefined && message.database !== "") { + writer.uint32(10).string(message.database); + } + if (message.table !== undefined && message.table !== "") { + writer.uint32(18).string(message.table); + } + if (message.primaryKeys !== undefined && message.primaryKeys.length !== 0) { + for (const v of message.primaryKeys) { + Value.encode(Value.wrap(v), writer.uint32(26).fork()).ldelim(); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRecordMatcher(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.database = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.table = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.primaryKeys.push(Value.unwrap(Value.decode(reader, reader.uint32()))); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + database: isSet(object.database) ? globalThis.String(object.database) : "", + table: isSet(object.table) ? globalThis.String(object.table) : "", + primaryKeys: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.primaryKeys) ? [...object.primaryKeys] : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.database !== undefined && message.database !== "") { + obj.database = message.database; + } + if (message.table !== undefined && message.table !== "") { + obj.table = message.table; + } + if ((_a = message.primaryKeys) === null || _a === void 0 ? void 0 : _a.length) { + obj.primaryKeys = message.primaryKeys; + } + return obj; + }, + create(base) { + return RecordMatcher.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c; + const message = createBaseRecordMatcher(); + message.database = (_a = object.database) !== null && _a !== void 0 ? _a : ""; + message.table = (_b = object.table) !== null && _b !== void 0 ? _b : ""; + message.primaryKeys = ((_c = object.primaryKeys) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || []; + return message; + }, +}; +function createBaseNefarioSubscription() { + return { id: "", state: "", processUid: "", channel: "", startSeq: "" }; +} +export const NefarioSubscription = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.state !== undefined && message.state !== "") { + writer.uint32(18).string(message.state); + } + if (message.processUid !== undefined && message.processUid !== "") { + writer.uint32(26).string(message.processUid); + } + if (message.channel !== undefined && message.channel !== "") { + writer.uint32(34).string(message.channel); + } + if (message.startSeq !== undefined && message.startSeq !== "") { + writer.uint32(42).string(message.startSeq); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseNefarioSubscription(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.state = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.processUid = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channel = reader.string(); + continue; + case 5: + if (tag !== 42) { + break; + } + message.startSeq = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + processUid: isSet(object.processUid) ? globalThis.String(object.processUid) : "", + channel: isSet(object.channel) ? globalThis.String(object.channel) : "", + startSeq: isSet(object.startSeq) ? globalThis.String(object.startSeq) : "", + }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + if (message.state !== undefined && message.state !== "") { + obj.state = message.state; + } + if (message.processUid !== undefined && message.processUid !== "") { + obj.processUid = message.processUid; + } + if (message.channel !== undefined && message.channel !== "") { + obj.channel = message.channel; + } + if (message.startSeq !== undefined && message.startSeq !== "") { + obj.startSeq = message.startSeq; + } + return obj; + }, + create(base) { + return NefarioSubscription.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e; + const message = createBaseNefarioSubscription(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + message.state = (_b = object.state) !== null && _b !== void 0 ? _b : ""; + message.processUid = (_c = object.processUid) !== null && _c !== void 0 ? _c : ""; + message.channel = (_d = object.channel) !== null && _d !== void 0 ? _d : ""; + message.startSeq = (_e = object.startSeq) !== null && _e !== void 0 ? _e : ""; + return message; + }, +}; +function createBaseUnsubscribe() { + return { id: "" }; +} +export const Unsubscribe = { + encode(message, writer = _m0.Writer.create()) { + if (message.id !== undefined && message.id !== "") { + writer.uint32(10).string(message.id); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUnsubscribe(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.id = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { id: isSet(object.id) ? globalThis.String(object.id) : "" }; + }, + toJSON(message) { + const obj = {}; + if (message.id !== undefined && message.id !== "") { + obj.id = message.id; + } + return obj; + }, + create(base) { + return Unsubscribe.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a; + const message = createBaseUnsubscribe(); + message.id = (_a = object.id) !== null && _a !== void 0 ? _a : ""; + return message; + }, +}; +function createBaseCreateMailboxRequest() { + return { + channels: [], + privateMetadata: undefined, + publicMetadata: undefined, + purgeTimeoutInMillis: 0, + closeTimeoutInMillis: 0, + extraData: undefined, + }; +} +export const CreateMailboxRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(10).string(v); + } + } + if (message.privateMetadata !== undefined) { + Struct.encode(Struct.wrap(message.privateMetadata), writer.uint32(18).fork()).ldelim(); + } + if (message.publicMetadata !== undefined) { + Struct.encode(Struct.wrap(message.publicMetadata), writer.uint32(26).fork()).ldelim(); + } + if (message.purgeTimeoutInMillis !== undefined && message.purgeTimeoutInMillis !== 0) { + writer.uint32(32).int64(message.purgeTimeoutInMillis); + } + if (message.closeTimeoutInMillis !== undefined && message.closeTimeoutInMillis !== 0) { + writer.uint32(40).int64(message.closeTimeoutInMillis); + } + if (message.extraData !== undefined) { + Struct.encode(Struct.wrap(message.extraData), writer.uint32(50).fork()).ldelim(); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateMailboxRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.channels.push(reader.string()); + continue; + case 2: + if (tag !== 18) { + break; + } + message.privateMetadata = Struct.unwrap(Struct.decode(reader, reader.uint32())); + continue; + case 3: + if (tag !== 26) { + break; + } + message.publicMetadata = Struct.unwrap(Struct.decode(reader, reader.uint32())); + continue; + case 4: + if (tag !== 32) { + break; + } + message.purgeTimeoutInMillis = longToNumber(reader.int64()); + continue; + case 5: + if (tag !== 40) { + break; + } + message.closeTimeoutInMillis = longToNumber(reader.int64()); + continue; + case 6: + if (tag !== 50) { + break; + } + message.extraData = Struct.unwrap(Struct.decode(reader, reader.uint32())); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + privateMetadata: isObject(object.privateMetadata) ? object.privateMetadata : undefined, + publicMetadata: isObject(object.publicMetadata) ? object.publicMetadata : undefined, + purgeTimeoutInMillis: isSet(object.purgeTimeoutInMillis) ? globalThis.Number(object.purgeTimeoutInMillis) : 0, + closeTimeoutInMillis: isSet(object.closeTimeoutInMillis) ? globalThis.Number(object.closeTimeoutInMillis) : 0, + extraData: isObject(object.extraData) ? object.extraData : undefined, + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + if (message.privateMetadata !== undefined) { + obj.privateMetadata = message.privateMetadata; + } + if (message.publicMetadata !== undefined) { + obj.publicMetadata = message.publicMetadata; + } + if (message.purgeTimeoutInMillis !== undefined && message.purgeTimeoutInMillis !== 0) { + obj.purgeTimeoutInMillis = Math.round(message.purgeTimeoutInMillis); + } + if (message.closeTimeoutInMillis !== undefined && message.closeTimeoutInMillis !== 0) { + obj.closeTimeoutInMillis = Math.round(message.closeTimeoutInMillis); + } + if (message.extraData !== undefined) { + obj.extraData = message.extraData; + } + return obj; + }, + create(base) { + return CreateMailboxRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d, _e, _f; + const message = createBaseCreateMailboxRequest(); + message.channels = ((_a = object.channels) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || []; + message.privateMetadata = (_b = object.privateMetadata) !== null && _b !== void 0 ? _b : undefined; + message.publicMetadata = (_c = object.publicMetadata) !== null && _c !== void 0 ? _c : undefined; + message.purgeTimeoutInMillis = (_d = object.purgeTimeoutInMillis) !== null && _d !== void 0 ? _d : 0; + message.closeTimeoutInMillis = (_e = object.closeTimeoutInMillis) !== null && _e !== void 0 ? _e : 0; + message.extraData = (_f = object.extraData) !== null && _f !== void 0 ? _f : undefined; + return message; + }, +}; +function createBaseCreateMailboxResponse() { + return { adminKey: "", address: "", readerKey: "", channels: [] }; +} +export const CreateMailboxResponse = { + encode(message, writer = _m0.Writer.create()) { + if (message.adminKey !== undefined && message.adminKey !== "") { + writer.uint32(10).string(message.adminKey); + } + if (message.address !== undefined && message.address !== "") { + writer.uint32(18).string(message.address); + } + if (message.readerKey !== undefined && message.readerKey !== "") { + writer.uint32(26).string(message.readerKey); + } + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(34).string(v); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateMailboxResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.adminKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.address = reader.string(); + continue; + case 3: + if (tag !== 26) { + break; + } + message.readerKey = reader.string(); + continue; + case 4: + if (tag !== 34) { + break; + } + message.channels.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + adminKey: isSet(object.adminKey) ? globalThis.String(object.adminKey) : "", + address: isSet(object.address) ? globalThis.String(object.address) : "", + readerKey: isSet(object.readerKey) ? globalThis.String(object.readerKey) : "", + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.adminKey !== undefined && message.adminKey !== "") { + obj.adminKey = message.adminKey; + } + if (message.address !== undefined && message.address !== "") { + obj.address = message.address; + } + if (message.readerKey !== undefined && message.readerKey !== "") { + obj.readerKey = message.readerKey; + } + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + return obj; + }, + create(base) { + return CreateMailboxResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b, _c, _d; + const message = createBaseCreateMailboxResponse(); + message.adminKey = (_a = object.adminKey) !== null && _a !== void 0 ? _a : ""; + message.address = (_b = object.address) !== null && _b !== void 0 ? _b : ""; + message.readerKey = (_c = object.readerKey) !== null && _c !== void 0 ? _c : ""; + message.channels = ((_d = object.channels) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || []; + return message; + }, +}; +function createBaseAddChannelRequest() { + return { adminKey: "", channels: [] }; +} +export const AddChannelRequest = { + encode(message, writer = _m0.Writer.create()) { + if (message.adminKey !== undefined && message.adminKey !== "") { + writer.uint32(10).string(message.adminKey); + } + if (message.channels !== undefined && message.channels.length !== 0) { + for (const v of message.channels) { + writer.uint32(18).string(v); + } + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddChannelRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + message.adminKey = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + message.channels.push(reader.string()); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(object) { + return { + adminKey: isSet(object.adminKey) ? globalThis.String(object.adminKey) : "", + channels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.channels) ? object.channels.map((e) => globalThis.String(e)) : [], + }; + }, + toJSON(message) { + var _a; + const obj = {}; + if (message.adminKey !== undefined && message.adminKey !== "") { + obj.adminKey = message.adminKey; + } + if ((_a = message.channels) === null || _a === void 0 ? void 0 : _a.length) { + obj.channels = message.channels; + } + return obj; + }, + create(base) { + return AddChannelRequest.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(object) { + var _a, _b; + const message = createBaseAddChannelRequest(); + message.adminKey = (_a = object.adminKey) !== null && _a !== void 0 ? _a : ""; + message.channels = ((_b = object.channels) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || []; + return message; + }, +}; +function createBaseAddChannelResponse() { + return {}; +} +export const AddChannelResponse = { + encode(_, writer = _m0.Writer.create()) { + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAddChannelResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + fromJSON(_) { + return {}; + }, + toJSON(_) { + const obj = {}; + return obj; + }, + create(base) { + return AddChannelResponse.fromPartial(base !== null && base !== void 0 ? base : {}); + }, + fromPartial(_) { + const message = createBaseAddChannelResponse(); + return message; + }, +}; +export const HermesServiceServiceName = "hermes.HermesService"; +export class HermesServiceClientImpl { + constructor(rpc, opts) { + this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || HermesServiceServiceName; + this.rpc = rpc; + this.SendReceive = this.SendReceive.bind(this); + this.CreateMailbox = this.CreateMailbox.bind(this); + this.AddChannel = this.AddChannel.bind(this); + } + SendReceive(request) { + const data = request.pipe(map((request) => MessageFromClient.encode(request).finish())); + const result = this.rpc.bidirectionalStreamingRequest(this.service, "SendReceive", data); + return result.pipe(map((data) => MessageToClient.decode(_m0.Reader.create(data)))); + } + CreateMailbox(request) { + const data = CreateMailboxRequest.encode(request).finish(); + const promise = this.rpc.request(this.service, "CreateMailbox", data); + return promise.then((data) => CreateMailboxResponse.decode(_m0.Reader.create(data))); + } + AddChannel(request) { + const data = AddChannelRequest.encode(request).finish(); + const promise = this.rpc.request(this.service, "AddChannel", data); + return promise.then((data) => AddChannelResponse.decode(_m0.Reader.create(data))); + } +} +function bytesFromBase64(b64) { + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } + else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} +function base64FromBytes(arr) { + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } + else { + const bin = []; + arr.forEach((byte) => { + bin.push(globalThis.String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} +function longToNumber(long) { + if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} +if (_m0.util.Long !== Long) { + _m0.util.Long = Long; + _m0.configure(); +} +function isObject(value) { + return typeof value === "object" && value !== null; +} +function isSet(value) { + return value !== null && value !== undefined; +} diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 100644 index 0000000..eea8856 --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../tsc/bin/tsc" "$@" +else + exec node "$basedir/../tsc/bin/tsc" "$@" +fi diff --git a/node_modules/.bin/tsc.cmd b/node_modules/.bin/tsc.cmd new file mode 100644 index 0000000..3d98661 --- /dev/null +++ b/node_modules/.bin/tsc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\tsc\bin\tsc" %* diff --git a/node_modules/.bin/tsc.ps1 b/node_modules/.bin/tsc.ps1 new file mode 100644 index 0000000..61e15d3 --- /dev/null +++ b/node_modules/.bin/tsc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../tsc/bin/tsc" $args + } else { + & "$basedir/node$exe" "$basedir/../tsc/bin/tsc" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../tsc/bin/tsc" $args + } else { + & "node$exe" "$basedir/../tsc/bin/tsc" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver new file mode 100644 index 0000000..6c19ce3 --- /dev/null +++ b/node_modules/.bin/tsserver @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" +else + exec node "$basedir/../typescript/bin/tsserver" "$@" +fi diff --git a/node_modules/.bin/tsserver.cmd b/node_modules/.bin/tsserver.cmd new file mode 100644 index 0000000..57f851f --- /dev/null +++ b/node_modules/.bin/tsserver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* diff --git a/node_modules/.bin/tsserver.ps1 b/node_modules/.bin/tsserver.ps1 new file mode 100644 index 0000000..249f417 --- /dev/null +++ b/node_modules/.bin/tsserver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..79c56a4 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,138 @@ +{ + "name": "hermes-client", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@types/node": { + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/protobufjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", + "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/tsc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/tsc/-/tsc-2.0.4.tgz", + "integrity": "sha512-fzoSieZI5KKJVBYGvwbVZs/J5za84f2lSTLPYf6AGiIf43tZ3GNrI1QzTLcjtyDDP4aLxd46RTZq1nQxe7+k5Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + } + } +} diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..5021cf4 --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,18 @@ +{ + "systemParams": "win32-x64-115", + "modulesFolders": [ + "node_modules" + ], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [ + "tsc@^2.0.4", + "typescript@^5.4.5" + ], + "lockfileEntries": { + "tsc@^2.0.4": "https://registry.yarnpkg.com/tsc/-/tsc-2.0.4.tgz#5f6499146abea5dca4420b451fa4f2f9345238f5", + "typescript@^5.4.5": "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + }, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/node_modules/@protobufjs/aspromise/LICENSE b/node_modules/@protobufjs/aspromise/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/aspromise/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/aspromise/README.md b/node_modules/@protobufjs/aspromise/README.md new file mode 100644 index 0000000..c7ae36f --- /dev/null +++ b/node_modules/@protobufjs/aspromise/README.md @@ -0,0 +1,13 @@ +@protobufjs/aspromise +===================== +[![npm](https://img.shields.io/npm/v/@protobufjs/aspromise.svg)](https://www.npmjs.com/package/@protobufjs/aspromise) + +Returns a promise from a node-style callback function. + +API +--- + +* **asPromise(fn: `function`, ctx: `Object`, ...params: `*`): `Promise<*>`**
+ Returns a promise from a node-style callback function. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/aspromise/index.d.ts b/node_modules/@protobufjs/aspromise/index.d.ts new file mode 100644 index 0000000..3db03db --- /dev/null +++ b/node_modules/@protobufjs/aspromise/index.d.ts @@ -0,0 +1,13 @@ +export = asPromise; + +type asPromiseCallback = (error: Error | null, ...params: any[]) => {}; + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +declare function asPromise(fn: asPromiseCallback, ctx: any, ...params: any[]): Promise; diff --git a/node_modules/@protobufjs/aspromise/index.js b/node_modules/@protobufjs/aspromise/index.js new file mode 100644 index 0000000..d6f642c --- /dev/null +++ b/node_modules/@protobufjs/aspromise/index.js @@ -0,0 +1,52 @@ +"use strict"; +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} diff --git a/node_modules/@protobufjs/aspromise/package.json b/node_modules/@protobufjs/aspromise/package.json new file mode 100644 index 0000000..aa8eaef --- /dev/null +++ b/node_modules/@protobufjs/aspromise/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/aspromise", + "description": "Returns a promise from a node-style callback function.", + "version": "1.1.2", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/aspromise/tests/index.js b/node_modules/@protobufjs/aspromise/tests/index.js new file mode 100644 index 0000000..cfdb258 --- /dev/null +++ b/node_modules/@protobufjs/aspromise/tests/index.js @@ -0,0 +1,130 @@ +var tape = require("tape"); + +var asPromise = require(".."); + +tape.test("aspromise", function(test) { + + test.test(this.name + " - resolve", function(test) { + + function fn(arg1, arg2, callback) { + test.equal(this, ctx, "function should be called with this = ctx"); + test.equal(arg1, 1, "function should be called with arg1 = 1"); + test.equal(arg2, 2, "function should be called with arg2 = 2"); + callback(null, arg2); + } + + var ctx = {}; + + var promise = asPromise(fn, ctx, 1, 2); + promise.then(function(arg2) { + test.equal(arg2, 2, "promise should be resolved with arg2 = 2"); + test.end(); + }).catch(function(err) { + test.fail("promise should not be rejected (" + err + ")"); + }); + }); + + test.test(this.name + " - reject", function(test) { + + function fn(arg1, arg2, callback) { + test.equal(this, ctx, "function should be called with this = ctx"); + test.equal(arg1, 1, "function should be called with arg1 = 1"); + test.equal(arg2, 2, "function should be called with arg2 = 2"); + callback(arg1); + } + + var ctx = {}; + + var promise = asPromise(fn, ctx, 1, 2); + promise.then(function() { + test.fail("promise should not be resolved"); + }).catch(function(err) { + test.equal(err, 1, "promise should be rejected with err = 1"); + test.end(); + }); + }); + + test.test(this.name + " - resolve twice", function(test) { + + function fn(arg1, arg2, callback) { + test.equal(this, ctx, "function should be called with this = ctx"); + test.equal(arg1, 1, "function should be called with arg1 = 1"); + test.equal(arg2, 2, "function should be called with arg2 = 2"); + callback(null, arg2); + callback(null, arg1); + } + + var ctx = {}; + var count = 0; + + var promise = asPromise(fn, ctx, 1, 2); + promise.then(function(arg2) { + test.equal(arg2, 2, "promise should be resolved with arg2 = 2"); + if (++count > 1) + test.fail("promise should not be resolved twice"); + test.end(); + }).catch(function(err) { + test.fail("promise should not be rejected (" + err + ")"); + }); + }); + + test.test(this.name + " - reject twice", function(test) { + + function fn(arg1, arg2, callback) { + test.equal(this, ctx, "function should be called with this = ctx"); + test.equal(arg1, 1, "function should be called with arg1 = 1"); + test.equal(arg2, 2, "function should be called with arg2 = 2"); + callback(arg1); + callback(arg2); + } + + var ctx = {}; + var count = 0; + + var promise = asPromise(fn, ctx, 1, 2); + promise.then(function() { + test.fail("promise should not be resolved"); + }).catch(function(err) { + test.equal(err, 1, "promise should be rejected with err = 1"); + if (++count > 1) + test.fail("promise should not be rejected twice"); + test.end(); + }); + }); + + test.test(this.name + " - reject error", function(test) { + + function fn(callback) { + test.ok(arguments.length === 1 && typeof callback === "function", "function should be called with just a callback"); + throw 3; + } + + var promise = asPromise(fn, null); + promise.then(function() { + test.fail("promise should not be resolved"); + }).catch(function(err) { + test.equal(err, 3, "promise should be rejected with err = 3"); + test.end(); + }); + }); + + test.test(this.name + " - reject and error", function(test) { + + function fn(callback) { + callback(3); + throw 4; + } + + var count = 0; + + var promise = asPromise(fn, null); + promise.then(function() { + test.fail("promise should not be resolved"); + }).catch(function(err) { + test.equal(err, 3, "promise should be rejected with err = 3"); + if (++count > 1) + test.fail("promise should not be rejected twice"); + test.end(); + }); + }); +}); diff --git a/node_modules/@protobufjs/base64/LICENSE b/node_modules/@protobufjs/base64/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/base64/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/base64/README.md b/node_modules/@protobufjs/base64/README.md new file mode 100644 index 0000000..b06cb0a --- /dev/null +++ b/node_modules/@protobufjs/base64/README.md @@ -0,0 +1,19 @@ +@protobufjs/base64 +================== +[![npm](https://img.shields.io/npm/v/@protobufjs/base64.svg)](https://www.npmjs.com/package/@protobufjs/base64) + +A minimal base64 implementation for number arrays. + +API +--- + +* **base64.length(string: `string`): `number`**
+ Calculates the byte length of a base64 encoded string. + +* **base64.encode(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**
+ Encodes a buffer to a base64 encoded string. + +* **base64.decode(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**
+ Decodes a base64 encoded string to a buffer. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/base64/index.d.ts b/node_modules/@protobufjs/base64/index.d.ts new file mode 100644 index 0000000..085d0a7 --- /dev/null +++ b/node_modules/@protobufjs/base64/index.d.ts @@ -0,0 +1,32 @@ +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +export function length(string: string): number; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +export function encode(buffer: Uint8Array, start: number, end: number): string; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +export function decode(string: string, buffer: Uint8Array, offset: number): number; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if it appears to be base64 encoded, otherwise false + */ +export function test(string: string): boolean; diff --git a/node_modules/@protobufjs/base64/index.js b/node_modules/@protobufjs/base64/index.js new file mode 100644 index 0000000..6146f54 --- /dev/null +++ b/node_modules/@protobufjs/base64/index.js @@ -0,0 +1,139 @@ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; diff --git a/node_modules/@protobufjs/base64/package.json b/node_modules/@protobufjs/base64/package.json new file mode 100644 index 0000000..f119811 --- /dev/null +++ b/node_modules/@protobufjs/base64/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/base64", + "description": "A minimal base64 implementation for number arrays.", + "version": "1.1.2", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/base64/tests/index.js b/node_modules/@protobufjs/base64/tests/index.js new file mode 100644 index 0000000..6ede32c --- /dev/null +++ b/node_modules/@protobufjs/base64/tests/index.js @@ -0,0 +1,46 @@ +var tape = require("tape"); + +var base64 = require(".."); + +var strings = { + "": "", + "a": "YQ==", + "ab": "YWI=", + "abcdefg": "YWJjZGVmZw==", + "abcdefgh": "YWJjZGVmZ2g=", + "abcdefghi": "YWJjZGVmZ2hp" +}; + +tape.test("base64", function(test) { + + Object.keys(strings).forEach(function(str) { + var enc = strings[str]; + + test.equal(base64.test(enc), true, "should detect '" + enc + "' to be base64 encoded"); + + var len = base64.length(enc); + test.equal(len, str.length, "should calculate '" + enc + "' as " + str.length + " bytes"); + + var buf = new Array(len); + var len2 = base64.decode(enc, buf, 0); + test.equal(len2, len, "should decode '" + enc + "' to " + len + " bytes"); + + test.equal(String.fromCharCode.apply(String, buf), str, "should decode '" + enc + "' to '" + str + "'"); + + var enc2 = base64.encode(buf, 0, buf.length); + test.equal(enc2, enc, "should encode '" + str + "' to '" + enc + "'"); + + }); + + test.throws(function() { + var buf = new Array(10); + base64.decode("YQ!", buf, 0); + }, Error, "should throw if encoding is invalid"); + + test.throws(function() { + var buf = new Array(10); + base64.decode("Y", buf, 0); + }, Error, "should throw if string is truncated"); + + test.end(); +}); diff --git a/node_modules/@protobufjs/codegen/LICENSE b/node_modules/@protobufjs/codegen/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/codegen/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/codegen/README.md b/node_modules/@protobufjs/codegen/README.md new file mode 100644 index 0000000..577c43e --- /dev/null +++ b/node_modules/@protobufjs/codegen/README.md @@ -0,0 +1,49 @@ +@protobufjs/codegen +=================== +[![npm](https://img.shields.io/npm/v/@protobufjs/codegen.svg)](https://www.npmjs.com/package/@protobufjs/codegen) + +A minimalistic code generation utility. + +API +--- + +* **codegen([functionParams: `string[]`], [functionName: string]): `Codegen`**
+ Begins generating a function. + +* **codegen.verbose = `false`**
+ When set to true, codegen will log generated code to console. Useful for debugging. + +Invoking **codegen** returns an appender function that appends code to the function's body and returns itself: + +* **Codegen(formatString: `string`, [...formatParams: `any`]): Codegen**
+ Appends code to the function's body. The format string can contain placeholders specifying the types of inserted format parameters: + + * `%d`: Number (integer or floating point value) + * `%f`: Floating point value + * `%i`: Integer value + * `%j`: JSON.stringify'ed value + * `%s`: String value + * `%%`: Percent sign
+ +* **Codegen([scope: `Object.`]): `Function`**
+ Finishes the function and returns it. + +* **Codegen.toString([functionNameOverride: `string`]): `string`**
+ Returns the function as a string. + +Example +------- + +```js +var codegen = require("@protobufjs/codegen"); + +var add = codegen(["a", "b"], "add") // A function with parameters "a" and "b" named "add" + ("// awesome comment") // adds the line to the function's body + ("return a + b - c + %d", 1) // replaces %d with 1 and adds the line to the body + ({ c: 1 }); // adds "c" with a value of 1 to the function's scope + +console.log(add.toString()); // function add(a, b) { return a + b - c + 1 } +console.log(add(1, 2)); // calculates 1 + 2 - 1 + 1 = 3 +``` + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/codegen/index.d.ts b/node_modules/@protobufjs/codegen/index.d.ts new file mode 100644 index 0000000..f8ed908 --- /dev/null +++ b/node_modules/@protobufjs/codegen/index.d.ts @@ -0,0 +1,31 @@ +export = codegen; + +/** + * Appends code to the function's body. + * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param [formatParams] Format parameters + * @returns Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ +type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function); + +/** + * Begins generating a function. + * @param functionParams Function parameter names + * @param [functionName] Function name if not anonymous + * @returns Appender that appends code to the function's body + */ +declare function codegen(functionParams: string[], functionName?: string): Codegen; + +/** + * Begins generating a function. + * @param [functionName] Function name if not anonymous + * @returns Appender that appends code to the function's body + */ +declare function codegen(functionName?: string): Codegen; + +declare namespace codegen { + + /** When set to `true`, codegen will log generated code to console. Useful for debugging. */ + let verbose: boolean; +} diff --git a/node_modules/@protobufjs/codegen/index.js b/node_modules/@protobufjs/codegen/index.js new file mode 100644 index 0000000..af005cb --- /dev/null +++ b/node_modules/@protobufjs/codegen/index.js @@ -0,0 +1,99 @@ +"use strict"; +module.exports = codegen; + +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + */ +function codegen(functionParams, functionName) { + + /* istanbul ignore if */ + if (typeof functionParams === "string") { + functionName = functionParams; + functionParams = undefined; + } + + var body = []; + + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ + + function Codegen(formatStringOrScope) { + // note that explicit array handling below makes this ~50% faster + + // finish the function + if (typeof formatStringOrScope !== "string") { + var source = toString(); + if (codegen.verbose) + console.log("codegen: " + source); // eslint-disable-line no-console + source = "return " + source; + if (formatStringOrScope) { + var scopeKeys = Object.keys(formatStringOrScope), + scopeParams = new Array(scopeKeys.length + 1), + scopeValues = new Array(scopeKeys.length), + scopeOffset = 0; + while (scopeOffset < scopeKeys.length) { + scopeParams[scopeOffset] = scopeKeys[scopeOffset]; + scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; + } + scopeParams[scopeOffset] = source; + return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func + } + return Function(source)(); // eslint-disable-line no-new-func + } + + // otherwise append to body + var formatParams = new Array(arguments.length - 1), + formatOffset = 0; + while (formatOffset < formatParams.length) + formatParams[formatOffset] = arguments[++formatOffset]; + formatOffset = 0; + formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { + var value = formatParams[formatOffset++]; + switch ($1) { + case "d": case "f": return String(Number(value)); + case "i": return String(Math.floor(value)); + case "j": return JSON.stringify(value); + case "s": return String(value); + } + return "%"; + }); + if (formatOffset !== formatParams.length) + throw Error("parameter count mismatch"); + body.push(formatStringOrScope); + return Codegen; + } + + function toString(functionNameOverride) { + return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; + } + + Codegen.toString = toString; + return Codegen; +} + +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ + +/** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} + */ +codegen.verbose = false; diff --git a/node_modules/@protobufjs/codegen/package.json b/node_modules/@protobufjs/codegen/package.json new file mode 100644 index 0000000..4e82f95 --- /dev/null +++ b/node_modules/@protobufjs/codegen/package.json @@ -0,0 +1,13 @@ +{ + "name": "@protobufjs/codegen", + "description": "A minimalistic code generation utility.", + "version": "2.0.4", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts" +} \ No newline at end of file diff --git a/node_modules/@protobufjs/codegen/tests/index.js b/node_modules/@protobufjs/codegen/tests/index.js new file mode 100644 index 0000000..b189117 --- /dev/null +++ b/node_modules/@protobufjs/codegen/tests/index.js @@ -0,0 +1,13 @@ +var codegen = require(".."); + +// new require("benchmark").Suite().add("add", function() { + +var add = codegen(["a", "b"], "add") + ("// awesome comment") + ("return a + b - c + %d", 1) + ({ c: 1 }); + +if (add(1, 2) !== 3) + throw Error("failed"); + +// }).on("cycle", function(event) { process.stdout.write(String(event.target) + "\n"); }).run(); diff --git a/node_modules/@protobufjs/eventemitter/LICENSE b/node_modules/@protobufjs/eventemitter/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/eventemitter/README.md b/node_modules/@protobufjs/eventemitter/README.md new file mode 100644 index 0000000..528e725 --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/README.md @@ -0,0 +1,22 @@ +@protobufjs/eventemitter +======================== +[![npm](https://img.shields.io/npm/v/@protobufjs/eventemitter.svg)](https://www.npmjs.com/package/@protobufjs/eventemitter) + +A minimal event emitter. + +API +--- + +* **new EventEmitter()**
+ Constructs a new event emitter instance. + +* **EventEmitter#on(evt: `string`, fn: `function`, [ctx: `Object`]): `EventEmitter`**
+ Registers an event listener. + +* **EventEmitter#off([evt: `string`], [fn: `function`]): `EventEmitter`**
+ Removes an event listener or any matching listeners if arguments are omitted. + +* **EventEmitter#emit(evt: `string`, ...args: `*`): `EventEmitter`**
+ Emits an event by calling its listeners with the specified arguments. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/eventemitter/index.d.ts b/node_modules/@protobufjs/eventemitter/index.d.ts new file mode 100644 index 0000000..f177823 --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/index.d.ts @@ -0,0 +1,43 @@ +export = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +declare class EventEmitter { + + /** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ + constructor(); + + /** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ + on(evt: string, fn: () => any, ctx?: any): EventEmitter; + + /** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ + off(evt?: string, fn?: () => any): EventEmitter; + + /** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ + emit(evt: string, ...args: any[]): EventEmitter; +} diff --git a/node_modules/@protobufjs/eventemitter/index.js b/node_modules/@protobufjs/eventemitter/index.js new file mode 100644 index 0000000..f766fd0 --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/index.js @@ -0,0 +1,76 @@ +"use strict"; +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; diff --git a/node_modules/@protobufjs/eventemitter/package.json b/node_modules/@protobufjs/eventemitter/package.json new file mode 100644 index 0000000..b333e99 --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/eventemitter", + "description": "A minimal event emitter.", + "version": "1.1.0", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/eventemitter/tests/index.js b/node_modules/@protobufjs/eventemitter/tests/index.js new file mode 100644 index 0000000..390958f --- /dev/null +++ b/node_modules/@protobufjs/eventemitter/tests/index.js @@ -0,0 +1,47 @@ +var tape = require("tape"); + +var EventEmitter = require(".."); + +tape.test("eventemitter", function(test) { + + var ee = new EventEmitter(); + var fn; + var ctx = {}; + + test.doesNotThrow(function() { + ee.emit("a", 1); + ee.off(); + ee.off("a"); + ee.off("a", function() {}); + }, "should not throw if no listeners are registered"); + + test.equal(ee.on("a", function(arg1) { + test.equal(this, ctx, "should be called with this = ctx"); + test.equal(arg1, 1, "should be called with arg1 = 1"); + }, ctx), ee, "should return itself when registering events"); + ee.emit("a", 1); + + ee.off("a"); + test.same(ee._listeners, { a: [] }, "should remove all listeners of the respective event when calling off(evt)"); + + ee.off(); + test.same(ee._listeners, {}, "should remove all listeners when just calling off()"); + + ee.on("a", fn = function(arg1) { + test.equal(this, ctx, "should be called with this = ctx"); + test.equal(arg1, 1, "should be called with arg1 = 1"); + }, ctx).emit("a", 1); + + ee.off("a", fn); + test.same(ee._listeners, { a: [] }, "should remove the exact listener when calling off(evt, fn)"); + + ee.on("a", function() { + test.equal(this, ee, "should be called with this = ee"); + }).emit("a"); + + test.doesNotThrow(function() { + ee.off("a", fn); + }, "should not throw if no such listener is found"); + + test.end(); +}); diff --git a/node_modules/@protobufjs/fetch/LICENSE b/node_modules/@protobufjs/fetch/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/fetch/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/fetch/README.md b/node_modules/@protobufjs/fetch/README.md new file mode 100644 index 0000000..1ebf4d4 --- /dev/null +++ b/node_modules/@protobufjs/fetch/README.md @@ -0,0 +1,13 @@ +@protobufjs/fetch +================= +[![npm](https://img.shields.io/npm/v/@protobufjs/fetch.svg)](https://www.npmjs.com/package/@protobufjs/fetch) + +Fetches the contents of a file accross node and browsers. + +API +--- + +* **fetch(path: `string`, [options: { binary: boolean } ], [callback: `function(error: ?Error, [contents: string])`]): `Promise|undefined`** + Fetches the contents of a file. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/fetch/index.d.ts b/node_modules/@protobufjs/fetch/index.d.ts new file mode 100644 index 0000000..ab0820c --- /dev/null +++ b/node_modules/@protobufjs/fetch/index.d.ts @@ -0,0 +1,56 @@ +export = fetch; + +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ +type FetchCallback = (error: Error, contents?: string) => void; + +/** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ + +interface FetchOptions { + binary?: boolean; + xhr?: boolean +} + +/** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +declare function fetch(filename: string, options: FetchOptions, callback: FetchCallback): void; + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ +declare function fetch(path: string, callback: FetchCallback): void; + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 + */ +declare function fetch(path: string, options?: FetchOptions): Promise<(string|Uint8Array)>; diff --git a/node_modules/@protobufjs/fetch/index.js b/node_modules/@protobufjs/fetch/index.js new file mode 100644 index 0000000..d92aa68 --- /dev/null +++ b/node_modules/@protobufjs/fetch/index.js @@ -0,0 +1,115 @@ +"use strict"; +module.exports = fetch; + +var asPromise = require("@protobufjs/aspromise"), + inquire = require("@protobufjs/inquire"); + +var fs = inquire("fs"); + +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ + +/** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +function fetch(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else if (!options) + options = {}; + + if (!callback) + return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this + + // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. + if (!options.xhr && fs && fs.readFile) + return fs.readFile(filename, function fetchReadFileCallback(err, contents) { + return err && typeof XMLHttpRequest !== "undefined" + ? fetch.xhr(filename, options, callback) + : err + ? callback(err) + : callback(null, options.binary ? contents : contents.toString("utf8")); + }); + + // use the XHR version otherwise. + return fetch.xhr(filename, options, callback); +} + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 + */ + +/**/ +fetch.xhr = function fetch_xhr(filename, options, callback) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { + + if (xhr.readyState !== 4) + return undefined; + + // local cors security errors return status 0 / empty string, too. afaik this cannot be + // reliably distinguished from an actually empty file for security reasons. feel free + // to send a pull request if you are aware of a solution. + if (xhr.status !== 0 && xhr.status !== 200) + return callback(Error("status " + xhr.status)); + + // if binary data is expected, make sure that some sort of array is returned, even if + // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. + if (options.binary) { + var buffer = xhr.response; + if (!buffer) { + buffer = []; + for (var i = 0; i < xhr.responseText.length; ++i) + buffer.push(xhr.responseText.charCodeAt(i) & 255); + } + return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); + } + return callback(null, xhr.responseText); + }; + + if (options.binary) { + // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers + if ("overrideMimeType" in xhr) + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + xhr.responseType = "arraybuffer"; + } + + xhr.open("GET", filename); + xhr.send(); +}; diff --git a/node_modules/@protobufjs/fetch/package.json b/node_modules/@protobufjs/fetch/package.json new file mode 100644 index 0000000..14ee25f --- /dev/null +++ b/node_modules/@protobufjs/fetch/package.json @@ -0,0 +1,25 @@ +{ + "name": "@protobufjs/fetch", + "description": "Fetches the contents of a file accross node and browsers.", + "version": "1.1.0", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/fetch/tests/index.js b/node_modules/@protobufjs/fetch/tests/index.js new file mode 100644 index 0000000..b7fbf81 --- /dev/null +++ b/node_modules/@protobufjs/fetch/tests/index.js @@ -0,0 +1,16 @@ +var tape = require("tape"); + +var fetch = require(".."); + +tape.test("fetch", function(test) { + + if (typeof Promise !== "undefined") { + var promise = fetch("NOTFOUND"); + promise.catch(function() {}); + test.ok(promise instanceof Promise, "should return a promise if callback has been omitted"); + } + + // TODO - some way to test this properly? + + test.end(); +}); diff --git a/node_modules/@protobufjs/float/LICENSE b/node_modules/@protobufjs/float/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/float/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/float/README.md b/node_modules/@protobufjs/float/README.md new file mode 100644 index 0000000..e475fc9 --- /dev/null +++ b/node_modules/@protobufjs/float/README.md @@ -0,0 +1,102 @@ +@protobufjs/float +================= +[![npm](https://img.shields.io/npm/v/@protobufjs/float.svg)](https://www.npmjs.com/package/@protobufjs/float) + +Reads / writes floats / doubles from / to buffers in both modern and ancient browsers. Fast. + +API +--- + +* **writeFloatLE(val: `number`, buf: `Uint8Array`, pos: `number`)**
+ Writes a 32 bit float to a buffer using little endian byte order. + +* **writeFloatBE(val: `number`, buf: `Uint8Array`, pos: `number`)**
+ Writes a 32 bit float to a buffer using big endian byte order. + +* **readFloatLE(buf: `Uint8Array`, pos: `number`): `number`**
+ Reads a 32 bit float from a buffer using little endian byte order. + +* **readFloatBE(buf: `Uint8Array`, pos: `number`): `number`**
+ Reads a 32 bit float from a buffer using big endian byte order. + +* **writeDoubleLE(val: `number`, buf: `Uint8Array`, pos: `number`)**
+ Writes a 64 bit double to a buffer using little endian byte order. + +* **writeDoubleBE(val: `number`, buf: `Uint8Array`, pos: `number`)**
+ Writes a 64 bit double to a buffer using big endian byte order. + +* **readDoubleLE(buf: `Uint8Array`, pos: `number`): `number`**
+ Reads a 64 bit double from a buffer using little endian byte order. + +* **readDoubleBE(buf: `Uint8Array`, pos: `number`): `number`**
+ Reads a 64 bit double from a buffer using big endian byte order. + +Performance +----------- +There is a simple benchmark included comparing raw read/write performance of this library (float), float's fallback for old browsers, the [ieee754](https://www.npmjs.com/package/ieee754) module and node's [buffer](https://nodejs.org/api/buffer.html). On an i7-2600k running node 6.9.1 it yields: + +``` +benchmarking writeFloat performance ... + +float x 42,741,625 ops/sec ±1.75% (81 runs sampled) +float (fallback) x 11,272,532 ops/sec ±1.12% (85 runs sampled) +ieee754 x 8,653,337 ops/sec ±1.18% (84 runs sampled) +buffer x 12,412,414 ops/sec ±1.41% (83 runs sampled) +buffer (noAssert) x 13,471,149 ops/sec ±1.09% (84 runs sampled) + + float was fastest + float (fallback) was 73.5% slower + ieee754 was 79.6% slower + buffer was 70.9% slower + buffer (noAssert) was 68.3% slower + +benchmarking readFloat performance ... + +float x 44,382,729 ops/sec ±1.70% (84 runs sampled) +float (fallback) x 20,925,938 ops/sec ±0.86% (87 runs sampled) +ieee754 x 17,189,009 ops/sec ±1.01% (87 runs sampled) +buffer x 10,518,437 ops/sec ±1.04% (83 runs sampled) +buffer (noAssert) x 11,031,636 ops/sec ±1.15% (87 runs sampled) + + float was fastest + float (fallback) was 52.5% slower + ieee754 was 61.0% slower + buffer was 76.1% slower + buffer (noAssert) was 75.0% slower + +benchmarking writeDouble performance ... + +float x 38,624,906 ops/sec ±0.93% (83 runs sampled) +float (fallback) x 10,457,811 ops/sec ±1.54% (85 runs sampled) +ieee754 x 7,681,130 ops/sec ±1.11% (83 runs sampled) +buffer x 12,657,876 ops/sec ±1.03% (83 runs sampled) +buffer (noAssert) x 13,372,795 ops/sec ±0.84% (85 runs sampled) + + float was fastest + float (fallback) was 73.1% slower + ieee754 was 80.1% slower + buffer was 67.3% slower + buffer (noAssert) was 65.3% slower + +benchmarking readDouble performance ... + +float x 40,527,888 ops/sec ±1.05% (84 runs sampled) +float (fallback) x 18,696,480 ops/sec ±0.84% (86 runs sampled) +ieee754 x 14,074,028 ops/sec ±1.04% (87 runs sampled) +buffer x 10,092,367 ops/sec ±1.15% (84 runs sampled) +buffer (noAssert) x 10,623,793 ops/sec ±0.96% (84 runs sampled) + + float was fastest + float (fallback) was 53.8% slower + ieee754 was 65.3% slower + buffer was 75.1% slower + buffer (noAssert) was 73.8% slower +``` + +To run it yourself: + +``` +$> npm run bench +``` + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/float/bench/index.js b/node_modules/@protobufjs/float/bench/index.js new file mode 100644 index 0000000..911f461 --- /dev/null +++ b/node_modules/@protobufjs/float/bench/index.js @@ -0,0 +1,87 @@ +"use strict"; + +var float = require(".."), + ieee754 = require("ieee754"), + newSuite = require("./suite"); + +var F32 = Float32Array; +var F64 = Float64Array; +delete global.Float32Array; +delete global.Float64Array; +var floatFallback = float({}); +global.Float32Array = F32; +global.Float64Array = F64; + +var buf = new Buffer(8); + +newSuite("writeFloat") +.add("float", function() { + float.writeFloatLE(0.1, buf, 0); +}) +.add("float (fallback)", function() { + floatFallback.writeFloatLE(0.1, buf, 0); +}) +.add("ieee754", function() { + ieee754.write(buf, 0.1, 0, true, 23, 4); +}) +.add("buffer", function() { + buf.writeFloatLE(0.1, 0); +}) +.add("buffer (noAssert)", function() { + buf.writeFloatLE(0.1, 0, true); +}) +.run(); + +newSuite("readFloat") +.add("float", function() { + float.readFloatLE(buf, 0); +}) +.add("float (fallback)", function() { + floatFallback.readFloatLE(buf, 0); +}) +.add("ieee754", function() { + ieee754.read(buf, 0, true, 23, 4); +}) +.add("buffer", function() { + buf.readFloatLE(0); +}) +.add("buffer (noAssert)", function() { + buf.readFloatLE(0, true); +}) +.run(); + +newSuite("writeDouble") +.add("float", function() { + float.writeDoubleLE(0.1, buf, 0); +}) +.add("float (fallback)", function() { + floatFallback.writeDoubleLE(0.1, buf, 0); +}) +.add("ieee754", function() { + ieee754.write(buf, 0.1, 0, true, 52, 8); +}) +.add("buffer", function() { + buf.writeDoubleLE(0.1, 0); +}) +.add("buffer (noAssert)", function() { + buf.writeDoubleLE(0.1, 0, true); +}) +.run(); + +newSuite("readDouble") +.add("float", function() { + float.readDoubleLE(buf, 0); +}) +.add("float (fallback)", function() { + floatFallback.readDoubleLE(buf, 0); +}) +.add("ieee754", function() { + ieee754.read(buf, 0, true, 52, 8); +}) +.add("buffer", function() { + buf.readDoubleLE(0); +}) +.add("buffer (noAssert)", function() { + buf.readDoubleLE(0, true); +}) +.run(); diff --git a/node_modules/@protobufjs/float/bench/suite.js b/node_modules/@protobufjs/float/bench/suite.js new file mode 100644 index 0000000..e8016d2 --- /dev/null +++ b/node_modules/@protobufjs/float/bench/suite.js @@ -0,0 +1,46 @@ +"use strict"; +module.exports = newSuite; + +var benchmark = require("benchmark"), + chalk = require("chalk"); + +var padSize = 27; + +function newSuite(name) { + var benches = []; + return new benchmark.Suite(name) + .on("add", function(event) { + benches.push(event.target); + }) + .on("start", function() { + process.stdout.write("benchmarking " + name + " performance ...\n\n"); + }) + .on("cycle", function(event) { + process.stdout.write(String(event.target) + "\n"); + }) + .on("complete", function() { + if (benches.length > 1) { + var fastest = this.filter("fastest"), // eslint-disable-line no-invalid-this + fastestHz = getHz(fastest[0]); + process.stdout.write("\n" + chalk.white(pad(fastest[0].name, padSize)) + " was " + chalk.green("fastest") + "\n"); + benches.forEach(function(bench) { + if (fastest.indexOf(bench) === 0) + return; + var hz = hz = getHz(bench); + var percent = (1 - hz / fastestHz) * 100; + process.stdout.write(chalk.white(pad(bench.name, padSize)) + " was " + chalk.red(percent.toFixed(1) + "% slower") + "\n"); + }); + } + process.stdout.write("\n"); + }); +} + +function getHz(bench) { + return 1 / (bench.stats.mean + bench.stats.moe); +} + +function pad(str, len, l) { + while (str.length < len) + str = l ? str + " " : " " + str; + return str; +} diff --git a/node_modules/@protobufjs/float/index.d.ts b/node_modules/@protobufjs/float/index.d.ts new file mode 100644 index 0000000..ab05de3 --- /dev/null +++ b/node_modules/@protobufjs/float/index.d.ts @@ -0,0 +1,83 @@ +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ +export function writeFloatLE(val: number, buf: Uint8Array, pos: number): void; + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ +export function writeFloatBE(val: number, buf: Uint8Array, pos: number): void; + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ +export function readFloatLE(buf: Uint8Array, pos: number): number; + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ +export function readFloatBE(buf: Uint8Array, pos: number): number; + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ +export function writeDoubleLE(val: number, buf: Uint8Array, pos: number): void; + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ +export function writeDoubleBE(val: number, buf: Uint8Array, pos: number): void; + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ +export function readDoubleLE(buf: Uint8Array, pos: number): number; + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ +export function readDoubleBE(buf: Uint8Array, pos: number): number; diff --git a/node_modules/@protobufjs/float/index.js b/node_modules/@protobufjs/float/index.js new file mode 100644 index 0000000..52ba3aa --- /dev/null +++ b/node_modules/@protobufjs/float/index.js @@ -0,0 +1,335 @@ +"use strict"; + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} diff --git a/node_modules/@protobufjs/float/package.json b/node_modules/@protobufjs/float/package.json new file mode 100644 index 0000000..aaebccf --- /dev/null +++ b/node_modules/@protobufjs/float/package.json @@ -0,0 +1,26 @@ +{ + "name": "@protobufjs/float", + "description": "Reads / writes floats / doubles from / to buffers in both modern and ancient browsers.", + "version": "1.0.2", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "dependencies": {}, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "benchmark": "^2.1.4", + "chalk": "^1.1.3", + "ieee754": "^1.1.8", + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js", + "bench": "node bench" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/float/tests/index.js b/node_modules/@protobufjs/float/tests/index.js new file mode 100644 index 0000000..62f0827 --- /dev/null +++ b/node_modules/@protobufjs/float/tests/index.js @@ -0,0 +1,100 @@ +var tape = require("tape"); + +var float = require(".."); + +tape.test("float", function(test) { + + // default + test.test(test.name + " - typed array", function(test) { + runTest(float, test); + }); + + // ieee754 + test.test(test.name + " - fallback", function(test) { + var F32 = global.Float32Array, + F64 = global.Float64Array; + delete global.Float32Array; + delete global.Float64Array; + runTest(float({}), test); + global.Float32Array = F32; + global.Float64Array = F64; + }); +}); + +function runTest(float, test) { + + var common = [ + 0, + -0, + Infinity, + -Infinity, + 0.125, + 1024.5, + -4096.5, + NaN + ]; + + test.test(test.name + " - using 32 bits", function(test) { + common.concat([ + 3.4028234663852886e+38, + 1.1754943508222875e-38, + 1.1754946310819804e-39 + ]) + .forEach(function(value) { + var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); + test.ok( + checkValue(value, 4, float.readFloatLE, float.writeFloatLE, Buffer.prototype.writeFloatLE), + "should write and read back " + strval + " (32 bit LE)" + ); + test.ok( + checkValue(value, 4, float.readFloatBE, float.writeFloatBE, Buffer.prototype.writeFloatBE), + "should write and read back " + strval + " (32 bit BE)" + ); + }); + test.end(); + }); + + test.test(test.name + " - using 64 bits", function(test) { + common.concat([ + 1.7976931348623157e+308, + 2.2250738585072014e-308, + 2.2250738585072014e-309 + ]) + .forEach(function(value) { + var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); + test.ok( + checkValue(value, 8, float.readDoubleLE, float.writeDoubleLE, Buffer.prototype.writeDoubleLE), + "should write and read back " + strval + " (64 bit LE)" + ); + test.ok( + checkValue(value, 8, float.readDoubleBE, float.writeDoubleBE, Buffer.prototype.writeDoubleBE), + "should write and read back " + strval + " (64 bit BE)" + ); + }); + test.end(); + }); + + test.end(); +} + +function checkValue(value, size, read, write, write_comp) { + var buffer = new Buffer(size); + write(value, buffer, 0); + var value_comp = read(buffer, 0); + var strval = value === 0 && 1 / value < 0 ? "-0" : value.toString(); + if (value !== value) { + if (value_comp === value_comp) + return false; + } else if (value_comp !== value) + return false; + + var buffer_comp = new Buffer(size); + write_comp.call(buffer_comp, value, 0); + for (var i = 0; i < size; ++i) + if (buffer[i] !== buffer_comp[i]) { + console.error(">", buffer, buffer_comp); + return false; + } + + return true; +} \ No newline at end of file diff --git a/node_modules/@protobufjs/inquire/.npmignore b/node_modules/@protobufjs/inquire/.npmignore new file mode 100644 index 0000000..c3fc82e --- /dev/null +++ b/node_modules/@protobufjs/inquire/.npmignore @@ -0,0 +1,3 @@ +npm-debug.* +node_modules/ +coverage/ diff --git a/node_modules/@protobufjs/inquire/LICENSE b/node_modules/@protobufjs/inquire/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/inquire/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/inquire/README.md b/node_modules/@protobufjs/inquire/README.md new file mode 100644 index 0000000..3eabd86 --- /dev/null +++ b/node_modules/@protobufjs/inquire/README.md @@ -0,0 +1,13 @@ +@protobufjs/inquire +=================== +[![npm](https://img.shields.io/npm/v/@protobufjs/inquire.svg)](https://www.npmjs.com/package/@protobufjs/inquire) + +Requires a module only if available and hides the require call from bundlers. + +API +--- + +* **inquire(moduleName: `string`): `?Object`**
+ Requires a module only if available. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/inquire/index.d.ts b/node_modules/@protobufjs/inquire/index.d.ts new file mode 100644 index 0000000..1f5a865 --- /dev/null +++ b/node_modules/@protobufjs/inquire/index.d.ts @@ -0,0 +1,9 @@ +export = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +declare function inquire(moduleName: string): Object; diff --git a/node_modules/@protobufjs/inquire/index.js b/node_modules/@protobufjs/inquire/index.js new file mode 100644 index 0000000..1a1f238 --- /dev/null +++ b/node_modules/@protobufjs/inquire/index.js @@ -0,0 +1,17 @@ +"use strict"; +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} diff --git a/node_modules/@protobufjs/inquire/package.json b/node_modules/@protobufjs/inquire/package.json new file mode 100644 index 0000000..6a64d66 --- /dev/null +++ b/node_modules/@protobufjs/inquire/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/inquire", + "description": "Requires a module only if available and hides the require call from bundlers.", + "version": "1.1.0", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/inquire/tests/data/array.js b/node_modules/@protobufjs/inquire/tests/data/array.js new file mode 100644 index 0000000..0847b28 --- /dev/null +++ b/node_modules/@protobufjs/inquire/tests/data/array.js @@ -0,0 +1 @@ +module.exports = [1]; diff --git a/node_modules/@protobufjs/inquire/tests/data/emptyArray.js b/node_modules/@protobufjs/inquire/tests/data/emptyArray.js new file mode 100644 index 0000000..e0a30c5 --- /dev/null +++ b/node_modules/@protobufjs/inquire/tests/data/emptyArray.js @@ -0,0 +1 @@ +module.exports = []; diff --git a/node_modules/@protobufjs/inquire/tests/data/emptyObject.js b/node_modules/@protobufjs/inquire/tests/data/emptyObject.js new file mode 100644 index 0000000..f053ebf --- /dev/null +++ b/node_modules/@protobufjs/inquire/tests/data/emptyObject.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/node_modules/@protobufjs/inquire/tests/data/object.js b/node_modules/@protobufjs/inquire/tests/data/object.js new file mode 100644 index 0000000..3b75bca --- /dev/null +++ b/node_modules/@protobufjs/inquire/tests/data/object.js @@ -0,0 +1 @@ +module.exports = { a: 1 }; diff --git a/node_modules/@protobufjs/inquire/tests/index.js b/node_modules/@protobufjs/inquire/tests/index.js new file mode 100644 index 0000000..4a555ca --- /dev/null +++ b/node_modules/@protobufjs/inquire/tests/index.js @@ -0,0 +1,20 @@ +var tape = require("tape"); + +var inquire = require(".."); + +tape.test("inquire", function(test) { + + test.equal(inquire("buffer").Buffer, Buffer, "should be able to require \"buffer\""); + + test.equal(inquire("%invalid"), null, "should not be able to require \"%invalid\""); + + test.equal(inquire("./tests/data/emptyObject"), null, "should return null when requiring a module exporting an empty object"); + + test.equal(inquire("./tests/data/emptyArray"), null, "should return null when requiring a module exporting an empty array"); + + test.same(inquire("./tests/data/object"), { a: 1 }, "should return the object if a non-empty object"); + + test.same(inquire("./tests/data/array"), [ 1 ], "should return the module if a non-empty array"); + + test.end(); +}); diff --git a/node_modules/@protobufjs/path/LICENSE b/node_modules/@protobufjs/path/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/path/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/path/README.md b/node_modules/@protobufjs/path/README.md new file mode 100644 index 0000000..1c1a2ba --- /dev/null +++ b/node_modules/@protobufjs/path/README.md @@ -0,0 +1,19 @@ +@protobufjs/path +================ +[![npm](https://img.shields.io/npm/v/@protobufjs/path.svg)](https://www.npmjs.com/package/@protobufjs/path) + +A minimal path module to resolve Unix, Windows and URL paths alike. + +API +--- + +* **path.isAbsolute(path: `string`): `boolean`**
+ Tests if the specified path is absolute. + +* **path.normalize(path: `string`): `string`**
+ Normalizes the specified path. + +* **path.resolve(originPath: `string`, includePath: `string`, [alreadyNormalized=false: `boolean`]): `string`**
+ Resolves the specified include path against the specified origin path. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/path/index.d.ts b/node_modules/@protobufjs/path/index.d.ts new file mode 100644 index 0000000..b664d81 --- /dev/null +++ b/node_modules/@protobufjs/path/index.d.ts @@ -0,0 +1,22 @@ +/** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute + */ +export function isAbsolute(path: string): boolean; + +/** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path + */ +export function normalize(path: string): string; + +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file + */ +export function resolve(originPath: string, includePath: string, alreadyNormalized?: boolean): string; diff --git a/node_modules/@protobufjs/path/index.js b/node_modules/@protobufjs/path/index.js new file mode 100644 index 0000000..7c7fb72 --- /dev/null +++ b/node_modules/@protobufjs/path/index.js @@ -0,0 +1,65 @@ +"use strict"; + +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace + */ +var path = exports; + +var isAbsolute = +/** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute + */ +path.isAbsolute = function isAbsolute(path) { + return /^(?:\/|\w+:)/.test(path); +}; + +var normalize = +/** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path + */ +path.normalize = function normalize(path) { + path = path.replace(/\\/g, "/") + .replace(/\/{2,}/g, "/"); + var parts = path.split("/"), + absolute = isAbsolute(path), + prefix = ""; + if (absolute) + prefix = parts.shift() + "/"; + for (var i = 0; i < parts.length;) { + if (parts[i] === "..") { + if (i > 0 && parts[i - 1] !== "..") + parts.splice(--i, 2); + else if (absolute) + parts.splice(i, 1); + else + ++i; + } else if (parts[i] === ".") + parts.splice(i, 1); + else + ++i; + } + return prefix + parts.join("/"); +}; + +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file + */ +path.resolve = function resolve(originPath, includePath, alreadyNormalized) { + if (!alreadyNormalized) + includePath = normalize(includePath); + if (isAbsolute(includePath)) + return includePath; + if (!alreadyNormalized) + originPath = normalize(originPath); + return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; +}; diff --git a/node_modules/@protobufjs/path/package.json b/node_modules/@protobufjs/path/package.json new file mode 100644 index 0000000..2262e01 --- /dev/null +++ b/node_modules/@protobufjs/path/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/path", + "description": "A minimal path module to resolve Unix, Windows and URL paths alike.", + "version": "1.1.2", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} \ No newline at end of file diff --git a/node_modules/@protobufjs/path/tests/index.js b/node_modules/@protobufjs/path/tests/index.js new file mode 100644 index 0000000..9c23bc9 --- /dev/null +++ b/node_modules/@protobufjs/path/tests/index.js @@ -0,0 +1,60 @@ +var tape = require("tape"); + +var path = require(".."); + +tape.test("path", function(test) { + + test.ok(path.isAbsolute("X:\\some\\path\\file.js"), "should identify absolute windows paths"); + test.ok(path.isAbsolute("/some/path/file.js"), "should identify absolute unix paths"); + + test.notOk(path.isAbsolute("some\\path\\file.js"), "should identify relative windows paths"); + test.notOk(path.isAbsolute("some/path/file.js"), "should identify relative unix paths"); + + var paths = [ + { + actual: "X:\\some\\..\\.\\path\\\\file.js", + normal: "X:/path/file.js", + resolve: { + origin: "X:/path/origin.js", + expected: "X:/path/file.js" + } + }, { + actual: "some\\..\\.\\path\\\\file.js", + normal: "path/file.js", + resolve: { + origin: "X:/path/origin.js", + expected: "X:/path/path/file.js" + } + }, { + actual: "/some/.././path//file.js", + normal: "/path/file.js", + resolve: { + origin: "/path/origin.js", + expected: "/path/file.js" + } + }, { + actual: "some/.././path//file.js", + normal: "path/file.js", + resolve: { + origin: "", + expected: "path/file.js" + } + }, { + actual: ".././path//file.js", + normal: "../path/file.js" + }, { + actual: "/.././path//file.js", + normal: "/path/file.js" + } + ]; + + paths.forEach(function(p) { + test.equal(path.normalize(p.actual), p.normal, "should normalize " + p.actual); + if (p.resolve) { + test.equal(path.resolve(p.resolve.origin, p.actual), p.resolve.expected, "should resolve " + p.actual); + test.equal(path.resolve(p.resolve.origin, p.normal, true), p.resolve.expected, "should resolve " + p.normal + " (already normalized)"); + } + }); + + test.end(); +}); diff --git a/node_modules/@protobufjs/pool/.npmignore b/node_modules/@protobufjs/pool/.npmignore new file mode 100644 index 0000000..c3fc82e --- /dev/null +++ b/node_modules/@protobufjs/pool/.npmignore @@ -0,0 +1,3 @@ +npm-debug.* +node_modules/ +coverage/ diff --git a/node_modules/@protobufjs/pool/LICENSE b/node_modules/@protobufjs/pool/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/pool/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/pool/README.md b/node_modules/@protobufjs/pool/README.md new file mode 100644 index 0000000..9fb0e97 --- /dev/null +++ b/node_modules/@protobufjs/pool/README.md @@ -0,0 +1,13 @@ +@protobufjs/pool +================ +[![npm](https://img.shields.io/npm/v/@protobufjs/pool.svg)](https://www.npmjs.com/package/@protobufjs/pool) + +A general purpose buffer pool. + +API +--- + +* **pool(alloc: `function(size: number): Uint8Array`, slice: `function(this: Uint8Array, start: number, end: number): Uint8Array`, [size=8192: `number`]): `function(size: number): Uint8Array`**
+ Creates a pooled allocator. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/pool/index.d.ts b/node_modules/@protobufjs/pool/index.d.ts new file mode 100644 index 0000000..23fe38c --- /dev/null +++ b/node_modules/@protobufjs/pool/index.d.ts @@ -0,0 +1,32 @@ +export = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +type PoolAllocator = (size: number) => Uint8Array; + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ +type PoolSlicer = (this: Uint8Array, start: number, end: number) => Uint8Array; + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +declare function pool(alloc: PoolAllocator, slice: PoolSlicer, size?: number): PoolAllocator; diff --git a/node_modules/@protobufjs/pool/index.js b/node_modules/@protobufjs/pool/index.js new file mode 100644 index 0000000..6c666f6 --- /dev/null +++ b/node_modules/@protobufjs/pool/index.js @@ -0,0 +1,48 @@ +"use strict"; +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} diff --git a/node_modules/@protobufjs/pool/package.json b/node_modules/@protobufjs/pool/package.json new file mode 100644 index 0000000..f025e03 --- /dev/null +++ b/node_modules/@protobufjs/pool/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/pool", + "description": "A general purpose buffer pool.", + "version": "1.1.0", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} diff --git a/node_modules/@protobufjs/pool/tests/index.js b/node_modules/@protobufjs/pool/tests/index.js new file mode 100644 index 0000000..5d1a921 --- /dev/null +++ b/node_modules/@protobufjs/pool/tests/index.js @@ -0,0 +1,33 @@ +var tape = require("tape"); + +var pool = require(".."); + +if (typeof Uint8Array !== "undefined") +tape.test("pool", function(test) { + + var alloc = pool(function(size) { return new Uint8Array(size); }, Uint8Array.prototype.subarray); + + var buf1 = alloc(0); + test.equal(buf1.length, 0, "should allocate a buffer of size 0"); + + var buf2 = alloc(1); + test.equal(buf2.length, 1, "should allocate a buffer of size 1 (initializes slab)"); + + test.notEqual(buf2.buffer, buf1.buffer, "should not reference the same backing buffer if previous buffer had size 0"); + test.equal(buf2.byteOffset, 0, "should allocate at byteOffset 0 when using a new slab"); + + buf1 = alloc(1); + test.equal(buf1.buffer, buf2.buffer, "should reference the same backing buffer when allocating a chunk fitting into the slab"); + test.equal(buf1.byteOffset, 8, "should align slices to 32 bit and this allocate at byteOffset 8"); + + var buf3 = alloc(4097); + test.notEqual(buf3.buffer, buf2.buffer, "should not reference the same backing buffer when allocating a buffer larger than half the backing buffer's size"); + + buf2 = alloc(4096); + test.equal(buf2.buffer, buf1.buffer, "should reference the same backing buffer when allocating a buffer smaller or equal than half the backing buffer's size"); + + buf1 = alloc(4096); + test.notEqual(buf1.buffer, buf2.buffer, "should not reference the same backing buffer when the slab is exhausted (initializes new slab)"); + + test.end(); +}); \ No newline at end of file diff --git a/node_modules/@protobufjs/utf8/.npmignore b/node_modules/@protobufjs/utf8/.npmignore new file mode 100644 index 0000000..c3fc82e --- /dev/null +++ b/node_modules/@protobufjs/utf8/.npmignore @@ -0,0 +1,3 @@ +npm-debug.* +node_modules/ +coverage/ diff --git a/node_modules/@protobufjs/utf8/LICENSE b/node_modules/@protobufjs/utf8/LICENSE new file mode 100644 index 0000000..be2b397 --- /dev/null +++ b/node_modules/@protobufjs/utf8/LICENSE @@ -0,0 +1,26 @@ +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@protobufjs/utf8/README.md b/node_modules/@protobufjs/utf8/README.md new file mode 100644 index 0000000..c936d9b --- /dev/null +++ b/node_modules/@protobufjs/utf8/README.md @@ -0,0 +1,20 @@ +@protobufjs/utf8 +================ +[![npm](https://img.shields.io/npm/v/@protobufjs/utf8.svg)](https://www.npmjs.com/package/@protobufjs/utf8) + +A minimal UTF8 implementation for number arrays. + +API +--- + +* **utf8.length(string: `string`): `number`**
+ Calculates the UTF8 byte length of a string. + +* **utf8.read(buffer: `Uint8Array`, start: `number`, end: `number`): `string`**
+ Reads UTF8 bytes as a string. + +* **utf8.write(string: `string`, buffer: `Uint8Array`, offset: `number`): `number`**
+ Writes a string as UTF8 bytes. + + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/@protobufjs/utf8/index.d.ts b/node_modules/@protobufjs/utf8/index.d.ts new file mode 100644 index 0000000..2f1d0ab --- /dev/null +++ b/node_modules/@protobufjs/utf8/index.d.ts @@ -0,0 +1,24 @@ +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +export function length(string: string): number; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +export function read(buffer: Uint8Array, start: number, end: number): string; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +export function write(string: string, buffer: Uint8Array, offset: number): number; diff --git a/node_modules/@protobufjs/utf8/index.js b/node_modules/@protobufjs/utf8/index.js new file mode 100644 index 0000000..43c5298 --- /dev/null +++ b/node_modules/@protobufjs/utf8/index.js @@ -0,0 +1,105 @@ +"use strict"; + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; diff --git a/node_modules/@protobufjs/utf8/package.json b/node_modules/@protobufjs/utf8/package.json new file mode 100644 index 0000000..80881c5 --- /dev/null +++ b/node_modules/@protobufjs/utf8/package.json @@ -0,0 +1,21 @@ +{ + "name": "@protobufjs/utf8", + "description": "A minimal UTF8 implementation for number arrays.", + "version": "1.1.0", + "author": "Daniel Wirtz ", + "repository": { + "type": "git", + "url": "https://github.com/dcodeIO/protobuf.js.git" + }, + "license": "BSD-3-Clause", + "main": "index.js", + "types": "index.d.ts", + "devDependencies": { + "istanbul": "^0.4.5", + "tape": "^4.6.3" + }, + "scripts": { + "test": "tape tests/*.js", + "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js" + } +} diff --git a/node_modules/@protobufjs/utf8/tests/data/utf8.txt b/node_modules/@protobufjs/utf8/tests/data/utf8.txt new file mode 100644 index 0000000..580b4c4 --- /dev/null +++ b/node_modules/@protobufjs/utf8/tests/data/utf8.txt @@ -0,0 +1,216 @@ +UTF-8 encoded sample plain-text file +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + +Markus Kuhn [ˈmaʳkʊs kuːn] — 2002-07-25 CC BY + + +The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279. + + +Using Unicode/UTF-8, you can write in emails and source code things such as + +Mathematics and sciences: + + ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ⎧⎡⎛┌─────┐⎞⎤⎫ + ⎪⎢⎜│a²+b³ ⎟⎥⎪ + ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ + ⎪⎢⎜⎷ c₈ ⎟⎥⎪ + ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⎨⎢⎜ ⎟⎥⎬ + ⎪⎢⎜ ∞ ⎟⎥⎪ + ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ + ⎪⎢⎜ ⎳aⁱ-bⁱ⎟⎥⎪ + 2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣⎝i=1 ⎠⎦⎭ + +Linguistics and dictionaries: + + ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn + Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ] + +APL: + + ((V⍳V)=⍳⍴V)/V←,V ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈ + +Nicer typography in plain text files: + + ╔══════════════════════════════════════════╗ + ║ ║ + ║ • ‘single’ and “double” quotes ║ + ║ ║ + ║ • Curly apostrophes: “We’ve been here” ║ + ║ ║ + ║ • Latin-1 apostrophe and accents: '´` ║ + ║ ║ + ║ • ‚deutsche‘ „Anführungszeichen“ ║ + ║ ║ + ║ • †, ‡, ‰, •, 3–4, —, −5/+5, ™, … ║ + ║ ║ + ║ • ASCII safety test: 1lI|, 0OD, 8B ║ + ║ ╭─────────╮ ║ + ║ • the euro symbol: │ 14.95 € │ ║ + ║ ╰─────────╯ ║ + ╚══════════════════════════════════════════╝ + +Combining characters: + + STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ + +Greek (in Polytonic): + + The Greek anthem: + + Σὲ γνωρίζω ἀπὸ τὴν κόψη + τοῦ σπαθιοῦ τὴν τρομερή, + σὲ γνωρίζω ἀπὸ τὴν ὄψη + ποὺ μὲ βία μετράει τὴ γῆ. + + ᾿Απ᾿ τὰ κόκκαλα βγαλμένη + τῶν ῾Ελλήνων τὰ ἱερά + καὶ σὰν πρῶτα ἀνδρειωμένη + χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά! + + From a speech of Demosthenes in the 4th century BC: + + Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι, + ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς + λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ + τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿ + εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ + πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν + οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι, + οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν + ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον + τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι + γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν + προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους + σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ + τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ + τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς + τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. + + Δημοσθένους, Γ´ ᾿Ολυνθιακὸς + +Georgian: + + From a Unicode conference invitation: + + გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო + კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს, + ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს + ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი, + ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება + ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში, + ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში. + +Russian: + + From a Unicode conference invitation: + + Зарегистрируйтесь сейчас на Десятую Международную Конференцию по + Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии. + Конференция соберет широкий круг экспертов по вопросам глобального + Интернета и Unicode, локализации и интернационализации, воплощению и + применению Unicode в различных операционных системах и программных + приложениях, шрифтах, верстке и многоязычных компьютерных системах. + +Thai (UCS Level 2): + + Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese + classic 'San Gua'): + + [----------------------------|------------------------] + ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ + สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนักหนา + โฮจิ๋นเรียกทัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัญ + เหมือนขับไสไล่เสือจากเคหา รับหมาป่าเข้ามาเลยอาสัญ + ฝ่ายอ้องอุ้นยุแยกให้แตกกัน ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยกุยกีกลับก่อเหตุ ช่างอาเพศจริงหนาฟ้าร้องไห้ + ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ + + (The above is a two-column text. If combining characters are handled + correctly, the lines of the second column should be aligned with the + | character above.) + +Ethiopian: + + Proverbs in the Amharic language: + + ሰማይ አይታረስ ንጉሥ አይከሰስ። + ብላ ካለኝ እንደአባቴ በቆመጠኝ። + ጌጥ ያለቤቱ ቁምጥና ነው። + ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው። + የአፍ ወለምታ በቅቤ አይታሽም። + አይጥ በበላ ዳዋ ተመታ። + ሲተረጉሙ ይደረግሙ። + ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል። + ድር ቢያብር አንበሳ ያስር። + ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም። + እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም። + የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ። + ሥራ ከመፍታት ልጄን ላፋታት። + ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል። + የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ። + ተንጋሎ ቢተፉ ተመልሶ ባፉ። + ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው። + እግርህን በፍራሽህ ልክ ዘርጋ። + +Runes: + + ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ + + (Old English, which transcribed into Latin reads 'He cwaeth that he + bude thaem lande northweardum with tha Westsae.' and means 'He said + that he lived in the northern land near the Western Sea.') + +Braille: + + ⡌⠁⠧⠑ ⠼⠁⠒ ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌ + + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞ + ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎ + ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂ + ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙ + ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑ + ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲ + + ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹ + ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞ + ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕ + ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹ + ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎ + ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎ + ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳ + ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞ + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + (The first couple of paragraphs of "A Christmas Carol" by Dickens) + +Compact font selection example text: + + ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 + abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ + –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд + ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა + +Greetings in various languages: + + Hello world, Καλημέρα κόσμε, コンニチハ + +Box drawing alignment tests: █ + ▉ + ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳ + ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳ + ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎ + ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ + ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ ▗▄▖▛▀▜ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ + ▝▀▘▙▄▟ + +Surrogates: + +𠜎 𠜱 𠝹 𠱓 𠱸 𠲖 𠳏 𠳕 𠴕 𠵼 𠵿 𠸎 𠸏 𠹷 𠺝 𠺢 𠻗 𠻹 𠻺 𠼭 𠼮 𠽌 𠾴 𠾼 𠿪 𡁜 𡁯 𡁵 𡁶 𡁻 𡃁 +𡃉 𡇙 𢃇 𢞵 𢫕 𢭃 𢯊 𢱑 𢱕 𢳂 𢴈 𢵌 𢵧 𢺳 𣲷 𤓓 𤶸 𤷪 𥄫 𦉘 𦟌 𦧲 𦧺 𧨾 𨅝 𨈇 𨋢 𨳊 𨳍 𨳒 𩶘 diff --git a/node_modules/@protobufjs/utf8/tests/index.js b/node_modules/@protobufjs/utf8/tests/index.js new file mode 100644 index 0000000..16d169e --- /dev/null +++ b/node_modules/@protobufjs/utf8/tests/index.js @@ -0,0 +1,57 @@ +var tape = require("tape"); + +var utf8 = require(".."); + +var data = require("fs").readFileSync(require.resolve("./data/utf8.txt")), + dataStr = data.toString("utf8"); + +tape.test("utf8", function(test) { + + test.test(test.name + " - length", function(test) { + test.equal(utf8.length(""), 0, "should return a byte length of zero for an empty string"); + + test.equal(utf8.length(dataStr), Buffer.byteLength(dataStr), "should return the same byte length as node buffers"); + + test.end(); + }); + + test.test(test.name + " - read", function(test) { + var comp = utf8.read([], 0, 0); + test.equal(comp, "", "should decode an empty buffer to an empty string"); + + comp = utf8.read(data, 0, data.length); + test.equal(comp, data.toString("utf8"), "should decode to the same byte data as node buffers"); + + var longData = Buffer.concat([data, data, data, data]); + comp = utf8.read(longData, 0, longData.length); + test.equal(comp, longData.toString("utf8"), "should decode to the same byte data as node buffers (long)"); + + var chunkData = new Buffer(data.toString("utf8").substring(0, 8192)); + comp = utf8.read(chunkData, 0, chunkData.length); + test.equal(comp, chunkData.toString("utf8"), "should decode to the same byte data as node buffers (chunk size)"); + + test.end(); + }); + + test.test(test.name + " - write", function(test) { + var buf = new Buffer(0); + test.equal(utf8.write("", buf, 0), 0, "should encode an empty string to an empty buffer"); + + var len = utf8.length(dataStr); + buf = new Buffer(len); + test.equal(utf8.write(dataStr, buf, 0), len, "should encode to exactly " + len + " bytes"); + + test.equal(buf.length, data.length, "should encode to a buffer length equal to that of node buffers"); + + for (var i = 0; i < buf.length; ++i) { + if (buf[i] !== data[i]) { + test.fail("should encode to the same buffer data as node buffers (offset " + i + ")"); + return; + } + } + test.pass("should encode to the same buffer data as node buffers"); + + test.end(); + }); + +}); diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/node_modules/@types/node/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md new file mode 100644 index 0000000..f24b253 --- /dev/null +++ b/node_modules/@types/node/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/node` + +# Summary +This package contains type definitions for node (https://nodejs.org/). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. + +### Additional Details + * Last updated: Tue, 14 May 2024 06:09:35 GMT + * Dependencies: [undici-types](https://npmjs.com/package/undici-types) + +# Credits +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts new file mode 100644 index 0000000..08fada9 --- /dev/null +++ b/node_modules/@types/node/assert.d.ts @@ -0,0 +1,1040 @@ +/** + * The `node:assert` module provides a set of assertion functions for verifying + * invariants. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/assert.js) + */ +declare module "assert" { + /** + * An alias of {@link ok}. + * @since v0.5.9 + * @param value The input that is checked for being truthy. + */ + function assert(value: unknown, message?: string | Error): asserts value; + namespace assert { + /** + * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. + */ + class AssertionError extends Error { + /** + * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. + */ + actual: unknown; + /** + * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. + */ + expected: unknown; + /** + * Set to the passed in operator value. + */ + operator: string; + /** + * Indicates if the message was auto-generated (`true`) or not. + */ + generatedMessage: boolean; + /** + * Value is always `ERR_ASSERTION` to show that the error is an assertion error. + */ + code: "ERR_ASSERTION"; + constructor(options?: { + /** If provided, the error message is set to this value. */ + message?: string | undefined; + /** The `actual` property on the error instance. */ + actual?: unknown | undefined; + /** The `expected` property on the error instance. */ + expected?: unknown | undefined; + /** The `operator` property on the error instance. */ + operator?: string | undefined; + /** If provided, the generated stack trace omits frames before this function. */ + // eslint-disable-next-line @typescript-eslint/ban-types + stackStartFn?: Function | undefined; + }); + } + /** + * This feature is deprecated and will be removed in a future version. + * Please consider using alternatives such as the `mock` helper function. + * @since v14.2.0, v12.19.0 + * @deprecated Deprecated + */ + class CallTracker { + /** + * The wrapper function is expected to be called exactly `exact` times. If the + * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an + * error. + * + * ```js + * import assert from 'node:assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func); + * ``` + * @since v14.2.0, v12.19.0 + * @param [fn='A no-op function'] + * @param [exact=1] + * @return A function that wraps `fn`. + */ + calls(exact?: number): () => void; + calls any>(fn?: Func, exact?: number): Func; + /** + * Example: + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * callsfunc(1, 2, 3); + * + * assert.deepStrictEqual(tracker.getCalls(callsfunc), + * [{ thisArg: undefined, arguments: [1, 2, 3] }]); + * ``` + * @since v18.8.0, v16.18.0 + * @return An array with all the calls to a tracked function. + */ + getCalls(fn: Function): CallTrackerCall[]; + /** + * The arrays contains information about the expected and actual number of calls of + * the functions that have not been called the expected number of times. + * + * ```js + * import assert from 'node:assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * // Returns an array containing information on callsfunc() + * console.log(tracker.report()); + * // [ + * // { + * // message: 'Expected the func function to be executed 2 time(s) but was + * // executed 0 time(s).', + * // actual: 0, + * // expected: 2, + * // operator: 'func', + * // stack: stack trace + * // } + * // ] + * ``` + * @since v14.2.0, v12.19.0 + * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}. + */ + report(): CallTrackerReportInformation[]; + /** + * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it. + * If no arguments are passed, all tracked functions will be reset. + * + * ```js + * import assert from 'node:assert'; + * + * const tracker = new assert.CallTracker(); + * + * function func() {} + * const callsfunc = tracker.calls(func); + * + * callsfunc(); + * // Tracker was called once + * assert.strictEqual(tracker.getCalls(callsfunc).length, 1); + * + * tracker.reset(callsfunc); + * assert.strictEqual(tracker.getCalls(callsfunc).length, 0); + * ``` + * @since v18.8.0, v16.18.0 + * @param fn a tracked function to reset. + */ + reset(fn?: Function): void; + /** + * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that + * have not been called the expected number of times. + * + * ```js + * import assert from 'node:assert'; + * + * // Creates call tracker. + * const tracker = new assert.CallTracker(); + * + * function func() {} + * + * // Returns a function that wraps func() that must be called exact times + * // before tracker.verify(). + * const callsfunc = tracker.calls(func, 2); + * + * callsfunc(); + * + * // Will throw an error since callsfunc() was only called once. + * tracker.verify(); + * ``` + * @since v14.2.0, v12.19.0 + */ + verify(): void; + } + interface CallTrackerCall { + thisArg: object; + arguments: unknown[]; + } + interface CallTrackerReportInformation { + message: string; + /** The actual number of times the function was called. */ + actual: number; + /** The number of times the function was expected to be called. */ + expected: number; + /** The name of the function that is wrapped. */ + operator: string; + /** A stack trace of the function. */ + stack: object; + } + type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; + /** + * Throws an `AssertionError` with the provided error message or a default + * error message. If the `message` parameter is an instance of an `Error` then + * it will be thrown instead of the `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.fail(); + * // AssertionError [ERR_ASSERTION]: Failed + * + * assert.fail('boom'); + * // AssertionError [ERR_ASSERTION]: boom + * + * assert.fail(new TypeError('need array')); + * // TypeError: need array + * ``` + * + * Using `assert.fail()` with more than two arguments is possible but deprecated. + * See below for further details. + * @since v0.1.21 + * @param [message='Failed'] + */ + function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + function fail( + actual: unknown, + expected: unknown, + message?: string | Error, + operator?: string, + // eslint-disable-next-line @typescript-eslint/ban-types + stackStartFn?: Function, + ): never; + /** + * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. + * + * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. + * + * Be aware that in the `repl` the error message will be different to the one + * thrown in a file! See below for further details. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ok(true); + * // OK + * assert.ok(1); + * // OK + * + * assert.ok(); + * // AssertionError: No value argument passed to `assert.ok()` + * + * assert.ok(false, 'it\'s false'); + * // AssertionError: it's false + * + * // In the repl: + * assert.ok(typeof 123 === 'string'); + * // AssertionError: false == true + * + * // In a file (e.g. test.js): + * assert.ok(typeof 123 === 'string'); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(typeof 123 === 'string') + * + * assert.ok(false); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(false) + * + * assert.ok(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert.ok(0) + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * // Using `assert()` works the same: + * assert(0); + * // AssertionError: The expression evaluated to a falsy value: + * // + * // assert(0) + * ``` + * @since v0.1.21 + */ + function ok(value: unknown, message?: string | Error): asserts value; + /** + * **Strict assertion mode** + * + * An alias of {@link strictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link strictEqual} instead. + * + * Tests shallow, coercive equality between the `actual` and `expected` parameters + * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled + * and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.equal(1, 1); + * // OK, 1 == 1 + * assert.equal(1, '1'); + * // OK, 1 == '1' + * assert.equal(NaN, NaN); + * // OK + * + * assert.equal(1, 2); + * // AssertionError: 1 == 2 + * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); + * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } + * ``` + * + * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function equal(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. + * + * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is + * specially handled and treated as being identical if both sides are `NaN`. + * + * ```js + * import assert from 'node:assert'; + * + * assert.notEqual(1, 2); + * // OK + * + * assert.notEqual(1, 1); + * // AssertionError: 1 != 1 + * + * assert.notEqual(1, '1'); + * // AssertionError: 1 != '1' + * ``` + * + * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error + * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. + * @since v0.1.21 + */ + function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link deepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. + * + * Tests for deep equality between the `actual` and `expected` parameters. Consider + * using {@link deepStrictEqual} instead. {@link deepEqual} can have + * surprising results. + * + * _Deep equality_ means that the enumerable "own" properties of child objects + * are also recursively evaluated by the following rules. + * @since v0.1.21 + */ + function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * **Strict assertion mode** + * + * An alias of {@link notDeepStrictEqual}. + * + * **Legacy assertion mode** + * + * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. + * + * Tests for any deep inequality. Opposite of {@link deepEqual}. + * + * ```js + * import assert from 'node:assert'; + * + * const obj1 = { + * a: { + * b: 1, + * }, + * }; + * const obj2 = { + * a: { + * b: 2, + * }, + * }; + * const obj3 = { + * a: { + * b: 1, + * }, + * }; + * const obj4 = { __proto__: obj1 }; + * + * assert.notDeepEqual(obj1, obj1); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj2); + * // OK + * + * assert.notDeepEqual(obj1, obj3); + * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } + * + * assert.notDeepEqual(obj1, obj4); + * // OK + * ``` + * + * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default + * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests strict equality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.strictEqual(1, 2); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + * // 1 !== 2 + * + * assert.strictEqual(1, 1); + * // OK + * + * assert.strictEqual('Hello foobar', 'Hello World!'); + * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: + * // + actual - expected + * // + * // + 'Hello foobar' + * // - 'Hello World!' + * // ^ + * + * const apples = 1; + * const oranges = 2; + * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); + * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 + * + * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); + * // TypeError: Inputs are not identical + * ``` + * + * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests strict inequality between the `actual` and `expected` parameters as + * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notStrictEqual(1, 2); + * // OK + * + * assert.notStrictEqual(1, 1); + * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: + * // + * // 1 + * + * assert.notStrictEqual(1, '1'); + * // OK + * ``` + * + * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a + * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v0.1.21 + */ + function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Tests for deep equality between the `actual` and `expected` parameters. + * "Deep" equality means that the enumerable "own" properties of child objects + * are recursively evaluated also by the following rules. + * @since v1.2.0 + */ + function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; + /** + * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); + * // OK + * ``` + * + * If the values are deeply and strictly equal, an `AssertionError` is thrown + * with a `message` property set equal to the value of the `message` parameter. If + * the `message` parameter is undefined, a default error message is assigned. If + * the `message` parameter is an instance of an `Error` then it will be thrown + * instead of the `AssertionError`. + * @since v1.2.0 + */ + function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; + /** + * Expects the function `fn` to throw an error. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * a validation object where each property will be tested for strict deep equality, + * or an instance of error where each property will be tested for strict deep + * equality including the non-enumerable `message` and `name` properties. When + * using an object, it is also possible to use a regular expression, when + * validating against a string property. See below for examples. + * + * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation + * fails. + * + * Custom validation object/error instance: + * + * ```js + * import assert from 'node:assert/strict'; + * + * const err = new TypeError('Wrong value'); + * err.code = 404; + * err.foo = 'bar'; + * err.info = { + * nested: true, + * baz: 'text', + * }; + * err.reg = /abc/i; + * + * assert.throws( + * () => { + * throw err; + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * info: { + * nested: true, + * baz: 'text', + * }, + * // Only properties on the validation object will be tested for. + * // Using nested objects requires all properties to be present. Otherwise + * // the validation is going to fail. + * }, + * ); + * + * // Using regular expressions to validate error properties: + * assert.throws( + * () => { + * throw err; + * }, + * { + * // The `name` and `message` properties are strings and using regular + * // expressions on those will match against the string. If they fail, an + * // error is thrown. + * name: /^TypeError$/, + * message: /Wrong/, + * foo: 'bar', + * info: { + * nested: true, + * // It is not possible to use regular expressions for nested properties! + * baz: 'text', + * }, + * // The `reg` property contains a regular expression and only if the + * // validation object contains an identical regular expression, it is going + * // to pass. + * reg: /abc/i, + * }, + * ); + * + * // Fails due to the different `message` and `name` properties: + * assert.throws( + * () => { + * const otherErr = new Error('Not found'); + * // Copy all enumerable properties from `err` to `otherErr`. + * for (const [key, value] of Object.entries(err)) { + * otherErr[key] = value; + * } + * throw otherErr; + * }, + * // The error's `message` and `name` properties will also be checked when using + * // an error as validation object. + * err, + * ); + * ``` + * + * Validate instanceof using constructor: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * Error, + * ); + * ``` + * + * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): + * + * Using a regular expression runs `.toString` on the error object, and will + * therefore also include the error name. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * /^Error: Wrong value$/, + * ); + * ``` + * + * Custom error validation: + * + * The function must return `true` to indicate all internal validations passed. + * It will otherwise fail with an `AssertionError`. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.throws( + * () => { + * throw new Error('Wrong value'); + * }, + * (err) => { + * assert(err instanceof Error); + * assert(/value/.test(err)); + * // Avoid returning anything from validation functions besides `true`. + * // Otherwise, it's not clear what part of the validation failed. Instead, + * // throw an error about the specific validation that failed (as done in this + * // example) and add as much helpful debugging information to that error as + * // possible. + * return true; + * }, + * 'unexpected error', + * ); + * ``` + * + * `error` cannot be a string. If a string is provided as the second + * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same + * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using + * a string as the second argument gets considered: + * + * ```js + * import assert from 'node:assert/strict'; + * + * function throwingFirst() { + * throw new Error('First'); + * } + * + * function throwingSecond() { + * throw new Error('Second'); + * } + * + * function notThrowing() {} + * + * // The second argument is a string and the input function threw an Error. + * // The first case will not throw as it does not match for the error message + * // thrown by the input function! + * assert.throws(throwingFirst, 'Second'); + * // In the next example the message has no benefit over the message from the + * // error and since it is not clear if the user intended to actually match + * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. + * assert.throws(throwingSecond, 'Second'); + * // TypeError [ERR_AMBIGUOUS_ARGUMENT] + * + * // The string is only used (as message) in case the function does not throw: + * assert.throws(notThrowing, 'Second'); + * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second + * + * // If it was intended to match for the error message do this instead: + * // It does not throw because the error messages match. + * assert.throws(throwingSecond, /Second$/); + * + * // If the error message does not match, an AssertionError is thrown. + * assert.throws(throwingFirst, /Second$/); + * // AssertionError [ERR_ASSERTION] + * ``` + * + * Due to the confusing error-prone notation, avoid a string as the second + * argument. + * @since v0.1.21 + */ + function throws(block: () => unknown, message?: string | Error): void; + function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Asserts that the function `fn` does not throw an error. + * + * Using `assert.doesNotThrow()` is actually not useful because there + * is no benefit in catching an error and then rethrowing it. Instead, consider + * adding a comment next to the specific code path that should not throw and keep + * error messages as expressive as possible. + * + * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. + * + * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a + * different type, or if the `error` parameter is undefined, the error is + * propagated back to the caller. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * The following, for instance, will throw the `TypeError` because there is no + * matching error type in the assertion: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * However, the following will result in an `AssertionError` with the message + * 'Got unwanted exception...': + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * TypeError, + * ); + * ``` + * + * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotThrow( + * () => { + * throw new TypeError('Wrong value'); + * }, + * /Wrong value/, + * 'Whoops', + * ); + * // Throws: AssertionError: Got unwanted exception: Whoops + * ``` + * @since v0.1.21 + */ + function doesNotThrow(block: () => unknown, message?: string | Error): void; + function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; + /** + * Throws `value` if `value` is not `undefined` or `null`. This is useful when + * testing the `error` argument in callbacks. The stack trace contains all frames + * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.ifError(null); + * // OK + * assert.ifError(0); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 + * assert.ifError('error'); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' + * assert.ifError(new Error()); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error + * + * // Create some random error frames. + * let err; + * (function errorFrame() { + * err = new Error('test error'); + * })(); + * + * (function ifErrorFrame() { + * assert.ifError(err); + * })(); + * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error + * // at ifErrorFrame + * // at errorFrame + * ``` + * @since v0.1.97 + */ + function ifError(value: unknown): asserts value is null | undefined; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the + * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) + * error. In both cases the error handler is skipped. + * + * Besides the async nature to await the completion behaves identically to {@link throws}. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, + * an object where each property will be tested for, or an instance of error where + * each property will be tested for including the non-enumerable `message` and `name` properties. + * + * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * { + * name: 'TypeError', + * message: 'Wrong value', + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.rejects( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * (err) => { + * assert.strictEqual(err.name, 'TypeError'); + * assert.strictEqual(err.message, 'Wrong value'); + * return true; + * }, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.rejects( + * Promise.reject(new Error('Wrong value')), + * Error, + * ).then(() => { + * // ... + * }); + * ``` + * + * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to + * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the + * example in {@link throws} carefully if using a string as the second argument gets considered. + * @since v10.0.0 + */ + function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; + function rejects( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately + * calls the function and awaits the returned promise to complete. It will then + * check that the promise is not rejected. + * + * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If + * the function does not return a promise, `assert.doesNotReject()` will return a + * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) error. In both cases + * the error handler is skipped. + * + * Using `assert.doesNotReject()` is actually not useful because there is little + * benefit in catching a rejection and then rejecting it again. Instead, consider + * adding a comment next to the specific code path that should not reject and keep + * error messages as expressive as possible. + * + * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), + * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation + * function. See {@link throws} for more details. + * + * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. + * + * ```js + * import assert from 'node:assert/strict'; + * + * await assert.doesNotReject( + * async () => { + * throw new TypeError('Wrong value'); + * }, + * SyntaxError, + * ); + * ``` + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) + * .then(() => { + * // ... + * }); + * ``` + * @since v10.0.0 + */ + function doesNotReject( + block: (() => Promise) | Promise, + message?: string | Error, + ): Promise; + function doesNotReject( + block: (() => Promise) | Promise, + error: AssertPredicate, + message?: string | Error, + ): Promise; + /** + * Expects the `string` input to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.match('I will fail', /pass/); + * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... + * + * assert.match(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.match('I will pass', /pass/); + * // OK + * ``` + * + * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function match(value: string, regExp: RegExp, message?: string | Error): void; + /** + * Expects the `string` input not to match the regular expression. + * + * ```js + * import assert from 'node:assert/strict'; + * + * assert.doesNotMatch('I will fail', /fail/); + * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... + * + * assert.doesNotMatch(123, /pass/); + * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. + * + * assert.doesNotMatch('I will pass', /different/); + * // OK + * ``` + * + * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal + * to the value of the `message` parameter. If the `message` parameter is + * undefined, a default error message is assigned. If the `message` parameter is an + * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. + * @since v13.6.0, v12.16.0 + */ + function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; + /** + * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, + * {@link deepEqual} will behave like {@link deepStrictEqual}. + * + * In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error + * messages for objects display the objects, often truncated. + * + * To use strict assertion mode: + * + * ```js + * import { strict as assert } from 'node:assert';COPY + * import assert from 'node:assert/strict'; + * ``` + * + * Example error diff: + * + * ```js + * import { strict as assert } from 'node:assert'; + * + * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); + * // AssertionError: Expected inputs to be strictly deep-equal: + * // + actual - expected ... Lines skipped + * // + * // [ + * // [ + * // ... + * // 2, + * // + 3 + * // - '3' + * // ], + * // ... + * // 5 + * // ] + * ``` + * + * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also + * deactivate the colors in the REPL. For more on color support in terminal environments, read the tty + * `getColorDepth()` documentation. + * + * @since v15.0.0, v13.9.0, v12.16.2, v9.9.0 + */ + namespace strict { + type AssertionError = assert.AssertionError; + type AssertPredicate = assert.AssertPredicate; + type CallTrackerCall = assert.CallTrackerCall; + type CallTrackerReportInformation = assert.CallTrackerReportInformation; + } + const strict: + & Omit< + typeof assert, + | "equal" + | "notEqual" + | "deepEqual" + | "notDeepEqual" + | "ok" + | "strictEqual" + | "deepStrictEqual" + | "ifError" + | "strict" + > + & { + (value: unknown, message?: string | Error): asserts value; + equal: typeof strictEqual; + notEqual: typeof notStrictEqual; + deepEqual: typeof deepStrictEqual; + notDeepEqual: typeof notDeepStrictEqual; + // Mapped types and assertion functions are incompatible? + // TS2775: Assertions require every name in the call target + // to be declared with an explicit type annotation. + ok: typeof ok; + strictEqual: typeof strictEqual; + deepStrictEqual: typeof deepStrictEqual; + ifError: typeof ifError; + strict: typeof strict; + }; + } + export = assert; +} +declare module "node:assert" { + import assert = require("assert"); + export = assert; +} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts new file mode 100644 index 0000000..f333913 --- /dev/null +++ b/node_modules/@types/node/assert/strict.d.ts @@ -0,0 +1,8 @@ +declare module "assert/strict" { + import { strict } from "node:assert"; + export = strict; +} +declare module "node:assert/strict" { + import { strict } from "node:assert"; + export = strict; +} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts new file mode 100644 index 0000000..9930a7e --- /dev/null +++ b/node_modules/@types/node/async_hooks.d.ts @@ -0,0 +1,541 @@ +/** + * We strongly discourage the use of the `async_hooks` API. + * Other APIs that can cover most of its use cases include: + * + * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v20.x/api/async_context.html#class-asynclocalstorage) tracks async context + * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processgetactiveresourcesinfo) tracks active resources + * + * The `node:async_hooks` module provides an API to track asynchronous resources. + * It can be accessed using: + * + * ```js + * import async_hooks from 'node:async_hooks'; + * ``` + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/async_hooks.js) + */ +declare module "async_hooks" { + /** + * ```js + * import { executionAsyncId } from 'node:async_hooks'; + * import fs from 'node:fs'; + * + * console.log(executionAsyncId()); // 1 - bootstrap + * const path = '.'; + * fs.open(path, 'r', (err, fd) => { + * console.log(executionAsyncId()); // 6 - open() + * }); + * ``` + * + * The ID returned from `executionAsyncId()` is related to execution timing, not + * causality (which is covered by `triggerAsyncId()`): + * + * ```js + * const server = net.createServer((conn) => { + * // Returns the ID of the server, not of the new connection, because the + * // callback runs in the execution scope of the server's MakeCallback(). + * async_hooks.executionAsyncId(); + * + * }).listen(port, () => { + * // Returns the ID of a TickObject (process.nextTick()) because all + * // callbacks passed to .listen() are wrapped in a nextTick(). + * async_hooks.executionAsyncId(); + * }); + * ``` + * + * Promise contexts may not get precise `executionAsyncIds` by default. + * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). + * @since v8.1.0 + * @return The `asyncId` of the current execution context. Useful to track when something calls. + */ + function executionAsyncId(): number; + /** + * Resource objects returned by `executionAsyncResource()` are most often internal + * Node.js handle objects with undocumented APIs. Using any functions or properties + * on the object is likely to crash your application and should be avoided. + * + * Using `executionAsyncResource()` in the top-level execution context will + * return an empty object as there is no handle or request object to use, + * but having an object representing the top-level can be helpful. + * + * ```js + * import { open } from 'node:fs'; + * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; + * + * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} + * open(new URL(import.meta.url), 'r', (err, fd) => { + * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap + * }); + * ``` + * + * This can be used to implement continuation local storage without the + * use of a tracking `Map` to store the metadata: + * + * ```js + * import { createServer } from 'node:http'; + * import { + * executionAsyncId, + * executionAsyncResource, + * createHook, + * } from 'async_hooks'; + * const sym = Symbol('state'); // Private symbol to avoid pollution + * + * createHook({ + * init(asyncId, type, triggerAsyncId, resource) { + * const cr = executionAsyncResource(); + * if (cr) { + * resource[sym] = cr[sym]; + * } + * }, + * }).enable(); + * + * const server = createServer((req, res) => { + * executionAsyncResource()[sym] = { state: req.url }; + * setTimeout(function() { + * res.end(JSON.stringify(executionAsyncResource()[sym])); + * }, 100); + * }).listen(3000); + * ``` + * @since v13.9.0, v12.17.0 + * @return The resource representing the current execution. Useful to store data within the resource. + */ + function executionAsyncResource(): object; + /** + * ```js + * const server = net.createServer((conn) => { + * // The resource that caused (or triggered) this callback to be called + * // was that of the new connection. Thus the return value of triggerAsyncId() + * // is the asyncId of "conn". + * async_hooks.triggerAsyncId(); + * + * }).listen(port, () => { + * // Even though all callbacks passed to .listen() are wrapped in a nextTick() + * // the callback itself exists because the call to the server's .listen() + * // was made. So the return value would be the ID of the server. + * async_hooks.triggerAsyncId(); + * }); + * ``` + * + * Promise contexts may not get valid `triggerAsyncId`s by default. See + * the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). + * @return The ID of the resource responsible for calling the callback that is currently being executed. + */ + function triggerAsyncId(): number; + interface HookCallbacks { + /** + * Called when a class is constructed that has the possibility to emit an asynchronous event. + * @param asyncId A unique ID for the async resource + * @param type The type of the async resource + * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created + * @param resource Reference to the resource representing the async operation, needs to be released during destroy + */ + init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; + /** + * When an asynchronous operation is initiated or completes a callback is called to notify the user. + * The before callback is called just before said callback is executed. + * @param asyncId the unique identifier assigned to the resource about to execute the callback. + */ + before?(asyncId: number): void; + /** + * Called immediately after the callback specified in `before` is completed. + * + * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs. + * @param asyncId the unique identifier assigned to the resource which has executed the callback. + */ + after?(asyncId: number): void; + /** + * Called when a promise has resolve() called. This may not be in the same execution id + * as the promise itself. + * @param asyncId the unique id for the promise that was resolve()d. + */ + promiseResolve?(asyncId: number): void; + /** + * Called after the resource corresponding to asyncId is destroyed + * @param asyncId a unique ID for the async resource + */ + destroy?(asyncId: number): void; + } + interface AsyncHook { + /** + * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. + */ + enable(): this; + /** + * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. + */ + disable(): this; + } + /** + * Registers functions to be called for different lifetime events of each async + * operation. + * + * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the + * respective asynchronous event during a resource's lifetime. + * + * All callbacks are optional. For example, if only resource cleanup needs to + * be tracked, then only the `destroy` callback needs to be passed. The + * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. + * + * ```js + * import { createHook } from 'node:async_hooks'; + * + * const asyncHook = createHook({ + * init(asyncId, type, triggerAsyncId, resource) { }, + * destroy(asyncId) { }, + * }); + * ``` + * + * The callbacks will be inherited via the prototype chain: + * + * ```js + * class MyAsyncCallbacks { + * init(asyncId, type, triggerAsyncId, resource) { } + * destroy(asyncId) {} + * } + * + * class MyAddedCallbacks extends MyAsyncCallbacks { + * before(asyncId) { } + * after(asyncId) { } + * } + * + * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); + * ``` + * + * Because promises are asynchronous resources whose lifecycle is tracked + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. + * @since v8.1.0 + * @param callbacks The `Hook Callbacks` to register + * @return Instance used for disabling and enabling hooks + */ + function createHook(callbacks: HookCallbacks): AsyncHook; + interface AsyncResourceOptions { + /** + * The ID of the execution context that created this async event. + * @default executionAsyncId() + */ + triggerAsyncId?: number | undefined; + /** + * Disables automatic `emitDestroy` when the object is garbage collected. + * This usually does not need to be set (even if `emitDestroy` is called + * manually), unless the resource's `asyncId` is retrieved and the + * sensitive API's `emitDestroy` is called with it. + * @default false + */ + requireManualDestroy?: boolean | undefined; + } + /** + * The class `AsyncResource` is designed to be extended by the embedder's async + * resources. Using this, users can easily trigger the lifetime events of their + * own resources. + * + * The `init` hook will trigger when an `AsyncResource` is instantiated. + * + * The following is an overview of the `AsyncResource` API. + * + * ```js + * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; + * + * // AsyncResource() is meant to be extended. Instantiating a + * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * // async_hook.executionAsyncId() is used. + * const asyncResource = new AsyncResource( + * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, + * ); + * + * // Run a function in the execution context of the resource. This will + * // * establish the context of the resource + * // * trigger the AsyncHooks before callbacks + * // * call the provided function `fn` with the supplied arguments + * // * trigger the AsyncHooks after callbacks + * // * restore the original execution context + * asyncResource.runInAsyncScope(fn, thisArg, ...args); + * + * // Call AsyncHooks destroy callbacks. + * asyncResource.emitDestroy(); + * + * // Return the unique ID assigned to the AsyncResource instance. + * asyncResource.asyncId(); + * + * // Return the trigger ID for the AsyncResource instance. + * asyncResource.triggerAsyncId(); + * ``` + */ + class AsyncResource { + /** + * AsyncResource() is meant to be extended. Instantiating a + * new AsyncResource() also triggers init. If triggerAsyncId is omitted then + * async_hook.executionAsyncId() is used. + * @param type The type of async event. + * @param triggerAsyncId The ID of the execution context that created + * this async event (default: `executionAsyncId()`), or an + * AsyncResourceOptions object (since v9.3.0) + */ + constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); + /** + * Binds the given function to the current execution context. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current execution context. + * @param type An optional name to associate with the underlying `AsyncResource`. + */ + static bind any, ThisArg>( + fn: Func, + type?: string, + thisArg?: ThisArg, + ): Func; + /** + * Binds the given function to execute to this `AsyncResource`'s scope. + * @since v14.8.0, v12.19.0 + * @param fn The function to bind to the current `AsyncResource`. + */ + bind any>(fn: Func): Func; + /** + * Call the provided function with the provided arguments in the execution context + * of the async resource. This will establish the context, trigger the AsyncHooks + * before callbacks, call the function, trigger the AsyncHooks after callbacks, and + * then restore the original execution context. + * @since v9.6.0 + * @param fn The function to call in the execution context of this async resource. + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runInAsyncScope( + fn: (this: This, ...args: any[]) => Result, + thisArg?: This, + ...args: any[] + ): Result; + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + * @return A reference to `asyncResource`. + */ + emitDestroy(): this; + /** + * @return The unique `asyncId` assigned to the resource. + */ + asyncId(): number; + /** + * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. + */ + triggerAsyncId(): number; + } + /** + * This class creates stores that stay coherent through asynchronous operations. + * + * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory + * safe implementation that involves significant optimizations that are non-obvious + * to implement. + * + * The following example uses `AsyncLocalStorage` to build a simple logger + * that assigns IDs to incoming HTTP requests and includes them in messages + * logged within each request. + * + * ```js + * import http from 'node:http'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * function logWithId(msg) { + * const id = asyncLocalStorage.getStore(); + * console.log(`${id !== undefined ? id : '-'}:`, msg); + * } + * + * let idSeq = 0; + * http.createServer((req, res) => { + * asyncLocalStorage.run(idSeq++, () => { + * logWithId('start'); + * // Imagine any chain of async operations here + * setImmediate(() => { + * logWithId('finish'); + * res.end(); + * }); + * }); + * }).listen(8080); + * + * http.get('http://localhost:8080'); + * http.get('http://localhost:8080'); + * // Prints: + * // 0: start + * // 1: start + * // 0: finish + * // 1: finish + * ``` + * + * Each instance of `AsyncLocalStorage` maintains an independent storage context. + * Multiple instances can safely exist simultaneously without risk of interfering + * with each other's data. + * @since v13.10.0, v12.17.0 + */ + class AsyncLocalStorage { + /** + * Binds the given function to the current execution context. + * @since v19.8.0 + * @experimental + * @param fn The function to bind to the current execution context. + * @return A new function that calls `fn` within the captured execution context. + */ + static bind any>(fn: Func): Func; + /** + * Captures the current execution context and returns a function that accepts a + * function as an argument. Whenever the returned function is called, it + * calls the function passed to it within the captured context. + * + * ```js + * const asyncLocalStorage = new AsyncLocalStorage(); + * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); + * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); + * console.log(result); // returns 123 + * ``` + * + * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple + * async context tracking purposes, for example: + * + * ```js + * class Foo { + * #runInAsyncScope = AsyncLocalStorage.snapshot(); + * + * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } + * } + * + * const foo = asyncLocalStorage.run(123, () => new Foo()); + * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 + * ``` + * @since v19.8.0 + * @experimental + * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. + */ + static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; + /** + * Disables the instance of `AsyncLocalStorage`. All subsequent calls + * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. + * + * When calling `asyncLocalStorage.disable()`, all current contexts linked to the + * instance will be exited. + * + * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores + * provided by the `asyncLocalStorage`, as those objects are garbage collected + * along with the corresponding async resources. + * + * Use this method when the `asyncLocalStorage` is not in use anymore + * in the current process. + * @since v13.10.0, v12.17.0 + * @experimental + */ + disable(): void; + /** + * Returns the current store. + * If called outside of an asynchronous context initialized by + * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it + * returns `undefined`. + * @since v13.10.0, v12.17.0 + */ + getStore(): T | undefined; + /** + * Runs a function synchronously within a context and returns its + * return value. The store is not accessible outside of the callback function. + * The store is accessible to any asynchronous operations created within the + * callback. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `run()` too. + * The stacktrace is not impacted by this call and the context is exited. + * + * Example: + * + * ```js + * const store = { id: 2 }; + * try { + * asyncLocalStorage.run(store, () => { + * asyncLocalStorage.getStore(); // Returns the store object + * setTimeout(() => { + * asyncLocalStorage.getStore(); // Returns the store object + * }, 200); + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns undefined + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + */ + run(store: T, callback: () => R): R; + run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Runs a function synchronously outside of a context and returns its + * return value. The store is not accessible within the callback function or + * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. + * + * The optional `args` are passed to the callback function. + * + * If the callback function throws an error, the error is thrown by `exit()` too. + * The stacktrace is not impacted by this call and the context is re-entered. + * + * Example: + * + * ```js + * // Within a call to run + * try { + * asyncLocalStorage.getStore(); // Returns the store object or value + * asyncLocalStorage.exit(() => { + * asyncLocalStorage.getStore(); // Returns undefined + * throw new Error(); + * }); + * } catch (e) { + * asyncLocalStorage.getStore(); // Returns the same object or value + * // The error will be caught here + * } + * ``` + * @since v13.10.0, v12.17.0 + * @experimental + */ + exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Transitions into the context for the remainder of the current + * synchronous execution and then persists the store through any following + * asynchronous calls. + * + * Example: + * + * ```js + * const store = { id: 1 }; + * // Replaces previous store with the given store object + * asyncLocalStorage.enterWith(store); + * asyncLocalStorage.getStore(); // Returns the store object + * someAsyncOperation(() => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * ``` + * + * This transition will continue for the _entire_ synchronous execution. + * This means that if, for example, the context is entered within an event + * handler subsequent event handlers will also run within that context unless + * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons + * to use the latter method. + * + * ```js + * const store = { id: 1 }; + * + * emitter.on('my-event', () => { + * asyncLocalStorage.enterWith(store); + * }); + * emitter.on('my-event', () => { + * asyncLocalStorage.getStore(); // Returns the same object + * }); + * + * asyncLocalStorage.getStore(); // Returns undefined + * emitter.emit('my-event'); + * asyncLocalStorage.getStore(); // Returns the same object + * ``` + * @since v13.11.0, v12.17.0 + * @experimental + */ + enterWith(store: T): void; + } +} +declare module "node:async_hooks" { + export * from "async_hooks"; +} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts new file mode 100644 index 0000000..53d62ad --- /dev/null +++ b/node_modules/@types/node/buffer.d.ts @@ -0,0 +1,2363 @@ +/** + * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many + * Node.js APIs support `Buffer`s. + * + * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and + * extends it with methods that cover additional use cases. Node.js APIs accept + * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. + * + * While the `Buffer` class is available within the global scope, it is still + * recommended to explicitly reference it via an import or require statement. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a zero-filled Buffer of length 10. + * const buf1 = Buffer.alloc(10); + * + * // Creates a Buffer of length 10, + * // filled with bytes which all have the value `1`. + * const buf2 = Buffer.alloc(10, 1); + * + * // Creates an uninitialized buffer of length 10. + * // This is faster than calling Buffer.alloc() but the returned + * // Buffer instance might contain old data that needs to be + * // overwritten using fill(), write(), or other functions that fill the Buffer's + * // contents. + * const buf3 = Buffer.allocUnsafe(10); + * + * // Creates a Buffer containing the bytes [1, 2, 3]. + * const buf4 = Buffer.from([1, 2, 3]); + * + * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries + * // are all truncated using `(value & 255)` to fit into the range 0–255. + * const buf5 = Buffer.from([257, 257.5, -255, '1']); + * + * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': + * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) + * // [116, 195, 169, 115, 116] (in decimal notation) + * const buf6 = Buffer.from('tést'); + * + * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. + * const buf7 = Buffer.from('tést', 'latin1'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/buffer.js) + */ +declare module "buffer" { + import { BinaryLike } from "node:crypto"; + import { ReadableStream as WebReadableStream } from "node:stream/web"; + /** + * This function returns `true` if `input` contains only valid UTF-8-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.4.0, v18.14.0 + * @param input The input to validate. + */ + export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean; + /** + * This function returns `true` if `input` contains only valid ASCII-encoded data, + * including the case in which `input` is empty. + * + * Throws if the `input` is a detached array buffer. + * @since v19.6.0, v18.15.0 + * @param input The input to validate. + */ + export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean; + export const INSPECT_MAX_BYTES: number; + export const kMaxLength: number; + export const kStringMaxLength: number; + export const constants: { + MAX_LENGTH: number; + MAX_STRING_LENGTH: number; + }; + export type TranscodeEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "latin1" + | "binary"; + /** + * Re-encodes the given `Buffer` or `Uint8Array` instance from one character + * encoding to another. Returns a new `Buffer` instance. + * + * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if + * conversion from `fromEnc` to `toEnc` is not permitted. + * + * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. + * + * The transcoding process will use substitution characters if a given byte + * sequence cannot be adequately represented in the target encoding. For instance: + * + * ```js + * import { Buffer, transcode } from 'node:buffer'; + * + * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); + * console.log(newBuf.toString('ascii')); + * // Prints: '?' + * ``` + * + * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced + * with `?` in the transcoded `Buffer`. + * @since v7.1.0 + * @param source A `Buffer` or `Uint8Array` instance. + * @param fromEnc The current encoding. + * @param toEnc To target encoding. + */ + export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; + export const SlowBuffer: { + /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */ + new(size: number): Buffer; + prototype: Buffer; + }; + /** + * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using + * a prior call to `URL.createObjectURL()`. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + export function resolveObjectURL(id: string): Blob | undefined; + export { Buffer }; + /** + * @experimental + */ + export interface BlobOptions { + /** + * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts + * will be converted to the platform native line-ending as specified by `require('node:os').EOL`. + */ + endings?: "transparent" | "native"; + /** + * The Blob content-type. The intent is for `type` to convey + * the MIME media type of the data, however no validation of the type format + * is performed. + */ + type?: string | undefined; + } + /** + * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across + * multiple worker threads. + * @since v15.7.0, v14.18.0 + */ + export class Blob { + /** + * The total size of the `Blob` in bytes. + * @since v15.7.0, v14.18.0 + */ + readonly size: number; + /** + * The content-type of the `Blob`. + * @since v15.7.0, v14.18.0 + */ + readonly type: string; + /** + * Creates a new `Blob` object containing a concatenation of the given sources. + * + * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into + * the 'Blob' and can therefore be safely modified after the 'Blob' is created. + * + * String sources are also copied into the `Blob`. + */ + constructor(sources: Array, options?: BlobOptions); + /** + * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of + * the `Blob` data. + * @since v15.7.0, v14.18.0 + */ + arrayBuffer(): Promise; + /** + * Creates and returns a new `Blob` containing a subset of this `Blob` objects + * data. The original `Blob` is not altered. + * @since v15.7.0, v14.18.0 + * @param start The starting index. + * @param end The ending index. + * @param type The content-type for the new `Blob` + */ + slice(start?: number, end?: number, type?: string): Blob; + /** + * Returns a promise that fulfills with the contents of the `Blob` decoded as a + * UTF-8 string. + * @since v15.7.0, v14.18.0 + */ + text(): Promise; + /** + * Returns a new `ReadableStream` that allows the content of the `Blob` to be read. + * @since v16.7.0 + */ + stream(): WebReadableStream; + } + export interface FileOptions { + /** + * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be + * converted to the platform native line-ending as specified by `require('node:os').EOL`. + */ + endings?: "native" | "transparent"; + /** The File content-type. */ + type?: string; + /** The last modified date of the file. `Default`: Date.now(). */ + lastModified?: number; + } + /** + * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files. + * @since v19.2.0, v18.13.0 + */ + export class File extends Blob { + constructor(sources: Array, fileName: string, options?: FileOptions); + /** + * The name of the `File`. + * @since v19.2.0, v18.13.0 + */ + readonly name: string; + /** + * The last modified date of the `File`. + * @since v19.2.0, v18.13.0 + */ + readonly lastModified: number; + } + export import atob = globalThis.atob; + export import btoa = globalThis.btoa; + import { Blob as NodeBlob } from "buffer"; + // This conditional type will be the existing global Blob in a browser, or + // the copy below in a Node environment. + type __Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : NodeBlob; + global { + namespace NodeJS { + export { BufferEncoding }; + } + // Buffer class + type BufferEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + type WithImplicitCoercion = + | T + | { + valueOf(): T; + }; + /** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' + */ + interface BufferConstructor { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. + */ + new(str: string, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). + */ + new(size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}/{SharedArrayBuffer}. + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. + */ + new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. + */ + new(array: readonly any[]): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. + */ + new(buffer: Buffer): Buffer; + /** + * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. + * Array entries outside that range will be truncated to fit into it. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. + * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); + * ``` + * + * If `array` is an `Array`\-like object (that is, one with a `length` property of + * type `number`), it is treated as if it is an array, unless it is a `Buffer` or + * a `Uint8Array`. This means all other `TypedArray` variants get treated as an `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`. + * + * A `TypeError` will be thrown if `array` is not an `Array` or another type + * appropriate for `Buffer.from()` variants. + * + * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v5.10.0 + */ + from( + arrayBuffer: WithImplicitCoercion, + byteOffset?: number, + length?: number, + ): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param data data to create a new Buffer + */ + from(data: Uint8Array | readonly number[]): Buffer; + from(data: WithImplicitCoercion): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + */ + from( + str: + | WithImplicitCoercion + | { + [Symbol.toPrimitive](hint: "string"): string; + }, + encoding?: BufferEncoding, + ): Buffer; + /** + * Creates a new Buffer using the passed {data} + * @param values to create a new Buffer + */ + of(...items: number[]): Buffer; + /** + * Returns `true` if `obj` is a `Buffer`, `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * Buffer.isBuffer(Buffer.alloc(10)); // true + * Buffer.isBuffer(Buffer.from('foo')); // true + * Buffer.isBuffer('a string'); // false + * Buffer.isBuffer([]); // false + * Buffer.isBuffer(new Uint8Array(1024)); // false + * ``` + * @since v0.1.101 + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns `true` if `encoding` is the name of a supported character encoding, + * or `false` otherwise. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * console.log(Buffer.isEncoding('utf8')); + * // Prints: true + * + * console.log(Buffer.isEncoding('hex')); + * // Prints: true + * + * console.log(Buffer.isEncoding('utf/8')); + * // Prints: false + * + * console.log(Buffer.isEncoding('')); + * // Prints: false + * ``` + * @since v0.9.1 + * @param encoding A character encoding name to check. + */ + isEncoding(encoding: string): encoding is BufferEncoding; + /** + * Returns the byte length of a string when encoded using `encoding`. + * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account + * for the encoding that is used to convert the string into bytes. + * + * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. + * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the + * return value might be greater than the length of a `Buffer` created from the + * string. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const str = '\u00bd + \u00bc = \u00be'; + * + * console.log(`${str}: ${str.length} characters, ` + + * `${Buffer.byteLength(str, 'utf8')} bytes`); + * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes + * ``` + * + * When `string` is a + * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- + * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- + * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. + * @since v0.1.90 + * @param string A value to calculate the length of. + * @param [encoding='utf8'] If `string` is a string, this is its encoding. + * @return The number of bytes contained within `string`. + */ + byteLength( + string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer, + encoding?: BufferEncoding, + ): number; + /** + * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. + * + * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. + * + * If `totalLength` is not provided, it is calculated from the `Buffer` instances + * in `list` by adding their lengths. + * + * If `totalLength` is provided, it is coerced to an unsigned integer. If the + * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is + * truncated to `totalLength`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a single `Buffer` from a list of three `Buffer` instances. + * + * const buf1 = Buffer.alloc(10); + * const buf2 = Buffer.alloc(14); + * const buf3 = Buffer.alloc(18); + * const totalLength = buf1.length + buf2.length + buf3.length; + * + * console.log(totalLength); + * // Prints: 42 + * + * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); + * + * console.log(bufA); + * // Prints: + * console.log(bufA.length); + * // Prints: 42 + * ``` + * + * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. + * @since v0.7.11 + * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. + * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. + */ + concat(list: readonly Uint8Array[], totalLength?: number): Buffer; + /** + * Copies the underlying memory of `view` into a new `Buffer`. + * + * ```js + * const u16 = new Uint16Array([0, 0xffff]); + * const buf = Buffer.copyBytesFrom(u16, 1, 1); + * u16[1] = 0; + * console.log(buf.length); // 2 + * console.log(buf[0]); // 255 + * console.log(buf[1]); // 255 + * ``` + * @since v19.8.0 + * @param view The {TypedArray} to copy. + * @param [offset=0] The starting offset within `view`. + * @param [length=view.length - offset] The number of elements from `view` to copy. + */ + copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; + /** + * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('1234'); + * const buf2 = Buffer.from('0123'); + * const arr = [buf1, buf2]; + * + * console.log(arr.sort(Buffer.compare)); + * // Prints: [ , ] + * // (This result is equal to: [buf2, buf1].) + * ``` + * @since v0.11.13 + * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. + */ + compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; + /** + * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5); + * + * console.log(buf); + * // Prints: + * ``` + * + * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(5, 'a'); + * + * console.log(buf); + * // Prints: + * ``` + * + * If both `fill` and `encoding` are specified, the allocated `Buffer` will be + * initialized by calling `buf.fill(fill, encoding)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); + * + * console.log(buf); + * // Prints: + * ``` + * + * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance + * contents will never contain sensitive data from previous allocations, including + * data that might not have been allocated for `Buffer`s. + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + * @param [fill=0] A value to pre-fill the new `Buffer` with. + * @param [encoding='utf8'] If `fill` is a string, this is its encoding. + */ + alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(10); + * + * console.log(buf); + * // Prints (contents may vary): + * + * buf.fill(0); + * + * console.log(buf); + * // Prints: + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * + * The `Buffer` module pre-allocates an internal `Buffer` instance of + * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, + * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). + * + * Use of this pre-allocated internal memory pool is a key difference between + * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. + * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less + * than or equal to half `Buffer.poolSize`. The + * difference is subtle but can be important when an application requires the + * additional performance that `Buffer.allocUnsafe()` provides. + * @since v5.10.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if + * `size` is 0. + * + * The underlying memory for `Buffer` instances created in this way is _not_ + * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize + * such `Buffer` instances with zeroes. + * + * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, + * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This + * allows applications to avoid the garbage collection overhead of creating many + * individually allocated `Buffer` instances. This approach improves both + * performance and memory usage by eliminating the need to track and clean up as + * many individual `ArrayBuffer` objects. + * + * However, in the case where a developer may need to retain a small chunk of + * memory from a pool for an indeterminate amount of time, it may be appropriate + * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and + * then copying out the relevant bits. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Need to keep around a few small chunks of memory. + * const store = []; + * + * socket.on('readable', () => { + * let data; + * while (null !== (data = readable.read())) { + * // Allocate for retained data. + * const sb = Buffer.allocUnsafeSlow(10); + * + * // Copy the data into the new allocation. + * data.copy(sb, 0, 0, 10); + * + * store.push(sb); + * } + * }); + * ``` + * + * A `TypeError` will be thrown if `size` is not a number. + * @since v5.12.0 + * @param size The desired length of the new `Buffer`. + */ + allocUnsafeSlow(size: number): Buffer; + /** + * This is the size (in bytes) of pre-allocated internal `Buffer` instances used + * for pooling. This value may be modified. + * @since v0.11.3 + */ + poolSize: number; + } + interface Buffer extends Uint8Array { + /** + * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did + * not contain enough space to fit the entire string, only part of `string` will be + * written. However, partially encoded characters will not be written. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.alloc(256); + * + * const len = buf.write('\u00bd + \u00bc = \u00be', 0); + * + * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); + * // Prints: 12 bytes: ½ + ¼ = ¾ + * + * const buffer = Buffer.alloc(10); + * + * const length = buffer.write('abcd', 8); + * + * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); + * // Prints: 2 bytes : ab + * ``` + * @since v0.1.90 + * @param string String to write to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write `string`. + * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). + * @param [encoding='utf8'] The character encoding of `string`. + * @return Number of bytes written. + */ + write(string: string, encoding?: BufferEncoding): number; + write(string: string, offset: number, encoding?: BufferEncoding): number; + write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; + /** + * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. + * + * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, + * then each invalid byte is replaced with the replacement character `U+FFFD`. + * + * The maximum length of a string instance (in UTF-16 code units) is available + * as {@link constants.MAX_STRING_LENGTH}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * console.log(buf1.toString('utf8')); + * // Prints: abcdefghijklmnopqrstuvwxyz + * console.log(buf1.toString('utf8', 0, 5)); + * // Prints: abcde + * + * const buf2 = Buffer.from('tést'); + * + * console.log(buf2.toString('hex')); + * // Prints: 74c3a97374 + * console.log(buf2.toString('utf8', 0, 3)); + * // Prints: té + * console.log(buf2.toString(undefined, 0, 3)); + * // Prints: té + * ``` + * @since v0.1.90 + * @param [encoding='utf8'] The character encoding to use. + * @param [start=0] The byte offset to start decoding at. + * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). + */ + toString(encoding?: BufferEncoding, start?: number, end?: number): string; + /** + * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls + * this function when stringifying a `Buffer` instance. + * + * `Buffer.from()` accepts objects in the format returned from this method. + * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); + * const json = JSON.stringify(buf); + * + * console.log(json); + * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} + * + * const copy = JSON.parse(json, (key, value) => { + * return value && value.type === 'Buffer' ? + * Buffer.from(value) : + * value; + * }); + * + * console.log(copy); + * // Prints: + * ``` + * @since v0.9.2 + */ + toJSON(): { + type: "Buffer"; + data: number[]; + }; + /** + * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('414243', 'hex'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.equals(buf2)); + * // Prints: true + * console.log(buf1.equals(buf3)); + * // Prints: false + * ``` + * @since v0.11.13 + * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. + */ + equals(otherBuffer: Uint8Array): boolean; + /** + * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. + * Comparison is based on the actual sequence of bytes in each `Buffer`. + * + * * `0` is returned if `target` is the same as `buf` + * * `1` is returned if `target` should come _before_`buf` when sorted. + * * `-1` is returned if `target` should come _after_`buf` when sorted. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('ABC'); + * const buf2 = Buffer.from('BCD'); + * const buf3 = Buffer.from('ABCD'); + * + * console.log(buf1.compare(buf1)); + * // Prints: 0 + * console.log(buf1.compare(buf2)); + * // Prints: -1 + * console.log(buf1.compare(buf3)); + * // Prints: -1 + * console.log(buf2.compare(buf1)); + * // Prints: 1 + * console.log(buf2.compare(buf3)); + * // Prints: 1 + * console.log([buf1, buf2, buf3].sort(Buffer.compare)); + * // Prints: [ , , ] + * // (This result is equal to: [buf1, buf3, buf2].) + * ``` + * + * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); + * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); + * + * console.log(buf1.compare(buf2, 5, 9, 0, 4)); + * // Prints: 0 + * console.log(buf1.compare(buf2, 0, 6, 4)); + * // Prints: -1 + * console.log(buf1.compare(buf2, 5, 6, 5)); + * // Prints: 1 + * ``` + * + * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. + * @since v0.11.13 + * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. + * @param [targetStart=0] The offset within `target` at which to begin comparison. + * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). + * @param [sourceStart=0] The offset within `buf` at which to begin comparison. + * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). + */ + compare( + target: Uint8Array, + targetStart?: number, + targetEnd?: number, + sourceStart?: number, + sourceEnd?: number, + ): -1 | 0 | 1; + /** + * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. + * + * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available + * for all TypedArrays, including Node.js `Buffer`s, although it takes + * different function arguments. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create two `Buffer` instances. + * const buf1 = Buffer.allocUnsafe(26); + * const buf2 = Buffer.allocUnsafe(26).fill('!'); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. + * buf1.copy(buf2, 8, 16, 20); + * // This is equivalent to: + * // buf2.set(buf1.subarray(16, 20), 8); + * + * console.log(buf2.toString('ascii', 0, 25)); + * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! + * ``` + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` and copy data from one region to an overlapping region + * // within the same `Buffer`. + * + * const buf = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf[i] = i + 97; + * } + * + * buf.copy(buf, 0, 4, 10); + * + * console.log(buf.toString()); + * // Prints: efghijghijklmnopqrstuvwxyz + * ``` + * @since v0.1.90 + * @param target A `Buffer` or {@link Uint8Array} to copy into. + * @param [targetStart=0] The offset within `target` at which to begin writing. + * @param [sourceStart=0] The offset within `buf` from which to begin copying. + * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). + * @return The number of bytes copied. + */ + copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * This method is not compatible with the `Uint8Array.prototype.slice()`, + * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * const copiedBuf = Uint8Array.prototype.slice.call(buf); + * copiedBuf[0]++; + * console.log(copiedBuf.toString()); + * // Prints: cuffer + * + * console.log(buf.toString()); + * // Prints: buffer + * + * // With buf.slice(), the original buffer is modified. + * const notReallyCopiedBuf = buf.slice(); + * notReallyCopiedBuf[0]++; + * console.log(notReallyCopiedBuf.toString()); + * // Prints: cuffer + * console.log(buf.toString()); + * // Also prints: cuffer (!) + * ``` + * @since v0.3.0 + * @deprecated Use `subarray` instead. + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + slice(start?: number, end?: number): Buffer; + /** + * Returns a new `Buffer` that references the same memory as the original, but + * offset and cropped by the `start` and `end` indices. + * + * Specifying `end` greater than `buf.length` will return the same result as + * that of `end` equal to `buf.length`. + * + * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). + * + * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte + * // from the original `Buffer`. + * + * const buf1 = Buffer.allocUnsafe(26); + * + * for (let i = 0; i < 26; i++) { + * // 97 is the decimal ASCII value for 'a'. + * buf1[i] = i + 97; + * } + * + * const buf2 = buf1.subarray(0, 3); + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: abc + * + * buf1[0] = 33; + * + * console.log(buf2.toString('ascii', 0, buf2.length)); + * // Prints: !bc + * ``` + * + * Specifying negative indexes causes the slice to be generated relative to the + * end of `buf` rather than the beginning. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * console.log(buf.subarray(-6, -1).toString()); + * // Prints: buffe + * // (Equivalent to buf.subarray(0, 5).) + * + * console.log(buf.subarray(-6, -2).toString()); + * // Prints: buff + * // (Equivalent to buf.subarray(0, 4).) + * + * console.log(buf.subarray(-5, -2).toString()); + * // Prints: uff + * // (Equivalent to buf.subarray(1, 4).) + * ``` + * @since v3.0.0 + * @param [start=0] Where the new `Buffer` will start. + * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). + */ + subarray(start?: number, end?: number): Buffer; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64BE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigInt64LE(0x0102030405060708n, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigInt64LE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. + * + * This function is also available under the `writeBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64BE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64BE(value: bigint, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); + * + * console.log(buf); + * // Prints: + * ``` + * + * This function is also available under the `writeBigUint64LE` alias. + * @since v12.0.0, v10.20.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeBigUInt64LE(value: bigint, offset?: number): number; + /** + * @alias Buffer.writeBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + writeBigUint64LE(value: bigint, offset?: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntLE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntLE + * @since v14.9.0, v12.19.0 + */ + writeUintLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than an unsigned integer. + * + * This function is also available under the `writeUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeUIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeUIntBE(value: number, offset: number, byteLength: number): number; + /** + * @alias Buffer.writeUIntBE + * @since v14.9.0, v12.19.0 + */ + writeUintBE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined + * when `value` is anything other than a signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntLE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntLE(value: number, offset: number, byteLength: number): number; + /** + * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a + * signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(6); + * + * buf.writeIntBE(0x1234567890ab, 0, 6); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. + * @return `offset` plus the number of bytes written. + */ + writeIntBE(value: number, offset: number, byteLength: number): number; + /** + * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64BE(0)); + * // Prints: 4294967295n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64BE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64BE + * @since v14.10.0, v12.19.0 + */ + readBigUint64BE(offset?: number): bigint; + /** + * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readBigUint64LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); + * + * console.log(buf.readBigUInt64LE(0)); + * // Prints: 18446744069414584320n + * ``` + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigUInt64LE(offset?: number): bigint; + /** + * @alias Buffer.readBigUInt64LE + * @since v14.10.0, v12.19.0 + */ + readBigUint64LE(offset?: number): bigint; + /** + * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64BE(offset?: number): bigint; + /** + * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed + * values. + * @since v12.0.0, v10.20.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. + */ + readBigInt64LE(offset?: number): bigint; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintLE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntLE(0, 6).toString(16)); + * // Prints: ab9078563412 + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntLE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntLE + * @since v14.9.0, v12.19.0 + */ + readUintLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting + * up to 48 bits of accuracy. + * + * This function is also available under the `readUintBE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readUIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readUIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readUIntBE(offset: number, byteLength: number): number; + /** + * @alias Buffer.readUIntBE + * @since v14.9.0, v12.19.0 + */ + readUintBE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntLE(0, 6).toString(16)); + * // Prints: -546f87a9cbee + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntLE(offset: number, byteLength: number): number; + /** + * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value + * supporting up to 48 bits of accuracy. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); + * + * console.log(buf.readIntBE(0, 6).toString(16)); + * // Prints: 1234567890ab + * console.log(buf.readIntBE(1, 6).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * console.log(buf.readIntBE(1, 0).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. + * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. + */ + readIntBE(offset: number, byteLength: number): number; + /** + * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. + * + * This function is also available under the `readUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, -2]); + * + * console.log(buf.readUInt8(0)); + * // Prints: 1 + * console.log(buf.readUInt8(1)); + * // Prints: 254 + * console.log(buf.readUInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readUInt8(offset?: number): number; + /** + * @alias Buffer.readUInt8 + * @since v14.9.0, v12.19.0 + */ + readUint8(offset?: number): number; + /** + * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16LE(0).toString(16)); + * // Prints: 3412 + * console.log(buf.readUInt16LE(1).toString(16)); + * // Prints: 5634 + * console.log(buf.readUInt16LE(2).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16LE(offset?: number): number; + /** + * @alias Buffer.readUInt16LE + * @since v14.9.0, v12.19.0 + */ + readUint16LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56]); + * + * console.log(buf.readUInt16BE(0).toString(16)); + * // Prints: 1234 + * console.log(buf.readUInt16BE(1).toString(16)); + * // Prints: 3456 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readUInt16BE(offset?: number): number; + /** + * @alias Buffer.readUInt16BE + * @since v14.9.0, v12.19.0 + */ + readUint16BE(offset?: number): number; + /** + * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32LE(0).toString(16)); + * // Prints: 78563412 + * console.log(buf.readUInt32LE(1).toString(16)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32LE(offset?: number): number; + /** + * @alias Buffer.readUInt32LE + * @since v14.9.0, v12.19.0 + */ + readUint32LE(offset?: number): number; + /** + * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. + * + * This function is also available under the `readUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); + * + * console.log(buf.readUInt32BE(0).toString(16)); + * // Prints: 12345678 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readUInt32BE(offset?: number): number; + /** + * @alias Buffer.readUInt32BE + * @since v14.9.0, v12.19.0 + */ + readUint32BE(offset?: number): number; + /** + * Reads a signed 8-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([-1, 5]); + * + * console.log(buf.readInt8(0)); + * // Prints: -1 + * console.log(buf.readInt8(1)); + * // Prints: 5 + * console.log(buf.readInt8(2)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.0 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. + */ + readInt8(offset?: number): number; + /** + * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16LE(0)); + * // Prints: 1280 + * console.log(buf.readInt16LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16LE(offset?: number): number; + /** + * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 5]); + * + * console.log(buf.readInt16BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. + */ + readInt16BE(offset?: number): number; + /** + * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32LE(0)); + * // Prints: 83886080 + * console.log(buf.readInt32LE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32LE(offset?: number): number; + /** + * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. + * + * Integers read from a `Buffer` are interpreted as two's complement signed values. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([0, 0, 0, 5]); + * + * console.log(buf.readInt32BE(0)); + * // Prints: 5 + * ``` + * @since v0.5.5 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readInt32BE(offset?: number): number; + /** + * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatLE(0)); + * // Prints: 1.539989614439558e-36 + * console.log(buf.readFloatLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatLE(offset?: number): number; + /** + * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4]); + * + * console.log(buf.readFloatBE(0)); + * // Prints: 2.387939260590663e-38 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. + */ + readFloatBE(offset?: number): number; + /** + * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleLE(0)); + * // Prints: 5.447603722011605e-270 + * console.log(buf.readDoubleLE(1)); + * // Throws ERR_OUT_OF_RANGE. + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleLE(offset?: number): number; + /** + * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); + * + * console.log(buf.readDoubleBE(0)); + * // Prints: 8.20788039913184e-304 + * ``` + * @since v0.11.15 + * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. + */ + readDoubleBE(offset?: number): number; + reverse(): this; + /** + * Interprets `buf` as an array of unsigned 16-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap16(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap16(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * + * One convenient use of `buf.swap16()` is to perform a fast in-place conversion + * between UTF-16 little-endian and UTF-16 big-endian: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); + * buf.swap16(); // Convert to big-endian UTF-16 text. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap16(): Buffer; + /** + * Interprets `buf` as an array of unsigned 32-bit integers and swaps the + * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap32(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap32(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v5.10.0 + * @return A reference to `buf`. + */ + swap32(): Buffer; + /** + * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. + * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); + * + * console.log(buf1); + * // Prints: + * + * buf1.swap64(); + * + * console.log(buf1); + * // Prints: + * + * const buf2 = Buffer.from([0x1, 0x2, 0x3]); + * + * buf2.swap64(); + * // Throws ERR_INVALID_BUFFER_SIZE. + * ``` + * @since v6.3.0 + * @return A reference to `buf`. + */ + swap64(): Buffer; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a + * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything + * other than an unsigned 8-bit integer. + * + * This function is also available under the `writeUint8` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt8(0x3, 0); + * buf.writeUInt8(0x4, 1); + * buf.writeUInt8(0x23, 2); + * buf.writeUInt8(0x42, 3); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeUInt8(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt8 + * @since v14.9.0, v12.19.0 + */ + writeUint8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 16-bit integer. + * + * This function is also available under the `writeUint16LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16LE(0xdead, 0); + * buf.writeUInt16LE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16LE + * @since v14.9.0, v12.19.0 + */ + writeUint16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 16-bit integer. + * + * This function is also available under the `writeUint16BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt16BE(0xdead, 0); + * buf.writeUInt16BE(0xbeef, 2); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeUInt16BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt16BE + * @since v14.9.0, v12.19.0 + */ + writeUint16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is + * anything other than an unsigned 32-bit integer. + * + * This function is also available under the `writeUint32LE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32LE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32LE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32LE + * @since v14.9.0, v12.19.0 + */ + writeUint32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an + * unsigned 32-bit integer. + * + * This function is also available under the `writeUint32BE` alias. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeUInt32BE(0xfeedface, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeUInt32BE(value: number, offset?: number): number; + /** + * @alias Buffer.writeUInt32BE + * @since v14.9.0, v12.19.0 + */ + writeUint32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset`. `value` must be a valid + * signed 8-bit integer. Behavior is undefined when `value` is anything other than + * a signed 8-bit integer. + * + * `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt8(2, 0); + * buf.writeInt8(-2, 1); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.0 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. + * @return `offset` plus the number of bytes written. + */ + writeInt8(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16LE(0x0304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is + * anything other than a signed 16-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(2); + * + * buf.writeInt16BE(0x0102, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. + * @return `offset` plus the number of bytes written. + */ + writeInt16BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32LE(0x05060708, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32LE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is + * anything other than a signed 32-bit integer. + * + * The `value` is interpreted and written as a two's complement signed integer. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeInt32BE(0x01020304, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.5.5 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeInt32BE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatLE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is + * undefined when `value` is anything other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(4); + * + * buf.writeFloatBE(0xcafebabe, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. + * @return `offset` plus the number of bytes written. + */ + writeFloatBE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleLE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleLE(value: number, offset?: number): number; + /** + * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything + * other than a JavaScript number. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(8); + * + * buf.writeDoubleBE(123.456, 0); + * + * console.log(buf); + * // Prints: + * ``` + * @since v0.11.15 + * @param value Number to be written to `buf`. + * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. + * @return `offset` plus the number of bytes written. + */ + writeDoubleBE(value: number, offset?: number): number; + /** + * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, + * the entire `buf` will be filled: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with the ASCII character 'h'. + * + * const b = Buffer.allocUnsafe(50).fill('h'); + * + * console.log(b.toString()); + * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + * + * // Fill a buffer with empty string + * const c = Buffer.allocUnsafe(5).fill(''); + * + * console.log(c.fill('')); + * // Prints: + * ``` + * + * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or + * integer. If the resulting integer is greater than `255` (decimal), `buf` will be + * filled with `value & 255`. + * + * If the final write of a `fill()` operation falls on a multi-byte character, + * then only the bytes of that character that fit into `buf` are written: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Fill a `Buffer` with character that takes up two bytes in UTF-8. + * + * console.log(Buffer.allocUnsafe(5).fill('\u0222')); + * // Prints: + * ``` + * + * If `value` contains invalid characters, it is truncated; if no valid + * fill data remains, an exception is thrown: + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.allocUnsafe(5); + * + * console.log(buf.fill('a')); + * // Prints: + * console.log(buf.fill('aazz', 'hex')); + * // Prints: + * console.log(buf.fill('zz', 'hex')); + * // Throws an exception. + * ``` + * @since v0.5.0 + * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. + * @param [offset=0] Number of bytes to skip before starting to fill `buf`. + * @param [end=buf.length] Where to stop filling `buf` (not inclusive). + * @param [encoding='utf8'] The encoding for `value` if `value` is a string. + * @return A reference to `buf`. + */ + fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; + /** + * If `value` is: + * + * * a string, `value` is interpreted according to the character encoding in`encoding`. + * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. + * To compare a partial `Buffer`, use `buf.subarray`. + * * a number, `value` will be interpreted as an unsigned 8-bit integer + * value between `0` and `255`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.indexOf('this')); + * // Prints: 0 + * console.log(buf.indexOf('is')); + * // Prints: 2 + * console.log(buf.indexOf(Buffer.from('a buffer'))); + * // Prints: 8 + * console.log(buf.indexOf(97)); + * // Prints: 8 (97 is the decimal ASCII value for 'a') + * console.log(buf.indexOf(Buffer.from('a buffer example'))); + * // Prints: -1 + * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: 8 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); + * // Prints: 4 + * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); + * // Prints: 6 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. If the result + * of coercion is `NaN` or `0`, then the entire buffer will be searched. This + * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.indexOf(99.9)); + * console.log(b.indexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN or 0. + * // Prints: 1, searching the whole buffer. + * console.log(b.indexOf('b', undefined)); + * console.log(b.indexOf('b', {})); + * console.log(b.indexOf('b', null)); + * console.log(b.indexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer` and `byteOffset` is less + * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. + * @since v1.5.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Identical to `buf.indexOf()`, except the last occurrence of `value` is found + * rather than the first occurrence. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this buffer is a buffer'); + * + * console.log(buf.lastIndexOf('this')); + * // Prints: 0 + * console.log(buf.lastIndexOf('buffer')); + * // Prints: 17 + * console.log(buf.lastIndexOf(Buffer.from('buffer'))); + * // Prints: 17 + * console.log(buf.lastIndexOf(97)); + * // Prints: 15 (97 is the decimal ASCII value for 'a') + * console.log(buf.lastIndexOf(Buffer.from('yolo'))); + * // Prints: -1 + * console.log(buf.lastIndexOf('buffer', 5)); + * // Prints: 5 + * console.log(buf.lastIndexOf('buffer', 4)); + * // Prints: -1 + * + * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); + * + * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); + * // Prints: 6 + * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); + * // Prints: 4 + * ``` + * + * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value, + * an integer between 0 and 255. + * + * If `byteOffset` is not a number, it will be coerced to a number. Any arguments + * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. + * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const b = Buffer.from('abcdef'); + * + * // Passing a value that's a number, but not a valid byte. + * // Prints: 2, equivalent to searching for 99 or 'c'. + * console.log(b.lastIndexOf(99.9)); + * console.log(b.lastIndexOf(256 + 99)); + * + * // Passing a byteOffset that coerces to NaN. + * // Prints: 1, searching the whole buffer. + * console.log(b.lastIndexOf('b', undefined)); + * console.log(b.lastIndexOf('b', {})); + * + * // Passing a byteOffset that coerces to 0. + * // Prints: -1, equivalent to passing 0. + * console.log(b.lastIndexOf('b', null)); + * console.log(b.lastIndexOf('b', [])); + * ``` + * + * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. + * @since v6.0.0 + * @param value What to search for. + * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. + * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. + */ + lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents + * of `buf`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * // Log the entire contents of a `Buffer`. + * + * const buf = Buffer.from('buffer'); + * + * for (const pair of buf.entries()) { + * console.log(pair); + * } + * // Prints: + * // [0, 98] + * // [1, 117] + * // [2, 102] + * // [3, 102] + * // [4, 101] + * // [5, 114] + * ``` + * @since v1.1.0 + */ + entries(): IterableIterator<[number, number]>; + /** + * Equivalent to `buf.indexOf() !== -1`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('this is a buffer'); + * + * console.log(buf.includes('this')); + * // Prints: true + * console.log(buf.includes('is')); + * // Prints: true + * console.log(buf.includes(Buffer.from('a buffer'))); + * // Prints: true + * console.log(buf.includes(97)); + * // Prints: true (97 is the decimal ASCII value for 'a') + * console.log(buf.includes(Buffer.from('a buffer example'))); + * // Prints: false + * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); + * // Prints: true + * console.log(buf.includes('this', 4)); + * // Prints: false + * ``` + * @since v5.3.0 + * @param value What to search for. + * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. + * @param [encoding='utf8'] If `value` is a string, this is its encoding. + * @return `true` if `value` was found in `buf`, `false` otherwise. + */ + includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices). + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const key of buf.keys()) { + * console.log(key); + * } + * // Prints: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since v1.1.0 + */ + keys(): IterableIterator; + /** + * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is + * called automatically when a `Buffer` is used in a `for..of` statement. + * + * ```js + * import { Buffer } from 'node:buffer'; + * + * const buf = Buffer.from('buffer'); + * + * for (const value of buf.values()) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * + * for (const value of buf) { + * console.log(value); + * } + * // Prints: + * // 98 + * // 117 + * // 102 + * // 102 + * // 101 + * // 114 + * ``` + * @since v1.1.0 + */ + values(): IterableIterator; + } + var Buffer: BufferConstructor; + /** + * Decodes a string of Base64-encoded data into bytes, and encodes those bytes + * into a string using Latin-1 (ISO-8859-1). + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @legacy Use `Buffer.from(data, 'base64')` instead. + * @param data The Base64-encoded input string. + */ + function atob(data: string): string; + /** + * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes + * into a string using Base64. + * + * The `data` may be any JavaScript-value that can be coerced into a string. + * + * **This function is only provided for compatibility with legacy web platform APIs** + * **and should never be used in new code, because they use strings to represent** + * **binary data and predate the introduction of typed arrays in JavaScript.** + * **For code running using Node.js APIs, converting between base64-encoded strings** + * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.** + * @since v15.13.0, v14.17.0 + * @legacy Use `buf.toString('base64')` instead. + * @param data An ASCII (Latin1) string. + */ + function btoa(data: string): string; + interface Blob extends __Blob {} + /** + * `Blob` class is a global reference for `require('node:buffer').Blob` + * https://nodejs.org/api/buffer.html#class-blob + * @since v18.0.0 + */ + var Blob: typeof globalThis extends { + onmessage: any; + Blob: infer T; + } ? T + : typeof NodeBlob; + } +} +declare module "node:buffer" { + export * from "buffer"; +} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts new file mode 100644 index 0000000..f56ac79 --- /dev/null +++ b/node_modules/@types/node/child_process.d.ts @@ -0,0 +1,1542 @@ +/** + * The `node:child_process` module provides the ability to spawn subprocesses in + * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability + * is primarily provided by the {@link spawn} function: + * + * ```js + * const { spawn } = require('node:child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * By default, pipes for `stdin`, `stdout`, and `stderr` are established between + * the parent Node.js process and the spawned subprocess. These pipes have + * limited (and platform-specific) capacity. If the subprocess writes to + * stdout in excess of that limit without the output being captured, the + * subprocess blocks waiting for the pipe buffer to accept more data. This is + * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed. + * + * The command lookup is performed using the `options.env.PATH` environment + * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is + * used. If `options.env` is set without `PATH`, lookup on Unix is performed + * on a default search path search of `/usr/bin:/bin` (see your operating system's + * manual for execvpe/execvp), on Windows the current processes environment + * variable `PATH` is used. + * + * On Windows, environment variables are case-insensitive. Node.js + * lexicographically sorts the `env` keys and uses the first one that + * case-insensitively matches. Only first (in lexicographic order) entry will be + * passed to the subprocess. This might lead to issues on Windows when passing + * objects to the `env` option that have multiple variants of the same key, such as`PATH` and `Path`. + * + * The {@link spawn} method spawns the child process asynchronously, + * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks + * the event loop until the spawned process either exits or is terminated. + * + * For convenience, the `node:child_process` module provides a handful of + * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on + * top of {@link spawn} or {@link spawnSync}. + * + * * {@link exec}: spawns a shell and runs a command within that + * shell, passing the `stdout` and `stderr` to a callback function when + * complete. + * * {@link execFile}: similar to {@link exec} except + * that it spawns the command directly without first spawning a shell by + * default. + * * {@link fork}: spawns a new Node.js process and invokes a + * specified module with an IPC communication channel established that allows + * sending messages between parent and child. + * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. + * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. + * + * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, + * the synchronous methods can have significant impact on performance due to + * stalling the event loop while spawned processes complete. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/child_process.js) + */ +declare module "child_process" { + import { ObjectEncodingOptions } from "node:fs"; + import { Abortable, EventEmitter } from "node:events"; + import * as net from "node:net"; + import { Pipe, Readable, Stream, Writable } from "node:stream"; + import { URL } from "node:url"; + type Serializable = string | object | number | boolean | bigint; + type SendHandle = net.Socket | net.Server; + /** + * Instances of the `ChildProcess` represent spawned child processes. + * + * Instances of `ChildProcess` are not intended to be created directly. Rather, + * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create + * instances of `ChildProcess`. + * @since v2.2.0 + */ + class ChildProcess extends EventEmitter { + /** + * A `Writable Stream` that represents the child process's `stdin`. + * + * If a child process waits to read all of its input, the child will not continue + * until this stream has been closed via `end()`. + * + * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will + * refer to the same value. + * + * The `subprocess.stdin` property can be `null` or `undefined`if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdin: Writable | null; + /** + * A `Readable Stream` that represents the child process's `stdout`. + * + * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will + * refer to the same value. + * + * ```js + * const { spawn } = require('node:child_process'); + * + * const subprocess = spawn('ls'); + * + * subprocess.stdout.on('data', (data) => { + * console.log(`Received chunk ${data}`); + * }); + * ``` + * + * The `subprocess.stdout` property can be `null` or `undefined`if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stdout: Readable | null; + /** + * A `Readable Stream` that represents the child process's `stderr`. + * + * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, + * then this will be `null`. + * + * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will + * refer to the same value. + * + * The `subprocess.stderr` property can be `null` or `undefined`if the child process could not be successfully spawned. + * @since v0.1.90 + */ + stderr: Readable | null; + /** + * The `subprocess.channel` property is a reference to the child's IPC channel. If + * no IPC channel exists, this property is `undefined`. + * @since v7.1.0 + */ + readonly channel?: Pipe | null | undefined; + /** + * A sparse array of pipes to the child process, corresponding with positions in + * the `stdio` option passed to {@link spawn} that have been set + * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and`subprocess.stdio[2]` are also available as `subprocess.stdin`,`subprocess.stdout`, and `subprocess.stderr`, + * respectively. + * + * In the following example, only the child's fd `1` (stdout) is configured as a + * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values + * in the array are `null`. + * + * ```js + * const assert = require('node:assert'); + * const fs = require('node:fs'); + * const child_process = require('node:child_process'); + * + * const subprocess = child_process.spawn('ls', { + * stdio: [ + * 0, // Use parent's stdin for child. + * 'pipe', // Pipe child's stdout to parent. + * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. + * ], + * }); + * + * assert.strictEqual(subprocess.stdio[0], null); + * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); + * + * assert(subprocess.stdout); + * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); + * + * assert.strictEqual(subprocess.stdio[2], null); + * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); + * ``` + * + * The `subprocess.stdio` property can be `undefined` if the child process could + * not be successfully spawned. + * @since v0.7.10 + */ + readonly stdio: [ + Writable | null, + // stdin + Readable | null, + // stdout + Readable | null, + // stderr + Readable | Writable | null | undefined, + // extra + Readable | Writable | null | undefined, // extra + ]; + /** + * The `subprocess.killed` property indicates whether the child process + * successfully received a signal from `subprocess.kill()`. The `killed` property + * does not indicate that the child process has been terminated. + * @since v0.5.10 + */ + readonly killed: boolean; + /** + * Returns the process identifier (PID) of the child process. If the child process + * fails to spawn due to errors, then the value is `undefined` and `error` is + * emitted. + * + * ```js + * const { spawn } = require('node:child_process'); + * const grep = spawn('grep', ['ssh']); + * + * console.log(`Spawned child pid: ${grep.pid}`); + * grep.stdin.end(); + * ``` + * @since v0.1.90 + */ + readonly pid?: number | undefined; + /** + * The `subprocess.connected` property indicates whether it is still possible to + * send and receive messages from a child process. When `subprocess.connected` is`false`, it is no longer possible to send or receive messages. + * @since v0.7.2 + */ + readonly connected: boolean; + /** + * The `subprocess.exitCode` property indicates the exit code of the child process. + * If the child process is still running, the field will be `null`. + */ + readonly exitCode: number | null; + /** + * The `subprocess.signalCode` property indicates the signal received by + * the child process if any, else `null`. + */ + readonly signalCode: NodeJS.Signals | null; + /** + * The `subprocess.spawnargs` property represents the full list of command-line + * arguments the child process was launched with. + */ + readonly spawnargs: string[]; + /** + * The `subprocess.spawnfile` property indicates the executable file name of + * the child process that is launched. + * + * For {@link fork}, its value will be equal to `process.execPath`. + * For {@link spawn}, its value will be the name of + * the executable file. + * For {@link exec}, its value will be the name of the shell + * in which the child process is launched. + */ + readonly spawnfile: string; + /** + * The `subprocess.kill()` method sends a signal to the child process. If no + * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function + * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. + * + * ```js + * const { spawn } = require('node:child_process'); + * const grep = spawn('grep', ['ssh']); + * + * grep.on('close', (code, signal) => { + * console.log( + * `child process terminated due to receipt of signal ${signal}`); + * }); + * + * // Send SIGHUP to process. + * grep.kill('SIGHUP'); + * ``` + * + * The `ChildProcess` object may emit an `'error'` event if the signal + * cannot be delivered. Sending a signal to a child process that has already exited + * is not an error but may have unforeseen consequences. Specifically, if the + * process identifier (PID) has been reassigned to another process, the signal will + * be delivered to that process instead which can have unexpected results. + * + * While the function is called `kill`, the signal delivered to the child process + * may not actually terminate the process. + * + * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. + * + * On Windows, where POSIX signals do not exist, the `signal` argument will be + * ignored, and the process will be killed forcefully and abruptly (similar to`'SIGKILL'`). + * See `Signal Events` for more details. + * + * On Linux, child processes of child processes will not be terminated + * when attempting to kill their parent. This is likely to happen when running a + * new process in a shell or with the use of the `shell` option of `ChildProcess`: + * + * ```js + * 'use strict'; + * const { spawn } = require('node:child_process'); + * + * const subprocess = spawn( + * 'sh', + * [ + * '-c', + * `node -e "setInterval(() => { + * console.log(process.pid, 'is alive') + * }, 500);"`, + * ], { + * stdio: ['inherit', 'inherit', 'inherit'], + * }, + * ); + * + * setTimeout(() => { + * subprocess.kill(); // Does not terminate the Node.js process in the shell. + * }, 2000); + * ``` + * @since v0.1.90 + */ + kill(signal?: NodeJS.Signals | number): boolean; + /** + * Calls {@link ChildProcess.kill} with `'SIGTERM'`. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + /** + * When an IPC channel has been established between the parent and child ( + * i.e. when using {@link fork}), the `subprocess.send()` method can + * be used to send messages to the child process. When the child process is a + * Node.js instance, these messages can be received via the `'message'` event. + * + * The message goes through serialization and parsing. The resulting + * message might not be the same as what is originally sent. + * + * For example, in the parent script: + * + * ```js + * const cp = require('node:child_process'); + * const n = cp.fork(`${__dirname}/sub.js`); + * + * n.on('message', (m) => { + * console.log('PARENT got message:', m); + * }); + * + * // Causes the child to print: CHILD got message: { hello: 'world' } + * n.send({ hello: 'world' }); + * ``` + * + * And then the child script, `'sub.js'` might look like this: + * + * ```js + * process.on('message', (m) => { + * console.log('CHILD got message:', m); + * }); + * + * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } + * process.send({ foo: 'bar', baz: NaN }); + * ``` + * + * Child Node.js processes will have a `process.send()` method of their own + * that allows the child to send messages back to the parent. + * + * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages + * containing a `NODE_` prefix in the `cmd` property are reserved for use within + * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the`'internalMessage'` event and are consumed internally by Node.js. + * Applications should avoid using such messages or listening for`'internalMessage'` events as it is subject to change without notice. + * + * The optional `sendHandle` argument that may be passed to `subprocess.send()` is + * for passing a TCP server or socket object to the child process. The child will + * receive the object as the second argument passed to the callback function + * registered on the `'message'` event. Any data that is received + * and buffered in the socket will not be sent to the child. + * + * The optional `callback` is a function that is invoked after the message is + * sent but before the child may have received it. The function is called with a + * single argument: `null` on success, or an `Error` object on failure. + * + * If no `callback` function is provided and the message cannot be sent, an`'error'` event will be emitted by the `ChildProcess` object. This can + * happen, for instance, when the child process has already exited. + * + * `subprocess.send()` will return `false` if the channel has closed or when the + * backlog of unsent messages exceeds a threshold that makes it unwise to send + * more. Otherwise, the method returns `true`. The `callback` function can be + * used to implement flow control. + * + * #### Example: sending a server object + * + * The `sendHandle` argument can be used, for instance, to pass the handle of + * a TCP server object to the child process as illustrated in the example below: + * + * ```js + * const subprocess = require('node:child_process').fork('subprocess.js'); + * + * // Open up the server object and send the handle. + * const server = require('node:net').createServer(); + * server.on('connection', (socket) => { + * socket.end('handled by parent'); + * }); + * server.listen(1337, () => { + * subprocess.send('server', server); + * }); + * ``` + * + * The child would then receive the server object as: + * + * ```js + * process.on('message', (m, server) => { + * if (m === 'server') { + * server.on('connection', (socket) => { + * socket.end('handled by child'); + * }); + * } + * }); + * ``` + * + * Once the server is now shared between the parent and child, some connections + * can be handled by the parent and some by the child. + * + * While the example above uses a server created using the `node:net` module,`node:dgram` module servers use exactly the same workflow with the exceptions of + * listening on a `'message'` event instead of `'connection'` and using`server.bind()` instead of `server.listen()`. This is, however, only + * supported on Unix platforms. + * + * #### Example: sending a socket object + * + * Similarly, the `sendHandler` argument can be used to pass the handle of a + * socket to the child process. The example below spawns two children that each + * handle connections with "normal" or "special" priority: + * + * ```js + * const { fork } = require('node:child_process'); + * const normal = fork('subprocess.js', ['normal']); + * const special = fork('subprocess.js', ['special']); + * + * // Open up the server and send sockets to child. Use pauseOnConnect to prevent + * // the sockets from being read before they are sent to the child process. + * const server = require('node:net').createServer({ pauseOnConnect: true }); + * server.on('connection', (socket) => { + * + * // If this is special priority... + * if (socket.remoteAddress === '74.125.127.100') { + * special.send('socket', socket); + * return; + * } + * // This is normal priority. + * normal.send('socket', socket); + * }); + * server.listen(1337); + * ``` + * + * The `subprocess.js` would receive the socket handle as the second argument + * passed to the event callback function: + * + * ```js + * process.on('message', (m, socket) => { + * if (m === 'socket') { + * if (socket) { + * // Check that the client socket exists. + * // It is possible for the socket to be closed between the time it is + * // sent and the time it is received in the child process. + * socket.end(`Request handled with ${process.argv[2]} priority`); + * } + * } + * }); + * ``` + * + * Do not use `.maxConnections` on a socket that has been passed to a subprocess. + * The parent cannot track when the socket is destroyed. + * + * Any `'message'` handlers in the subprocess should verify that `socket` exists, + * as the connection may have been closed during the time it takes to send the + * connection to the child. + * @since v0.5.9 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send(message: Serializable, callback?: (error: Error | null) => void): boolean; + send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; + send( + message: Serializable, + sendHandle?: SendHandle, + options?: MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * Closes the IPC channel between parent and child, allowing the child to exit + * gracefully once there are no other connections keeping it alive. After calling + * this method the `subprocess.connected` and `process.connected` properties in + * both the parent and child (respectively) will be set to `false`, and it will be + * no longer possible to pass messages between the processes. + * + * The `'disconnect'` event will be emitted when there are no messages in the + * process of being received. This will most often be triggered immediately after + * calling `subprocess.disconnect()`. + * + * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked + * within the child process to close the IPC channel as well. + * @since v0.7.2 + */ + disconnect(): void; + /** + * By default, the parent will wait for the detached child to exit. To prevent the + * parent from waiting for a given `subprocess` to exit, use the`subprocess.unref()` method. Doing so will cause the parent's event loop to not + * include the child in its reference count, allowing the parent to exit + * independently of the child, unless there is an established IPC channel between + * the child and the parent. + * + * ```js + * const { spawn } = require('node:child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * ``` + * @since v0.7.10 + */ + unref(): void; + /** + * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will + * restore the removed reference count for the child process, forcing the parent + * to wait for the child to exit before exiting itself. + * + * ```js + * const { spawn } = require('node:child_process'); + * + * const subprocess = spawn(process.argv[0], ['child_program.js'], { + * detached: true, + * stdio: 'ignore', + * }); + * + * subprocess.unref(); + * subprocess.ref(); + * ``` + * @since v0.7.10 + */ + ref(): void; + /** + * events.EventEmitter + * 1. close + * 2. disconnect + * 3. error + * 4. exit + * 5. message + * 6. spawn + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + addListener(event: "spawn", listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean; + emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean; + emit(event: "spawn", listener: () => void): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + on(event: "spawn", listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + once(event: "spawn", listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; + prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependListener(event: "spawn", listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener( + event: "close", + listener: (code: number | null, signal: NodeJS.Signals | null) => void, + ): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener( + event: "exit", + listener: (code: number | null, signal: NodeJS.Signals | null) => void, + ): this; + prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; + prependOnceListener(event: "spawn", listener: () => void): this; + } + // return this object when stdio option is undefined or not specified + interface ChildProcessWithoutNullStreams extends ChildProcess { + stdin: Writable; + stdout: Readable; + stderr: Readable; + readonly stdio: [ + Writable, + Readable, + Readable, + // stderr + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + // return this object when stdio option is a tuple of 3 + interface ChildProcessByStdio + extends ChildProcess + { + stdin: I; + stdout: O; + stderr: E; + readonly stdio: [ + I, + O, + E, + Readable | Writable | null | undefined, + // extra, no modification + Readable | Writable | null | undefined, // extra, no modification + ]; + } + interface MessageOptions { + keepOpen?: boolean | undefined; + } + type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; + type StdioOptions = IOType | Array; + type SerializationType = "json" | "advanced"; + interface MessagingOptions extends Abortable { + /** + * Specify the kind of serialization used for sending messages between processes. + * @default 'json' + */ + serialization?: SerializationType | undefined; + /** + * The signal value to be used when the spawned process will be killed by the abort signal. + * @default 'SIGTERM' + */ + killSignal?: NodeJS.Signals | number | undefined; + /** + * In milliseconds the maximum amount of time the process is allowed to run. + */ + timeout?: number | undefined; + } + interface ProcessEnvOptions { + uid?: number | undefined; + gid?: number | undefined; + cwd?: string | URL | undefined; + env?: NodeJS.ProcessEnv | undefined; + } + interface CommonOptions extends ProcessEnvOptions { + /** + * @default false + */ + windowsHide?: boolean | undefined; + /** + * @default 0 + */ + timeout?: number | undefined; + } + interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { + argv0?: string | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + shell?: boolean | string | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + interface SpawnOptions extends CommonSpawnOptions { + detached?: boolean | undefined; + } + interface SpawnOptionsWithoutStdio extends SpawnOptions { + stdio?: StdioPipeNamed | StdioPipe[] | undefined; + } + type StdioNull = "inherit" | "ignore" | Stream; + type StdioPipeNamed = "pipe" | "overlapped"; + type StdioPipe = undefined | null | StdioPipeNamed; + interface SpawnOptionsWithStdioTuple< + Stdin extends StdioNull | StdioPipe, + Stdout extends StdioNull | StdioPipe, + Stderr extends StdioNull | StdioPipe, + > extends SpawnOptions { + stdio: [Stdin, Stdout, Stderr]; + } + /** + * The `child_process.spawn()` method spawns a new process using the given`command`, with command-line arguments in `args`. If omitted, `args` defaults + * to an empty array. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * A third argument may be used to specify additional options, with these defaults: + * + * ```js + * const defaults = { + * cwd: undefined, + * env: process.env, + * }; + * ``` + * + * Use `cwd` to specify the working directory from which the process is spawned. + * If not given, the default is to inherit the current working directory. If given, + * but the path does not exist, the child process emits an `ENOENT` error + * and exits immediately. `ENOENT` is also emitted when the command + * does not exist. + * + * Use `env` to specify environment variables that will be visible to the new + * process, the default is `process.env`. + * + * `undefined` values in `env` will be ignored. + * + * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the + * exit code: + * + * ```js + * const { spawn } = require('node:child_process'); + * const ls = spawn('ls', ['-lh', '/usr']); + * + * ls.stdout.on('data', (data) => { + * console.log(`stdout: ${data}`); + * }); + * + * ls.stderr.on('data', (data) => { + * console.error(`stderr: ${data}`); + * }); + * + * ls.on('close', (code) => { + * console.log(`child process exited with code ${code}`); + * }); + * ``` + * + * Example: A very elaborate way to run `ps ax | grep ssh` + * + * ```js + * const { spawn } = require('node:child_process'); + * const ps = spawn('ps', ['ax']); + * const grep = spawn('grep', ['ssh']); + * + * ps.stdout.on('data', (data) => { + * grep.stdin.write(data); + * }); + * + * ps.stderr.on('data', (data) => { + * console.error(`ps stderr: ${data}`); + * }); + * + * ps.on('close', (code) => { + * if (code !== 0) { + * console.log(`ps process exited with code ${code}`); + * } + * grep.stdin.end(); + * }); + * + * grep.stdout.on('data', (data) => { + * console.log(data.toString()); + * }); + * + * grep.stderr.on('data', (data) => { + * console.error(`grep stderr: ${data}`); + * }); + * + * grep.on('close', (code) => { + * if (code !== 0) { + * console.log(`grep process exited with code ${code}`); + * } + * }); + * ``` + * + * Example of checking for failed `spawn`: + * + * ```js + * const { spawn } = require('node:child_process'); + * const subprocess = spawn('bad_command'); + * + * subprocess.on('error', (err) => { + * console.error('Failed to start subprocess.'); + * }); + * ``` + * + * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process + * title while others (Windows, SunOS) will use `command`. + * + * Node.js overwrites `argv[0]` with `process.execPath` on startup, so`process.argv[0]` in a Node.js child process will not match the `argv0`parameter passed to `spawn` from the parent. Retrieve + * it with the`process.argv0` property instead. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { spawn } = require('node:child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const grep = spawn('grep', ['ssh'], { signal }); + * grep.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * ``` + * @since v0.1.90 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, options: SpawnOptions): ChildProcess; + // overloads of spawn with 'args' + function spawn( + command: string, + args?: readonly string[], + options?: SpawnOptionsWithoutStdio, + ): ChildProcessWithoutNullStreams; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn( + command: string, + args: readonly string[], + options: SpawnOptionsWithStdioTuple, + ): ChildProcessByStdio; + function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; + interface ExecOptions extends CommonOptions { + shell?: string | undefined; + signal?: AbortSignal | undefined; + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + } + interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: BufferEncoding | null; // specify `null`. + } + interface ExecException extends Error { + cmd?: string | undefined; + killed?: boolean | undefined; + code?: number | undefined; + signal?: NodeJS.Signals | undefined; + stdout?: string; + stderr?: string; + } + /** + * Spawns a shell then executes the `command` within that shell, buffering any + * generated output. The `command` string passed to the exec function is processed + * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) + * need to be dealt with accordingly: + * + * ```js + * const { exec } = require('node:child_process'); + * + * exec('"/path/to/test file/test.sh" arg1 arg2'); + * // Double quotes are used so that the space in the path is not interpreted as + * // a delimiter of multiple arguments. + * + * exec('echo "The \\$HOME variable is $HOME"'); + * // The $HOME variable is escaped in the first instance, but not in the second. + * ``` + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * + * If a `callback` function is provided, it is called with the arguments`(error, stdout, stderr)`. On success, `error` will be `null`. On error,`error` will be an instance of `Error`. The + * `error.code` property will be + * the exit code of the process. By convention, any exit code other than `0`indicates an error. `error.signal` will be the signal that terminated the + * process. + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * ```js + * const { exec } = require('node:child_process'); + * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { + * if (error) { + * console.error(`exec error: ${error}`); + * return; + * } + * console.log(`stdout: ${stdout}`); + * console.error(`stderr: ${stderr}`); + * }); + * ``` + * + * If `timeout` is greater than `0`, the parent will send the signal + * identified by the `killSignal` property (the default is `'SIGTERM'`) if the + * child runs longer than `timeout` milliseconds. + * + * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace + * the existing process and uses a shell to execute the command. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('node:util'); + * const exec = util.promisify(require('node:child_process').exec); + * + * async function lsExample() { + * const { stdout, stderr } = await exec('ls'); + * console.log('stdout:', stdout); + * console.error('stderr:', stderr); + * } + * lsExample(); + * ``` + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { exec } = require('node:child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = exec('grep ssh', { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.90 + * @param command The command to run, with space-separated arguments. + * @param callback called with the output when process terminates. + */ + function exec( + command: string, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function exec( + command: string, + options: { + encoding: "buffer" | null; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function exec( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function exec( + command: string, + options: ExecOptions, + callback?: (error: ExecException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function exec( + command: string, + options: (ObjectEncodingOptions & ExecOptions) | undefined | null, + callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + interface PromiseWithChild extends Promise { + child: ChildProcess; + } + namespace exec { + function __promisify__(command: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: { + encoding: "buffer" | null; + } & ExecOptions, + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + command: string, + options: { + encoding: BufferEncoding; + } & ExecOptions, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options: ExecOptions, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + command: string, + options?: (ObjectEncodingOptions & ExecOptions) | null, + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ExecFileOptions extends CommonOptions, Abortable { + maxBuffer?: number | undefined; + killSignal?: NodeJS.Signals | number | undefined; + windowsVerbatimArguments?: boolean | undefined; + shell?: boolean | string | undefined; + signal?: AbortSignal | undefined; + } + interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: "buffer" | null; + } + interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + type ExecFileException = + & Omit + & Omit + & { code?: string | number | undefined | null }; + /** + * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified + * executable `file` is spawned directly as a new process making it slightly more + * efficient than {@link exec}. + * + * The same options as {@link exec} are supported. Since a shell is + * not spawned, behaviors such as I/O redirection and file globbing are not + * supported. + * + * ```js + * const { execFile } = require('node:child_process'); + * const child = execFile('node', ['--version'], (error, stdout, stderr) => { + * if (error) { + * throw error; + * } + * console.log(stdout); + * }); + * ``` + * + * The `stdout` and `stderr` arguments passed to the callback will contain the + * stdout and stderr output of the child process. By default, Node.js will decode + * the output as UTF-8 and pass strings to the callback. The `encoding` option + * can be used to specify the character encoding used to decode the stdout and + * stderr output. If `encoding` is `'buffer'`, or an unrecognized character + * encoding, `Buffer` objects will be passed to the callback instead. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned`ChildProcess` instance is attached to the `Promise` as a `child` property. In + * case of an error (including any error resulting in an exit code other than 0), a + * rejected promise is returned, with the same `error` object given in the + * callback, but with two additional properties `stdout` and `stderr`. + * + * ```js + * const util = require('node:util'); + * const execFile = util.promisify(require('node:child_process').execFile); + * async function getVersion() { + * const { stdout } = await execFile('node', ['--version']); + * console.log(stdout); + * } + * getVersion(); + * ``` + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * const { execFile } = require('node:child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = execFile('node', ['--version'], { signal }, (error) => { + * console.error(error); // an AbortError + * }); + * controller.abort(); + * ``` + * @since v0.1.91 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @param callback Called with the output when process terminates. + */ + function execFile(file: string): ChildProcess; + function execFile( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + ): ChildProcess; + function execFile(file: string, args?: readonly string[] | null): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + ): ChildProcess; + // no `options` definitely means stdout/stderr are `string`. + function execFile( + file: string, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. + function execFile( + file: string, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void, + ): ChildProcess; + // `options` with well known `encoding` means stdout/stderr are definitely `string`. + function execFile( + file: string, + options: ExecFileOptionsWithStringEncoding, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. + // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. + function execFile( + file: string, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void, + ): ChildProcess; + // `options` without an `encoding` means stdout/stderr are definitely `string`. + function execFile( + file: string, + options: ExecFileOptions, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions, + callback: (error: ExecFileException | null, stdout: string, stderr: string) => void, + ): ChildProcess; + // fallback if nothing else matches. Worst case is always `string | Buffer`. + function execFile( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: + | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) + | undefined + | null, + ): ChildProcess; + function execFile( + file: string, + args: readonly string[] | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + callback: + | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) + | undefined + | null, + ): ChildProcess; + namespace execFile { + function __promisify__(file: string): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithBufferEncoding, + ): PromiseWithChild<{ + stdout: Buffer; + stderr: Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithStringEncoding, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: ExecFileOptionsWithOtherEncoding, + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptionsWithOtherEncoding, + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + options: ExecFileOptions, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: ExecFileOptions, + ): PromiseWithChild<{ + stdout: string; + stderr: string; + }>; + function __promisify__( + file: string, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + function __promisify__( + file: string, + args: readonly string[] | undefined | null, + options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null, + ): PromiseWithChild<{ + stdout: string | Buffer; + stderr: string | Buffer; + }>; + } + interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { + execPath?: string | undefined; + execArgv?: string[] | undefined; + silent?: boolean | undefined; + /** + * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + detached?: boolean | undefined; + windowsVerbatimArguments?: boolean | undefined; + } + /** + * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. + * Like {@link spawn}, a `ChildProcess` object is returned. The + * returned `ChildProcess` will have an additional communication channel + * built-in that allows messages to be passed back and forth between the parent and + * child. See `subprocess.send()` for details. + * + * Keep in mind that spawned Node.js child processes are + * independent of the parent with exception of the IPC communication channel + * that is established between the two. Each process has its own memory, with + * their own V8 instances. Because of the additional resource allocations + * required, spawning a large number of child Node.js processes is not + * recommended. + * + * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the`options` object allows for an alternative + * execution path to be used. + * + * Node.js processes launched with a custom `execPath` will communicate with the + * parent process using the file descriptor (fd) identified using the + * environment variable `NODE_CHANNEL_FD` on the child process. + * + * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the + * current process. + * + * The `shell` option available in {@link spawn} is not supported by`child_process.fork()` and will be ignored if set. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding`AbortController` is similar to calling `.kill()` on the child process except + * the error passed to the callback will be an `AbortError`: + * + * ```js + * if (process.argv[2] === 'child') { + * setTimeout(() => { + * console.log(`Hello from ${process.argv[2]}!`); + * }, 1_000); + * } else { + * const { fork } = require('node:child_process'); + * const controller = new AbortController(); + * const { signal } = controller; + * const child = fork(__filename, ['child'], { signal }); + * child.on('error', (err) => { + * // This will be called with err being an AbortError if the controller aborts + * }); + * controller.abort(); // Stops the child process + * } + * ``` + * @since v0.5.0 + * @param modulePath The module to run in the child. + * @param args List of string arguments. + */ + function fork(modulePath: string, options?: ForkOptions): ChildProcess; + function fork(modulePath: string, args?: readonly string[], options?: ForkOptions): ChildProcess; + interface SpawnSyncOptions extends CommonSpawnOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding?: "buffer" | null | undefined; + } + interface SpawnSyncReturns { + pid: number; + output: Array; + stdout: T; + stderr: T; + status: number | null; + signal: NodeJS.Signals | null; + error?: Error | undefined; + } + /** + * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the process intercepts and handles the `SIGTERM` signal + * and doesn't exit, the parent process will wait until the child process has + * exited. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @param args List of string arguments. + */ + function spawnSync(command: string): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithStringEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args: readonly string[], + options: SpawnSyncOptionsWithBufferEncoding, + ): SpawnSyncReturns; + function spawnSync( + command: string, + args?: readonly string[], + options?: SpawnSyncOptions, + ): SpawnSyncReturns; + interface CommonExecOptions extends CommonOptions { + input?: string | NodeJS.ArrayBufferView | undefined; + /** + * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. + * If passed as an array, the first element is used for `stdin`, the second for + * `stdout`, and the third for `stderr`. A fourth element can be used to + * specify the `stdio` behavior beyond the standard streams. See + * {@link ChildProcess.stdio} for more information. + * + * @default 'pipe' + */ + stdio?: StdioOptions | undefined; + killSignal?: NodeJS.Signals | number | undefined; + maxBuffer?: number | undefined; + encoding?: BufferEncoding | "buffer" | null | undefined; + } + interface ExecSyncOptions extends CommonExecOptions { + shell?: string | undefined; + } + interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding?: "buffer" | null | undefined; + } + /** + * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return + * until the child process has fully closed. When a timeout has been encountered + * and `killSignal` is sent, the method won't return until the process has + * completely exited. If the child process intercepts and handles the `SIGTERM`signal and doesn't exit, the parent process will wait until the child process + * has exited. + * + * If the process times out or has a non-zero exit code, this method will throw. + * The `Error` object will contain the entire result from {@link spawnSync}. + * + * **Never pass unsanitized user input to this function. Any input containing shell** + * **metacharacters may be used to trigger arbitrary command execution.** + * @since v0.11.12 + * @param command The command to run. + * @return The stdout from the command. + */ + function execSync(command: string): Buffer; + function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; + function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer; + function execSync(command: string, options?: ExecSyncOptions): string | Buffer; + interface ExecFileSyncOptions extends CommonExecOptions { + shell?: boolean | string | undefined; + } + interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding?: "buffer" | null; // specify `null`. + } + /** + * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not + * return until the child process has fully closed. When a timeout has been + * encountered and `killSignal` is sent, the method won't return until the process + * has completely exited. + * + * If the child process intercepts and handles the `SIGTERM` signal and + * does not exit, the parent process will still wait until the child process has + * exited. + * + * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. + * + * **If the `shell` option is enabled, do not pass unsanitized user input to this** + * **function. Any input containing shell metacharacters may be used to trigger** + * **arbitrary command execution.** + * @since v0.11.12 + * @param file The name or path of the executable file to run. + * @param args List of string arguments. + * @return The stdout from the command. + */ + function execFileSync(file: string): Buffer; + function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; + function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer; + function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer; + function execFileSync(file: string, args: readonly string[]): Buffer; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithStringEncoding, + ): string; + function execFileSync( + file: string, + args: readonly string[], + options: ExecFileSyncOptionsWithBufferEncoding, + ): Buffer; + function execFileSync(file: string, args?: readonly string[], options?: ExecFileSyncOptions): string | Buffer; +} +declare module "node:child_process" { + export * from "child_process"; +} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts new file mode 100644 index 0000000..a2b86d1 --- /dev/null +++ b/node_modules/@types/node/cluster.d.ts @@ -0,0 +1,578 @@ +/** + * Clusters of Node.js processes can be used to run multiple instances of Node.js + * that can distribute workloads among their application threads. When process isolation + * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html) + * module instead, which allows running multiple application threads within a single Node.js instance. + * + * The cluster module allows easy creation of child processes that all share + * server ports. + * + * ```js + * import cluster from 'node:cluster'; + * import http from 'node:http'; + * import { availableParallelism } from 'node:os'; + * import process from 'node:process'; + * + * const numCPUs = availableParallelism(); + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('exit', (worker, code, signal) => { + * console.log(`worker ${worker.process.pid} died`); + * }); + * } else { + * // Workers can share any TCP connection + * // In this case it is an HTTP server + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * + * console.log(`Worker ${process.pid} started`); + * } + * ``` + * + * Running Node.js will now share port 8000 between the workers: + * + * ```console + * $ node server.js + * Primary 3596 is running + * Worker 4324 started + * Worker 4520 started + * Worker 6056 started + * Worker 5644 started + * ``` + * + * On Windows, it is not yet possible to set up a named pipe server in a worker. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/cluster.js) + */ +declare module "cluster" { + import * as child from "node:child_process"; + import EventEmitter = require("node:events"); + import * as net from "node:net"; + type SerializationType = "json" | "advanced"; + export interface ClusterSettings { + /** + * List of string arguments passed to the Node.js executable. + * @default process.execArgv + */ + execArgv?: string[] | undefined; + /** + * File path to worker file. + * @default process.argv[1] + */ + exec?: string | undefined; + /** + * String arguments passed to worker. + * @default process.argv.slice(2) + */ + args?: string[] | undefined; + /** + * Whether or not to send output to parent's stdio. + * @default false + */ + silent?: boolean | undefined; + /** + * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must + * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processspawncommand-args-options)'s + * [`stdio`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#optionsstdio). + */ + stdio?: any[] | undefined; + /** + * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) + */ + uid?: number | undefined; + /** + * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) + */ + gid?: number | undefined; + /** + * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. + * By default each worker gets its own port, incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + /** + * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. + * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#advanced-serialization) for more details. + * @default false + */ + serialization?: SerializationType | undefined; + /** + * Current working directory of the worker process. + * @default undefined (inherits from parent process) + */ + cwd?: string | undefined; + /** + * Hide the forked processes console window that would normally be created on Windows systems. + * @default false + */ + windowsHide?: boolean | undefined; + } + export interface Address { + address: string; + port: number; + /** + * The `addressType` is one of: + * + * * `4` (TCPv4) + * * `6` (TCPv6) + * * `-1` (Unix domain socket) + * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) + */ + addressType: 4 | 6 | -1 | "udp4" | "udp6"; + } + /** + * A `Worker` object contains all public information and method about a worker. + * In the primary it can be obtained using `cluster.workers`. In a worker + * it can be obtained using `cluster.worker`. + * @since v0.7.0 + */ + export class Worker extends EventEmitter { + /** + * Each new worker is given its own unique id, this id is stored in the `id`. + * + * While a worker is alive, this is the key that indexes it in `cluster.workers`. + * @since v0.8.0 + */ + id: number; + /** + * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object + * from this function is stored as `.process`. In a worker, the global `process` is stored. + * + * See: [Child Process module](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options). + * + * Workers will call `process.exit(0)` if the `'disconnect'` event occurs + * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against + * accidental disconnection. + * @since v0.7.0 + */ + process: child.ChildProcess; + /** + * Send a message to a worker or primary, optionally with a handle. + * + * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). + * + * In a worker, this sends a message to the primary. It is identical to `process.send()`. + * + * This example will echo back all messages from the primary: + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * worker.send('hi there'); + * + * } else if (cluster.isWorker) { + * process.on('message', (msg) => { + * process.send(msg); + * }); + * } + * ``` + * @since v0.7.0 + * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. + */ + send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; + send( + message: child.Serializable, + sendHandle: child.SendHandle, + callback?: (error: Error | null) => void, + ): boolean; + send( + message: child.Serializable, + sendHandle: child.SendHandle, + options?: child.MessageOptions, + callback?: (error: Error | null) => void, + ): boolean; + /** + * This function will kill the worker. In the primary worker, it does this by + * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. + * + * The `kill()` function kills the worker process without waiting for a graceful + * disconnect, it has the same behavior as `worker.process.kill()`. + * + * This method is aliased as `worker.destroy()` for backwards compatibility. + * + * In a worker, `process.kill()` exists, but it is not this function; + * it is [`kill()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processkillpid-signal). + * @since v0.9.12 + * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. + */ + kill(signal?: string): void; + destroy(signal?: string): void; + /** + * In a worker, this function will close all servers, wait for the `'close'` event + * on those servers, and then disconnect the IPC channel. + * + * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. + * + * Causes `.exitedAfterDisconnect` to be set. + * + * After a server is closed, it will no longer accept new connections, + * but connections may be accepted by any other listening worker. Existing + * connections will be allowed to close as usual. When no more connections exist, + * see `server.close()`, the IPC channel to the worker will close allowing it + * to die gracefully. + * + * The above applies _only_ to server connections, client connections are not + * automatically closed by workers, and disconnect does not wait for them to close + * before exiting. + * + * In a worker, `process.disconnect` exists, but it is not this function; + * it is `disconnect()`. + * + * Because long living server connections may block workers from disconnecting, it + * may be useful to send a message, so application specific actions may be taken to + * close them. It also may be useful to implement a timeout, killing a worker if + * the `'disconnect'` event has not been emitted after some time. + * + * ```js + * if (cluster.isPrimary) { + * const worker = cluster.fork(); + * let timeout; + * + * worker.on('listening', (address) => { + * worker.send('shutdown'); + * worker.disconnect(); + * timeout = setTimeout(() => { + * worker.kill(); + * }, 2000); + * }); + * + * worker.on('disconnect', () => { + * clearTimeout(timeout); + * }); + * + * } else if (cluster.isWorker) { + * const net = require('node:net'); + * const server = net.createServer((socket) => { + * // Connections never end + * }); + * + * server.listen(8000); + * + * process.on('message', (msg) => { + * if (msg === 'shutdown') { + * // Initiate graceful close of any connections to server + * } + * }); + * } + * ``` + * @since v0.7.7 + * @return A reference to `worker`. + */ + disconnect(): void; + /** + * This function returns `true` if the worker is connected to its primary via its + * IPC channel, `false` otherwise. A worker is connected to its primary after it + * has been created. It is disconnected after the `'disconnect'` event is emitted. + * @since v0.11.14 + */ + isConnected(): boolean; + /** + * This function returns `true` if the worker's process has terminated (either + * because of exiting or being signaled). Otherwise, it returns `false`. + * + * ```js + * import cluster from 'node:cluster'; + * import http from 'node:http'; + * import { availableParallelism } from 'node:os'; + * import process from 'node:process'; + * + * const numCPUs = availableParallelism(); + * + * if (cluster.isPrimary) { + * console.log(`Primary ${process.pid} is running`); + * + * // Fork workers. + * for (let i = 0; i < numCPUs; i++) { + * cluster.fork(); + * } + * + * cluster.on('fork', (worker) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * + * cluster.on('exit', (worker, code, signal) => { + * console.log('worker is dead:', worker.isDead()); + * }); + * } else { + * // Workers can share any TCP connection. In this case, it is an HTTP server. + * http.createServer((req, res) => { + * res.writeHead(200); + * res.end(`Current process\n ${process.pid}`); + * process.kill(process.pid); + * }).listen(8000); + * } + * ``` + * @since v0.11.14 + */ + isDead(): boolean; + /** + * This property is `true` if the worker exited due to `.disconnect()`. + * If the worker exited any other way, it is `false`. If the + * worker has not exited, it is `undefined`. + * + * The boolean `worker.exitedAfterDisconnect` allows distinguishing between + * voluntary and accidental exit, the primary may choose not to respawn a worker + * based on this value. + * + * ```js + * cluster.on('exit', (worker, code, signal) => { + * if (worker.exitedAfterDisconnect === true) { + * console.log('Oh, it was just voluntary – no need to worry'); + * } + * }); + * + * // kill worker + * worker.kill(); + * ``` + * @since v6.0.0 + */ + exitedAfterDisconnect: boolean; + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "exit", code: number, signal: string): boolean; + emit(event: "listening", address: Address): boolean; + emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online"): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + export interface Cluster extends EventEmitter { + disconnect(callback?: () => void): void; + /** + * Spawn a new worker process. + * + * This can only be called from the primary process. + * @param env Key/value pairs to add to worker process environment. + * @since v0.6.0 + */ + fork(env?: any): Worker; + /** @deprecated since v16.0.0 - use isPrimary. */ + readonly isMaster: boolean; + /** + * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` + * is undefined, then `isPrimary` is `true`. + * @since v16.0.0 + */ + readonly isPrimary: boolean; + /** + * True if the process is not a primary (it is the negation of `cluster.isPrimary`). + * @since v0.6.0 + */ + readonly isWorker: boolean; + /** + * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a + * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) + * is called, whichever comes first. + * + * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute + * IOCP handles without incurring a large performance hit. + * + * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. + * @since v0.11.2 + */ + schedulingPolicy: number; + /** + * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) + * (or [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)) this settings object will contain + * the settings, including the default values. + * + * This object is not intended to be changed or set manually. + * @since v0.7.1 + */ + readonly settings: ClusterSettings; + /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) instead. */ + setupMaster(settings?: ClusterSettings): void; + /** + * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. + * + * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv) + * and have no effect on workers that are already running. + * + * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to + * [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv). + * + * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of + * `cluster.setupPrimary()` is called. + * + * ```js + * import cluster from 'node:cluster'; + * + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'https'], + * silent: true, + * }); + * cluster.fork(); // https worker + * cluster.setupPrimary({ + * exec: 'worker.js', + * args: ['--use', 'http'], + * }); + * cluster.fork(); // http worker + * ``` + * + * This can only be called from the primary process. + * @since v16.0.0 + */ + setupPrimary(settings?: ClusterSettings): void; + /** + * A reference to the current worker object. Not available in the primary process. + * + * ```js + * import cluster from 'node:cluster'; + * + * if (cluster.isPrimary) { + * console.log('I am primary'); + * cluster.fork(); + * cluster.fork(); + * } else if (cluster.isWorker) { + * console.log(`I am worker #${cluster.worker.id}`); + * } + * ``` + * @since v0.7.0 + */ + readonly worker?: Worker | undefined; + /** + * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. + * + * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it + * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. + * + * ```js + * import cluster from 'node:cluster'; + * + * for (const worker of Object.values(cluster.workers)) { + * worker.send('big announcement to all workers'); + * } + * ``` + * @since v0.7.0 + */ + readonly workers?: NodeJS.Dict | undefined; + readonly SCHED_NONE: number; + readonly SCHED_RR: number; + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener( + event: "message", + listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, + ): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "disconnect", worker: Worker): boolean; + emit(event: "exit", worker: Worker, code: number, signal: string): boolean; + emit(event: "fork", worker: Worker): boolean; + emit(event: "listening", worker: Worker, address: Address): boolean; + emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; + emit(event: "online", worker: Worker): boolean; + emit(event: "setup", settings: ClusterSettings): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: ClusterSettings) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: ClusterSettings) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependListener( + event: "message", + listener: (worker: Worker, message: any, handle?: net.Socket | net.Server) => void, + ): this; + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener( + event: "message", + listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, + ): this; + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; + } + const cluster: Cluster; + export default cluster; +} +declare module "node:cluster" { + export * from "cluster"; + export { default as default } from "cluster"; +} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts new file mode 100644 index 0000000..d0b0797 --- /dev/null +++ b/node_modules/@types/node/console.d.ts @@ -0,0 +1,452 @@ +/** + * The `node:console` module provides a simple debugging console that is similar to + * the JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and + * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('node:console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/console.js) + */ +declare module "console" { + import console = require("node:console"); + export = console; +} +declare module "node:console" { + import { InspectOptions } from "node:util"; + global { + // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build + interface Console { + Console: console.ConsoleConstructor; + /** + * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only + * writes a message and does not otherwise affect execution. The output always + * starts with `"Assertion failed"`. If provided, `message` is formatted using + * [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args). + * + * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. + * + * ```js + * console.assert(true, 'does nothing'); + * + * console.assert(false, 'Whoops %s work', 'didn\'t'); + * // Assertion failed: Whoops didn't work + * + * console.assert(); + * // Assertion failed + * ``` + * @since v0.1.101 + * @param value The value tested for being truthy. + * @param message All arguments besides `value` are used as error message. + */ + assert(value: any, message?: string, ...optionalParams: any[]): void; + /** + * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the + * TTY. When `stdout` is not a TTY, this method does nothing. + * + * The specific operation of `console.clear()` can vary across operating systems + * and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the + * current terminal viewport for the Node.js + * binary. + * @since v8.3.0 + */ + clear(): void; + /** + * Maintains an internal counter specific to `label` and outputs to `stdout` the + * number of times `console.count()` has been called with the given `label`. + * + * ```js + * > console.count() + * default: 1 + * undefined + * > console.count('default') + * default: 2 + * undefined + * > console.count('abc') + * abc: 1 + * undefined + * > console.count('xyz') + * xyz: 1 + * undefined + * > console.count('abc') + * abc: 2 + * undefined + * > console.count() + * default: 3 + * undefined + * > + * ``` + * @since v8.3.0 + * @param [label='default'] The display label for the counter. + */ + count(label?: string): void; + /** + * Resets the internal counter specific to `label`. + * + * ```js + * > console.count('abc'); + * abc: 1 + * undefined + * > console.countReset('abc'); + * undefined + * > console.count('abc'); + * abc: 1 + * undefined + * > + * ``` + * @since v8.3.0 + * @param [label='default'] The display label for the counter. + */ + countReset(label?: string): void; + /** + * The `console.debug()` function is an alias for {@link log}. + * @since v8.0.0 + */ + debug(message?: any, ...optionalParams: any[]): void; + /** + * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`. + * This function bypasses any custom `inspect()` function defined on `obj`. + * @since v0.1.101 + */ + dir(obj: any, options?: InspectOptions): void; + /** + * This method calls `console.log()` passing it the arguments received. + * This method does not produce any XML formatting. + * @since v8.0.0 + */ + dirxml(...data: any[]): void; + /** + * Prints to `stderr` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) + * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). + * + * ```js + * const code = 5; + * console.error('error #%d', code); + * // Prints: error #5, to stderr + * console.error('error', code); + * // Prints: error 5, to stderr + * ``` + * + * If formatting elements (e.g. `%d`) are not found in the first string then + * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the + * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) + * for more information. + * @since v0.1.100 + */ + error(message?: any, ...optionalParams: any[]): void; + /** + * Increases indentation of subsequent lines by spaces for `groupIndentation` length. + * + * If one or more `label`s are provided, those are printed first without the + * additional indentation. + * @since v8.5.0 + */ + group(...label: any[]): void; + /** + * An alias for {@link group}. + * @since v8.5.0 + */ + groupCollapsed(...label: any[]): void; + /** + * Decreases indentation of subsequent lines by spaces for `groupIndentation` length. + * @since v8.5.0 + */ + groupEnd(): void; + /** + * The `console.info()` function is an alias for {@link log}. + * @since v0.1.100 + */ + info(message?: any, ...optionalParams: any[]): void; + /** + * Prints to `stdout` with newline. Multiple arguments can be passed, with the + * first used as the primary message and all additional used as substitution + * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) + * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). + * + * ```js + * const count = 5; + * console.log('count: %d', count); + * // Prints: count: 5, to stdout + * console.log('count:', count); + * // Prints: count: 5, to stdout + * ``` + * + * See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information. + * @since v0.1.100 + */ + log(message?: any, ...optionalParams: any[]): void; + /** + * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just + * logging the argument if it can't be parsed as tabular. + * + * ```js + * // These can't be parsed as tabular data + * console.table(Symbol()); + * // Symbol() + * + * console.table(undefined); + * // undefined + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); + * // ┌─────────┬─────┬─────┐ + * // │ (index) │ a │ b │ + * // ├─────────┼─────┼─────┤ + * // │ 0 │ 1 │ 'Y' │ + * // │ 1 │ 'Z' │ 2 │ + * // └─────────┴─────┴─────┘ + * + * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); + * // ┌─────────┬─────┐ + * // │ (index) │ a │ + * // ├─────────┼─────┤ + * // │ 0 │ 1 │ + * // │ 1 │ 'Z' │ + * // └─────────┴─────┘ + * ``` + * @since v10.0.0 + * @param properties Alternate properties for constructing the table. + */ + table(tabularData: any, properties?: readonly string[]): void; + /** + * Starts a timer that can be used to compute the duration of an operation. Timers + * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in + * suitable time units to `stdout`. For example, if the elapsed + * time is 3869ms, `console.timeEnd()` displays "3.869s". + * @since v0.1.104 + * @param [label='default'] + */ + time(label?: string): void; + /** + * Stops a timer that was previously started by calling {@link time} and + * prints the result to `stdout`: + * + * ```js + * console.time('bunch-of-stuff'); + * // Do a bunch of stuff. + * console.timeEnd('bunch-of-stuff'); + * // Prints: bunch-of-stuff: 225.438ms + * ``` + * @since v0.1.104 + * @param [label='default'] + */ + timeEnd(label?: string): void; + /** + * For a timer that was previously started by calling {@link time}, prints + * the elapsed time and other `data` arguments to `stdout`: + * + * ```js + * console.time('process'); + * const value = expensiveProcess1(); // Returns 42 + * console.timeLog('process', value); + * // Prints "process: 365.227ms 42". + * doExpensiveProcess2(value); + * console.timeEnd('process'); + * ``` + * @since v10.7.0 + * @param [label='default'] + */ + timeLog(label?: string, ...data: any[]): void; + /** + * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) + * formatted message and stack trace to the current position in the code. + * + * ```js + * console.trace('Show me'); + * // Prints: (stack trace will vary based on where trace is called) + * // Trace: Show me + * // at repl:2:9 + * // at REPLServer.defaultEval (repl.js:248:27) + * // at bound (domain.js:287:14) + * // at REPLServer.runBound [as eval] (domain.js:300:12) + * // at REPLServer. (repl.js:412:12) + * // at emitOne (events.js:82:20) + * // at REPLServer.emit (events.js:169:7) + * // at REPLServer.Interface._onLine (readline.js:210:10) + * // at REPLServer.Interface._line (readline.js:549:8) + * // at REPLServer.Interface._ttyWrite (readline.js:826:14) + * ``` + * @since v0.1.104 + */ + trace(message?: any, ...optionalParams: any[]): void; + /** + * The `console.warn()` function is an alias for {@link error}. + * @since v0.1.100 + */ + warn(message?: any, ...optionalParams: any[]): void; + // --- Inspector mode only --- + /** + * This method does not display anything unless used in the inspector. The `console.profile()` + * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} + * is called. The profile is then added to the Profile panel of the inspector. + * + * ```js + * console.profile('MyLabel'); + * // Some code + * console.profileEnd('MyLabel'); + * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. + * ``` + * @since v8.0.0 + */ + profile(label?: string): void; + /** + * This method does not display anything unless used in the inspector. Stops the current + * JavaScript CPU profiling session if one has been started and prints the report to the + * Profiles panel of the inspector. See {@link profile} for an example. + * + * If this method is called without a label, the most recently started profile is stopped. + * @since v8.0.0 + */ + profileEnd(label?: string): void; + /** + * This method does not display anything unless used in the inspector. The `console.timeStamp()` + * method adds an event with the label `'label'` to the Timeline panel of the inspector. + * @since v8.0.0 + */ + timeStamp(label?: string): void; + } + /** + * The `console` module provides a simple debugging console that is similar to the + * JavaScript console mechanism provided by web browsers. + * + * The module exports two specific components: + * + * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. + * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and + * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without calling `require('console')`. + * + * _**Warning**_: The global console object's methods are neither consistently + * synchronous like the browser APIs they resemble, nor are they consistently + * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for + * more information. + * + * Example using the global `console`: + * + * ```js + * console.log('hello world'); + * // Prints: hello world, to stdout + * console.log('hello %s', 'world'); + * // Prints: hello world, to stdout + * console.error(new Error('Whoops, something bad happened')); + * // Prints error message and stack trace to stderr: + * // Error: Whoops, something bad happened + * // at [eval]:5:15 + * // at Script.runInThisContext (node:vm:132:18) + * // at Object.runInThisContext (node:vm:309:38) + * // at node:internal/process/execution:77:19 + * // at [eval]-wrapper:6:22 + * // at evalScript (node:internal/process/execution:76:60) + * // at node:internal/main/eval_string:23:3 + * + * const name = 'Will Robinson'; + * console.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to stderr + * ``` + * + * Example using the `Console` class: + * + * ```js + * const out = getStreamSomehow(); + * const err = getStreamSomehow(); + * const myConsole = new console.Console(out, err); + * + * myConsole.log('hello world'); + * // Prints: hello world, to out + * myConsole.log('hello %s', 'world'); + * // Prints: hello world, to out + * myConsole.error(new Error('Whoops, something bad happened')); + * // Prints: [Error: Whoops, something bad happened], to err + * + * const name = 'Will Robinson'; + * myConsole.warn(`Danger ${name}! Danger!`); + * // Prints: Danger Will Robinson! Danger!, to err + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js) + */ + namespace console { + interface ConsoleConstructorOptions { + stdout: NodeJS.WritableStream; + stderr?: NodeJS.WritableStream | undefined; + /** + * Ignore errors when writing to the underlying streams. + * @default true + */ + ignoreErrors?: boolean | undefined; + /** + * Set color support for this `Console` instance. Setting to true enables coloring while inspecting + * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color + * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the + * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. + * @default auto + */ + colorMode?: boolean | "auto" | undefined; + /** + * Specifies options that are passed along to + * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options). + */ + inspectOptions?: InspectOptions | undefined; + /** + * Set group indentation. + * @default 2 + */ + groupIndentation?: number | undefined; + } + interface ConsoleConstructor { + prototype: Console; + new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; + new(options: ConsoleConstructorOptions): Console; + } + } + var console: Console; + } + export = globalThis.console; +} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts new file mode 100644 index 0000000..c3ac2b8 --- /dev/null +++ b/node_modules/@types/node/constants.d.ts @@ -0,0 +1,19 @@ +/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ +declare module "constants" { + import { constants as osConstants, SignalConstants } from "node:os"; + import { constants as cryptoConstants } from "node:crypto"; + import { constants as fsConstants } from "node:fs"; + + const exp: + & typeof osConstants.errno + & typeof osConstants.priority + & SignalConstants + & typeof cryptoConstants + & typeof fsConstants; + export = exp; +} + +declare module "node:constants" { + import constants = require("constants"); + export = constants; +} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts new file mode 100644 index 0000000..9c6843d --- /dev/null +++ b/node_modules/@types/node/crypto.d.ts @@ -0,0 +1,4522 @@ +/** + * The `node:crypto` module provides cryptographic functionality that includes a + * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify + * functions. + * + * ```js + * const { createHmac } = await import('node:crypto'); + * + * const secret = 'abcdefg'; + * const hash = createHmac('sha256', secret) + * .update('I love cupcakes') + * .digest('hex'); + * console.log(hash); + * // Prints: + * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/crypto.js) + */ +declare module "crypto" { + import * as stream from "node:stream"; + import { PeerCertificate } from "node:tls"; + /** + * SPKAC is a Certificate Signing Request mechanism originally implemented by + * Netscape and was specified formally as part of HTML5's `keygen` element. + * + * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects + * should not use this element anymore. + * + * The `node:crypto` module provides the `Certificate` class for working with SPKAC + * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC + * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. + * @since v0.11.8 + */ + class Certificate { + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const challenge = Certificate.exportChallenge(spkac); + * console.log(challenge.toString('utf8')); + * // Prints: the challenge as a UTF8 string + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportChallenge(spkac: BinaryLike): Buffer; + /** + * ```js + * const { Certificate } = await import('node:crypto'); + * const spkac = getSpkacSomehow(); + * const publicKey = Certificate.exportPublicKey(spkac); + * console.log(publicKey); + * // Prints: the public key as + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. + */ + static exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * ```js + * import { Buffer } from 'node:buffer'; + * const { Certificate } = await import('node:crypto'); + * + * const spkac = getSpkacSomehow(); + * console.log(Certificate.verifySpkac(Buffer.from(spkac))); + * // Prints: true or false + * ``` + * @since v9.0.0 + * @param encoding The `encoding` of the `spkac` string. + * @return `true` if the given `spkac` data structure is valid, `false` otherwise. + */ + static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + /** + * @deprecated + * @param spkac + * @returns The challenge component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportChallenge(spkac: BinaryLike): Buffer; + /** + * @deprecated + * @param spkac + * @param encoding The encoding of the spkac string. + * @returns The public key component of the `spkac` data structure, + * which includes a public key and a challenge. + */ + exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer; + /** + * @deprecated + * @param spkac + * @returns `true` if the given `spkac` data structure is valid, + * `false` otherwise. + */ + verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; + } + namespace constants { + // https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants + const OPENSSL_VERSION_NUMBER: number; + /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ + const SSL_OP_ALL: number; + /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */ + const SSL_OP_ALLOW_NO_DHE_KEX: number; + /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ + const SSL_OP_CIPHER_SERVER_PREFERENCE: number; + /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */ + const SSL_OP_CISCO_ANYCONNECT: number; + /** Instructs OpenSSL to turn on cookie exchange. */ + const SSL_OP_COOKIE_EXCHANGE: number; + /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ + const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ + const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + /** Allows initial connection to servers that do not support RI. */ + const SSL_OP_LEGACY_SERVER_CONNECT: number; + /** Instructs OpenSSL to disable support for SSL/TLS compression. */ + const SSL_OP_NO_COMPRESSION: number; + /** Instructs OpenSSL to disable encrypt-then-MAC. */ + const SSL_OP_NO_ENCRYPT_THEN_MAC: number; + const SSL_OP_NO_QUERY_MTU: number; + /** Instructs OpenSSL to disable renegotiation. */ + const SSL_OP_NO_RENEGOTIATION: number; + /** Instructs OpenSSL to always start a new session when performing renegotiation. */ + const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + /** Instructs OpenSSL to turn off SSL v2 */ + const SSL_OP_NO_SSLv2: number; + /** Instructs OpenSSL to turn off SSL v3 */ + const SSL_OP_NO_SSLv3: number; + /** Instructs OpenSSL to disable use of RFC4507bis tickets. */ + const SSL_OP_NO_TICKET: number; + /** Instructs OpenSSL to turn off TLS v1 */ + const SSL_OP_NO_TLSv1: number; + /** Instructs OpenSSL to turn off TLS v1.1 */ + const SSL_OP_NO_TLSv1_1: number; + /** Instructs OpenSSL to turn off TLS v1.2 */ + const SSL_OP_NO_TLSv1_2: number; + /** Instructs OpenSSL to turn off TLS v1.3 */ + const SSL_OP_NO_TLSv1_3: number; + /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */ + const SSL_OP_PRIORITIZE_CHACHA: number; + /** Instructs OpenSSL to disable version rollback attack detection. */ + const SSL_OP_TLS_ROLLBACK_BUG: number; + const ENGINE_METHOD_RSA: number; + const ENGINE_METHOD_DSA: number; + const ENGINE_METHOD_DH: number; + const ENGINE_METHOD_RAND: number; + const ENGINE_METHOD_EC: number; + const ENGINE_METHOD_CIPHERS: number; + const ENGINE_METHOD_DIGESTS: number; + const ENGINE_METHOD_PKEY_METHS: number; + const ENGINE_METHOD_PKEY_ASN1_METHS: number; + const ENGINE_METHOD_ALL: number; + const ENGINE_METHOD_NONE: number; + const DH_CHECK_P_NOT_SAFE_PRIME: number; + const DH_CHECK_P_NOT_PRIME: number; + const DH_UNABLE_TO_CHECK_GENERATOR: number; + const DH_NOT_SUITABLE_GENERATOR: number; + const RSA_PKCS1_PADDING: number; + const RSA_SSLV23_PADDING: number; + const RSA_NO_PADDING: number; + const RSA_PKCS1_OAEP_PADDING: number; + const RSA_X931_PADDING: number; + const RSA_PKCS1_PSS_PADDING: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ + const RSA_PSS_SALTLEN_DIGEST: number; + /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ + const RSA_PSS_SALTLEN_MAX_SIGN: number; + /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ + const RSA_PSS_SALTLEN_AUTO: number; + const POINT_CONVERSION_COMPRESSED: number; + const POINT_CONVERSION_UNCOMPRESSED: number; + const POINT_CONVERSION_HYBRID: number; + /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ + const defaultCoreCipherList: string; + /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ + const defaultCipherList: string; + } + interface HashOptions extends stream.TransformOptions { + /** + * For XOF hash functions such as `shake256`, the + * outputLength option can be used to specify the desired output length in bytes. + */ + outputLength?: number | undefined; + } + /** @deprecated since v10.0.0 */ + const fips: boolean; + /** + * Creates and returns a `Hash` object that can be used to generate hash digests + * using the given `algorithm`. Optional `options` argument controls stream + * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option + * can be used to specify the desired output length in bytes. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * Example: generating the sha256 sum of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHash, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hash = createHash('sha256'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hash.update(data); + * else { + * console.log(`${hash.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.92 + * @param options `stream.transform` options + */ + function createHash(algorithm: string, options?: HashOptions): Hash; + /** + * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. + * Optional `options` argument controls stream behavior. + * + * The `algorithm` is dependent on the available algorithms supported by the + * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. + * On recent releases of OpenSSL, `openssl list -digest-algorithms` will + * display the available digest algorithms. + * + * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is + * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was + * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not + * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). + * + * Example: generating the sha256 HMAC of a file + * + * ```js + * import { + * createReadStream, + * } from 'node:fs'; + * import { argv } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const filename = argv[2]; + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream(filename); + * input.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = input.read(); + * if (data) + * hmac.update(data); + * else { + * console.log(`${hmac.digest('hex')} ${filename}`); + * } + * }); + * ``` + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; + // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings + type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; + type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; + type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; + type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + /** + * The `Hash` class is a utility for creating hash digests of data. It can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed hash digest on the readable side, or + * * Using the `hash.update()` and `hash.digest()` methods to produce the + * computed hash. + * + * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hash` objects as streams: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hash.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * } + * }); + * + * hash.write('some data to hash'); + * hash.end(); + * ``` + * + * Example: Using `Hash` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { createHash } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * const input = createReadStream('test.js'); + * input.pipe(hash).setEncoding('hex').pipe(stdout); + * ``` + * + * Example: Using the `hash.update()` and `hash.digest()` methods: + * + * ```js + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('some data to hash'); + * console.log(hash.digest('hex')); + * // Prints: + * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 + * ``` + * @since v0.1.92 + */ + class Hash extends stream.Transform { + private constructor(); + /** + * Creates a new `Hash` object that contains a deep copy of the internal state + * of the current `Hash` object. + * + * The optional `options` argument controls stream behavior. For XOF hash + * functions such as `'shake256'`, the `outputLength` option can be used to + * specify the desired output length in bytes. + * + * An error is thrown when an attempt is made to copy the `Hash` object after + * its `hash.digest()` method has been called. + * + * ```js + * // Calculate a rolling hash. + * const { + * createHash, + * } = await import('node:crypto'); + * + * const hash = createHash('sha256'); + * + * hash.update('one'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('two'); + * console.log(hash.copy().digest('hex')); + * + * hash.update('three'); + * console.log(hash.copy().digest('hex')); + * + * // Etc. + * ``` + * @since v13.1.0 + * @param options `stream.transform` options + */ + copy(options?: HashOptions): Hash; + /** + * Updates the hash content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hash; + update(data: string, inputEncoding: Encoding): Hash; + /** + * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). + * If `encoding` is provided a string will be returned; otherwise + * a `Buffer` is returned. + * + * The `Hash` object can not be used again after `hash.digest()` method has been + * called. Multiple calls will cause an error to be thrown. + * @since v0.1.92 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + /** + * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can + * be used in one of two ways: + * + * * As a `stream` that is both readable and writable, where data is written + * to produce a computed HMAC digest on the readable side, or + * * Using the `hmac.update()` and `hmac.digest()` methods to produce the + * computed HMAC digest. + * + * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. + * + * Example: Using `Hmac` objects as streams: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.on('readable', () => { + * // Only one element is going to be produced by the + * // hash stream. + * const data = hmac.read(); + * if (data) { + * console.log(data.toString('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * } + * }); + * + * hmac.write('some data to hash'); + * hmac.end(); + * ``` + * + * Example: Using `Hmac` and piped streams: + * + * ```js + * import { createReadStream } from 'node:fs'; + * import { stdout } from 'node:process'; + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * const input = createReadStream('test.js'); + * input.pipe(hmac).pipe(stdout); + * ``` + * + * Example: Using the `hmac.update()` and `hmac.digest()` methods: + * + * ```js + * const { + * createHmac, + * } = await import('node:crypto'); + * + * const hmac = createHmac('sha256', 'a secret'); + * + * hmac.update('some data to hash'); + * console.log(hmac.digest('hex')); + * // Prints: + * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e + * ``` + * @since v0.1.94 + */ + class Hmac extends stream.Transform { + private constructor(); + /** + * Updates the `Hmac` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Hmac; + update(data: string, inputEncoding: Encoding): Hmac; + /** + * Calculates the HMAC digest of all of the data passed using `hmac.update()`. + * If `encoding` is + * provided a string is returned; otherwise a `Buffer` is returned; + * + * The `Hmac` object can not be used again after `hmac.digest()` has been + * called. Multiple calls to `hmac.digest()` will result in an error being thrown. + * @since v0.1.94 + * @param encoding The `encoding` of the return value. + */ + digest(): Buffer; + digest(encoding: BinaryToTextEncoding): string; + } + type KeyObjectType = "secret" | "public" | "private"; + interface KeyExportOptions { + type: "pkcs1" | "spki" | "pkcs8" | "sec1"; + format: T; + cipher?: string | undefined; + passphrase?: string | Buffer | undefined; + } + interface JwkKeyExportOptions { + format: "jwk"; + } + interface JsonWebKey { + crv?: string | undefined; + d?: string | undefined; + dp?: string | undefined; + dq?: string | undefined; + e?: string | undefined; + k?: string | undefined; + kty?: string | undefined; + n?: string | undefined; + p?: string | undefined; + q?: string | undefined; + qi?: string | undefined; + x?: string | undefined; + y?: string | undefined; + [key: string]: unknown; + } + interface AsymmetricKeyDetails { + /** + * Key size in bits (RSA, DSA). + */ + modulusLength?: number | undefined; + /** + * Public exponent (RSA). + */ + publicExponent?: bigint | undefined; + /** + * Name of the message digest (RSA-PSS). + */ + hashAlgorithm?: string | undefined; + /** + * Name of the message digest used by MGF1 (RSA-PSS). + */ + mgf1HashAlgorithm?: string | undefined; + /** + * Minimal salt length in bytes (RSA-PSS). + */ + saltLength?: number | undefined; + /** + * Size of q in bits (DSA). + */ + divisorLength?: number | undefined; + /** + * Name of the curve (EC). + */ + namedCurve?: string | undefined; + } + /** + * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, + * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` + * objects are not to be created directly using the `new`keyword. + * + * Most applications should consider using the new `KeyObject` API instead of + * passing keys as strings or `Buffer`s due to improved security features. + * + * `KeyObject` instances can be passed to other threads via `postMessage()`. + * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to + * be listed in the `transferList` argument. + * @since v11.6.0 + */ + class KeyObject { + private constructor(); + /** + * Example: Converting a `CryptoKey` instance to a `KeyObject`: + * + * ```js + * const { KeyObject } = await import('node:crypto'); + * const { subtle } = globalThis.crypto; + * + * const key = await subtle.generateKey({ + * name: 'HMAC', + * hash: 'SHA-256', + * length: 256, + * }, true, ['sign', 'verify']); + * + * const keyObject = KeyObject.from(key); + * console.log(keyObject.symmetricKeySize); + * // Prints: 32 (symmetric key size in bytes) + * ``` + * @since v15.0.0 + */ + static from(key: webcrypto.CryptoKey): KeyObject; + /** + * For asymmetric keys, this property represents the type of the key. Supported key + * types are: + * + * * `'rsa'` (OID 1.2.840.113549.1.1.1) + * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) + * * `'dsa'` (OID 1.2.840.10040.4.1) + * * `'ec'` (OID 1.2.840.10045.2.1) + * * `'x25519'` (OID 1.3.101.110) + * * `'x448'` (OID 1.3.101.111) + * * `'ed25519'` (OID 1.3.101.112) + * * `'ed448'` (OID 1.3.101.113) + * * `'dh'` (OID 1.2.840.113549.1.3.1) + * + * This property is `undefined` for unrecognized `KeyObject` types and symmetric + * keys. + * @since v11.6.0 + */ + asymmetricKeyType?: KeyType | undefined; + /** + * For asymmetric keys, this property represents the size of the embedded key in + * bytes. This property is `undefined` for symmetric keys. + */ + asymmetricKeySize?: number | undefined; + /** + * This property exists only on asymmetric keys. Depending on the type of the key, + * this object contains information about the key. None of the information obtained + * through this property can be used to uniquely identify a key or to compromise + * the security of the key. + * + * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, + * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be + * set. + * + * Other key details might be exposed via this API using additional attributes. + * @since v15.7.0 + */ + asymmetricKeyDetails?: AsymmetricKeyDetails | undefined; + /** + * For symmetric keys, the following encoding options can be used: + * + * For public keys, the following encoding options can be used: + * + * For private keys, the following encoding options can be used: + * + * The result type depends on the selected encoding format, when PEM the + * result is a string, when DER it will be a buffer containing the data + * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. + * + * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are + * ignored. + * + * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of + * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be + * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for + * encrypted private keys. Since PKCS#8 defines its own + * encryption mechanism, PEM-level encryption is not supported when encrypting + * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for + * PKCS#1 and SEC1 encryption. + * @since v11.6.0 + */ + export(options: KeyExportOptions<"pem">): string | Buffer; + export(options?: KeyExportOptions<"der">): Buffer; + export(options?: JwkKeyExportOptions): JsonWebKey; + /** + * Returns `true` or `false` depending on whether the keys have exactly the same + * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). + * @since v17.7.0, v16.15.0 + * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. + */ + equals(otherKeyObject: KeyObject): boolean; + /** + * For secret keys, this property represents the size of the key in bytes. This + * property is `undefined` for asymmetric keys. + * @since v11.6.0 + */ + symmetricKeySize?: number | undefined; + /** + * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys + * or `'private'` for private (asymmetric) keys. + * @since v11.6.0 + */ + type: KeyObjectType; + } + type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305"; + type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; + type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; + type BinaryLike = string | NodeJS.ArrayBufferView; + type CipherKey = BinaryLike | KeyObject; + interface CipherCCMOptions extends stream.TransformOptions { + authTagLength: number; + } + interface CipherGCMOptions extends stream.TransformOptions { + authTagLength?: number | undefined; + } + interface CipherOCBOptions extends stream.TransformOptions { + authTagLength: number; + } + /** + * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`. + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `password` is used to derive the cipher key and initialization vector (IV). + * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. + * + * **This function is semantically insecure for all** + * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** + * **GCM, or CCM).** + * + * The implementation of `crypto.createCipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode + * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when + * they are used in order to avoid the risk of IV reuse that causes + * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. + * @param options `stream.transform` options + */ + function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; + /** @deprecated since v10.0.0 use `createCipheriv()` */ + function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; + /** + * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and + * initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication + * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a + * given IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createCipheriv( + algorithm: CipherCCMTypes, + key: CipherKey, + iv: BinaryLike, + options: CipherCCMOptions, + ): CipherCCM; + function createCipheriv( + algorithm: CipherOCBTypes, + key: CipherKey, + iv: BinaryLike, + options: CipherOCBOptions, + ): CipherOCB; + function createCipheriv( + algorithm: CipherGCMTypes, + key: CipherKey, + iv: BinaryLike, + options?: CipherGCMOptions, + ): CipherGCM; + function createCipheriv( + algorithm: string, + key: CipherKey, + iv: BinaryLike | null, + options?: stream.TransformOptions, + ): Cipher; + /** + * Instances of the `Cipher` class are used to encrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain unencrypted + * data is written to produce encrypted data on the readable side, or + * * Using the `cipher.update()` and `cipher.final()` methods to produce + * the encrypted data. + * + * The {@link createCipher} or {@link createCipheriv} methods are + * used to create `Cipher` instances. `Cipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Cipher` objects as streams: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * // Once we have the key and iv, we can create and use the cipher... + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = ''; + * cipher.setEncoding('hex'); + * + * cipher.on('data', (chunk) => encrypted += chunk); + * cipher.on('end', () => console.log(encrypted)); + * + * cipher.write('some clear text data'); + * cipher.end(); + * }); + * }); + * ``` + * + * Example: Using `Cipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * + * import { + * pipeline, + * } from 'node:stream'; + * + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.js'); + * const output = createWriteStream('test.enc'); + * + * pipeline(input, cipher, output, (err) => { + * if (err) throw err; + * }); + * }); + * }); + * ``` + * + * Example: Using the `cipher.update()` and `cipher.final()` methods: + * + * ```js + * const { + * scrypt, + * randomFill, + * createCipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * + * // First, we'll generate the key. The key length is dependent on the algorithm. + * // In this case for aes192, it is 24 bytes (192 bits). + * scrypt(password, 'salt', 24, (err, key) => { + * if (err) throw err; + * // Then, we'll generate a random initialization vector + * randomFill(new Uint8Array(16), (err, iv) => { + * if (err) throw err; + * + * const cipher = createCipheriv(algorithm, key, iv); + * + * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); + * encrypted += cipher.final('hex'); + * console.log(encrypted); + * }); + * }); + * ``` + * @since v0.1.94 + */ + class Cipher extends stream.Transform { + private constructor(); + /** + * Updates the cipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`, + * `TypedArray`, or `DataView`, then`inputEncoding` is ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being + * thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the data. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: BinaryLike): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `cipher.final()` method has been called, the `Cipher` object can no + * longer be used to encrypt data. Attempts to call `cipher.final()` more than + * once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When using block encryption algorithms, the `Cipher` class will automatically + * add padding to the input data to the appropriate block size. To disable the + * default padding call `cipher.setAutoPadding(false)`. + * + * When `autoPadding` is `false`, the length of the entire input data must be a + * multiple of the cipher's block size or `cipher.final()` will throw an error. + * Disabling automatic padding is useful for non-standard padding, for instance + * using `0x0` instead of PKCS padding. + * + * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(autoPadding?: boolean): this; + } + interface CipherCCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + }, + ): this; + getAuthTag(): Buffer; + } + interface CipherGCM extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + }, + ): this; + getAuthTag(): Buffer; + } + interface CipherOCB extends Cipher { + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + }, + ): this; + getAuthTag(): Buffer; + } + /** + * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * **This function is semantically insecure for all** + * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** + * **GCM, or CCM).** + * + * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL + * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one + * iteration, and no salt. The lack of salt allows dictionary attacks as the same + * password always creates the same key. The low iteration count and + * non-cryptographically secure hash algorithm allow passwords to be tested very + * rapidly. + * + * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that + * developers derive a key and IV on + * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. + * @since v0.1.94 + * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. + * @param options `stream.transform` options + */ + function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; + /** @deprecated since v10.0.0 use `createDecipheriv()` */ + function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; + /** + * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`). + * + * The `options` argument controls stream behavior and is optional except when a + * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the + * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags + * to those with the specified length. + * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. + * + * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On + * recent OpenSSL releases, `openssl list -cipher-algorithms` will + * display the available cipher algorithms. + * + * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded + * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be + * a `KeyObject` of type `secret`. If the cipher does not need + * an initialization vector, `iv` may be `null`. + * + * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * Initialization vectors should be unpredictable and unique; ideally, they will be + * cryptographically random. They do not have to be secret: IVs are typically just + * added to ciphertext messages unencrypted. It may sound contradictory that + * something has to be unpredictable and unique, but does not have to be secret; + * remember that an attacker must not be able to predict ahead of time what a given + * IV will be. + * @since v0.1.94 + * @param options `stream.transform` options + */ + function createDecipheriv( + algorithm: CipherCCMTypes, + key: CipherKey, + iv: BinaryLike, + options: CipherCCMOptions, + ): DecipherCCM; + function createDecipheriv( + algorithm: CipherOCBTypes, + key: CipherKey, + iv: BinaryLike, + options: CipherOCBOptions, + ): DecipherOCB; + function createDecipheriv( + algorithm: CipherGCMTypes, + key: CipherKey, + iv: BinaryLike, + options?: CipherGCMOptions, + ): DecipherGCM; + function createDecipheriv( + algorithm: string, + key: CipherKey, + iv: BinaryLike | null, + options?: stream.TransformOptions, + ): Decipher; + /** + * Instances of the `Decipher` class are used to decrypt data. The class can be + * used in one of two ways: + * + * * As a `stream` that is both readable and writable, where plain encrypted + * data is written to produce unencrypted data on the readable side, or + * * Using the `decipher.update()` and `decipher.final()` methods to + * produce the unencrypted data. + * + * The {@link createDecipher} or {@link createDecipheriv} methods are + * used to create `Decipher` instances. `Decipher` objects are not to be created + * directly using the `new` keyword. + * + * Example: Using `Decipher` objects as streams: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Key length is dependent on the algorithm. In this case for aes192, it is + * // 24 bytes (192 bits). + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * let decrypted = ''; + * decipher.on('readable', () => { + * let chunk; + * while (null !== (chunk = decipher.read())) { + * decrypted += chunk.toString('utf8'); + * } + * }); + * decipher.on('end', () => { + * console.log(decrypted); + * // Prints: some clear text data + * }); + * + * // Encrypted with same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * decipher.write(encrypted, 'hex'); + * decipher.end(); + * ``` + * + * Example: Using `Decipher` and piped streams: + * + * ```js + * import { + * createReadStream, + * createWriteStream, + * } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * const input = createReadStream('test.enc'); + * const output = createWriteStream('test.js'); + * + * input.pipe(decipher).pipe(output); + * ``` + * + * Example: Using the `decipher.update()` and `decipher.final()` methods: + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * scryptSync, + * createDecipheriv, + * } = await import('node:crypto'); + * + * const algorithm = 'aes-192-cbc'; + * const password = 'Password used to generate key'; + * // Use the async `crypto.scrypt()` instead. + * const key = scryptSync(password, 'salt', 24); + * // The IV is usually passed along with the ciphertext. + * const iv = Buffer.alloc(16, 0); // Initialization vector. + * + * const decipher = createDecipheriv(algorithm, key, iv); + * + * // Encrypted using same algorithm, key and iv. + * const encrypted = + * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; + * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); + * decrypted += decipher.final('utf8'); + * console.log(decrypted); + * // Prints: some clear text data + * ``` + * @since v0.1.94 + */ + class Decipher extends stream.Transform { + private constructor(); + /** + * Updates the decipher with `data`. If the `inputEncoding` argument is given, + * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is + * ignored. + * + * The `outputEncoding` specifies the output format of the enciphered + * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. + * + * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error + * being thrown. + * @since v0.1.94 + * @param inputEncoding The `encoding` of the `data` string. + * @param outputEncoding The `encoding` of the return value. + */ + update(data: NodeJS.ArrayBufferView): Buffer; + update(data: string, inputEncoding: Encoding): Buffer; + update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; + update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; + /** + * Once the `decipher.final()` method has been called, the `Decipher` object can + * no longer be used to decrypt data. Attempts to call `decipher.final()` more + * than once will result in an error being thrown. + * @since v0.1.94 + * @param outputEncoding The `encoding` of the return value. + * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. + */ + final(): Buffer; + final(outputEncoding: BufferEncoding): string; + /** + * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and + * removing padding. + * + * Turning auto padding off will only work if the input data's length is a + * multiple of the ciphers block size. + * + * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. + * @since v0.7.1 + * @param [autoPadding=true] + * @return for method chaining. + */ + setAutoPadding(auto_padding?: boolean): this; + } + interface DecipherCCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options: { + plaintextLength: number; + }, + ): this; + } + interface DecipherGCM extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + }, + ): this; + } + interface DecipherOCB extends Decipher { + setAuthTag(buffer: NodeJS.ArrayBufferView): this; + setAAD( + buffer: NodeJS.ArrayBufferView, + options?: { + plaintextLength: number; + }, + ): this; + } + interface PrivateKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: "pkcs1" | "pkcs8" | "sec1" | undefined; + passphrase?: string | Buffer | undefined; + encoding?: string | undefined; + } + interface PublicKeyInput { + key: string | Buffer; + format?: KeyFormat | undefined; + type?: "pkcs1" | "spki" | undefined; + encoding?: string | undefined; + } + /** + * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKey, + * } = await import('node:crypto'); + * + * generateKey('hmac', { length: 512 }, (err, key) => { + * if (err) throw err; + * console.log(key.export().toString('hex')); // 46e..........620 + * }); + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKey( + type: "hmac" | "aes", + options: { + length: number; + }, + callback: (err: Error | null, key: KeyObject) => void, + ): void; + /** + * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`. + * + * ```js + * const { + * generateKeySync, + * } = await import('node:crypto'); + * + * const key = generateKeySync('hmac', { length: 512 }); + * console.log(key.export().toString('hex')); // e89..........41e + * ``` + * + * The size of a generated HMAC key should not exceed the block size of the + * underlying hash function. See {@link createHmac} for more information. + * @since v15.0.0 + * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. + */ + function generateKeySync( + type: "hmac" | "aes", + options: { + length: number; + }, + ): KeyObject; + interface JsonWebKeyInput { + key: JsonWebKey; + format: "jwk"; + } + /** + * Creates and returns a new key object containing a private key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above. + * + * If the private key is encrypted, a `passphrase` must be specified. The length + * of the passphrase is limited to 1024 bytes. + * @since v11.6.0 + */ + function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a public key. If `key` is a + * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key; + * otherwise, `key` must be an object with the properties described above. + * + * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. + * + * Because public keys can be derived from private keys, a private key may be + * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the + * returned `KeyObject` will be `'public'` and that the private key cannot be + * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned + * and it will be impossible to extract the private key from the returned object. + * @since v11.6.0 + */ + function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; + /** + * Creates and returns a new key object containing a secret key for symmetric + * encryption or `Hmac`. + * @since v11.6.0 + * @param encoding The string encoding when `key` is a string. + */ + function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; + function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; + /** + * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. + * Optional `options` argument controls the `stream.Writable` behavior. + * + * In some cases, a `Sign` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createSign(algorithm: string, options?: stream.WritableOptions): Sign; + type DSAEncoding = "der" | "ieee-p1363"; + interface SigningOptions { + /** + * @see crypto.constants.RSA_PKCS1_PADDING + */ + padding?: number | undefined; + saltLength?: number | undefined; + dsaEncoding?: DSAEncoding | undefined; + } + interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} + interface SignKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} + interface VerifyKeyObjectInput extends SigningOptions { + key: KeyObject; + } + interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} + type KeyLike = string | Buffer | KeyObject; + /** + * The `Sign` class is a utility for generating signatures. It can be used in one + * of two ways: + * + * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or + * * Using the `sign.update()` and `sign.sign()` methods to produce the + * signature. + * + * The {@link createSign} method is used to create `Sign` instances. The + * argument is the string name of the hash function to use. `Sign` objects are not + * to be created directly using the `new` keyword. + * + * Example: Using `Sign` and `Verify` objects as streams: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('ec', { + * namedCurve: 'sect239k1', + * }); + * + * const sign = createSign('SHA256'); + * sign.write('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey, 'hex'); + * + * const verify = createVerify('SHA256'); + * verify.write('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature, 'hex')); + * // Prints: true + * ``` + * + * Example: Using the `sign.update()` and `verify.update()` methods: + * + * ```js + * const { + * generateKeyPairSync, + * createSign, + * createVerify, + * } = await import('node:crypto'); + * + * const { privateKey, publicKey } = generateKeyPairSync('rsa', { + * modulusLength: 2048, + * }); + * + * const sign = createSign('SHA256'); + * sign.update('some data to sign'); + * sign.end(); + * const signature = sign.sign(privateKey); + * + * const verify = createVerify('SHA256'); + * verify.update('some data to sign'); + * verify.end(); + * console.log(verify.verify(publicKey, signature)); + * // Prints: true + * ``` + * @since v0.1.92 + */ + class Sign extends stream.Writable { + private constructor(); + /** + * Updates the `Sign` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `encoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): this; + update(data: string, inputEncoding: Encoding): this; + /** + * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the following additional properties can be passed: + * + * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * The `Sign` object can not be again used after `sign.sign()` method has been + * called. Multiple calls to `sign.sign()` will result in an error being thrown. + * @since v0.1.92 + */ + sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer; + sign( + privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, + outputFormat: BinaryToTextEncoding, + ): string; + } + /** + * Creates and returns a `Verify` object that uses the given algorithm. + * Use {@link getHashes} to obtain an array of names of the available + * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior. + * + * In some cases, a `Verify` instance can be created using the name of a signature + * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use + * the corresponding digest algorithm. This does not work for all signature + * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest + * algorithm names. + * @since v0.1.92 + * @param options `stream.Writable` options + */ + function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; + /** + * The `Verify` class is a utility for verifying signatures. It can be used in one + * of two ways: + * + * * As a writable `stream` where written data is used to validate against the + * supplied signature, or + * * Using the `verify.update()` and `verify.verify()` methods to verify + * the signature. + * + * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword. + * + * See `Sign` for examples. + * @since v0.1.92 + */ + class Verify extends stream.Writable { + private constructor(); + /** + * Updates the `Verify` content with the given `data`, the encoding of which + * is given in `inputEncoding`. + * If `inputEncoding` is not provided, and the `data` is a string, an + * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. + * + * This can be called many times with new data as it is streamed. + * @since v0.1.92 + * @param inputEncoding The `encoding` of the `data` string. + */ + update(data: BinaryLike): Verify; + update(data: string, inputEncoding: Encoding): Verify; + /** + * Verifies the provided data using the given `object` and `signature`. + * + * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an + * object, the following additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the data, in + * the `signatureEncoding`. + * If a `signatureEncoding` is specified, the `signature` is expected to be a + * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * The `verify` object can not be used again after `verify.verify()` has been + * called. Multiple calls to `verify.verify()` will result in an error being + * thrown. + * + * Because public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.1.92 + */ + verify( + object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: NodeJS.ArrayBufferView, + ): boolean; + verify( + object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: string, + signature_format?: BinaryToTextEncoding, + ): boolean; + } + /** + * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an + * optional specific `generator`. + * + * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used. + * + * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise + * a `Buffer`, `TypedArray`, or `DataView` is expected. + * + * If `generatorEncoding` is specified, `generator` is expected to be a string; + * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. + * @since v0.11.12 + * @param primeEncoding The `encoding` of the `prime` string. + * @param [generator=2] + * @param generatorEncoding The `encoding` of the `generator` string. + */ + function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; + function createDiffieHellman( + prime: ArrayBuffer | NodeJS.ArrayBufferView, + generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, + ): DiffieHellman; + function createDiffieHellman( + prime: ArrayBuffer | NodeJS.ArrayBufferView, + generator: string, + generatorEncoding: BinaryToTextEncoding, + ): DiffieHellman; + function createDiffieHellman( + prime: string, + primeEncoding: BinaryToTextEncoding, + generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, + ): DiffieHellman; + function createDiffieHellman( + prime: string, + primeEncoding: BinaryToTextEncoding, + generator: string, + generatorEncoding: BinaryToTextEncoding, + ): DiffieHellman; + /** + * The `DiffieHellman` class is a utility for creating Diffie-Hellman key + * exchanges. + * + * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createDiffieHellman, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createDiffieHellman(2048); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * // OK + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * ``` + * @since v0.5.0 + */ + class DiffieHellman { + private constructor(); + /** + * Generates private and public Diffie-Hellman key values unless they have been + * generated or computed already, and returns + * the public key in the specified `encoding`. This key should be + * transferred to the other party. + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * + * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, + * once a private key has been generated or set, calling this function only updates + * the public key but does not generate a new private key. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using the specified `inputEncoding`, and secret is + * encoded using specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. + * @since v0.5.0 + * @param inputEncoding The `encoding` of an `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer; + computeSecret( + otherPublicKey: NodeJS.ArrayBufferView, + inputEncoding: null, + outputEncoding: BinaryToTextEncoding, + ): string; + computeSecret( + otherPublicKey: string, + inputEncoding: BinaryToTextEncoding, + outputEncoding: BinaryToTextEncoding, + ): string; + /** + * Returns the Diffie-Hellman prime in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrime(): Buffer; + getPrime(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman generator in the specified `encoding`. + * If `encoding` is provided a string is + * returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getGenerator(): Buffer; + getGenerator(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman public key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPublicKey(): Buffer; + getPublicKey(encoding: BinaryToTextEncoding): string; + /** + * Returns the Diffie-Hellman private key in the specified `encoding`. + * If `encoding` is provided a + * string is returned; otherwise a `Buffer` is returned. + * @since v0.5.0 + * @param encoding The `encoding` of the return value. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected + * to be a string. If no `encoding` is provided, `publicKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * @since v0.5.0 + * @param encoding The `encoding` of the `publicKey` string. + */ + setPublicKey(publicKey: NodeJS.ArrayBufferView): void; + setPublicKey(publicKey: string, encoding: BufferEncoding): void; + /** + * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected + * to be a string. If no `encoding` is provided, `privateKey` is expected + * to be a `Buffer`, `TypedArray`, or `DataView`. + * + * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be + * used to manually provide the public key or to automatically derive it. + * @since v0.5.0 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BufferEncoding): void; + /** + * A bit field containing any warnings and/or errors resulting from a check + * performed during initialization of the `DiffieHellman` object. + * + * The following values are valid for this property (as defined in `node:constants` module): + * + * * `DH_CHECK_P_NOT_SAFE_PRIME` + * * `DH_CHECK_P_NOT_PRIME` + * * `DH_UNABLE_TO_CHECK_GENERATOR` + * * `DH_NOT_SUITABLE_GENERATOR` + * @since v0.11.12 + */ + verifyError: number; + } + /** + * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. + * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. + * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. + * + * ```js + * const { createDiffieHellmanGroup } = await import('node:crypto'); + * const dh = createDiffieHellmanGroup('modp1'); + * ``` + * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): + * ```bash + * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h + * modp1 # 768 bits + * modp2 # 1024 bits + * modp5 # 1536 bits + * modp14 # 2048 bits + * modp15 # etc. + * modp16 + * modp17 + * modp18 + * ``` + * @since v0.7.5 + */ + const DiffieHellmanGroup: DiffieHellmanGroupConstructor; + interface DiffieHellmanGroupConstructor { + new(name: string): DiffieHellmanGroup; + (name: string): DiffieHellmanGroup; + readonly prototype: DiffieHellmanGroup; + } + type DiffieHellmanGroup = Omit; + /** + * Creates a predefined `DiffieHellmanGroup` key exchange object. The + * supported groups are listed in the documentation for `DiffieHellmanGroup`. + * + * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing + * the keys (with `diffieHellman.setPublicKey()`, for example). The + * advantage of using this method is that the parties do not have to + * generate nor exchange a group modulus beforehand, saving both processor + * and communication time. + * + * Example (obtaining a shared secret): + * + * ```js + * const { + * getDiffieHellman, + * } = await import('node:crypto'); + * const alice = getDiffieHellman('modp14'); + * const bob = getDiffieHellman('modp14'); + * + * alice.generateKeys(); + * bob.generateKeys(); + * + * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); + * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); + * + * // aliceSecret and bobSecret should be the same + * console.log(aliceSecret === bobSecret); + * ``` + * @since v0.7.5 + */ + function getDiffieHellman(groupName: string): DiffieHellmanGroup; + /** + * An alias for {@link getDiffieHellman} + * @since v0.9.3 + */ + function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; + /** + * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be + * thrown if any of the input arguments specify invalid values or types. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2, + * } = await import('node:crypto'); + * + * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * @since v0.5.5 + */ + function pbkdf2( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + /** + * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) + * implementation. A selected HMAC digest algorithm specified by `digest` is + * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`. + * + * If an error occurs an `Error` will be thrown, otherwise the derived key will be + * returned as a `Buffer`. + * + * The `iterations` argument must be a number set as high as possible. The + * higher the number of iterations, the more secure the derived key will be, + * but will take a longer amount of time to complete. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * ```js + * const { + * pbkdf2Sync, + * } = await import('node:crypto'); + * + * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); + * console.log(key.toString('hex')); // '3745e48...08d59ae' + * ``` + * + * An array of supported digest functions can be retrieved using {@link getHashes}. + * @since v0.9.3 + */ + function pbkdf2Sync( + password: BinaryLike, + salt: BinaryLike, + iterations: number, + keylen: number, + digest: string, + ): Buffer; + /** + * Generates cryptographically strong pseudorandom data. The `size` argument + * is a number indicating the number of bytes to generate. + * + * If a `callback` function is provided, the bytes are generated asynchronously + * and the `callback` function is invoked with two arguments: `err` and `buf`. + * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes. + * + * ```js + * // Asynchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * randomBytes(256, (err, buf) => { + * if (err) throw err; + * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); + * }); + * ``` + * + * If the `callback` function is not provided, the random bytes are generated + * synchronously and returned as a `Buffer`. An error will be thrown if + * there is a problem generating the bytes. + * + * ```js + * // Synchronous + * const { + * randomBytes, + * } = await import('node:crypto'); + * + * const buf = randomBytes(256); + * console.log( + * `${buf.length} bytes of random data: ${buf.toString('hex')}`); + * ``` + * + * The `crypto.randomBytes()` method will not complete until there is + * sufficient entropy available. + * This should normally never take longer than a few milliseconds. The only time + * when generating the random bytes may conceivably block for a longer period of + * time is right after boot, when the whole system is still low on entropy. + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomBytes()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomBytes` requests when doing so as part of fulfilling a client + * request. + * @since v0.5.8 + * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. + * @return if the `callback` function is not provided. + */ + function randomBytes(size: number): Buffer; + function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + function pseudoRandomBytes(size: number): Buffer; + function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; + /** + * Return a random integer `n` such that `min <= n < max`. This + * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). + * + * The range (`max - min`) must be less than 2**48. `min` and `max` must + * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + * + * If the `callback` function is not provided, the random integer is + * generated synchronously. + * + * ```js + * // Asynchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * randomInt(3, (err, n) => { + * if (err) throw err; + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * }); + * ``` + * + * ```js + * // Synchronous + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(3); + * console.log(`Random number chosen from (0, 1, 2): ${n}`); + * ``` + * + * ```js + * // With `min` argument + * const { + * randomInt, + * } = await import('node:crypto'); + * + * const n = randomInt(1, 7); + * console.log(`The dice rolled: ${n}`); + * ``` + * @since v14.10.0, v12.19.0 + * @param [min=0] Start of random range (inclusive). + * @param max End of random range (exclusive). + * @param callback `function(err, n) {}`. + */ + function randomInt(max: number): number; + function randomInt(min: number, max: number): number; + function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; + function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; + /** + * Synchronous version of {@link randomFill}. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * console.log(randomFillSync(buf).toString('hex')); + * + * randomFillSync(buf, 5); + * console.log(buf.toString('hex')); + * + * // The above is equivalent to the following: + * randomFillSync(buf, 5, 5); + * console.log(buf.toString('hex')); + * ``` + * + * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFillSync } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * console.log(Buffer.from(randomFillSync(a).buffer, + * a.byteOffset, a.byteLength).toString('hex')); + * + * const b = new DataView(new ArrayBuffer(10)); + * console.log(Buffer.from(randomFillSync(b).buffer, + * b.byteOffset, b.byteLength).toString('hex')); + * + * const c = new ArrayBuffer(10); + * console.log(Buffer.from(randomFillSync(c)).toString('hex')); + * ``` + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @return The object passed as `buffer` argument. + */ + function randomFillSync(buffer: T, offset?: number, size?: number): T; + /** + * This function is similar to {@link randomBytes} but requires the first + * argument to be a `Buffer` that will be filled. It also + * requires that a callback is passed in. + * + * If the `callback` function is not provided, an error will be thrown. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const buf = Buffer.alloc(10); + * randomFill(buf, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * randomFill(buf, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * + * // The above is equivalent to the following: + * randomFill(buf, 5, 5, (err, buf) => { + * if (err) throw err; + * console.log(buf.toString('hex')); + * }); + * ``` + * + * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`. + * + * While this includes instances of `Float32Array` and `Float64Array`, this + * function should not be used to generate random floating-point numbers. The + * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array + * contains finite numbers only, they are not drawn from a uniform random + * distribution and have no meaningful lower or upper bounds. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { randomFill } = await import('node:crypto'); + * + * const a = new Uint32Array(10); + * randomFill(a, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const b = new DataView(new ArrayBuffer(10)); + * randomFill(b, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) + * .toString('hex')); + * }); + * + * const c = new ArrayBuffer(10); + * randomFill(c, (err, buf) => { + * if (err) throw err; + * console.log(Buffer.from(buf).toString('hex')); + * }); + * ``` + * + * This API uses libuv's threadpool, which can have surprising and + * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. + * + * The asynchronous version of `crypto.randomFill()` is carried out in a single + * threadpool request. To minimize threadpool task length variation, partition + * large `randomFill` requests when doing so as part of fulfilling a client + * request. + * @since v7.10.0, v6.13.0 + * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. + * @param [offset=0] + * @param [size=buffer.length - offset] + * @param callback `function(err, buf) {}`. + */ + function randomFill( + buffer: T, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + callback: (err: Error | null, buf: T) => void, + ): void; + function randomFill( + buffer: T, + offset: number, + size: number, + callback: (err: Error | null, buf: T) => void, + ): void; + interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; + } + /** + * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the + * callback as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scrypt, + * } = await import('node:crypto'); + * + * // Using the factory defaults. + * scrypt('password', 'salt', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' + * }); + * // Using a custom N parameter. Must be a power of two. + * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { + * if (err) throw err; + * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' + * }); + * ``` + * @since v10.5.0 + */ + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + function scrypt( + password: BinaryLike, + salt: BinaryLike, + keylen: number, + options: ScryptOptions, + callback: (err: Error | null, derivedKey: Buffer) => void, + ): void; + /** + * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based + * key derivation function that is designed to be expensive computationally and + * memory-wise in order to make brute-force attacks unrewarding. + * + * The `salt` should be as unique as possible. It is recommended that a salt is + * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. + * + * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. + * + * An exception is thrown when key derivation fails, otherwise the derived key is + * returned as a `Buffer`. + * + * An exception is thrown when any of the input arguments specify invalid values + * or types. + * + * ```js + * const { + * scryptSync, + * } = await import('node:crypto'); + * // Using the factory defaults. + * + * const key1 = scryptSync('password', 'salt', 64); + * console.log(key1.toString('hex')); // '3745e48...08d59ae' + * // Using a custom N parameter. Must be a power of two. + * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); + * console.log(key2.toString('hex')); // '3745e48...aa39b34' + * ``` + * @since v10.5.0 + */ + function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; + interface RsaPublicKey { + key: KeyLike; + padding?: number | undefined; + } + interface RsaPrivateKey { + key: KeyLike; + passphrase?: string | undefined; + /** + * @default 'sha1' + */ + oaepHash?: string | undefined; + oaepLabel?: NodeJS.TypedArray | undefined; + padding?: number | undefined; + } + /** + * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using + * the corresponding private key, for example using {@link privateDecrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v0.11.14 + */ + function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `key`.`buffer` was previously encrypted using + * the corresponding private key, for example using {@link privateEncrypt}. + * + * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * + * Because RSA public keys can be derived from private keys, a private key may + * be passed instead of a public key. + * @since v1.1.0 + */ + function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using + * the corresponding public key, for example using {@link publicEncrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`. + * @since v0.11.14 + */ + function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using + * the corresponding public key, for example using {@link publicDecrypt}. + * + * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an + * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`. + * @since v1.1.0 + */ + function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer; + /** + * ```js + * const { + * getCiphers, + * } = await import('node:crypto'); + * + * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] + * ``` + * @since v0.9.3 + * @return An array with the names of the supported cipher algorithms. + */ + function getCiphers(): string[]; + /** + * ```js + * const { + * getCurves, + * } = await import('node:crypto'); + * + * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] + * ``` + * @since v2.3.0 + * @return An array with the names of the supported elliptic curves. + */ + function getCurves(): string[]; + /** + * @since v10.0.0 + * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. + */ + function getFips(): 1 | 0; + /** + * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. + * Throws an error if FIPS mode is not available. + * @since v10.0.0 + * @param bool `true` to enable FIPS mode. + */ + function setFips(bool: boolean): void; + /** + * ```js + * const { + * getHashes, + * } = await import('node:crypto'); + * + * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] + * ``` + * @since v0.9.3 + * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. + */ + function getHashes(): string[]; + /** + * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) + * key exchanges. + * + * Instances of the `ECDH` class can be created using the {@link createECDH} function. + * + * ```js + * import assert from 'node:assert'; + * + * const { + * createECDH, + * } = await import('node:crypto'); + * + * // Generate Alice's keys... + * const alice = createECDH('secp521r1'); + * const aliceKey = alice.generateKeys(); + * + * // Generate Bob's keys... + * const bob = createECDH('secp521r1'); + * const bobKey = bob.generateKeys(); + * + * // Exchange and generate the secret... + * const aliceSecret = alice.computeSecret(bobKey); + * const bobSecret = bob.computeSecret(aliceKey); + * + * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); + * // OK + * ``` + * @since v0.11.14 + */ + class ECDH { + private constructor(); + /** + * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the + * format specified by `format`. The `format` argument specifies point encoding + * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is + * interpreted using the specified `inputEncoding`, and the returned key is encoded + * using the specified `outputEncoding`. + * + * Use {@link getCurves} to obtain a list of available curve names. + * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display + * the name and description of each available elliptic curve. + * + * If `format` is not specified the point will be returned in `'uncompressed'`format. + * + * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * Example (uncompressing a key): + * + * ```js + * const { + * createECDH, + * ECDH, + * } = await import('node:crypto'); + * + * const ecdh = createECDH('secp256k1'); + * ecdh.generateKeys(); + * + * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); + * + * const uncompressedKey = ECDH.convertKey(compressedKey, + * 'secp256k1', + * 'hex', + * 'hex', + * 'uncompressed'); + * + * // The converted key and the uncompressed public key should be the same + * console.log(uncompressedKey === ecdh.getPublicKey('hex')); + * ``` + * @since v10.0.0 + * @param inputEncoding The `encoding` of the `key` string. + * @param outputEncoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + static convertKey( + key: BinaryLike, + curve: string, + inputEncoding?: BinaryToTextEncoding, + outputEncoding?: "latin1" | "hex" | "base64" | "base64url", + format?: "uncompressed" | "compressed" | "hybrid", + ): Buffer | string; + /** + * Generates private and public EC Diffie-Hellman key values, and returns + * the public key in the specified `format` and `encoding`. This key should be + * transferred to the other party. + * + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. + * + * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + */ + generateKeys(): Buffer; + generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Computes the shared secret using `otherPublicKey` as the other + * party's public key and returns the computed shared secret. The supplied + * key is interpreted using specified `inputEncoding`, and the returned secret + * is encoded using the specified `outputEncoding`. + * If the `inputEncoding` is not + * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`. + * + * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. + * + * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is + * usually supplied from a remote user over an insecure network, + * be sure to handle this exception accordingly. + * @since v0.11.14 + * @param inputEncoding The `encoding` of the `otherPublicKey` string. + * @param outputEncoding The `encoding` of the return value. + */ + computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer; + computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer; + computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; + computeSecret( + otherPublicKey: string, + inputEncoding: BinaryToTextEncoding, + outputEncoding: BinaryToTextEncoding, + ): string; + /** + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @return The EC Diffie-Hellman in the specified `encoding`. + */ + getPrivateKey(): Buffer; + getPrivateKey(encoding: BinaryToTextEncoding): string; + /** + * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. + * + * If `encoding` is specified, a string is returned; otherwise a `Buffer` is + * returned. + * @since v0.11.14 + * @param encoding The `encoding` of the return value. + * @param [format='uncompressed'] + * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. + */ + getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer; + getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; + /** + * Sets the EC Diffie-Hellman private key. + * If `encoding` is provided, `privateKey` is expected + * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`. + * + * If `privateKey` is not valid for the curve specified when the `ECDH` object was + * created, an error is thrown. Upon setting the private key, the associated + * public point (key) is also generated and set in the `ECDH` object. + * @since v0.11.14 + * @param encoding The `encoding` of the `privateKey` string. + */ + setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; + setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; + } + /** + * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a + * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent + * OpenSSL releases, `openssl ecparam -list_curves` will also display the name + * and description of each available elliptic curve. + * @since v0.11.14 + */ + function createECDH(curveName: string): ECDH; + /** + * This function compares the underlying bytes that represent the given`ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time + * algorithm. + * + * This function does not leak timing information that + * would allow an attacker to guess one of the values. This is suitable for + * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). + * + * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they + * must have the same byte length. An error is thrown if `a` and `b` have + * different byte lengths. + * + * If at least one of `a` and `b` is a `TypedArray` with more than one byte per + * entry, such as `Uint16Array`, the result will be computed using the platform + * byte order. + * + * **When both of the inputs are `Float32Array`s or`Float64Array`s, this function might return unexpected results due to IEEE 754** + * **encoding of floating-point numbers. In particular, neither `x === y` nor`Object.is(x, y)` implies that the byte representations of two floating-point** + * **numbers `x` and `y` are equal.** + * + * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code + * is timing-safe. Care should be taken to ensure that the surrounding code does + * not introduce timing vulnerabilities. + * @since v6.6.0 + */ + function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; + type KeyType = "rsa" | "rsa-pss" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448"; + type KeyFormat = "pem" | "der" | "jwk"; + interface BasePrivateKeyEncodingOptions { + format: T; + cipher?: string | undefined; + passphrase?: string | undefined; + } + interface KeyPairKeyObjectResult { + publicKey: KeyObject; + privateKey: KeyObject; + } + interface ED25519KeyPairKeyObjectOptions {} + interface ED448KeyPairKeyObjectOptions {} + interface X25519KeyPairKeyObjectOptions {} + interface X448KeyPairKeyObjectOptions {} + interface ECKeyPairKeyObjectOptions { + /** + * Name of the curve to use + */ + namedCurve: string; + /** + * Must be `'named'` or `'explicit'`. Default: `'named'`. + */ + paramEncoding?: "explicit" | "named" | undefined; + } + interface RSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + } + interface RSAPSSKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + } + interface DSAKeyPairKeyObjectOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + } + interface RSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + publicKeyEncoding: { + type: "pkcs1" | "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs1" | "pkcs8"; + }; + } + interface RSAPSSKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Public exponent + * @default 0x10001 + */ + publicExponent?: number | undefined; + /** + * Name of the message digest + */ + hashAlgorithm?: string; + /** + * Name of the message digest used by MGF1 + */ + mgf1HashAlgorithm?: string; + /** + * Minimal salt length in bytes + */ + saltLength?: string; + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface DSAKeyPairOptions { + /** + * Key size in bits + */ + modulusLength: number; + /** + * Size of q in bits + */ + divisorLength: number; + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface ECKeyPairOptions extends ECKeyPairKeyObjectOptions { + publicKeyEncoding: { + type: "pkcs1" | "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "sec1" | "pkcs8"; + }; + } + interface ED25519KeyPairOptions { + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface ED448KeyPairOptions { + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface X25519KeyPairOptions { + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface X448KeyPairOptions { + publicKeyEncoding: { + type: "spki"; + format: PubF; + }; + privateKeyEncoding: BasePrivateKeyEncodingOptions & { + type: "pkcs8"; + }; + } + interface KeyPairSyncResult { + publicKey: T1; + privateKey: T2; + } + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * When encoding public keys, it is recommended to use `'spki'`. When encoding + * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, + * and to keep the passphrase confidential. + * + * ```js + * const { + * generateKeyPairSync, + * } = await import('node:crypto'); + * + * const { + * publicKey, + * privateKey, + * } = generateKeyPairSync('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }); + * ``` + * + * The return value `{ publicKey, privateKey }` represents the generated key pair. + * When PEM encoding was selected, the respective key will be a string, otherwise + * it will be a buffer containing the data encoded as DER. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPairSync( + type: "rsa", + options: RSAKeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa", + options: RSAKeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa", + options: RSAKeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa", + options: RSAKeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "dsa", + options: DSAKeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "dsa", + options: DSAKeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "dsa", + options: DSAKeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "dsa", + options: DSAKeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "ec", + options: ECKeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ec", + options: ECKeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ec", + options: ECKeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ec", + options: ECKeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "ed448", + options: ED448KeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed448", + options: ED448KeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed448", + options: ED448KeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "ed448", + options: ED448KeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "x25519", + options: X25519KeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x25519", + options: X25519KeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x25519", + options: X25519KeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x25519", + options: X25519KeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + function generateKeyPairSync( + type: "x448", + options: X448KeyPairOptions<"pem", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x448", + options: X448KeyPairOptions<"pem", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x448", + options: X448KeyPairOptions<"der", "pem">, + ): KeyPairSyncResult; + function generateKeyPairSync( + type: "x448", + options: X448KeyPairOptions<"der", "der">, + ): KeyPairSyncResult; + function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; + /** + * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, + * Ed25519, Ed448, X25519, X448, and DH are currently supported. + * + * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function + * behaves as if `keyObject.export()` had been called on its result. Otherwise, + * the respective part of the key is returned as a `KeyObject`. + * + * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage: + * + * ```js + * const { + * generateKeyPair, + * } = await import('node:crypto'); + * + * generateKeyPair('rsa', { + * modulusLength: 4096, + * publicKeyEncoding: { + * type: 'spki', + * format: 'pem', + * }, + * privateKeyEncoding: { + * type: 'pkcs8', + * format: 'pem', + * cipher: 'aes-256-cbc', + * passphrase: 'top secret', + * }, + * }, (err, publicKey, privateKey) => { + * // Handle errors and use the generated key pair. + * }); + * ``` + * + * On completion, `callback` will be called with `err` set to `undefined` and`publicKey` / `privateKey` representing the generated key pair. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. + * @since v10.12.0 + * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. + */ + function generateKeyPair( + type: "rsa", + options: RSAKeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "rsa", + options: RSAKeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "rsa", + options: RSAKeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "rsa", + options: RSAKeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "rsa", + options: RSAKeyPairKeyObjectOptions, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "rsa-pss", + options: RSAPSSKeyPairKeyObjectOptions, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "dsa", + options: DSAKeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "dsa", + options: DSAKeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "dsa", + options: DSAKeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "dsa", + options: DSAKeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "dsa", + options: DSAKeyPairKeyObjectOptions, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "ec", + options: ECKeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ec", + options: ECKeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ec", + options: ECKeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ec", + options: ECKeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ec", + options: ECKeyPairKeyObjectOptions, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ed25519", + options: ED25519KeyPairKeyObjectOptions | undefined, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "ed448", + options: ED448KeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ed448", + options: ED448KeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ed448", + options: ED448KeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "ed448", + options: ED448KeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "ed448", + options: ED448KeyPairKeyObjectOptions | undefined, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "x25519", + options: X25519KeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "x25519", + options: X25519KeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "x25519", + options: X25519KeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "x25519", + options: X25519KeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "x25519", + options: X25519KeyPairKeyObjectOptions | undefined, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + function generateKeyPair( + type: "x448", + options: X448KeyPairOptions<"pem", "pem">, + callback: (err: Error | null, publicKey: string, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "x448", + options: X448KeyPairOptions<"pem", "der">, + callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "x448", + options: X448KeyPairOptions<"der", "pem">, + callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void, + ): void; + function generateKeyPair( + type: "x448", + options: X448KeyPairOptions<"der", "der">, + callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void, + ): void; + function generateKeyPair( + type: "x448", + options: X448KeyPairKeyObjectOptions | undefined, + callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, + ): void; + namespace generateKeyPair { + function __promisify__( + type: "rsa", + options: RSAKeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "rsa", + options: RSAKeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "rsa", + options: RSAKeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "rsa", + options: RSAKeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "rsa-pss", + options: RSAPSSKeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__( + type: "rsa-pss", + options: RSAPSSKeyPairKeyObjectOptions, + ): Promise; + function __promisify__( + type: "dsa", + options: DSAKeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "dsa", + options: DSAKeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "dsa", + options: DSAKeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "dsa", + options: DSAKeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: "ec", + options: ECKeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "ec", + options: ECKeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "ec", + options: ECKeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "ec", + options: ECKeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; + function __promisify__( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "ed25519", + options: ED25519KeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "ed25519", + options: ED25519KeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__( + type: "ed25519", + options?: ED25519KeyPairKeyObjectOptions, + ): Promise; + function __promisify__( + type: "ed448", + options: ED448KeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "ed448", + options: ED448KeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "ed448", + options: ED448KeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "ed448", + options: ED448KeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise; + function __promisify__( + type: "x25519", + options: X25519KeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "x25519", + options: X25519KeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "x25519", + options: X25519KeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "x25519", + options: X25519KeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__( + type: "x25519", + options?: X25519KeyPairKeyObjectOptions, + ): Promise; + function __promisify__( + type: "x448", + options: X448KeyPairOptions<"pem", "pem">, + ): Promise<{ + publicKey: string; + privateKey: string; + }>; + function __promisify__( + type: "x448", + options: X448KeyPairOptions<"pem", "der">, + ): Promise<{ + publicKey: string; + privateKey: Buffer; + }>; + function __promisify__( + type: "x448", + options: X448KeyPairOptions<"der", "pem">, + ): Promise<{ + publicKey: Buffer; + privateKey: string; + }>; + function __promisify__( + type: "x448", + options: X448KeyPairOptions<"der", "der">, + ): Promise<{ + publicKey: Buffer; + privateKey: Buffer; + }>; + function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise; + } + /** + * Calculates and returns the signature for `data` using the given private key and + * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is + * dependent upon the key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPrivateKey}. If it is an object, the following + * additional properties can be passed: + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function sign( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, + ): Buffer; + function sign( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, + callback: (error: Error | null, data: Buffer) => void, + ): void; + /** + * Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the + * key type (especially Ed25519 and Ed448). + * + * If `key` is not a `KeyObject`, this function behaves as if `key` had been + * passed to {@link createPublicKey}. If it is an object, the following + * additional properties can be passed: + * + * The `signature` argument is the previously calculated signature for the `data`. + * + * Because public keys can be derived from private keys, a private key or a public + * key may be passed for `key`. + * + * If the `callback` function is provided this function uses libuv's threadpool. + * @since v12.0.0 + */ + function verify( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: NodeJS.ArrayBufferView, + ): boolean; + function verify( + algorithm: string | null | undefined, + data: NodeJS.ArrayBufferView, + key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, + signature: NodeJS.ArrayBufferView, + callback: (error: Error | null, result: boolean) => void, + ): void; + /** + * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. + * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). + * @since v13.9.0, v12.17.0 + */ + function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer; + /** + * A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data + * (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm` + * is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases + * of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms. + * + * Example: + * + * ```js + * const crypto = require('node:crypto'); + * const { Buffer } = require('node:buffer'); + * + * // Hashing a string and return the result as a hex-encoded string. + * const string = 'Node.js'; + * // 10b3493287f831e81a438811a1ffba01f8cec4b7 + * console.log(crypto.hash('sha1', string)); + * + * // Encode a base64-encoded string into a Buffer, hash it and return + * // the result as a buffer. + * const base64 = 'Tm9kZS5qcw=='; + * // + * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); + * ``` + * @since v21.7.0, v20.12.0 + * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user + * could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead. + * @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v20.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest. + */ + function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string; + function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): Buffer; + function hash( + algorithm: string, + data: BinaryLike, + outputEncoding?: BinaryToTextEncoding | "buffer", + ): string | Buffer; + type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; + interface CipherInfoOptions { + /** + * A test key length. + */ + keyLength?: number | undefined; + /** + * A test IV length. + */ + ivLength?: number | undefined; + } + interface CipherInfo { + /** + * The name of the cipher. + */ + name: string; + /** + * The nid of the cipher. + */ + nid: number; + /** + * The block size of the cipher in bytes. + * This property is omitted when mode is 'stream'. + */ + blockSize?: number | undefined; + /** + * The expected or default initialization vector length in bytes. + * This property is omitted if the cipher does not use an initialization vector. + */ + ivLength?: number | undefined; + /** + * The expected or default key length in bytes. + */ + keyLength: number; + /** + * The cipher mode. + */ + mode: CipherMode; + } + /** + * Returns information about a given cipher. + * + * Some ciphers accept variable length keys and initialization vectors. By default, + * the `crypto.getCipherInfo()` method will return the default values for these + * ciphers. To test if a given key length or iv length is acceptable for given + * cipher, use the `keyLength` and `ivLength` options. If the given values are + * unacceptable, `undefined` will be returned. + * @since v15.0.0 + * @param nameOrNid The name or nid of the cipher to query. + */ + function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; + /** + * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. + * + * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set; + * otherwise `err` will be `null`. The successfully generated `derivedKey` will + * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any + * of the input arguments specify invalid values or types. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdf, + * } = await import('node:crypto'); + * + * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { + * if (err) throw err; + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * }); + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdf( + digest: string, + irm: BinaryLike | KeyObject, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + callback: (err: Error | null, derivedKey: ArrayBuffer) => void, + ): void; + /** + * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The + * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes. + * + * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). + * + * An error will be thrown if any of the input arguments specify invalid values or + * types, or if the derived key cannot be generated. + * + * ```js + * import { Buffer } from 'node:buffer'; + * const { + * hkdfSync, + * } = await import('node:crypto'); + * + * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); + * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' + * ``` + * @since v15.0.0 + * @param digest The digest algorithm to use. + * @param ikm The input keying material. Must be provided but can be zero-length. + * @param salt The salt value. Must be provided but can be zero-length. + * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. + * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` + * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). + */ + function hkdfSync( + digest: string, + ikm: BinaryLike | KeyObject, + salt: BinaryLike, + info: BinaryLike, + keylen: number, + ): ArrayBuffer; + interface SecureHeapUsage { + /** + * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. + */ + total: number; + /** + * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. + */ + min: number; + /** + * The total number of bytes currently allocated from the secure heap. + */ + used: number; + /** + * The calculated ratio of `used` to `total` allocated bytes. + */ + utilization: number; + } + /** + * @since v15.6.0 + */ + function secureHeapUsed(): SecureHeapUsage; + interface RandomUUIDOptions { + /** + * By default, to improve performance, + * Node.js will pre-emptively generate and persistently cache enough + * random data to generate up to 128 random UUIDs. To generate a UUID + * without using the cache, set `disableEntropyCache` to `true`. + * + * @default `false` + */ + disableEntropyCache?: boolean | undefined; + } + type UUID = `${string}-${string}-${string}-${string}-${string}`; + /** + * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a + * cryptographic pseudorandom number generator. + * @since v15.6.0, v14.17.0 + */ + function randomUUID(options?: RandomUUIDOptions): UUID; + interface X509CheckOptions { + /** + * @default 'always' + */ + subject?: "always" | "default" | "never"; + /** + * @default true + */ + wildcards?: boolean; + /** + * @default true + */ + partialWildcards?: boolean; + /** + * @default false + */ + multiLabelWildcards?: boolean; + /** + * @default false + */ + singleLabelSubdomains?: boolean; + } + /** + * Encapsulates an X509 certificate and provides read-only access to + * its information. + * + * ```js + * const { X509Certificate } = await import('node:crypto'); + * + * const x509 = new X509Certificate('{... pem encoded cert ...}'); + * + * console.log(x509.subject); + * ``` + * @since v15.6.0 + */ + class X509Certificate { + /** + * Will be \`true\` if this is a Certificate Authority (CA) certificate. + * @since v15.6.0 + */ + readonly ca: boolean; + /** + * The SHA-1 fingerprint of this certificate. + * + * Because SHA-1 is cryptographically broken and because the security of SHA-1 is + * significantly worse than that of algorithms that are commonly used to sign + * certificates, consider using `x509.fingerprint256` instead. + * @since v15.6.0 + */ + readonly fingerprint: string; + /** + * The SHA-256 fingerprint of this certificate. + * @since v15.6.0 + */ + readonly fingerprint256: string; + /** + * The SHA-512 fingerprint of this certificate. + * + * Because computing the SHA-256 fingerprint is usually faster and because it is + * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be + * a better choice. While SHA-512 presumably provides a higher level of security in + * general, the security of SHA-256 matches that of most algorithms that are + * commonly used to sign certificates. + * @since v17.2.0, v16.14.0 + */ + readonly fingerprint512: string; + /** + * The complete subject of this certificate. + * @since v15.6.0 + */ + readonly subject: string; + /** + * The subject alternative name specified for this certificate. + * + * This is a comma-separated list of subject alternative names. Each entry begins + * with a string identifying the kind of the subject alternative name followed by + * a colon and the value associated with the entry. + * + * Earlier versions of Node.js incorrectly assumed that it is safe to split this + * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, + * both malicious and legitimate certificates can contain subject alternative names + * that include this sequence when represented as a string. + * + * After the prefix denoting the type of the entry, the remainder of each entry + * might be enclosed in quotes to indicate that the value is a JSON string literal. + * For backward compatibility, Node.js only uses JSON string literals within this + * property when necessary to avoid ambiguity. Third-party code should be prepared + * to handle both possible entry formats. + * @since v15.6.0 + */ + readonly subjectAltName: string | undefined; + /** + * A textual representation of the certificate's authority information access + * extension. + * + * This is a line feed separated list of access descriptions. Each line begins with + * the access method and the kind of the access location, followed by a colon and + * the value associated with the access location. + * + * After the prefix denoting the access method and the kind of the access location, + * the remainder of each line might be enclosed in quotes to indicate that the + * value is a JSON string literal. For backward compatibility, Node.js only uses + * JSON string literals within this property when necessary to avoid ambiguity. + * Third-party code should be prepared to handle both possible entry formats. + * @since v15.6.0 + */ + readonly infoAccess: string | undefined; + /** + * An array detailing the key usages for this certificate. + * @since v15.6.0 + */ + readonly keyUsage: string[]; + /** + * The issuer identification included in this certificate. + * @since v15.6.0 + */ + readonly issuer: string; + /** + * The issuer certificate or `undefined` if the issuer certificate is not + * available. + * @since v15.9.0 + */ + readonly issuerCertificate?: X509Certificate | undefined; + /** + * The public key `KeyObject` for this certificate. + * @since v15.6.0 + */ + readonly publicKey: KeyObject; + /** + * A `Buffer` containing the DER encoding of this certificate. + * @since v15.6.0 + */ + readonly raw: Buffer; + /** + * The serial number of this certificate. + * + * Serial numbers are assigned by certificate authorities and do not uniquely + * identify certificates. Consider using `x509.fingerprint256` as a unique + * identifier instead. + * @since v15.6.0 + */ + readonly serialNumber: string; + /** + * The date/time from which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validFrom: string; + /** + * The date/time until which this certificate is considered valid. + * @since v15.6.0 + */ + readonly validTo: string; + constructor(buffer: BinaryLike); + /** + * Checks whether the certificate matches the given email address. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any email addresses. + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching email + * address, the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns `email` if the certificate matches, `undefined` if it does not. + */ + checkEmail(email: string, options?: Pick): string | undefined; + /** + * Checks whether the certificate matches the given host name. + * + * If the certificate matches the given host name, the matching subject name is + * returned. The returned name might be an exact match (e.g., `foo.example.com`) + * or it might contain wildcards (e.g., `*.example.com`). Because host name + * comparisons are case-insensitive, the returned subject name might also differ + * from the given `name` in capitalization. + * + * If the `'subject'` option is undefined or set to `'default'`, the certificate + * subject is only considered if the subject alternative name extension either does + * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). + * + * If the `'subject'` option is set to `'always'` and if the subject alternative + * name extension either does not exist or does not contain a matching DNS name, + * the certificate subject is considered. + * + * If the `'subject'` option is set to `'never'`, the certificate subject is never + * considered, even if the certificate contains no subject alternative names. + * @since v15.6.0 + * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. + */ + checkHost(name: string, options?: X509CheckOptions): string | undefined; + /** + * Checks whether the certificate matches the given IP address (IPv4 or IPv6). + * + * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they + * must match the given `ip` address exactly. Other subject alternative names as + * well as the subject field of the certificate are ignored. + * @since v15.6.0 + * @return Returns `ip` if the certificate matches, `undefined` if it does not. + */ + checkIP(ip: string): string | undefined; + /** + * Checks whether this certificate was issued by the given `otherCert`. + * @since v15.6.0 + */ + checkIssued(otherCert: X509Certificate): boolean; + /** + * Checks whether the public key for this certificate is consistent with + * the given private key. + * @since v15.6.0 + * @param privateKey A private key. + */ + checkPrivateKey(privateKey: KeyObject): boolean; + /** + * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded + * certificate. + * @since v15.6.0 + */ + toJSON(): string; + /** + * Returns information about this certificate using the legacy `certificate object` encoding. + * @since v15.6.0 + */ + toLegacyObject(): PeerCertificate; + /** + * Returns the PEM-encoded certificate. + * @since v15.6.0 + */ + toString(): string; + /** + * Verifies that this certificate was signed by the given public key. + * Does not perform any other validation checks on the certificate. + * @since v15.6.0 + * @param publicKey A public key. + */ + verify(publicKey: KeyObject): boolean; + } + type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; + interface GeneratePrimeOptions { + add?: LargeNumberLike | undefined; + rem?: LargeNumberLike | undefined; + /** + * @default false + */ + safe?: boolean | undefined; + bigint?: boolean | undefined; + } + interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { + bigint: true; + } + interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { + bigint?: false | undefined; + } + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsBigInt, + callback: (err: Error | null, prime: bigint) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptionsArrayBuffer, + callback: (err: Error | null, prime: ArrayBuffer) => void, + ): void; + function generatePrime( + size: number, + options: GeneratePrimeOptions, + callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, + ): void; + /** + * Generates a pseudorandom prime of `size` bits. + * + * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime. + * + * The `options.add` and `options.rem` parameters can be used to enforce additional + * requirements, e.g., for Diffie-Hellman: + * + * * If `options.add` and `options.rem` are both set, the prime will satisfy the + * condition that `prime % add = rem`. + * * If only `options.add` is set and `options.safe` is not `true`, the prime will + * satisfy the condition that `prime % add = 1`. + * * If only `options.add` is set and `options.safe` is set to `true`, the prime + * will instead satisfy the condition that `prime % add = 3`. This is necessary + * because `prime % add = 1` for `options.add > 2` would contradict the condition + * enforced by `options.safe`. + * * `options.rem` is ignored if `options.add` is not given. + * + * Both `options.add` and `options.rem` must be encoded as big-endian sequences + * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`. + * + * By default, the prime is encoded as a big-endian sequence of octets + * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. + * @since v15.8.0 + * @param size The size (in bits) of the prime to generate. + */ + function generatePrimeSync(size: number): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; + function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; + function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; + interface CheckPrimeOptions { + /** + * The number of Miller-Rabin probabilistic primality iterations to perform. + * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. + * Care must be used when selecting a number of checks. + * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. + * + * @default 0 + */ + checks?: number | undefined; + } + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + */ + function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; + function checkPrime( + value: LargeNumberLike, + options: CheckPrimeOptions, + callback: (err: Error | null, result: boolean) => void, + ): void; + /** + * Checks the primality of the `candidate`. + * @since v15.8.0 + * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. + * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. + */ + function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; + /** + * Load and set the `engine` for some or all OpenSSL functions (selected by flags). + * + * `engine` could be either an id or a path to the engine's shared library. + * + * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags`is a bit field taking one of or a mix of the following flags (defined in`crypto.constants`): + * + * * `crypto.constants.ENGINE_METHOD_RSA` + * * `crypto.constants.ENGINE_METHOD_DSA` + * * `crypto.constants.ENGINE_METHOD_DH` + * * `crypto.constants.ENGINE_METHOD_RAND` + * * `crypto.constants.ENGINE_METHOD_EC` + * * `crypto.constants.ENGINE_METHOD_CIPHERS` + * * `crypto.constants.ENGINE_METHOD_DIGESTS` + * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` + * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` + * * `crypto.constants.ENGINE_METHOD_ALL` + * * `crypto.constants.ENGINE_METHOD_NONE` + * @since v0.11.11 + * @param flags + */ + function setEngine(engine: string, flags?: number): void; + /** + * A convenient alias for {@link webcrypto.getRandomValues}. This + * implementation is not compliant with the Web Crypto spec, to write + * web-compatible code use {@link webcrypto.getRandomValues} instead. + * @since v17.4.0 + * @return Returns `typedArray`. + */ + function getRandomValues(typedArray: T): T; + /** + * A convenient alias for `crypto.webcrypto.subtle`. + * @since v17.4.0 + */ + const subtle: webcrypto.SubtleCrypto; + /** + * An implementation of the Web Crypto API standard. + * + * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. + * @since v15.0.0 + */ + const webcrypto: webcrypto.Crypto; + namespace webcrypto { + type BufferSource = ArrayBufferView | ArrayBuffer; + type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; + type KeyType = "private" | "public" | "secret"; + type KeyUsage = + | "decrypt" + | "deriveBits" + | "deriveKey" + | "encrypt" + | "sign" + | "unwrapKey" + | "verify" + | "wrapKey"; + type AlgorithmIdentifier = Algorithm | string; + type HashAlgorithmIdentifier = AlgorithmIdentifier; + type NamedCurve = string; + type BigInteger = Uint8Array; + interface AesCbcParams extends Algorithm { + iv: BufferSource; + } + interface AesCtrParams extends Algorithm { + counter: BufferSource; + length: number; + } + interface AesDerivedKeyParams extends Algorithm { + length: number; + } + interface AesGcmParams extends Algorithm { + additionalData?: BufferSource; + iv: BufferSource; + tagLength?: number; + } + interface AesKeyAlgorithm extends KeyAlgorithm { + length: number; + } + interface AesKeyGenParams extends Algorithm { + length: number; + } + interface Algorithm { + name: string; + } + interface EcKeyAlgorithm extends KeyAlgorithm { + namedCurve: NamedCurve; + } + interface EcKeyGenParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcKeyImportParams extends Algorithm { + namedCurve: NamedCurve; + } + interface EcdhKeyDeriveParams extends Algorithm { + public: CryptoKey; + } + interface EcdsaParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface Ed448Params extends Algorithm { + context?: BufferSource; + } + interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: BufferSource; + salt: BufferSource; + } + interface HmacImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface HmacKeyAlgorithm extends KeyAlgorithm { + hash: KeyAlgorithm; + length: number; + } + interface HmacKeyGenParams extends Algorithm { + hash: HashAlgorithmIdentifier; + length?: number; + } + interface JsonWebKey { + alg?: string; + crv?: string; + d?: string; + dp?: string; + dq?: string; + e?: string; + ext?: boolean; + k?: string; + key_ops?: string[]; + kty?: string; + n?: string; + oth?: RsaOtherPrimesInfo[]; + p?: string; + q?: string; + qi?: string; + use?: string; + x?: string; + y?: string; + } + interface KeyAlgorithm { + name: string; + } + interface Pbkdf2Params extends Algorithm { + hash: HashAlgorithmIdentifier; + iterations: number; + salt: BufferSource; + } + interface RsaHashedImportParams extends Algorithm { + hash: HashAlgorithmIdentifier; + } + interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { + hash: KeyAlgorithm; + } + interface RsaHashedKeyGenParams extends RsaKeyGenParams { + hash: HashAlgorithmIdentifier; + } + interface RsaKeyAlgorithm extends KeyAlgorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaKeyGenParams extends Algorithm { + modulusLength: number; + publicExponent: BigInteger; + } + interface RsaOaepParams extends Algorithm { + label?: BufferSource; + } + interface RsaOtherPrimesInfo { + d?: string; + r?: string; + t?: string; + } + interface RsaPssParams extends Algorithm { + saltLength: number; + } + /** + * Calling `require('node:crypto').webcrypto` returns an instance of the `Crypto` class. + * `Crypto` is a singleton that provides access to the remainder of the crypto API. + * @since v15.0.0 + */ + interface Crypto { + /** + * Provides access to the `SubtleCrypto` API. + * @since v15.0.0 + */ + readonly subtle: SubtleCrypto; + /** + * Generates cryptographically strong random values. + * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned. + * + * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted. + * + * An error will be thrown if the given `typedArray` is larger than 65,536 bytes. + * @since v15.0.0 + */ + getRandomValues>(typedArray: T): T; + /** + * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID. + * The UUID is generated using a cryptographic pseudorandom number generator. + * @since v16.7.0 + */ + randomUUID(): UUID; + CryptoKey: CryptoKeyConstructor; + } + // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable. + interface CryptoKeyConstructor { + /** Illegal constructor */ + (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user. + readonly length: 0; + readonly name: "CryptoKey"; + readonly prototype: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface CryptoKey { + /** + * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters. + * @since v15.0.0 + */ + readonly algorithm: KeyAlgorithm; + /** + * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`. + * @since v15.0.0 + */ + readonly extractable: boolean; + /** + * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key. + * @since v15.0.0 + */ + readonly type: KeyType; + /** + * An array of strings identifying the operations for which the key may be used. + * + * The possible usages are: + * - `'encrypt'` - The key may be used to encrypt data. + * - `'decrypt'` - The key may be used to decrypt data. + * - `'sign'` - The key may be used to generate digital signatures. + * - `'verify'` - The key may be used to verify digital signatures. + * - `'deriveKey'` - The key may be used to derive a new key. + * - `'deriveBits'` - The key may be used to derive bits. + * - `'wrapKey'` - The key may be used to wrap another key. + * - `'unwrapKey'` - The key may be used to unwrap another key. + * + * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`). + * @since v15.0.0 + */ + readonly usages: KeyUsage[]; + } + /** + * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair. + * @since v15.0.0 + */ + interface CryptoKeyPair { + /** + * A {@link CryptoKey} whose type will be `'private'`. + * @since v15.0.0 + */ + privateKey: CryptoKey; + /** + * A {@link CryptoKey} whose type will be `'public'`. + * @since v15.0.0 + */ + publicKey: CryptoKey; + } + /** + * @since v15.0.0 + */ + interface SubtleCrypto { + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `key`, + * `subtle.decrypt()` attempts to decipher the provided `data`. If successful, + * the returned promise will be resolved with an `` containing the plaintext result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + decrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + key: CryptoKey, + data: BufferSource, + ): Promise; + /** + * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, + * `subtle.deriveBits()` attempts to generate `length` bits. + * The Node.js implementation requires that when `length` is a number it must be multiple of `8`. + * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed + * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms. + * If successful, the returned promise will be resolved with an `` containing the generated data. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @since v15.0.0 + */ + deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; + deriveBits( + algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, + baseKey: CryptoKey, + length: number, + ): Promise; + /** + * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, + * `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`. + * + * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material, + * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input. + * + * The algorithms currently supported include: + * + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HKDF'` + * - `'PBKDF2'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + deriveKey( + algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, + baseKey: CryptoKey, + derivedKeyAlgorithm: + | AlgorithmIdentifier + | AesDerivedKeyParams + | HmacImportParams + | HkdfParams + | Pbkdf2Params, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + /** + * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`. + * If successful, the returned promise is resolved with an `` containing the computed digest. + * + * If `algorithm` is provided as a ``, it must be one of: + * + * - `'SHA-1'` + * - `'SHA-256'` + * - `'SHA-384'` + * - `'SHA-512'` + * + * If `algorithm` is provided as an ``, it must have a `name` property whose value is one of the above. + * @since v15.0.0 + */ + digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; + /** + * Using the method and parameters specified by `algorithm` and the keying material provided by `key`, + * `subtle.encrypt()` attempts to encipher `data`. If successful, + * the returned promise is resolved with an `` containing the encrypted result. + * + * The algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * @since v15.0.0 + */ + encrypt( + algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + key: CryptoKey, + data: BufferSource, + ): Promise; + /** + * Exports the given key into the specified format, if supported. + * + * If the `` is not extractable, the returned promise will reject. + * + * When `format` is either `'pkcs8'` or `'spki'` and the export is successful, + * the returned promise will be resolved with an `` containing the exported key data. + * + * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a + * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @returns `` containing ``. + * @since v15.0.0 + */ + exportKey(format: "jwk", key: CryptoKey): Promise; + exportKey(format: Exclude, key: CryptoKey): Promise; + /** + * Using the method and parameters provided in `algorithm`, + * `subtle.generateKey()` attempts to generate new keying material. + * Depending the method used, the method may generate either a single `` or a ``. + * + * The `` (public and private key) generating algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * The `` (secret key) generating algorithms supported include: + * + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + generateKey( + algorithm: RsaHashedKeyGenParams | EcKeyGenParams, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + generateKey( + algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + generateKey( + algorithm: AlgorithmIdentifier, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + /** + * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format` + * to create a `` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. + * If the import is successful, the returned promise will be resolved with the created ``. + * + * If importing a `'PBKDF2'` key, `extractable` must be `false`. + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + importKey( + format: "jwk", + keyData: JsonWebKey, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm, + extractable: boolean, + keyUsages: readonly KeyUsage[], + ): Promise; + importKey( + format: Exclude, + keyData: BufferSource, + algorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + /** + * Using the method and parameters given by `algorithm` and the keying material provided by `key`, + * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful, + * the returned promise is resolved with an `` containing the generated signature. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + sign( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, + key: CryptoKey, + data: BufferSource, + ): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `` instance. + * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input) + * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs. + * If successful, the returned promise is resolved with a `` object. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * + * The unwrapped key algorithms supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'RSA-OAEP'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'ECDH'` + * - `'X25519'` + * - `'X448'` + * - `'HMAC'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. + * @since v15.0.0 + */ + unwrapKey( + format: KeyFormat, + wrappedKey: BufferSource, + unwrappingKey: CryptoKey, + unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + unwrappedKeyAlgorithm: + | AlgorithmIdentifier + | RsaHashedImportParams + | EcKeyImportParams + | HmacImportParams + | AesKeyAlgorithm, + extractable: boolean, + keyUsages: KeyUsage[], + ): Promise; + /** + * Using the method and parameters given in `algorithm` and the keying material provided by `key`, + * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`. + * The returned promise is resolved with either `true` or `false`. + * + * The algorithms currently supported include: + * + * - `'RSASSA-PKCS1-v1_5'` + * - `'RSA-PSS'` + * - `'ECDSA'` + * - `'Ed25519'` + * - `'Ed448'` + * - `'HMAC'` + * @since v15.0.0 + */ + verify( + algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, + key: CryptoKey, + signature: BufferSource, + data: BufferSource, + ): Promise; + /** + * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. + * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`, + * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`. + * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, + * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs. + * If successful, the returned promise will be resolved with an `` containing the encrypted key data. + * + * The wrapping algorithms currently supported include: + * + * - `'RSA-OAEP'` + * - `'AES-CTR'` + * - `'AES-CBC'` + * - `'AES-GCM'` + * - `'AES-KW'` + * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. + * @since v15.0.0 + */ + wrapKey( + format: KeyFormat, + key: CryptoKey, + wrappingKey: CryptoKey, + wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, + ): Promise; + } + } + + global { + var crypto: typeof globalThis extends { + crypto: infer T; + onmessage: any; + } ? T + : webcrypto.Crypto; + } +} +declare module "node:crypto" { + export * from "crypto"; +} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts new file mode 100644 index 0000000..3b32bd8 --- /dev/null +++ b/node_modules/@types/node/dgram.d.ts @@ -0,0 +1,596 @@ +/** + * The `node:dgram` module provides an implementation of UDP datagram sockets. + * + * ```js + * import dgram from 'node:dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.error(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dgram.js) + */ +declare module "dgram" { + import { AddressInfo } from "node:net"; + import * as dns from "node:dns"; + import { Abortable, EventEmitter } from "node:events"; + interface RemoteInfo { + address: string; + family: "IPv4" | "IPv6"; + port: number; + size: number; + } + interface BindOptions { + port?: number | undefined; + address?: string | undefined; + exclusive?: boolean | undefined; + fd?: number | undefined; + } + type SocketType = "udp4" | "udp6"; + interface SocketOptions extends Abortable { + type: SocketType; + reuseAddr?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + recvBufferSize?: number | undefined; + sendBufferSize?: number | undefined; + lookup?: + | (( + hostname: string, + options: dns.LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ) => void) + | undefined; + } + /** + * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram + * messages. When `address` and `port` are not passed to `socket.bind()` the + * method will bind the socket to the "all interfaces" address on a random port + * (it does the right thing for both `udp4` and `udp6` sockets). The bound address + * and port can be retrieved using `socket.address().address` and `socket.address().port`. + * + * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: + * + * ```js + * const controller = new AbortController(); + * const { signal } = controller; + * const server = dgram.createSocket({ type: 'udp4', signal }); + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * // Later, when you want to close the server. + * controller.abort(); + * ``` + * @since v0.11.13 + * @param options Available options are: + * @param callback Attached as a listener for `'message'` events. Optional. + */ + function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + /** + * Encapsulates the datagram functionality. + * + * New instances of `dgram.Socket` are created using {@link createSocket}. + * The `new` keyword is not to be used to create `dgram.Socket` instances. + * @since v0.1.99 + */ + class Socket extends EventEmitter { + /** + * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not + * specified, the operating system will choose + * one interface and will add membership to it. To add membership to every + * available interface, call `addMembership` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * + * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: + * + * ```js + * import cluster from 'node:cluster'; + * import dgram from 'node:dgram'; + * + * if (cluster.isPrimary) { + * cluster.fork(); // Works ok. + * cluster.fork(); // Fails with EADDRINUSE. + * } else { + * const s = dgram.createSocket('udp4'); + * s.bind(1234, () => { + * s.addMembership('224.0.0.114'); + * }); + * } + * ``` + * @since v0.6.9 + */ + addMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * Returns an object containing the address information for a socket. + * For UDP sockets, this object will contain `address`, `family`, and `port` properties. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.99 + */ + address(): AddressInfo; + /** + * For UDP sockets, causes the `dgram.Socket` to listen for datagram + * messages on a named `port` and optional `address`. If `port` is not + * specified or is `0`, the operating system will attempt to bind to a + * random port. If `address` is not specified, the operating system will + * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is + * called. + * + * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very + * useful. + * + * A bound datagram socket keeps the Node.js process running to receive + * datagram messages. + * + * If binding fails, an `'error'` event is generated. In rare case (e.g. + * attempting to bind with a closed socket), an `Error` may be thrown. + * + * Example of a UDP server listening on port 41234: + * + * ```js + * import dgram from 'node:dgram'; + * + * const server = dgram.createSocket('udp4'); + * + * server.on('error', (err) => { + * console.error(`server error:\n${err.stack}`); + * server.close(); + * }); + * + * server.on('message', (msg, rinfo) => { + * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); + * }); + * + * server.on('listening', () => { + * const address = server.address(); + * console.log(`server listening ${address.address}:${address.port}`); + * }); + * + * server.bind(41234); + * // Prints: server listening 0.0.0.0:41234 + * ``` + * @since v0.1.99 + * @param callback with no parameters. Called when binding is complete. + */ + bind(port?: number, address?: string, callback?: () => void): this; + bind(port?: number, callback?: () => void): this; + bind(callback?: () => void): this; + bind(options: BindOptions, callback?: () => void): this; + /** + * Close the underlying socket and stop listening for data on it. If a callback is + * provided, it is added as a listener for the `'close'` event. + * @since v0.1.99 + * @param callback Called when the socket has been closed. + */ + close(callback?: () => void): this; + /** + * Associates the `dgram.Socket` to a remote address and port. Every + * message sent by this handle is automatically sent to that destination. Also, + * the socket will only receive messages from that remote peer. + * Trying to call `connect()` on an already connected socket will result + * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not + * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) + * will be used by default. Once the connection is complete, a `'connect'` event + * is emitted and the optional `callback` function is called. In case of failure, + * the `callback` is called or, failing this, an `'error'` event is emitted. + * @since v12.0.0 + * @param callback Called when the connection is completed or on error. + */ + connect(port: number, address?: string, callback?: () => void): void; + connect(port: number, callback: () => void): void; + /** + * A synchronous function that disassociates a connected `dgram.Socket` from + * its remote address. Trying to call `disconnect()` on an unbound or already + * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. + * @since v12.0.0 + */ + disconnect(): void; + /** + * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the + * kernel when the socket is closed or the process terminates, so most apps will + * never have reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v0.6.9 + */ + dropMembership(multicastAddress: string, multicastInterface?: string): void; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_RCVBUF` socket receive buffer size in bytes. + */ + getRecvBufferSize(): number; + /** + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + * @return the `SO_SNDBUF` socket send buffer size in bytes. + */ + getSendBufferSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of bytes queued for sending. + */ + getSendQueueSize(): number; + /** + * @since v18.8.0, v16.19.0 + * @return Number of send requests currently in the queue awaiting to be processed. + */ + getSendQueueCount(): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active. The `socket.ref()` method adds the socket back to the reference + * counting and restores the default behavior. + * + * Calling `socket.ref()` multiples times will have no additional effect. + * + * The `socket.ref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + ref(): this; + /** + * Returns an object containing the `address`, `family`, and `port` of the remote + * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception + * if the socket is not connected. + * @since v12.0.0 + */ + remoteAddress(): AddressInfo; + /** + * Broadcasts a datagram on the socket. + * For connectionless sockets, the destination `port` and `address` must be + * specified. Connected sockets, on the other hand, will use their associated + * remote endpoint, so the `port` and `address` arguments must not be set. + * + * The `msg` argument contains the message to be sent. + * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, + * any `TypedArray` or a `DataView`, + * the `offset` and `length` specify the offset within the `Buffer` where the + * message begins and the number of bytes in the message, respectively. + * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that + * contain multi-byte characters, `offset` and `length` will be calculated with + * respect to `byte length` and not the character position. + * If `msg` is an array, `offset` and `length` must not be specified. + * + * The `address` argument is a string. If the value of `address` is a host name, + * DNS will be used to resolve the address of the host. If `address` is not + * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default. + * + * If the socket has not been previously bound with a call to `bind`, the socket + * is assigned a random port number and is bound to the "all interfaces" address + * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) + * + * An optional `callback` function may be specified to as a way of reporting + * DNS errors or for determining when it is safe to reuse the `buf` object. + * DNS lookups delay the time to send for at least one tick of the + * Node.js event loop. + * + * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be + * passed as the first argument to the `callback`. If a `callback` is not given, + * the error is emitted as an `'error'` event on the `socket` object. + * + * Offset and length are optional but both _must_ be set if either are used. + * They are supported only when the first argument is a `Buffer`, a `TypedArray`, + * or a `DataView`. + * + * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. + * + * Example of sending a UDP packet to a port on `localhost`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.send(message, 41234, 'localhost', (err) => { + * client.close(); + * }); + * ``` + * + * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const buf1 = Buffer.from('Some '); + * const buf2 = Buffer.from('bytes'); + * const client = dgram.createSocket('udp4'); + * client.send([buf1, buf2], 41234, (err) => { + * client.close(); + * }); + * ``` + * + * Sending multiple buffers might be faster or slower depending on the + * application and operating system. Run benchmarks to + * determine the optimal strategy on a case-by-case basis. Generally speaking, + * however, sending multiple buffers is faster. + * + * Example of sending a UDP packet using a socket connected to a port on `localhost`: + * + * ```js + * import dgram from 'node:dgram'; + * import { Buffer } from 'node:buffer'; + * + * const message = Buffer.from('Some bytes'); + * const client = dgram.createSocket('udp4'); + * client.connect(41234, 'localhost', (err) => { + * client.send(message, (err) => { + * client.close(); + * }); + * }); + * ``` + * @since v0.1.99 + * @param msg Message to be sent. + * @param offset Offset in the buffer where the message starts. + * @param length Number of bytes in the message. + * @param port Destination port. + * @param address Destination host name or IP address. + * @param callback Called when the message has been sent. + */ + send( + msg: string | Uint8Array | readonly any[], + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | Uint8Array | readonly any[], + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | Uint8Array | readonly any[], + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | Uint8Array, + offset: number, + length: number, + port?: number, + address?: string, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | Uint8Array, + offset: number, + length: number, + port?: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + send( + msg: string | Uint8Array, + offset: number, + length: number, + callback?: (error: Error | null, bytes: number) => void, + ): void; + /** + * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP + * packets may be sent to a local interface's broadcast address. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.6.9 + */ + setBroadcast(flag: boolean): void; + /** + * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC + * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ + * _with a scope index is written as `'IP%scope'` where scope is an interface name_ + * _or interface number._ + * + * Sets the default outgoing multicast interface of the socket to a chosen + * interface or back to system interface selection. The `multicastInterface` must + * be a valid string representation of an IP from the socket's family. + * + * For IPv4 sockets, this should be the IP configured for the desired physical + * interface. All packets sent to multicast on the socket will be sent on the + * interface determined by the most recent successful use of this call. + * + * For IPv6 sockets, `multicastInterface` should include a scope to indicate the + * interface as in the examples that follow. In IPv6, individual `send` calls can + * also use explicit scope in addresses, so only packets sent to a multicast + * address without specifying an explicit scope are affected by the most recent + * successful use of this call. + * + * This method throws `EBADF` if called on an unbound socket. + * + * #### Example: IPv6 outgoing multicast interface + * + * On most systems, where scope format uses the interface name: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%eth1'); + * }); + * ``` + * + * On Windows, where scope format uses an interface number: + * + * ```js + * const socket = dgram.createSocket('udp6'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('::%2'); + * }); + * ``` + * + * #### Example: IPv4 outgoing multicast interface + * + * All systems use an IP of the host on the desired physical interface: + * + * ```js + * const socket = dgram.createSocket('udp4'); + * + * socket.bind(1234, () => { + * socket.setMulticastInterface('10.0.0.2'); + * }); + * ``` + * @since v8.6.0 + */ + setMulticastInterface(multicastInterface: string): void; + /** + * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, + * multicast packets will also be received on the local interface. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastLoopback(flag: boolean): boolean; + /** + * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for + * "Time to Live", in this context it specifies the number of IP hops that a + * packet is allowed to travel through, specifically for multicast traffic. Each + * router or gateway that forwards a packet decrements the TTL. If the TTL is + * decremented to 0 by a router, it will not be forwarded. + * + * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.3.8 + */ + setMulticastTTL(ttl: number): number; + /** + * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setRecvBufferSize(size: number): void; + /** + * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer + * in bytes. + * + * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. + * @since v8.7.0 + */ + setSendBufferSize(size: number): void; + /** + * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", + * in this context it specifies the number of IP hops that a packet is allowed to + * travel through. Each router or gateway that forwards a packet decrements the + * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. + * Changing TTL values is typically done for network probes or when multicasting. + * + * The `ttl` argument may be between 1 and 255\. The default on most systems + * is 64. + * + * This method throws `EBADF` if called on an unbound socket. + * @since v0.1.101 + */ + setTTL(ttl: number): number; + /** + * By default, binding a socket will cause it to block the Node.js process from + * exiting as long as the socket is open. The `socket.unref()` method can be used + * to exclude the socket from the reference counting that keeps the Node.js + * process active, allowing the process to exit even if the socket is still + * listening. + * + * Calling `socket.unref()` multiple times will have no additional effect. + * + * The `socket.unref()` method returns a reference to the socket so calls can be + * chained. + * @since v0.9.1 + */ + unref(): this; + /** + * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket + * option. If the `multicastInterface` argument + * is not specified, the operating system will choose one interface and will add + * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. + * + * When called on an unbound socket, this method will implicitly bind to a random + * port, listening on all interfaces. + * @since v13.1.0, v12.16.0 + */ + addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is + * automatically called by the kernel when the + * socket is closed or the process terminates, so most apps will never have + * reason to call this. + * + * If `multicastInterface` is not specified, the operating system will attempt to + * drop membership on all valid interfaces. + * @since v13.1.0, v12.16.0 + */ + dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. error + * 4. listening + * 5. message + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connect"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connect", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connect", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; + /** + * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } +} +declare module "node:dgram" { + export * from "dgram"; +} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts new file mode 100644 index 0000000..c5b365e --- /dev/null +++ b/node_modules/@types/node/diagnostics_channel.d.ts @@ -0,0 +1,545 @@ +/** + * The `node:diagnostics_channel` module provides an API to create named channels + * to report arbitrary message data for diagnostics purposes. + * + * It can be accessed using: + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * ``` + * + * It is intended that a module writer wanting to report diagnostics messages + * will create one or many top-level channels to report messages through. + * Channels may also be acquired at runtime but it is not encouraged + * due to the additional overhead of doing so. Channels may be exported for + * convenience, but as long as the name is known it can be acquired anywhere. + * + * If you intend for your module to produce diagnostics data for others to + * consume it is recommended that you include documentation of what named + * channels are used along with the shape of the message data. Channel names + * should generally include the module name to avoid collisions with data from + * other modules. + * @since v15.1.0, v14.17.0 + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/diagnostics_channel.js) + */ +declare module "diagnostics_channel" { + import { AsyncLocalStorage } from "node:async_hooks"; + /** + * Check if there are active subscribers to the named channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * if (diagnostics_channel.hasSubscribers('my-channel')) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return If there are active subscribers + */ + function hasSubscribers(name: string | symbol): boolean; + /** + * This is the primary entry-point for anyone wanting to publish to a named + * channel. It produces a channel object which is optimized to reduce overhead at + * publish time as much as possible. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * ``` + * @since v15.1.0, v14.17.0 + * @param name The channel name + * @return The named channel object + */ + function channel(name: string | symbol): Channel; + type ChannelListener = (message: unknown, name: string | symbol) => void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * diagnostics_channel.subscribe('my-channel', (message, name) => { + * // Received data + * }); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The handler to receive channel messages + */ + function subscribe(name: string | symbol, onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with {@link subscribe}. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * function onMessage(message, name) { + * // Received data + * } + * + * diagnostics_channel.subscribe('my-channel', onMessage); + * + * diagnostics_channel.unsubscribe('my-channel', onMessage); + * ``` + * @since v18.7.0, v16.17.0 + * @param name The channel name + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; + /** + * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing + * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); + * + * // or... + * + * const channelsByCollection = diagnostics_channel.tracingChannel({ + * start: diagnostics_channel.channel('tracing:my-channel:start'), + * end: diagnostics_channel.channel('tracing:my-channel:end'), + * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), + * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), + * error: diagnostics_channel.channel('tracing:my-channel:error'), + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` + * @return Collection of channels to trace with + */ + function tracingChannel< + StoreType = unknown, + ContextType extends object = StoreType extends object ? StoreType : object, + >( + nameOrChannels: string | TracingChannelCollection, + ): TracingChannel; + /** + * The class `Channel` represents an individual named channel within the data + * pipeline. It is used to track subscribers and to publish messages when there + * are subscribers present. It exists as a separate object to avoid channel + * lookups at publish time, enabling very fast publish speeds and allowing + * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly + * with `new Channel(name)` is not supported. + * @since v15.1.0, v14.17.0 + */ + class Channel { + readonly name: string | symbol; + /** + * Check if there are active subscribers to this channel. This is helpful if + * the message you want to send might be expensive to prepare. + * + * This API is optional but helpful when trying to publish messages from very + * performance-sensitive code. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * if (channel.hasSubscribers) { + * // There are subscribers, prepare and publish message + * } + * ``` + * @since v15.1.0, v14.17.0 + */ + readonly hasSubscribers: boolean; + private constructor(name: string | symbol); + /** + * Publish a message to any subscribers to the channel. This will trigger + * message handlers synchronously so they will execute within the same context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.publish({ + * some: 'message', + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @param message The message to send to the channel subscribers + */ + publish(message: unknown): void; + /** + * Register a message handler to subscribe to this channel. This message handler + * will be run synchronously whenever a message is published to the channel. Any + * errors thrown in the message handler will trigger an `'uncaughtException'`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.subscribe((message, name) => { + * // Received data + * }); + * ``` + * @since v15.1.0, v14.17.0 + * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)} + * @param onMessage The handler to receive channel messages + */ + subscribe(onMessage: ChannelListener): void; + /** + * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * function onMessage(message, name) { + * // Received data + * } + * + * channel.subscribe(onMessage); + * + * channel.unsubscribe(onMessage); + * ``` + * @since v15.1.0, v14.17.0 + * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)} + * @param onMessage The previous subscribed handler to remove + * @return `true` if the handler was found, `false` otherwise. + */ + unsubscribe(onMessage: ChannelListener): void; + /** + * When `channel.runStores(context, ...)` is called, the given context data + * will be applied to any store bound to the channel. If the store has already been + * bound the previous `transform` function will be replaced with the new one. + * The `transform` function may be omitted to set the given context data as the + * context directly. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (data) => { + * return { data }; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to which to bind the context data + * @param transform Transform context data before setting the store context + */ + bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; + /** + * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store); + * channel.unbindStore(store); + * ``` + * @since v19.9.0 + * @experimental + * @param store The store to unbind from the channel. + * @return `true` if the store was found, `false` otherwise. + */ + unbindStore(store: any): void; + /** + * Applies the given data to any AsyncLocalStorage instances bound to the channel + * for the duration of the given function, then publishes to the channel within + * the scope of that data is applied to the stores. + * + * If a transform function was given to `channel.bindStore(store)` it will be + * applied to transform the message data before it becomes the context value for + * the store. The prior storage context is accessible from within the transform + * function in cases where context linking is required. + * + * The context applied to the store should be accessible in any async code which + * continues from execution which began during the given function, however + * there are some situations in which `context loss` may occur. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const store = new AsyncLocalStorage(); + * + * const channel = diagnostics_channel.channel('my-channel'); + * + * channel.bindStore(store, (message) => { + * const parent = store.getStore(); + * return new Span(message, parent); + * }); + * channel.runStores({ some: 'message' }, () => { + * store.getStore(); // Span({ some: 'message' }) + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param context Message to send to subscribers and bind to stores + * @param fn Handler to run within the entered storage context + * @param thisArg The receiver to be used for the function call. + * @param args Optional arguments to pass to the function. + */ + runStores(): void; + } + interface TracingChannelSubscribers { + start: (message: ContextType) => void; + end: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncStart: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + asyncEnd: ( + message: ContextType & { + error?: unknown; + result?: unknown; + }, + ) => void; + error: ( + message: ContextType & { + error: unknown; + }, + ) => void; + } + interface TracingChannelCollection { + start: Channel; + end: Channel; + asyncStart: Channel; + asyncEnd: Channel; + error: Channel; + } + /** + * The class `TracingChannel` is a collection of `TracingChannel Channels` which + * together express a single traceable action. It is used to formalize and + * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a + * single `TracingChannel` at the top-level of the file rather than creating them + * dynamically. + * @since v19.9.0 + * @experimental + */ + class TracingChannel implements TracingChannelCollection { + start: Channel; + end: Channel; + asyncStart: Channel; + asyncEnd: Channel; + error: Channel; + /** + * Helper to subscribe a collection of functions to the corresponding channels. + * This is the same as calling `channel.subscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.subscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + */ + subscribe(subscribers: TracingChannelSubscribers): void; + /** + * Helper to unsubscribe a collection of functions from the corresponding channels. + * This is the same as calling `channel.unsubscribe(onMessage)` on each channel + * individually. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.unsubscribe({ + * start(message) { + * // Handle start message + * }, + * end(message) { + * // Handle end message + * }, + * asyncStart(message) { + * // Handle asyncStart message + * }, + * asyncEnd(message) { + * // Handle asyncEnd message + * }, + * error(message) { + * // Handle error message + * }, + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param subscribers Set of `TracingChannel Channels` subscribers + * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. + */ + unsubscribe(subscribers: TracingChannelSubscribers): void; + /** + * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. + * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceSync(() => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Function to wrap a trace around + * @param context Shared object to correlate events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceSync( + fn: (this: ThisArg, ...args: Args) => any, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): void; + /** + * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the + * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also + * produce an `error event` if the given function throws an error or the + * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.tracePromise(async () => { + * // Do something + * }, { + * some: 'thing', + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn Promise-returning function to wrap a trace around + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return Chained from promise returned by the given function + */ + tracePromise( + fn: (this: ThisArg, ...args: Args) => Promise, + context?: ContextType, + thisArg?: ThisArg, + ...args: Args + ): void; + /** + * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the + * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or + * the returned + * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all + * events should have any bound stores set to match this trace context. + * + * The `position` will be -1 by default to indicate the final argument should + * be used as the callback. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * + * channels.traceCallback((arg1, callback) => { + * // Do something + * callback(null, 'result'); + * }, 1, { + * some: 'thing', + * }, thisArg, arg1, callback); + * ``` + * + * The callback will also be run with `channel.runStores(context, ...)` which + * enables context loss recovery in some cases. + * + * ```js + * import diagnostics_channel from 'node:diagnostics_channel'; + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const channels = diagnostics_channel.tracingChannel('my-channel'); + * const myStore = new AsyncLocalStorage(); + * + * // The start channel sets the initial store data to something + * // and stores that store data value on the trace context object + * channels.start.bindStore(myStore, (data) => { + * const span = new Span(data); + * data.span = span; + * return span; + * }); + * + * // Then asyncStart can restore from that data it stored previously + * channels.asyncStart.bindStore(myStore, (data) => { + * return data.span; + * }); + * ``` + * @since v19.9.0 + * @experimental + * @param fn callback using function to wrap a trace around + * @param position Zero-indexed argument position of expected callback + * @param context Shared object to correlate trace events through + * @param thisArg The receiver to be used for the function call + * @param args Optional arguments to pass to the function + * @return The return value of the given function + */ + traceCallback any>( + fn: Fn, + position: number | undefined, + context: ContextType | undefined, + thisArg: any, + ...args: Parameters + ): void; + } +} +declare module "node:diagnostics_channel" { + export * from "diagnostics_channel"; +} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts new file mode 100644 index 0000000..92d23b8 --- /dev/null +++ b/node_modules/@types/node/dns.d.ts @@ -0,0 +1,853 @@ +/** + * The `node:dns` module enables name resolution. For example, use it to look up IP + * addresses of host names. + * + * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the + * DNS protocol for lookups. {@link lookup} uses the operating system + * facilities to perform name resolution. It may not need to perform any network + * communication. To perform name resolution the way other applications on the same + * system do, use {@link lookup}. + * + * ```js + * const dns = require('node:dns'); + * + * dns.lookup('example.org', (err, address, family) => { + * console.log('address: %j family: IPv%s', address, family); + * }); + * // address: "93.184.216.34" family: IPv4 + * ``` + * + * All other functions in the `node:dns` module connect to an actual DNS server to + * perform name resolution. They will always use the network to perform DNS + * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform + * DNS queries, bypassing other name-resolution facilities. + * + * ```js + * const dns = require('node:dns'); + * + * dns.resolve4('archive.org', (err, addresses) => { + * if (err) throw err; + * + * console.log(`addresses: ${JSON.stringify(addresses)}`); + * + * addresses.forEach((a) => { + * dns.reverse(a, (err, hostnames) => { + * if (err) { + * throw err; + * } + * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); + * }); + * }); + * }); + * ``` + * + * See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dns.js) + */ +declare module "dns" { + import * as dnsPromises from "node:dns/promises"; + // Supported getaddrinfo flags. + /** + * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are + * only returned if the current system has at least one IPv4 address configured. + */ + export const ADDRCONFIG: number; + /** + * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported + * on some operating systems (e.g. FreeBSD 10.1). + */ + export const V4MAPPED: number; + /** + * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as + * well as IPv4 mapped IPv6 addresses. + */ + export const ALL: number; + export interface LookupOptions { + /** + * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted + * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used + * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. + * @default 0 + */ + family?: number | "IPv4" | "IPv6" | undefined; + /** + * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v20.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be + * passed by bitwise `OR`ing their values. + */ + hints?: number | undefined; + /** + * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. + * @default false + */ + all?: boolean | undefined; + /** + * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 + * addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder()} + * or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). + * @default true (addresses are not reordered) + */ + verbatim?: boolean | undefined; + } + export interface LookupOneOptions extends LookupOptions { + all?: false | undefined; + } + export interface LookupAllOptions extends LookupOptions { + all: true; + } + export interface LookupAddress { + /** + * A string representation of an IPv4 or IPv6 address. + */ + address: string; + /** + * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a + * bug in the name resolution service used by the operating system. + */ + family: number; + } + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then + * IPv4 and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the + * properties `address` and `family`. + * + * On error, `err` is an `Error` object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. + * The implementation uses an operating system facility that can associate names + * with addresses and vice versa. This implementation can have subtle but + * important consequences on the behavior of any Node.js program. Please take some + * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) + * before using `dns.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('node:dns'); + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * dns.lookup('example.com', options, (err, address, family) => + * console.log('address: %j family: IPv%s', address, family)); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dns.lookup('example.com', options, (err, addresses) => + * console.log('addresses: %j', addresses)); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed + * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. + * @since v0.1.90 + */ + export function lookup( + hostname: string, + family: number, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + export function lookup( + hostname: string, + options: LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + export function lookup( + hostname: string, + options: LookupAllOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, + ): void; + export function lookup( + hostname: string, + options: LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, + ): void; + export function lookup( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ): void; + export namespace lookup { + function __promisify__(hostname: string, options: LookupAllOptions): Promise; + function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; + function __promisify__(hostname: string, options: LookupOptions): Promise; + } + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, + * where `err.code` is the error code. + * + * ```js + * const dns = require('node:dns'); + * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { + * console.log(hostname, service); + * // Prints: localhost ssh + * }); + * ``` + * + * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed + * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. + * @since v0.11.14 + */ + export function lookupService( + address: string, + port: number, + callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, + ): void; + export namespace lookupService { + function __promisify__( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + } + export interface ResolveOptions { + ttl: boolean; + } + export interface ResolveWithTtlOptions extends ResolveOptions { + ttl: true; + } + export interface RecordWithTtl { + address: string; + ttl: number; + } + /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ + export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; + export interface AnyARecord extends RecordWithTtl { + type: "A"; + } + export interface AnyAaaaRecord extends RecordWithTtl { + type: "AAAA"; + } + export interface CaaRecord { + critical: number; + issue?: string | undefined; + issuewild?: string | undefined; + iodef?: string | undefined; + contactemail?: string | undefined; + contactphone?: string | undefined; + } + export interface MxRecord { + priority: number; + exchange: string; + } + export interface AnyMxRecord extends MxRecord { + type: "MX"; + } + export interface NaptrRecord { + flags: string; + service: string; + regexp: string; + replacement: string; + order: number; + preference: number; + } + export interface AnyNaptrRecord extends NaptrRecord { + type: "NAPTR"; + } + export interface SoaRecord { + nsname: string; + hostmaster: string; + serial: number; + refresh: number; + retry: number; + expire: number; + minttl: number; + } + export interface AnySoaRecord extends SoaRecord { + type: "SOA"; + } + export interface SrvRecord { + priority: number; + weight: number; + port: number; + name: string; + } + export interface AnySrvRecord extends SrvRecord { + type: "SRV"; + } + export interface AnyTxtRecord { + type: "TXT"; + entries: string[]; + } + export interface AnyNsRecord { + type: "NS"; + value: string; + } + export interface AnyPtrRecord { + type: "PTR"; + value: string; + } + export interface AnyCnameRecord { + type: "CNAME"; + value: string; + } + export type AnyRecord = + | AnyARecord + | AnyAaaaRecord + | AnyCnameRecord + | AnyMxRecord + | AnyNaptrRecord + | AnyNsRecord + | AnyPtrRecord + | AnySoaRecord + | AnySrvRecord + | AnyTxtRecord; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource + * records. The type and structure of individual results varies based on `rrtype`: + * + * + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, + * where `err.code` is one of the `DNS error codes`. + * @since v0.1.27 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + export function resolve( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "A", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "AAAA", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "ANY", + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "CNAME", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "MX", + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "NAPTR", + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "NS", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "PTR", + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "SOA", + callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "SRV", + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: "TXT", + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + export function resolve( + hostname: string, + rrtype: string, + callback: ( + err: NodeJS.ErrnoException | null, + addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[], + ) => void, + ): void; + export namespace resolve { + function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; + function __promisify__(hostname: string, rrtype: "ANY"): Promise; + function __promisify__(hostname: string, rrtype: "MX"): Promise; + function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; + function __promisify__(hostname: string, rrtype: "SOA"): Promise; + function __promisify__(hostname: string, rrtype: "SRV"): Promise; + function __promisify__(hostname: string, rrtype: "TXT"): Promise; + function __promisify__( + hostname: string, + rrtype: string, + ): Promise; + } + /** + * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve4( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve4( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + export function resolve4( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + export namespace resolve4 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of IPv6 addresses. + * @since v0.1.16 + * @param hostname Host name to resolve. + */ + export function resolve6( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export function resolve6( + hostname: string, + options: ResolveWithTtlOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, + ): void; + export function resolve6( + hostname: string, + options: ResolveOptions, + callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, + ): void; + export namespace resolve6 { + function __promisify__(hostname: string): Promise; + function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; + function __promisify__(hostname: string, options?: ResolveOptions): Promise; + } + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). + * @since v0.3.2 + */ + export function resolveCname( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export namespace resolveCname { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function + * will contain an array of certification authority authorization records + * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + export function resolveCaa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, + ): void; + export namespace resolveCaa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v0.1.27 + */ + export function resolveMx( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, + ): void; + export namespace resolveMx { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of + * objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v0.9.12 + */ + export function resolveNaptr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, + ): void; + export namespace resolveNaptr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). + * @since v0.1.90 + */ + export function resolveNs( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export namespace resolveNs { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of strings containing the reply records. + * @since v6.0.0 + */ + export function resolvePtr( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, + ): void; + export namespace resolvePtr { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. The `address` argument passed to the `callback` function will + * be an object with the following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v0.11.10 + */ + export function resolveSoa( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, + ): void; + export namespace resolveSoa { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will + * be an array of objects with the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v0.1.27 + */ + export function resolveSrv( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, + ): void; + export namespace resolveSrv { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a + * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v0.1.27 + */ + export function resolveTxt( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, + ): void; + export namespace resolveTxt { + function __promisify__(hostname: string): Promise; + } + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * The `ret` argument passed to the `callback` function will be an array containing + * various types of records. Each object has a property `type` that indicates the + * type of the current record. And depending on the `type`, additional properties + * will be present on the object: + * + * + * + * Here is an example of the `ret` object passed to the callback: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * + * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see + * [RFC 8482](https://tools.ietf.org/html/rfc8482). + */ + export function resolveAny( + hostname: string, + callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, + ): void; + export namespace resolveAny { + function __promisify__(hostname: string): Promise; + } + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is + * one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v0.1.16 + */ + export function reverse( + ip: string, + callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, + ): void; + /** + * Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `verbatim` defaulting to `false`. + * * `verbatim`: for `verbatim` defaulting to `true`. + * @since v18.17.0 + */ + export function getDefaultResultOrder(): "ipv4first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dns.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dns.setServers()` method must not be called while a DNS query is in + * progress. + * + * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v0.11.3 + * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses + */ + export function setServers(servers: readonly string[]): void; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v0.11.3 + */ + export function getServers(): string[]; + /** + * Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `verbatim` and {@link setDefaultResultOrder} have higher + * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using + * [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main + * thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; + // Error codes + export const NODATA: "NODATA"; + export const FORMERR: "FORMERR"; + export const SERVFAIL: "SERVFAIL"; + export const NOTFOUND: "NOTFOUND"; + export const NOTIMP: "NOTIMP"; + export const REFUSED: "REFUSED"; + export const BADQUERY: "BADQUERY"; + export const BADNAME: "BADNAME"; + export const BADFAMILY: "BADFAMILY"; + export const BADRESP: "BADRESP"; + export const CONNREFUSED: "TIMEOUT"; + export const TIMEOUT: "TIMEOUT"; + export const EOF: "EOF"; + export const FILE: "FILE"; + export const NOMEM: "NOMEM"; + export const DESTRUCTION: "DESTRUCTION"; + export const BADSTR: "BADSTR"; + export const BADFLAGS: "BADFLAGS"; + export const NONAME: "NONAME"; + export const BADHINTS: "BADHINTS"; + export const NOTINITIALIZED: "NOTINITIALIZED"; + export const LOADIPHLPAPI: "LOADIPHLPAPI"; + export const ADDRGETNETWORKPARAMS: "ADDRGETNETWORKPARAMS"; + export const CANCELLED: "CANCELLED"; + export interface ResolverOptions { + /** + * Query timeout in milliseconds, or `-1` to use the default timeout. + */ + timeout?: number | undefined; + /** + * The number of tries the resolver will try contacting each name server before giving up. + * @default 4 + */ + tries?: number; + } + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnssetserversservers) does not affect + * other resolvers: + * + * ```js + * const { Resolver } = require('node:dns'); + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org', (err, addresses) => { + * // ... + * }); + * ``` + * + * The following methods from the `node:dns` module are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v8.3.0 + */ + export class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } + export { dnsPromises as promises }; +} +declare module "node:dns" { + export * from "dns"; +} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts new file mode 100644 index 0000000..8256fcd --- /dev/null +++ b/node_modules/@types/node/dns/promises.d.ts @@ -0,0 +1,473 @@ +/** + * The `dns.promises` API provides an alternative set of asynchronous DNS methods + * that return `Promise` objects rather than using callbacks. The API is accessible + * via `require('node:dns').promises` or `require('node:dns/promises')`. + * @since v10.6.0 + */ +declare module "dns/promises" { + import { + AnyRecord, + CaaRecord, + LookupAddress, + LookupAllOptions, + LookupOneOptions, + LookupOptions, + MxRecord, + NaptrRecord, + RecordWithTtl, + ResolveOptions, + ResolverOptions, + ResolveWithTtlOptions, + SoaRecord, + SrvRecord, + } from "node:dns"; + /** + * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), + * that are currently configured for DNS resolution. A string will include a port + * section if a custom port is used. + * + * ```js + * [ + * '4.4.4.4', + * '2001:4860:4860::8888', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ] + * ``` + * @since v10.6.0 + */ + function getServers(): string[]; + /** + * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or + * AAAA (IPv6) record. All `option` properties are optional. If `options` is an + * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 + * and IPv6 addresses are both returned if found. + * + * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when + * the host name does not exist but also when the lookup fails in other ways + * such as no available file descriptors. + * + * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS + * protocol. The implementation uses an operating system facility that can + * associate names with addresses and vice versa. This implementation can have + * subtle but important consequences on the behavior of any Node.js program. Please + * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before + * using `dnsPromises.lookup()`. + * + * Example usage: + * + * ```js + * const dns = require('node:dns'); + * const dnsPromises = dns.promises; + * const options = { + * family: 6, + * hints: dns.ADDRCONFIG | dns.V4MAPPED, + * }; + * + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('address: %j family: IPv%s', result.address, result.family); + * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 + * }); + * + * // When options.all is true, the result will be an Array. + * options.all = true; + * dnsPromises.lookup('example.com', options).then((result) => { + * console.log('addresses: %j', result); + * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] + * }); + * ``` + * @since v10.6.0 + */ + function lookup(hostname: string, family: number): Promise; + function lookup(hostname: string, options: LookupOneOptions): Promise; + function lookup(hostname: string, options: LookupAllOptions): Promise; + function lookup(hostname: string, options: LookupOptions): Promise; + function lookup(hostname: string): Promise; + /** + * Resolves the given `address` and `port` into a host name and service using + * the operating system's underlying `getnameinfo` implementation. + * + * If `address` is not a valid IP address, a `TypeError` will be thrown. + * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. + * + * ```js + * const dnsPromises = require('node:dns').promises; + * dnsPromises.lookupService('127.0.0.1', 22).then((result) => { + * console.log(result.hostname, result.service); + * // Prints: localhost ssh + * }); + * ``` + * @since v10.6.0 + */ + function lookupService( + address: string, + port: number, + ): Promise<{ + hostname: string; + service: string; + }>; + /** + * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array + * of the resource records. When successful, the `Promise` is resolved with an + * array of resource records. The type and structure of individual results vary + * based on `rrtype`: + * + * + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + * @param hostname Host name to resolve. + * @param [rrtype='A'] Resource record type. + */ + function resolve(hostname: string): Promise; + function resolve(hostname: string, rrtype: "A"): Promise; + function resolve(hostname: string, rrtype: "AAAA"): Promise; + function resolve(hostname: string, rrtype: "ANY"): Promise; + function resolve(hostname: string, rrtype: "CAA"): Promise; + function resolve(hostname: string, rrtype: "CNAME"): Promise; + function resolve(hostname: string, rrtype: "MX"): Promise; + function resolve(hostname: string, rrtype: "NAPTR"): Promise; + function resolve(hostname: string, rrtype: "NS"): Promise; + function resolve(hostname: string, rrtype: "PTR"): Promise; + function resolve(hostname: string, rrtype: "SOA"): Promise; + function resolve(hostname: string, rrtype: "SRV"): Promise; + function resolve(hostname: string, rrtype: "TXT"): Promise; + function resolve( + hostname: string, + rrtype: string, + ): Promise; + /** + * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 + * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve4(hostname: string): Promise; + function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve4(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 + * addresses. + * @since v10.6.0 + * @param hostname Host name to resolve. + */ + function resolve6(hostname: string): Promise; + function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; + function resolve6(hostname: string, options: ResolveOptions): Promise; + /** + * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). + * On success, the `Promise` is resolved with an array containing various types of + * records. Each object has a property `type` that indicates the type of the + * current record. And depending on the `type`, additional properties will be + * present on the object: + * + * + * + * Here is an example of the result object: + * + * ```js + * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, + * { type: 'CNAME', value: 'example.com' }, + * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, + * { type: 'NS', value: 'ns1.example.com' }, + * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, + * { type: 'SOA', + * nsname: 'ns1.example.com', + * hostmaster: 'admin.example.com', + * serial: 156696742, + * refresh: 900, + * retry: 900, + * expire: 1800, + * minttl: 60 } ] + * ``` + * @since v10.6.0 + */ + function resolveAny(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, + * the `Promise` is resolved with an array of objects containing available + * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). + * @since v15.0.0, v14.17.0 + */ + function resolveCaa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, + * the `Promise` is resolved with an array of canonical name records available for + * the `hostname` (e.g. `['bar.example.com']`). + * @since v10.6.0 + */ + function resolveCname(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects + * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). + * @since v10.6.0 + */ + function resolveMx(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array + * of objects with the following properties: + * + * * `flags` + * * `service` + * * `regexp` + * * `replacement` + * * `order` + * * `preference` + * + * ```js + * { + * flags: 's', + * service: 'SIP+D2U', + * regexp: '', + * replacement: '_sip._udp.example.com', + * order: 30, + * preference: 100 + * } + * ``` + * @since v10.6.0 + */ + function resolveNaptr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server + * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). + * @since v10.6.0 + */ + function resolveNs(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings + * containing the reply records. + * @since v10.6.0 + */ + function resolvePtr(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for + * the `hostname`. On success, the `Promise` is resolved with an object with the + * following properties: + * + * * `nsname` + * * `hostmaster` + * * `serial` + * * `refresh` + * * `retry` + * * `expire` + * * `minttl` + * + * ```js + * { + * nsname: 'ns.example.com', + * hostmaster: 'root.example.com', + * serial: 2013101809, + * refresh: 10000, + * retry: 2400, + * expire: 604800, + * minttl: 3600 + * } + * ``` + * @since v10.6.0 + */ + function resolveSoa(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with + * the following properties: + * + * * `priority` + * * `weight` + * * `port` + * * `name` + * + * ```js + * { + * priority: 10, + * weight: 5, + * port: 21223, + * name: 'service.example.com' + * } + * ``` + * @since v10.6.0 + */ + function resolveSrv(hostname: string): Promise; + /** + * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array + * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of + * one record. Depending on the use case, these could be either joined together or + * treated separately. + * @since v10.6.0 + */ + function resolveTxt(hostname: string): Promise; + /** + * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an + * array of host names. + * + * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` + * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). + * @since v10.6.0 + */ + function reverse(ip: string): Promise; + /** + * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). + * The value could be: + * + * * `ipv4first`: for `verbatim` defaulting to `false`. + * * `verbatim`: for `verbatim` defaulting to `true`. + * @since v20.1.0 + */ + function getDefaultResultOrder(): "ipv4first" | "verbatim"; + /** + * Sets the IP address and port of servers to be used when performing DNS + * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted + * addresses. If the port is the IANA default DNS port (53) it can be omitted. + * + * ```js + * dnsPromises.setServers([ + * '4.4.4.4', + * '[2001:4860:4860::8888]', + * '4.4.4.4:1053', + * '[2001:4860:4860::8888]:1053', + * ]); + * ``` + * + * An error will be thrown if an invalid address is provided. + * + * The `dnsPromises.setServers()` method must not be called while a DNS query is in + * progress. + * + * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). + * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with + * subsequent servers provided. Fallback DNS servers will only be used if the + * earlier ones time out or result in some other error. + * @since v10.6.0 + * @param servers array of `RFC 5952` formatted addresses + */ + function setServers(servers: readonly string[]): void; + /** + * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be: + * + * * `ipv4first`: sets default `verbatim` `false`. + * * `verbatim`: sets default `verbatim` `true`. + * + * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). + * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) + * from the main thread won't affect the default dns orders in workers. + * @since v16.4.0, v14.18.0 + * @param order must be `'ipv4first'` or `'verbatim'`. + */ + function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; + const NODATA: "NODATA"; + const FORMERR: "FORMERR"; + const SERVFAIL: "SERVFAIL"; + const NOTFOUND: "NOTFOUND"; + const NOTIMP: "NOTIMP"; + const REFUSED: "REFUSED"; + const BADQUERY: "BADQUERY"; + const BADNAME: "BADNAME"; + const BADFAMILY: "BADFAMILY"; + const BADRESP: "BADRESP"; + const CONNREFUSED: "TIMEOUT"; + const TIMEOUT: "TIMEOUT"; + const EOF: "EOF"; + const FILE: "FILE"; + const NOMEM: "NOMEM"; + const DESTRUCTION: "DESTRUCTION"; + const BADSTR: "BADSTR"; + const BADFLAGS: "BADFLAGS"; + const NONAME: "NONAME"; + const BADHINTS: "BADHINTS"; + const NOTINITIALIZED: "NOTINITIALIZED"; + const LOADIPHLPAPI: "LOADIPHLPAPI"; + const ADDRGETNETWORKPARAMS: "ADDRGETNETWORKPARAMS"; + const CANCELLED: "CANCELLED"; + /** + * An independent resolver for DNS requests. + * + * Creating a new resolver uses the default server settings. Setting + * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect + * other resolvers: + * + * ```js + * const { Resolver } = require('node:dns').promises; + * const resolver = new Resolver(); + * resolver.setServers(['4.4.4.4']); + * + * // This request will use the server at 4.4.4.4, independent of global settings. + * resolver.resolve4('example.org').then((addresses) => { + * // ... + * }); + * + * // Alternatively, the same code can be written using async-await style. + * (async function() { + * const addresses = await resolver.resolve4('example.org'); + * })(); + * ``` + * + * The following methods from the `dnsPromises` API are available: + * + * * `resolver.getServers()` + * * `resolver.resolve()` + * * `resolver.resolve4()` + * * `resolver.resolve6()` + * * `resolver.resolveAny()` + * * `resolver.resolveCaa()` + * * `resolver.resolveCname()` + * * `resolver.resolveMx()` + * * `resolver.resolveNaptr()` + * * `resolver.resolveNs()` + * * `resolver.resolvePtr()` + * * `resolver.resolveSoa()` + * * `resolver.resolveSrv()` + * * `resolver.resolveTxt()` + * * `resolver.reverse()` + * * `resolver.setServers()` + * @since v10.6.0 + */ + class Resolver { + constructor(options?: ResolverOptions); + /** + * Cancel all outstanding DNS queries made by this resolver. The corresponding + * callbacks will be called with an error with code `ECANCELLED`. + * @since v8.3.0 + */ + cancel(): void; + getServers: typeof getServers; + resolve: typeof resolve; + resolve4: typeof resolve4; + resolve6: typeof resolve6; + resolveAny: typeof resolveAny; + resolveCaa: typeof resolveCaa; + resolveCname: typeof resolveCname; + resolveMx: typeof resolveMx; + resolveNaptr: typeof resolveNaptr; + resolveNs: typeof resolveNs; + resolvePtr: typeof resolvePtr; + resolveSoa: typeof resolveSoa; + resolveSrv: typeof resolveSrv; + resolveTxt: typeof resolveTxt; + reverse: typeof reverse; + /** + * The resolver instance will send its requests from the specified IP address. + * This allows programs to specify outbound interfaces when used on multi-homed + * systems. + * + * If a v4 or v6 address is not specified, it is set to the default and the + * operating system will choose a local address automatically. + * + * The resolver will use the v4 local address when making requests to IPv4 DNS + * servers, and the v6 local address when making requests to IPv6 DNS servers. + * The `rrtype` of resolution requests has no impact on the local address used. + * @since v15.1.0, v14.17.0 + * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. + * @param [ipv6='::0'] A string representation of an IPv6 address. + */ + setLocalAddress(ipv4?: string, ipv6?: string): void; + setServers: typeof setServers; + } +} +declare module "node:dns/promises" { + export * from "dns/promises"; +} diff --git a/node_modules/@types/node/dom-events.d.ts b/node_modules/@types/node/dom-events.d.ts new file mode 100644 index 0000000..f47f71d --- /dev/null +++ b/node_modules/@types/node/dom-events.d.ts @@ -0,0 +1,124 @@ +export {}; // Don't export anything! + +//// DOM-like Events +// NB: The Event / EventTarget / EventListener implementations below were copied +// from lib.dom.d.ts, then edited to reflect Node's documentation at +// https://nodejs.org/api/events.html#class-eventtarget. +// Please read that link to understand important implementation differences. + +// This conditional type will be the existing global Event in a browser, or +// the copy below in a Node environment. +type __Event = typeof globalThis extends { onmessage: any; Event: any } ? {} + : { + /** This is not used in Node.js and is provided purely for completeness. */ + readonly bubbles: boolean; + /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */ + cancelBubble: () => void; + /** True if the event was created with the cancelable option */ + readonly cancelable: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly composed: boolean; + /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */ + composedPath(): [EventTarget?]; + /** Alias for event.target. */ + readonly currentTarget: EventTarget | null; + /** Is true if cancelable is true and event.preventDefault() has been called. */ + readonly defaultPrevented: boolean; + /** This is not used in Node.js and is provided purely for completeness. */ + readonly eventPhase: 0 | 2; + /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */ + readonly isTrusted: boolean; + /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */ + preventDefault(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + returnValue: boolean; + /** Alias for event.target. */ + readonly srcElement: EventTarget | null; + /** Stops the invocation of event listeners after the current one completes. */ + stopImmediatePropagation(): void; + /** This is not used in Node.js and is provided purely for completeness. */ + stopPropagation(): void; + /** The `EventTarget` dispatching the event */ + readonly target: EventTarget | null; + /** The millisecond timestamp when the Event object was created. */ + readonly timeStamp: number; + /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ + readonly type: string; + }; + +// See comment above explaining conditional type +type __EventTarget = typeof globalThis extends { onmessage: any; EventTarget: any } ? {} + : { + /** + * Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value. + * + * If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched. + * + * The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification. + * Specifically, the `capture` option is used as part of the key when registering a `listener`. + * Any individual `listener` may be added once with `capture = false`, and once with `capture = true`. + */ + addEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: AddEventListenerOptions | boolean, + ): void; + /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ + dispatchEvent(event: Event): boolean; + /** Removes the event listener in target's event listener list with the same type, callback, and options. */ + removeEventListener( + type: string, + listener: EventListener | EventListenerObject, + options?: EventListenerOptions | boolean, + ): void; + }; + +interface EventInit { + bubbles?: boolean; + cancelable?: boolean; + composed?: boolean; +} + +interface EventListenerOptions { + /** Not directly used by Node.js. Added for API completeness. Default: `false`. */ + capture?: boolean; +} + +interface AddEventListenerOptions extends EventListenerOptions { + /** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */ + once?: boolean; + /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */ + passive?: boolean; + /** The listener will be removed when the given AbortSignal object's `abort()` method is called. */ + signal?: AbortSignal; +} + +interface EventListener { + (evt: Event): void; +} + +interface EventListenerObject { + handleEvent(object: Event): void; +} + +import {} from "events"; // Make this an ambient declaration +declare global { + /** An event which takes place in the DOM. */ + interface Event extends __Event {} + var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T + : { + prototype: __Event; + new(type: string, eventInitDict?: EventInit): __Event; + }; + + /** + * EventTarget is a DOM interface implemented by objects that can + * receive events and may have listeners for them. + */ + interface EventTarget extends __EventTarget {} + var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T + : { + prototype: __EventTarget; + new(): __EventTarget; + }; +} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts new file mode 100644 index 0000000..6a2e4c4 --- /dev/null +++ b/node_modules/@types/node/domain.d.ts @@ -0,0 +1,170 @@ +/** + * **This module is pending deprecation.** Once a replacement API has been + * finalized, this module will be fully deprecated. Most developers should + * **not** have cause to use this module. Users who absolutely must have + * the functionality that domains provide may rely on it for the time being + * but should expect to have to migrate to a different solution + * in the future. + * + * Domains provide a way to handle multiple different IO operations as a + * single group. If any of the event emitters or callbacks registered to a + * domain emit an `'error'` event, or throw an error, then the domain object + * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to + * exit immediately with an error code. + * @deprecated Since v1.4.2 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/domain.js) + */ +declare module "domain" { + import EventEmitter = require("node:events"); + /** + * The `Domain` class encapsulates the functionality of routing errors and + * uncaught exceptions to the active `Domain` object. + * + * To handle the errors that it catches, listen to its `'error'` event. + */ + class Domain extends EventEmitter { + /** + * An array of timers and event emitters that have been explicitly added + * to the domain. + */ + members: Array; + /** + * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly + * pushes the domain onto the domain + * stack managed by the domain module (see {@link exit} for details on the + * domain stack). The call to `enter()` delimits the beginning of a chain of + * asynchronous calls and I/O operations bound to a domain. + * + * Calling `enter()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + enter(): void; + /** + * The `exit()` method exits the current domain, popping it off the domain stack. + * Any time execution is going to switch to the context of a different chain of + * asynchronous calls, it's important to ensure that the current domain is exited. + * The call to `exit()` delimits either the end of or an interruption to the chain + * of asynchronous calls and I/O operations bound to a domain. + * + * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. + * + * Calling `exit()` changes only the active domain, and does not alter the domain + * itself. `enter()` and `exit()` can be called an arbitrary number of times on a + * single domain. + */ + exit(): void; + /** + * Run the supplied function in the context of the domain, implicitly + * binding all event emitters, timers, and low-level requests that are + * created in that context. Optionally, arguments can be passed to + * the function. + * + * This is the most basic way to use a domain. + * + * ```js + * const domain = require('node:domain'); + * const fs = require('node:fs'); + * const d = domain.create(); + * d.on('error', (er) => { + * console.error('Caught error!', er); + * }); + * d.run(() => { + * process.nextTick(() => { + * setTimeout(() => { // Simulating some various async stuff + * fs.open('non-existent file', 'r', (er, fd) => { + * if (er) throw er; + * // proceed... + * }); + * }, 100); + * }); + * }); + * ``` + * + * In this example, the `d.on('error')` handler will be triggered, rather + * than crashing the program. + */ + run(fn: (...args: any[]) => T, ...args: any[]): T; + /** + * Explicitly adds an emitter to the domain. If any event handlers called by + * the emitter throw an error, or if the emitter emits an `'error'` event, it + * will be routed to the domain's `'error'` event, just like with implicit + * binding. + * + * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by + * the domain `'error'` handler. + * + * If the Timer or `EventEmitter` was already bound to a domain, it is removed + * from that one, and bound to this one instead. + * @param emitter emitter or timer to be added to the domain + */ + add(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The opposite of {@link add}. Removes domain handling from the + * specified emitter. + * @param emitter emitter or timer to be removed from the domain + */ + remove(emitter: EventEmitter | NodeJS.Timer): void; + /** + * The returned function will be a wrapper around the supplied callback + * function. When the returned function is called, any errors that are + * thrown will be routed to the domain's `'error'` event. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.bind((er, data) => { + * // If this throws, it will also be passed to the domain. + * return cb(er, data ? JSON.parse(data) : null); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The bound function + */ + bind(callback: T): T; + /** + * This method is almost identical to {@link bind}. However, in + * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. + * + * In this way, the common `if (err) return callback(err);` pattern can be replaced + * with a single error handler in a single place. + * + * ```js + * const d = domain.create(); + * + * function readSomeFile(filename, cb) { + * fs.readFile(filename, 'utf8', d.intercept((data) => { + * // Note, the first argument is never passed to the + * // callback since it is assumed to be the 'Error' argument + * // and thus intercepted by the domain. + * + * // If this throws, it will also be passed to the domain + * // so the error-handling logic can be moved to the 'error' + * // event on the domain instead of being repeated throughout + * // the program. + * return cb(null, JSON.parse(data)); + * })); + * } + * + * d.on('error', (er) => { + * // An error occurred somewhere. If we throw it now, it will crash the program + * // with the normal line number and stack message. + * }); + * ``` + * @param callback The callback function + * @return The intercepted function + */ + intercept(callback: T): T; + } + function create(): Domain; +} +declare module "node:domain" { + export * from "domain"; +} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts new file mode 100644 index 0000000..62d6e7e --- /dev/null +++ b/node_modules/@types/node/events.d.ts @@ -0,0 +1,884 @@ +/** + * Much of the Node.js core API is built around an idiomatic asynchronous + * event-driven architecture in which certain kinds of objects (called "emitters") + * emit named events that cause `Function` objects ("listeners") to be called. + * + * For instance: a `net.Server` object emits an event each time a peer + * connects to it; a `fs.ReadStream` emits an event when the file is opened; + * a `stream` emits an event whenever data is available to be read. + * + * All objects that emit events are instances of the `EventEmitter` class. These + * objects expose an `eventEmitter.on()` function that allows one or more + * functions to be attached to named events emitted by the object. Typically, + * event names are camel-cased strings but any valid JavaScript property key + * can be used. + * + * When the `EventEmitter` object emits an event, all of the functions attached + * to that specific event are called _synchronously_. Any values returned by the + * called listeners are _ignored_ and discarded. + * + * The following example shows a simple `EventEmitter` instance with a single + * listener. The `eventEmitter.on()` method is used to register listeners, while + * the `eventEmitter.emit()` method is used to trigger the event. + * + * ```js + * import { EventEmitter } from 'node:events'; + * + * class MyEmitter extends EventEmitter {} + * + * const myEmitter = new MyEmitter(); + * myEmitter.on('event', () => { + * console.log('an event occurred!'); + * }); + * myEmitter.emit('event'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/events.js) + */ +declare module "events" { + import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; + // NOTE: This class is in the docs but is **not actually exported** by Node. + // If https://github.com/nodejs/node/issues/39903 gets resolved and Node + // actually starts exporting the class, uncomment below. + // import { EventListener, EventListenerObject } from '__dom-events'; + // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */ + // interface NodeEventTarget extends EventTarget { + // /** + // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API. + // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget. + // */ + // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */ + // eventNames(): string[]; + // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */ + // listenerCount(type: string): number; + // /** Node.js-specific alias for `eventTarget.removeListener()`. */ + // off(type: string, listener: EventListener | EventListenerObject): this; + // /** Node.js-specific alias for `eventTarget.addListener()`. */ + // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this; + // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */ + // once(type: string, listener: EventListener | EventListenerObject): this; + // /** + // * Node.js-specific extension to the `EventTarget` class. + // * If `type` is specified, removes all registered listeners for `type`, + // * otherwise removes all registered listeners. + // */ + // removeAllListeners(type: string): this; + // /** + // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`. + // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`. + // */ + // removeListener(type: string, listener: EventListener | EventListenerObject): this; + // } + interface EventEmitterOptions { + /** + * Enables automatic capturing of promise rejection. + */ + captureRejections?: boolean | undefined; + } + interface StaticEventEmitterOptions { + signal?: AbortSignal | undefined; + } + interface EventEmitter = DefaultEventMap> extends NodeJS.EventEmitter {} + type EventMap = Record | DefaultEventMap; + type DefaultEventMap = [never]; + type AnyRest = [...args: any[]]; + type Args = T extends DefaultEventMap ? AnyRest : ( + K extends keyof T ? T[K] : never + ); + type Key = T extends DefaultEventMap ? string | symbol : K | keyof T; + type Key2 = T extends DefaultEventMap ? string | symbol : K & keyof T; + type Listener = T extends DefaultEventMap ? F : ( + K extends keyof T ? ( + T[K] extends unknown[] ? (...args: T[K]) => void : never + ) + : never + ); + type Listener1 = Listener void>; + type Listener2 = Listener; + + /** + * The `EventEmitter` class is defined and exposed by the `node:events` module: + * + * ```js + * import { EventEmitter } from 'node:events'; + * ``` + * + * All `EventEmitter`s emit the event `'newListener'` when new listeners are + * added and `'removeListener'` when existing listeners are removed. + * + * It supports the following option: + * @since v0.1.26 + */ + class EventEmitter = DefaultEventMap> { + constructor(options?: EventEmitterOptions); + + [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; + + /** + * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given + * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. + * The `Promise` will resolve with an array of all the arguments emitted to the + * given event. + * + * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event + * semantics and does not listen to the `'error'` event. + * + * ```js + * import { once, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * process.nextTick(() => { + * ee.emit('myevent', 42); + * }); + * + * const [value] = await once(ee, 'myevent'); + * console.log(value); + * + * const err = new Error('kaboom'); + * process.nextTick(() => { + * ee.emit('error', err); + * }); + * + * try { + * await once(ee, 'myevent'); + * } catch (err) { + * console.error('error happened', err); + * } + * ``` + * + * The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the + * '`error'` event itself, then it is treated as any other kind of event without + * special handling: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * + * once(ee, 'error') + * .then(([err]) => console.log('ok', err.message)) + * .catch((err) => console.error('error', err.message)); + * + * ee.emit('error', new Error('boom')); + * + * // Prints: ok boom + * ``` + * + * An `AbortSignal` can be used to cancel waiting for the event: + * + * ```js + * import { EventEmitter, once } from 'node:events'; + * + * const ee = new EventEmitter(); + * const ac = new AbortController(); + * + * async function foo(emitter, event, signal) { + * try { + * await once(emitter, event, { signal }); + * console.log('event emitted!'); + * } catch (error) { + * if (error.name === 'AbortError') { + * console.error('Waiting for the event was canceled!'); + * } else { + * console.error('There was an error', error.message); + * } + * } + * } + * + * foo(ee, 'foo', ac.signal); + * ac.abort(); // Abort waiting for the event + * ee.emit('foo'); // Prints: Waiting for the event was canceled! + * ``` + * @since v11.13.0, v10.16.0 + */ + static once( + emitter: NodeJS.EventEmitter, + eventName: string | symbol, + options?: StaticEventEmitterOptions, + ): Promise; + static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; + /** + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo')) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * ``` + * + * Returns an `AsyncIterator` that iterates `eventName` events. It will throw + * if the `EventEmitter` emits `'error'`. It removes all listeners when + * exiting the loop. The `value` returned by each iteration is an array + * composed of the emitted event arguments. + * + * An `AbortSignal` can be used to cancel waiting on events: + * + * ```js + * import { on, EventEmitter } from 'node:events'; + * import process from 'node:process'; + * + * const ac = new AbortController(); + * + * (async () => { + * const ee = new EventEmitter(); + * + * // Emit later on + * process.nextTick(() => { + * ee.emit('foo', 'bar'); + * ee.emit('foo', 42); + * }); + * + * for await (const event of on(ee, 'foo', { signal: ac.signal })) { + * // The execution of this inner block is synchronous and it + * // processes one event at a time (even with await). Do not use + * // if concurrent execution is required. + * console.log(event); // prints ['bar'] [42] + * } + * // Unreachable here + * })(); + * + * process.nextTick(() => ac.abort()); + * ``` + * @since v13.6.0, v12.16.0 + * @param eventName The name of the event being listened for + * @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` + */ + static on( + emitter: NodeJS.EventEmitter, + eventName: string, + options?: StaticEventEmitterOptions, + ): AsyncIterableIterator; + /** + * A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. + * + * ```js + * import { EventEmitter, listenerCount } from 'node:events'; + * + * const myEmitter = new EventEmitter(); + * myEmitter.on('event', () => {}); + * myEmitter.on('event', () => {}); + * console.log(listenerCount(myEmitter, 'event')); + * // Prints: 2 + * ``` + * @since v0.9.12 + * @deprecated Since v3.2.0 - Use `listenerCount` instead. + * @param emitter The emitter to query + * @param eventName The event name + */ + static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the event listeners for the + * event target. This is useful for debugging and diagnostic purposes. + * + * ```js + * import { getEventListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * const listener = () => console.log('Events are fun'); + * ee.on('foo', listener); + * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] + * } + * { + * const et = new EventTarget(); + * const listener = () => console.log('Events are fun'); + * et.addEventListener('foo', listener); + * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] + * } + * ``` + * @since v15.2.0, v14.17.0 + */ + static getEventListeners(emitter: EventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; + /** + * Returns the currently set max amount of listeners. + * + * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on + * the emitter. + * + * For `EventTarget`s this is the only way to get the max event listeners for the + * event target. If the number of event handlers on a single EventTarget exceeds + * the max set, the EventTarget will print a warning. + * + * ```js + * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; + * + * { + * const ee = new EventEmitter(); + * console.log(getMaxListeners(ee)); // 10 + * setMaxListeners(11, ee); + * console.log(getMaxListeners(ee)); // 11 + * } + * { + * const et = new EventTarget(); + * console.log(getMaxListeners(et)); // 10 + * setMaxListeners(11, et); + * console.log(getMaxListeners(et)); // 11 + * } + * ``` + * @since v19.9.0 + */ + static getMaxListeners(emitter: EventTarget | NodeJS.EventEmitter): number; + /** + * ```js + * import { setMaxListeners, EventEmitter } from 'node:events'; + * + * const target = new EventTarget(); + * const emitter = new EventEmitter(); + * + * setMaxListeners(5, target, emitter); + * ``` + * @since v15.4.0 + * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. + * @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} + * objects. + */ + static setMaxListeners(n?: number, ...eventTargets: Array): void; + /** + * Listens once to the `abort` event on the provided `signal`. + * + * Listening to the `abort` event on abort signals is unsafe and may + * lead to resource leaks since another third party with the signal can + * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change + * this since it would violate the web standard. Additionally, the original + * API makes it easy to forget to remove listeners. + * + * This API allows safely using `AbortSignal`s in Node.js APIs by solving these + * two issues by listening to the event such that `stopImmediatePropagation` does + * not prevent the listener from running. + * + * Returns a disposable so that it may be unsubscribed from more easily. + * + * ```js + * import { addAbortListener } from 'node:events'; + * + * function example(signal) { + * let disposable; + * try { + * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + * disposable = addAbortListener(signal, (e) => { + * // Do something when signal is aborted. + * }); + * } finally { + * disposable?.[Symbol.dispose](); + * } + * } + * ``` + * @since v20.5.0 + * @experimental + * @return Disposable that removes the `abort` listener. + */ + static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; + /** + * This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. + * + * Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no + * regular `'error'` listener is installed. + * @since v13.6.0, v12.17.0 + */ + static readonly errorMonitor: unique symbol; + /** + * Value: `Symbol.for('nodejs.rejection')` + * + * See how to write a custom `rejection handler`. + * @since v13.4.0, v12.16.0 + */ + static readonly captureRejectionSymbol: unique symbol; + /** + * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) + * + * Change the default `captureRejections` option on all new `EventEmitter` objects. + * @since v13.4.0, v12.16.0 + */ + static captureRejections: boolean; + /** + * By default, a maximum of `10` listeners can be registered for any single + * event. This limit can be changed for individual `EventEmitter` instances + * using the `emitter.setMaxListeners(n)` method. To change the default + * for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property + * can be used. If this value is not a positive number, a `RangeError` is thrown. + * + * Take caution when setting the `events.defaultMaxListeners` because the + * change affects _all_ `EventEmitter` instances, including those created before + * the change is made. However, calling `emitter.setMaxListeners(n)` still has + * precedence over `events.defaultMaxListeners`. + * + * This is not a hard limit. The `EventEmitter` instance will allow + * more listeners to be added but will output a trace warning to stderr indicating + * that a "possible EventEmitter memory leak" has been detected. For any single + * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to + * temporarily avoid this warning: + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.setMaxListeners(emitter.getMaxListeners() + 1); + * emitter.once('event', () => { + * // do stuff + * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); + * }); + * ``` + * + * The `--trace-warnings` command-line flag can be used to display the + * stack trace for such warnings. + * + * The emitted warning can be inspected with `process.on('warning')` and will + * have the additional `emitter`, `type`, and `count` properties, referring to + * the event emitter instance, the event's name and the number of attached + * listeners, respectively. + * Its `name` property is set to `'MaxListenersExceededWarning'`. + * @since v0.11.2 + */ + static defaultMaxListeners: number; + } + import internal = require("node:events"); + namespace EventEmitter { + // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 + export { internal as EventEmitter }; + export interface Abortable { + /** + * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. + */ + signal?: AbortSignal | undefined; + } + + export interface EventEmitterReferencingAsyncResource extends AsyncResource { + readonly eventEmitter: EventEmitterAsyncResource; + } + + export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { + /** + * The type of async event, this is required when instantiating `EventEmitterAsyncResource` + * directly rather than as a child class. + * @default new.target.name if instantiated as a child class. + */ + name?: string; + } + + /** + * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that + * require manual async tracking. Specifically, all events emitted by instances + * of `events.EventEmitterAsyncResource` will run within its `async context`. + * + * ```js + * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; + * import { notStrictEqual, strictEqual } from 'node:assert'; + * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; + * + * // Async tracking tooling will identify this as 'Q'. + * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); + * + * // 'foo' listeners will run in the EventEmitters async context. + * ee1.on('foo', () => { + * strictEqual(executionAsyncId(), ee1.asyncId); + * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); + * }); + * + * const ee2 = new EventEmitter(); + * + * // 'foo' listeners on ordinary EventEmitters that do not track async + * // context, however, run in the same async context as the emit(). + * ee2.on('foo', () => { + * notStrictEqual(executionAsyncId(), ee2.asyncId); + * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); + * }); + * + * Promise.resolve().then(() => { + * ee1.emit('foo'); + * ee2.emit('foo'); + * }); + * ``` + * + * The `EventEmitterAsyncResource` class has the same methods and takes the + * same options as `EventEmitter` and `AsyncResource` themselves. + * @since v17.4.0, v16.14.0 + */ + export class EventEmitterAsyncResource extends EventEmitter { + /** + * @param options Only optional in child class. + */ + constructor(options?: EventEmitterAsyncResourceOptions); + /** + * Call all `destroy` hooks. This should only ever be called once. An error will + * be thrown if it is called more than once. This **must** be manually called. If + * the resource is left to be collected by the GC then the `destroy` hooks will + * never be called. + */ + emitDestroy(): void; + /** + * The unique `asyncId` assigned to the resource. + */ + readonly asyncId: number; + /** + * The same triggerAsyncId that is passed to the AsyncResource constructor. + */ + readonly triggerAsyncId: number; + /** + * The returned `AsyncResource` object has an additional `eventEmitter` property + * that provides a reference to this `EventEmitterAsyncResource`. + */ + readonly asyncResource: EventEmitterReferencingAsyncResource; + } + } + global { + namespace NodeJS { + interface EventEmitter = DefaultEventMap> { + [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; + /** + * Alias for `emitter.on(eventName, listener)`. + * @since v0.1.26 + */ + addListener(eventName: Key, listener: Listener1): this; + /** + * Adds the `listener` function to the end of the listeners array for the event + * named `eventName`. No checks are made to see if the `listener` has already + * been added. Multiple calls passing the same combination of `eventName` and + * `listener` will result in the `listener` being added, and called, multiple times. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.on('foo', () => console.log('a')); + * myEE.prependListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.1.101 + * @param eventName The name of the event. + * @param listener The callback function + */ + on(eventName: Key, listener: Listener1): this; + /** + * Adds a **one-time** `listener` function for the event named `eventName`. The + * next time `eventName` is triggered, this listener is removed and then invoked. + * + * ```js + * server.once('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * + * By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the + * event listener to the beginning of the listeners array. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEE = new EventEmitter(); + * myEE.once('foo', () => console.log('a')); + * myEE.prependOnceListener('foo', () => console.log('b')); + * myEE.emit('foo'); + * // Prints: + * // b + * // a + * ``` + * @since v0.3.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + once(eventName: Key, listener: Listener1): this; + /** + * Removes the specified `listener` from the listener array for the event named `eventName`. + * + * ```js + * const callback = (stream) => { + * console.log('someone connected!'); + * }; + * server.on('connection', callback); + * // ... + * server.removeListener('connection', callback); + * ``` + * + * `removeListener()` will remove, at most, one instance of a listener from the + * listener array. If any single listener has been added multiple times to the + * listener array for the specified `eventName`, then `removeListener()` must be + * called multiple times to remove each instance. + * + * Once an event is emitted, all listeners attached to it at the + * time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution + * will not remove them from`emit()` in progress. Subsequent events behave as expected. + * + * ```js + * import { EventEmitter } from 'node:events'; + * class MyEmitter extends EventEmitter {} + * const myEmitter = new MyEmitter(); + * + * const callbackA = () => { + * console.log('A'); + * myEmitter.removeListener('event', callbackB); + * }; + * + * const callbackB = () => { + * console.log('B'); + * }; + * + * myEmitter.on('event', callbackA); + * + * myEmitter.on('event', callbackB); + * + * // callbackA removes listener callbackB but it will still be called. + * // Internal listener array at time of emit [callbackA, callbackB] + * myEmitter.emit('event'); + * // Prints: + * // A + * // B + * + * // callbackB is now removed. + * // Internal listener array [callbackA] + * myEmitter.emit('event'); + * // Prints: + * // A + * ``` + * + * Because listeners are managed using an internal array, calling this will + * change the position indices of any listener registered _after_ the listener + * being removed. This will not impact the order in which listeners are called, + * but it means that any copies of the listener array as returned by + * the `emitter.listeners()` method will need to be recreated. + * + * When a single function has been added as a handler multiple times for a single + * event (as in the example below), `removeListener()` will remove the most + * recently added instance. In the example the `once('ping')` listener is removed: + * + * ```js + * import { EventEmitter } from 'node:events'; + * const ee = new EventEmitter(); + * + * function pong() { + * console.log('pong'); + * } + * + * ee.on('ping', pong); + * ee.once('ping', pong); + * ee.removeListener('ping', pong); + * + * ee.emit('ping'); + * ee.emit('ping'); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeListener(eventName: Key, listener: Listener1): this; + /** + * Alias for `emitter.removeListener()`. + * @since v10.0.0 + */ + off(eventName: Key, listener: Listener1): this; + /** + * Removes all listeners, or those of the specified `eventName`. + * + * It is bad practice to remove listeners added elsewhere in the code, + * particularly when the `EventEmitter` instance was created by some other + * component or module (e.g. sockets or file streams). + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.1.26 + */ + removeAllListeners(eventName?: Key): this; + /** + * By default `EventEmitter`s will print a warning if more than `10` listeners are + * added for a particular event. This is a useful default that helps finding + * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be + * modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v0.3.5 + */ + setMaxListeners(n: number): this; + /** + * Returns the current max listener value for the `EventEmitter` which is either + * set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}. + * @since v1.0.0 + */ + getMaxListeners(): number; + /** + * Returns a copy of the array of listeners for the event named `eventName`. + * + * ```js + * server.on('connection', (stream) => { + * console.log('someone connected!'); + * }); + * console.log(util.inspect(server.listeners('connection'))); + * // Prints: [ [Function] ] + * ``` + * @since v0.1.26 + */ + listeners(eventName: Key): Array>; + /** + * Returns a copy of the array of listeners for the event named `eventName`, + * including any wrappers (such as those created by `.once()`). + * + * ```js + * import { EventEmitter } from 'node:events'; + * const emitter = new EventEmitter(); + * emitter.once('log', () => console.log('log once')); + * + * // Returns a new Array with a function `onceWrapper` which has a property + * // `listener` which contains the original listener bound above + * const listeners = emitter.rawListeners('log'); + * const logFnWrapper = listeners[0]; + * + * // Logs "log once" to the console and does not unbind the `once` event + * logFnWrapper.listener(); + * + * // Logs "log once" to the console and removes the listener + * logFnWrapper(); + * + * emitter.on('log', () => console.log('log persistently')); + * // Will return a new Array with a single function bound by `.on()` above + * const newListeners = emitter.rawListeners('log'); + * + * // Logs "log persistently" twice + * newListeners[0](); + * emitter.emit('log'); + * ``` + * @since v9.4.0 + */ + rawListeners(eventName: Key): Array>; + /** + * Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments + * to each. + * + * Returns `true` if the event had listeners, `false` otherwise. + * + * ```js + * import { EventEmitter } from 'node:events'; + * const myEmitter = new EventEmitter(); + * + * // First listener + * myEmitter.on('event', function firstListener() { + * console.log('Helloooo! first listener'); + * }); + * // Second listener + * myEmitter.on('event', function secondListener(arg1, arg2) { + * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); + * }); + * // Third listener + * myEmitter.on('event', function thirdListener(...args) { + * const parameters = args.join(', '); + * console.log(`event with parameters ${parameters} in third listener`); + * }); + * + * console.log(myEmitter.listeners('event')); + * + * myEmitter.emit('event', 1, 2, 3, 4, 5); + * + * // Prints: + * // [ + * // [Function: firstListener], + * // [Function: secondListener], + * // [Function: thirdListener] + * // ] + * // Helloooo! first listener + * // event with parameters 1, 2 in second listener + * // event with parameters 1, 2, 3, 4, 5 in third listener + * ``` + * @since v0.1.26 + */ + emit(eventName: Key, ...args: Args): boolean; + /** + * Returns the number of listeners listening for the event named `eventName`. + * If `listener` is provided, it will return how many times the listener is found + * in the list of the listeners of the event. + * @since v3.2.0 + * @param eventName The name of the event being listened for + * @param listener The event handler function + */ + listenerCount(eventName: Key, listener?: Listener2): number; + /** + * Adds the `listener` function to the _beginning_ of the listeners array for the + * event named `eventName`. No checks are made to see if the `listener` has + * already been added. Multiple calls passing the same combination of `eventName` + * and `listener` will result in the `listener` being added, and called, multiple times. + * + * ```js + * server.prependListener('connection', (stream) => { + * console.log('someone connected!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependListener(eventName: Key, listener: Listener1): this; + /** + * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this + * listener is removed, and then invoked. + * + * ```js + * server.prependOnceListener('connection', (stream) => { + * console.log('Ah, we have our first user!'); + * }); + * ``` + * + * Returns a reference to the `EventEmitter`, so that calls can be chained. + * @since v6.0.0 + * @param eventName The name of the event. + * @param listener The callback function + */ + prependOnceListener(eventName: Key, listener: Listener1): this; + /** + * Returns an array listing the events for which the emitter has registered + * listeners. The values in the array are strings or `Symbol`s. + * + * ```js + * import { EventEmitter } from 'node:events'; + * + * const myEE = new EventEmitter(); + * myEE.on('foo', () => {}); + * myEE.on('bar', () => {}); + * + * const sym = Symbol('symbol'); + * myEE.on(sym, () => {}); + * + * console.log(myEE.eventNames()); + * // Prints: [ 'foo', 'bar', Symbol(symbol) ] + * ``` + * @since v6.0.0 + */ + eventNames(): Array<(string | symbol) & Key2>; + } + } + } + export = EventEmitter; +} +declare module "node:events" { + import events = require("events"); + export = events; +} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts new file mode 100644 index 0000000..e68012d --- /dev/null +++ b/node_modules/@types/node/fs.d.ts @@ -0,0 +1,4317 @@ +/** + * The `node:fs` module enables interacting with the file system in a + * way modeled on standard POSIX functions. + * + * To use the promise-based APIs: + * + * ```js + * import * as fs from 'node:fs/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as fs from 'node:fs'; + * ``` + * + * All file system operations have synchronous, callback, and promise-based + * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/fs.js) + */ +declare module "fs" { + import * as stream from "node:stream"; + import { Abortable, EventEmitter } from "node:events"; + import { URL } from "node:url"; + import * as promises from "node:fs/promises"; + export { promises }; + /** + * Valid types for path values in "fs". + */ + export type PathLike = string | Buffer | URL; + export type PathOrFileDescriptor = PathLike | number; + export type TimeLike = string | number | Date; + export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; + export type BufferEncodingOption = + | "buffer" + | { + encoding: "buffer"; + }; + export interface ObjectEncodingOptions { + encoding?: BufferEncoding | null | undefined; + } + export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; + export type OpenMode = number | string; + export type Mode = number | string; + export interface StatsBase { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: T; + ino: T; + mode: T; + nlink: T; + uid: T; + gid: T; + rdev: T; + size: T; + blksize: T; + blocks: T; + atimeMs: T; + mtimeMs: T; + ctimeMs: T; + birthtimeMs: T; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + export interface Stats extends StatsBase {} + /** + * A `fs.Stats` object provides information about a file. + * + * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and + * their synchronous counterparts are of this type. + * If `bigint` in the `options` passed to those methods is true, the numeric values + * will be `bigint` instead of `number`, and the object will contain additional + * nanosecond-precision properties suffixed with `Ns`. + * + * ```console + * Stats { + * dev: 2114, + * ino: 48064969, + * mode: 33188, + * nlink: 1, + * uid: 85, + * gid: 100, + * rdev: 0, + * size: 527, + * blksize: 4096, + * blocks: 8, + * atimeMs: 1318289051000.1, + * mtimeMs: 1318289051000.1, + * ctimeMs: 1318289051000.1, + * birthtimeMs: 1318289051000.1, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * + * `bigint` version: + * + * ```console + * BigIntStats { + * dev: 2114n, + * ino: 48064969n, + * mode: 33188n, + * nlink: 1n, + * uid: 85n, + * gid: 100n, + * rdev: 0n, + * size: 527n, + * blksize: 4096n, + * blocks: 8n, + * atimeMs: 1318289051000n, + * mtimeMs: 1318289051000n, + * ctimeMs: 1318289051000n, + * birthtimeMs: 1318289051000n, + * atimeNs: 1318289051000000000n, + * mtimeNs: 1318289051000000000n, + * ctimeNs: 1318289051000000000n, + * birthtimeNs: 1318289051000000000n, + * atime: Mon, 10 Oct 2011 23:24:11 GMT, + * mtime: Mon, 10 Oct 2011 23:24:11 GMT, + * ctime: Mon, 10 Oct 2011 23:24:11 GMT, + * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } + * ``` + * @since v0.1.21 + */ + export class Stats {} + export interface StatsFsBase { + /** Type of file system. */ + type: T; + /** Optimal transfer block size. */ + bsize: T; + /** Total data blocks in file system. */ + blocks: T; + /** Free blocks in file system. */ + bfree: T; + /** Available blocks for unprivileged users */ + bavail: T; + /** Total file nodes in file system. */ + files: T; + /** Free file nodes in file system. */ + ffree: T; + } + export interface StatsFs extends StatsFsBase {} + /** + * Provides information about a mounted file system. + * + * Objects returned from {@link statfs} and its synchronous counterpart are of + * this type. If `bigint` in the `options` passed to those methods is `true`, the + * numeric values will be `bigint` instead of `number`. + * + * ```console + * StatFs { + * type: 1397114950, + * bsize: 4096, + * blocks: 121938943, + * bfree: 61058895, + * bavail: 61058895, + * files: 999, + * ffree: 1000000 + * } + * ``` + * + * `bigint` version: + * + * ```console + * StatFs { + * type: 1397114950n, + * bsize: 4096n, + * blocks: 121938943n, + * bfree: 61058895n, + * bavail: 61058895n, + * files: 999n, + * ffree: 1000000n + * } + * ``` + * @since v19.6.0, v18.15.0 + */ + export class StatsFs {} + export interface BigIntStatsFs extends StatsFsBase {} + export interface StatFsOptions { + bigint?: boolean | undefined; + } + /** + * A representation of a directory entry, which can be a file or a subdirectory + * within the directory, as returned by reading from an `fs.Dir`. The + * directory entry is a combination of the file name and file type pairs. + * + * Additionally, when {@link readdir} or {@link readdirSync} is called with + * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. + * @since v10.10.0 + */ + export class Dirent { + /** + * Returns `true` if the `fs.Dirent` object describes a regular file. + * @since v10.10.0 + */ + isFile(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a file system + * directory. + * @since v10.10.0 + */ + isDirectory(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a block device. + * @since v10.10.0 + */ + isBlockDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a character device. + * @since v10.10.0 + */ + isCharacterDevice(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a symbolic link. + * @since v10.10.0 + */ + isSymbolicLink(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a first-in-first-out + * (FIFO) pipe. + * @since v10.10.0 + */ + isFIFO(): boolean; + /** + * Returns `true` if the `fs.Dirent` object describes a socket. + * @since v10.10.0 + */ + isSocket(): boolean; + /** + * The file name that this `fs.Dirent` object refers to. The type of this + * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. + * @since v10.10.0 + */ + name: string; + /** + * The base path that this `fs.Dirent` object refers to. + * @since v20.12.0 + */ + parentPath: string; + /** + * Alias for `dirent.parentPath`. + * @since v20.1.0 + * @deprecated Since v20.12.0 + */ + path: string; + } + /** + * A class representing a directory stream. + * + * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + */ + export class Dir implements AsyncIterable { + /** + * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. + * @since v12.12.0 + */ + readonly path: string; + /** + * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. + */ + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Asynchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * + * A promise is returned that will be fulfilled after the resource has been + * closed. + * @since v12.12.0 + */ + close(): Promise; + close(cb: NoParamCallback): void; + /** + * Synchronously close the directory's underlying resource handle. + * Subsequent reads will result in errors. + * @since v12.12.0 + */ + closeSync(): void; + /** + * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. + * + * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null`if there are no more directory entries to read. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + * @return containing {fs.Dirent|null} + */ + read(): Promise; + read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; + /** + * Synchronously read the next directory entry as an `fs.Dirent`. See the + * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. + * + * If there are no more directory entries to read, `null` will be returned. + * + * Directory entries returned by this function are in no particular order as + * provided by the operating system's underlying directory mechanisms. + * Entries added or removed while iterating over the directory might not be + * included in the iteration results. + * @since v12.12.0 + */ + readSync(): Dirent | null; + } + /** + * Class: fs.StatWatcher + * @since v14.3.0, v12.20.0 + * Extends `EventEmitter` + * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. + */ + export interface StatWatcher extends EventEmitter { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.StatWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.StatWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + } + export interface FSWatcher extends EventEmitter { + /** + * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. + * @since v0.5.8 + */ + close(): void; + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have + * no effect. + * + * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally + * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been + * called previously. + * @since v14.3.0, v12.20.0 + */ + ref(): this; + /** + * When called, the active `fs.FSWatcher` object will not require the Node.js + * event loop to remain active. If there is no other activity keeping the + * event loop running, the process may exit before the `fs.FSWatcher` object's + * callback is invoked. Calling `watcher.unref()` multiple times will have + * no effect. + * @since v14.3.0, v12.20.0 + */ + unref(): this; + /** + * events.EventEmitter + * 1. change + * 2. close + * 3. error + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + } + /** + * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. + * @since v0.1.93 + */ + export class ReadStream extends stream.Readable { + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes that have been read so far. + * @since v6.4.0 + */ + bytesRead: number; + /** + * The path to the file the stream is reading from as specified in the first + * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a + * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0, v10.16.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "ready", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "ready", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "ready", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "ready", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "ready", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * * Extends `stream.Writable` + * + * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. + * @since v0.1.93 + */ + export class WriteStream extends stream.Writable { + /** + * Closes `writeStream`. Optionally accepts a + * callback that will be executed once the `writeStream`is closed. + * @since v0.9.4 + */ + close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; + /** + * The number of bytes written so far. Does not include data that is still queued + * for writing. + * @since v0.4.7 + */ + bytesWritten: number; + /** + * The path to the file the stream is writing to as specified in the first + * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a + * `Buffer`. + * @since v0.1.93 + */ + path: string | Buffer; + /** + * This property is `true` if the underlying file has not been opened yet, + * i.e. before the `'ready'` event is emitted. + * @since v11.2.0 + */ + pending: boolean; + /** + * events.EventEmitter + * 1. open + * 2. close + * 3. ready + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "ready", listener: () => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "ready", listener: () => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "ready", listener: () => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "ready", listener: () => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "ready", listener: () => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * Asynchronously rename file at `oldPath` to the pathname provided + * as `newPath`. In the case that `newPath` already exists, it will + * be overwritten. If there is a directory at `newPath`, an error will + * be raised instead. No arguments other than a possible exception are + * given to the completion callback. + * + * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). + * + * ```js + * import { rename } from 'node:fs'; + * + * rename('oldFile.txt', 'newFile.txt', (err) => { + * if (err) throw err; + * console.log('Rename complete!'); + * }); + * ``` + * @since v0.0.2 + */ + export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace rename { + /** + * Asynchronous rename(2) - Change the name or location of a file or directory. + * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; + } + /** + * Renames the file from `oldPath` to `newPath`. Returns `undefined`. + * + * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. + * @since v0.1.21 + */ + export function renameSync(oldPath: PathLike, newPath: PathLike): void; + /** + * Truncates the file. No arguments other than a possible exception are + * given to the completion callback. A file descriptor can also be passed as the + * first argument. In this case, `fs.ftruncate()` is called. + * + * ```js + * import { truncate } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * truncate('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was truncated'); + * }); + * ``` + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * + * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. + * @since v0.8.6 + * @param [len=0] + */ + export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function truncate(path: PathLike, callback: NoParamCallback): void; + export namespace truncate { + /** + * Asynchronous truncate(2) - Truncate a file to a specified length. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(path: PathLike, len?: number | null): Promise; + } + /** + * Truncates the file. Returns `undefined`. A file descriptor can also be + * passed as the first argument. In this case, `fs.ftruncateSync()` is called. + * + * Passing a file descriptor is deprecated and may result in an error being thrown + * in the future. + * @since v0.8.6 + * @param [len=0] + */ + export function truncateSync(path: PathLike, len?: number | null): void; + /** + * Truncates the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. + * + * If the file referred to by the file descriptor was larger than `len` bytes, only + * the first `len` bytes will be retained in the file. + * + * For example, the following program retains only the first four bytes of the + * file: + * + * ```js + * import { open, close, ftruncate } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('temp.txt', 'r+', (err, fd) => { + * if (err) throw err; + * + * try { + * ftruncate(fd, 4, (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * if (err) throw err; + * } + * }); + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void; + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + */ + export function ftruncate(fd: number, callback: NoParamCallback): void; + export namespace ftruncate { + /** + * Asynchronous ftruncate(2) - Truncate a file to a specified length. + * @param fd A file descriptor. + * @param len If not specified, defaults to `0`. + */ + function __promisify__(fd: number, len?: number | null): Promise; + } + /** + * Truncates the file descriptor. Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link ftruncate}. + * @since v0.8.6 + * @param [len=0] + */ + export function ftruncateSync(fd: number, len?: number | null): void; + /** + * Asynchronously changes owner and group of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace chown { + /** + * Asynchronous chown(2) - Change ownership of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Synchronously changes owner and group of a file. Returns `undefined`. + * This is the synchronous version of {@link chown}. + * + * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. + * @since v0.1.97 + */ + export function chownSync(path: PathLike, uid: number, gid: number): void; + /** + * Sets the owner of the file. No arguments other than a possible exception are + * given to the completion callback. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; + export namespace fchown { + /** + * Asynchronous fchown(2) - Change ownership of a file. + * @param fd A file descriptor. + */ + function __promisify__(fd: number, uid: number, gid: number): Promise; + } + /** + * Sets the owner of the file. Returns `undefined`. + * + * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. + * @since v0.4.7 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function fchownSync(fd: number, uid: number, gid: number): void; + /** + * Set the owner of the symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. + */ + export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; + export namespace lchown { + /** + * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, uid: number, gid: number): Promise; + } + /** + * Set the owner for the path. Returns `undefined`. + * + * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + */ + export function lchownSync(path: PathLike, uid: number, gid: number): void; + /** + * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic + * link, then the link is not dereferenced: instead, the timestamps of the + * symbolic link itself are changed. + * + * No arguments other than a possible exception are given to the completion + * callback. + * @since v14.5.0, v12.19.0 + */ + export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace lutimes { + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, + * with the difference that if the path refers to a symbolic link, then the link is not + * dereferenced: instead, the timestamps of the symbolic link itself are changed. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Change the file system timestamps of the symbolic link referenced by `path`. + * Returns `undefined`, or throws an exception when parameters are incorrect or + * the operation fails. This is the synchronous version of {@link lutimes}. + * @since v14.5.0, v12.19.0 + */ + export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Asynchronously changes the permissions of a file. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * + * ```js + * import { chmod } from 'node:fs'; + * + * chmod('my_file.txt', 0o775, (err) => { + * if (err) throw err; + * console.log('The permissions for file "my_file.txt" have been changed!'); + * }); + * ``` + * @since v0.1.30 + */ + export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + export namespace chmod { + /** + * Asynchronous chmod(2) - Change permissions of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link chmod}. + * + * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. + * @since v0.6.7 + */ + export function chmodSync(path: PathLike, mode: Mode): void; + /** + * Sets the permissions on the file. No arguments other than a possible exception + * are given to the completion callback. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; + export namespace fchmod { + /** + * Asynchronous fchmod(2) - Change permissions of a file. + * @param fd A file descriptor. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(fd: number, mode: Mode): Promise; + } + /** + * Sets the permissions on the file. Returns `undefined`. + * + * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. + * @since v0.4.7 + */ + export function fchmodSync(fd: number, mode: Mode): void; + /** + * Changes the permissions on a symbolic link. No arguments other than a possible + * exception are given to the completion callback. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; + /** @deprecated */ + export namespace lchmod { + /** + * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. + */ + function __promisify__(path: PathLike, mode: Mode): Promise; + } + /** + * Changes the permissions on a symbolic link. Returns `undefined`. + * + * This method is only implemented on macOS. + * + * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. + * @deprecated Since v0.4.7 + */ + export function lchmodSync(path: PathLike, mode: Mode): void; + /** + * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * + * {@link stat} follows symbolic links. Use {@link lstat} to look at the + * links themselves. + * + * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. + * Instead, user code should open/read/write the file directly and handle the + * error raised if the file is not available. + * + * To check if a file exists without manipulating it afterwards, {@link access} is recommended. + * + * For example, given the following directory structure: + * + * ```text + * - txtDir + * -- file.txt + * - app.js + * ``` + * + * The next program will check for the stats of the given paths: + * + * ```js + * import { stat } from 'node:fs'; + * + * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; + * + * for (let i = 0; i < pathsToCheck.length; i++) { + * stat(pathsToCheck[i], (err, stats) => { + * console.log(stats.isDirectory()); + * console.log(stats); + * }); + * } + * ``` + * + * The resulting output will resemble: + * + * ```console + * true + * Stats { + * dev: 16777220, + * mode: 16877, + * nlink: 3, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214262, + * size: 96, + * blocks: 0, + * atimeMs: 1561174653071.963, + * mtimeMs: 1561174614583.3518, + * ctimeMs: 1561174626623.5366, + * birthtimeMs: 1561174126937.2893, + * atime: 2019-06-22T03:37:33.072Z, + * mtime: 2019-06-22T03:36:54.583Z, + * ctime: 2019-06-22T03:37:06.624Z, + * birthtime: 2019-06-22T03:28:46.937Z + * } + * false + * Stats { + * dev: 16777220, + * mode: 33188, + * nlink: 1, + * uid: 501, + * gid: 20, + * rdev: 0, + * blksize: 4096, + * ino: 14214074, + * size: 8, + * blocks: 8, + * atimeMs: 1561174616618.8555, + * mtimeMs: 1561174614584, + * ctimeMs: 1561174614583.8145, + * birthtimeMs: 1561174007710.7478, + * atime: 2019-06-22T03:36:56.619Z, + * mtime: 2019-06-22T03:36:54.584Z, + * ctime: 2019-06-22T03:36:54.584Z, + * birthtime: 2019-06-22T03:26:47.711Z + * } + * ``` + * @since v0.0.2 + */ + export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function stat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + export function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + export function stat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + export namespace stat { + /** + * Asynchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + export interface StatSyncFn extends Function { + (path: PathLike, options?: undefined): Stats; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + ( + path: PathLike, + options?: StatSyncOptions & { + bigint?: false | undefined; + }, + ): Stats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: true; + }, + ): BigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { + bigint: boolean; + throwIfNoEntry?: false | undefined; + }, + ): Stats | BigIntStats; + (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; + } + /** + * Synchronous stat(2) - Get file status. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const statSync: StatSyncFn; + /** + * Invokes the callback with the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function fstat( + fd: number, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + export function fstat( + fd: number, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + export function fstat( + fd: number, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + export namespace fstat { + /** + * Asynchronous fstat(2) - Get file status. + * @param fd A file descriptor. + */ + function __promisify__( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; + } + /** + * Retrieves the `fs.Stats` for the file descriptor. + * + * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. + * @since v0.1.95 + */ + export function fstatSync( + fd: number, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Stats; + export function fstatSync( + fd: number, + options: StatOptions & { + bigint: true; + }, + ): BigIntStats; + export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; + /** + * Retrieves the `fs.Stats` for the symbolic link referred to by the path. + * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic + * link, then the link itself is stat-ed, not the file that it refers to. + * + * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. + * @since v0.1.30 + */ + export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function lstat( + path: PathLike, + options: + | (StatOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, + ): void; + export function lstat( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, + ): void; + export function lstat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, + ): void; + export namespace lstat { + /** + * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; + } + /** + * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; + export function statfs( + path: PathLike, + options: + | (StatFsOptions & { + bigint?: false | undefined; + }) + | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, + ): void; + export function statfs( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, + ): void; + export function statfs( + path: PathLike, + options: StatFsOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, + ): void; + export namespace statfs { + /** + * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. + * @param path A path to an existing file or directory on the file system to be queried. + */ + function __promisify__( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatFsOptions): Promise; + } + /** + * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which + * contains `path`. + * + * In case of an error, the `err.code` will be one of `Common System Errors`. + * @since v19.6.0, v18.15.0 + * @param path A path to an existing file or directory on the file system to be queried. + */ + export function statfsSync( + path: PathLike, + options?: StatFsOptions & { + bigint?: false | undefined; + }, + ): StatsFs; + export function statfsSync( + path: PathLike, + options: StatFsOptions & { + bigint: true; + }, + ): BigIntStatsFs; + export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; + /** + * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export const lstatSync: StatSyncFn; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than + * a possible + * exception are given to the completion callback. + * @since v0.1.31 + */ + export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; + export namespace link { + /** + * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. + * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; + } + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.31 + */ + export function linkSync(existingPath: PathLike, newPath: PathLike): void; + /** + * Creates the link called `path` pointing to `target`. No arguments other than a + * possible exception are given to the completion callback. + * + * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. + * + * The `type` argument is only available on Windows and ignored on other platforms. + * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is + * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. + * If the `target` does not exist, `'file'` will be used. Windows junction points + * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction + * points on NTFS volumes can only point to directories. + * + * Relative targets are relative to the link's parent directory. + * + * ```js + * import { symlink } from 'node:fs'; + * + * symlink('./mew', './mewtwo', callback); + * ``` + * + * The above example creates a symbolic link `mewtwo` which points to `mew` in the + * same directory: + * + * ```bash + * $ tree . + * . + * ├── mew + * └── mewtwo -> ./mew + * ``` + * @since v0.1.31 + * @param [type='null'] + */ + export function symlink( + target: PathLike, + path: PathLike, + type: symlink.Type | undefined | null, + callback: NoParamCallback, + ): void; + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + */ + export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; + export namespace symlink { + /** + * Asynchronous symlink(2) - Create a new symbolic link to an existing file. + * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. + * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. + * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). + * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. + */ + function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; + type Type = "dir" | "file" | "junction"; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link symlink}. + * @since v0.1.31 + * @param [type='null'] + */ + export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; + /** + * Reads the contents of the symbolic link referred to by `path`. The callback gets + * two arguments `(err, linkString)`. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path passed to the callback. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlink( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void, + ): void; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readlink( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, + ): void; + export namespace readlink { + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + } + /** + * Returns the symbolic link's string value. + * + * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, + * the link path returned will be passed as a `Buffer` object. + * @since v0.1.31 + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer; + /** + * Asynchronously computes the canonical pathname by resolving `.`, `..`, and + * symbolic links. + * + * A canonical pathname is not necessarily unique. Hard links and bind mounts can + * expose a file system entity through many pathnames. + * + * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: + * + * 1. No case conversion is performed on case-insensitive file systems. + * 2. The maximum number of symbolic links is platform-independent and generally + * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. + * + * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * If `path` resolves to a socket or a pipe, the function will return a system + * dependent name for that object. + * @since v0.1.31 + */ + export function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpath( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void, + ): void; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function realpath( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + export namespace realpath { + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(path: PathLike, options?: EncodingOption): Promise; + /** + * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). + * + * The `callback` gets two arguments `(err, resolvedPath)`. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path passed to the callback. If the `encoding` is set to `'buffer'`, + * the path returned will be passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v9.2.0 + */ + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + function native( + path: PathLike, + options: BufferEncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void, + ): void; + function native( + path: PathLike, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void, + ): void; + function native( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, + ): void; + } + /** + * Returns the resolved pathname. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link realpath}. + * @since v0.1.31 + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer; + /** + * Synchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function realpathSync(path: PathLike, options?: EncodingOption): string | Buffer; + export namespace realpathSync { + function native(path: PathLike, options?: EncodingOption): string; + function native(path: PathLike, options: BufferEncodingOption): Buffer; + function native(path: PathLike, options?: EncodingOption): string | Buffer; + } + /** + * Asynchronously removes a file or symbolic link. No arguments other than a + * possible exception are given to the completion callback. + * + * ```js + * import { unlink } from 'node:fs'; + * // Assuming that 'path/file.txt' is a regular file. + * unlink('path/file.txt', (err) => { + * if (err) throw err; + * console.log('path/file.txt was deleted'); + * }); + * ``` + * + * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a + * directory, use {@link rmdir}. + * + * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. + * @since v0.0.2 + */ + export function unlink(path: PathLike, callback: NoParamCallback): void; + export namespace unlink { + /** + * Asynchronous unlink(2) - delete a name and possibly the file it refers to. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. + * @since v0.1.21 + */ + export function unlinkSync(path: PathLike): void; + export interface RmDirOptions { + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning + * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. + * Use `fs.rm(path, { recursive: true, force: true })` instead. + * + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given + * to the completion callback. + * + * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on + * Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. + * @since v0.0.2 + */ + export function rmdir(path: PathLike, callback: NoParamCallback): void; + export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; + export namespace rmdir { + /** + * Asynchronous rmdir(2) - delete a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + function __promisify__(path: PathLike, options?: RmDirOptions): Promise; + } + /** + * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. + * + * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error + * on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. + * @since v0.1.21 + */ + export function rmdirSync(path: PathLike, options?: RmDirOptions): void; + export interface RmOptions { + /** + * When `true`, exceptions will be ignored if `path` does not exist. + * @default false + */ + force?: boolean | undefined; + /** + * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or + * `EPERM` error is encountered, Node.js will retry the operation with a linear + * backoff wait of `retryDelay` ms longer on each try. This option represents the + * number of retries. This option is ignored if the `recursive` option is not + * `true`. + * @default 0 + */ + maxRetries?: number | undefined; + /** + * If `true`, perform a recursive directory removal. In + * recursive mode, operations are retried on failure. + * @default false + */ + recursive?: boolean | undefined; + /** + * The amount of time in milliseconds to wait between retries. + * This option is ignored if the `recursive` option is not `true`. + * @default 100 + */ + retryDelay?: number | undefined; + } + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the + * completion callback. + * @since v14.14.0 + */ + export function rm(path: PathLike, callback: NoParamCallback): void; + export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; + export namespace rm { + /** + * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). + */ + function __promisify__(path: PathLike, options?: RmOptions): Promise; + } + /** + * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. + * @since v14.14.0 + */ + export function rmSync(path: PathLike, options?: RmOptions): void; + export interface MakeDirectoryOptions { + /** + * Indicates whether parent folders should be created. + * If a folder was created, the path to the first created folder will be returned. + * @default false + */ + recursive?: boolean | undefined; + /** + * A file mode. If a string is passed, it is parsed as an octal integer. If not specified + * @default 0o777 + */ + mode?: Mode | undefined; + } + /** + * Asynchronously creates a directory. + * + * The callback is given a possible exception and, if `recursive` is `true`, the + * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was + * created (for instance, if it was previously created). + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that + * exists results in an error only + * when `recursive` is false. If `recursive` is false and the directory exists, + * an `EEXIST` error occurs. + * + * ```js + * import { mkdir } from 'node:fs'; + * + * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. + * mkdir('./tmp/a/apple', { recursive: true }, (err) => { + * if (err) throw err; + * }); + * ``` + * + * On Windows, using `fs.mkdir()` on the root directory even with recursion will + * result in an error: + * + * ```js + * import { mkdir } from 'node:fs'; + * + * mkdir('/', { recursive: true }, (err) => { + * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] + * }); + * ``` + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.8 + */ + export function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir( + path: PathLike, + options: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null + | undefined, + callback: NoParamCallback, + ): void; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdir( + path: PathLike, + options: Mode | MakeDirectoryOptions | null | undefined, + callback: (err: NodeJS.ErrnoException | null, path?: string) => void, + ): void; + /** + * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function mkdir(path: PathLike, callback: NoParamCallback): void; + export namespace mkdir { + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function __promisify__( + path: PathLike, + options?: Mode | MakeDirectoryOptions | null, + ): Promise; + } + /** + * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. + * This is the synchronous version of {@link mkdir}. + * + * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. + * @since v0.1.21 + */ + export function mkdirSync( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): string | undefined; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): void; + /** + * Synchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; + /** + * Creates a unique temporary directory. + * + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform + * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, + * notably the BSDs, can return more than six random characters, and replace + * trailing `X` characters in `prefix` with random characters. + * + * The created directory path is passed as a string to the callback's second + * parameter. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 + * }); + * ``` + * + * The `fs.mkdtemp()` method will append the six randomly selected characters + * directly to the `prefix` string. For instance, given a directory `/tmp`, if the + * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator + * (`require('node:path').sep`). + * + * ```js + * import { tmpdir } from 'node:os'; + * import { mkdtemp } from 'node:fs'; + * + * // The parent directory for the new temporary directory + * const tmpDir = tmpdir(); + * + * // This method is *INCORRECT*: + * mkdtemp(tmpDir, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmpabc123`. + * // A new temporary directory is created at the file system root + * // rather than *within* the /tmp directory. + * }); + * + * // This method is *CORRECT*: + * import { sep } from 'node:path'; + * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { + * if (err) throw err; + * console.log(directory); + * // Will print something similar to `/tmp/abc123`. + * // A new temporary directory is created within + * // the /tmp directory. + * }); + * ``` + * @since v5.10.0 + */ + export function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp( + prefix: string, + options: + | "buffer" + | { + encoding: "buffer"; + }, + callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtemp( + prefix: string, + options: EncodingOption, + callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void, + ): void; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + */ + export function mkdtemp( + prefix: string, + callback: (err: NodeJS.ErrnoException | null, folder: string) => void, + ): void; + export namespace mkdtemp { + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__(prefix: string, options?: EncodingOption): Promise; + } + /** + * Returns the created directory path. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link mkdtemp}. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * @since v5.10.0 + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer; + /** + * Synchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer; + /** + * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. + * @since v0.1.8 + */ + export function readdir( + path: PathLike, + options: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdir( + path: PathLike, + options: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function readdir( + path: PathLike, + callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, + ): void; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, + ): void; + export namespace readdir { + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options: + | "buffer" + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function __promisify__( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent + */ + function __promisify__( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + } + /** + * Reads the contents of the directory. + * + * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames returned. If the `encoding` is set to `'buffer'`, + * the filenames returned will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. + * @since v0.1.21 + */ + export function readdirSync( + path: PathLike, + options?: + | { + encoding: BufferEncoding | null; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | BufferEncoding + | null, + ): string[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + export function readdirSync( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): string[] | Buffer[]; + /** + * Synchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + export function readdirSync( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Dirent[]; + /** + * Closes the file descriptor. No arguments other than a possible exception are + * given to the completion callback. + * + * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.0.2 + */ + export function close(fd: number, callback?: NoParamCallback): void; + export namespace close { + /** + * Asynchronous close(2) - close a file descriptor. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Closes the file descriptor. Returns `undefined`. + * + * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use + * through any other `fs` operation may lead to undefined behavior. + * + * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. + * @since v0.1.21 + */ + export function closeSync(fd: number): void; + /** + * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. + * + * `mode` sets the file mode (permission and sticky bits), but only if the file was + * created. On Windows, only the write permission can be manipulated; see {@link chmod}. + * + * The callback gets two arguments `(err, fd)`. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * + * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. + * @since v0.0.2 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] + */ + export function open( + path: PathLike, + flags: OpenMode | undefined, + mode: Mode | undefined | null, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param [flags='r'] See `support of file system `flags``. + */ + export function open( + path: PathLike, + flags: OpenMode | undefined, + callback: (err: NodeJS.ErrnoException | null, fd: number) => void, + ): void; + /** + * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + */ + export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; + export namespace open { + /** + * Asynchronous open(2) - open and possibly create a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. + */ + function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; + } + /** + * Returns an integer representing the file descriptor. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link open}. + * @since v0.1.21 + * @param [flags='r'] + * @param [mode=0o666] + */ + export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v0.4.2 + */ + export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace utimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied path. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Returns `undefined`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link utimes}. + * @since v0.4.2 + */ + export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; + /** + * Change the file system timestamps of the object referenced by the supplied file + * descriptor. See {@link utimes}. + * @since v0.4.2 + */ + export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; + export namespace futimes { + /** + * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param atime The last access time. If a string is provided, it will be coerced to number. + * @param mtime The last modified time. If a string is provided, it will be coerced to number. + */ + function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; + } + /** + * Synchronous version of {@link futimes}. Returns `undefined`. + * @since v0.4.2 + */ + export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other + * than a possible exception are given to the completion callback. + * @since v0.1.96 + */ + export function fsync(fd: number, callback: NoParamCallback): void; + export namespace fsync { + /** + * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. + * @since v0.1.96 + */ + export function fsyncSync(fd: number): void; + /** + * Write `buffer` to the file specified by `fd`. + * + * `offset` determines the part of the buffer to be written, and `length` is + * an integer specifying the number of bytes to write. + * + * `position` refers to the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). + * + * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesWritten` and `buffer` properties. + * + * It is unsafe to use `fs.write()` multiple times on the same file without waiting + * for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v0.0.2 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + length: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + */ + export function write( + fd: number, + buffer: TBuffer, + offset: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + */ + export function write( + fd: number, + buffer: TBuffer, + callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function write( + fd: number, + string: string, + position: number | undefined | null, + encoding: BufferEncoding | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + export function write( + fd: number, + string: string, + position: number | undefined | null, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + */ + export function write( + fd: number, + string: string, + callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, + ): void; + export namespace write { + /** + * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. + * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + */ + function __promisify__( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + /** + * Asynchronously writes `string` to the file referenced by the supplied file descriptor. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + function __promisify__( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link write}. + * @since v0.1.21 + * @param [offset=0] + * @param [length=buffer.byteLength - offset] + * @param [position='null'] + * @return The number of bytes written. + */ + export function writeSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset?: number | null, + length?: number | null, + position?: number | null, + ): number; + /** + * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. + * @param fd A file descriptor. + * @param string A string to write. + * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. + * @param encoding The expected string encoding. + */ + export function writeSync( + fd: number, + string: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): number; + export type ReadPosition = number | bigint; + export interface ReadSyncOptions { + /** + * @default 0 + */ + offset?: number | undefined; + /** + * @default `length of buffer` + */ + length?: number | undefined; + /** + * @default null + */ + position?: ReadPosition | null | undefined; + } + export interface ReadAsyncOptions extends ReadSyncOptions { + buffer?: TBuffer; + } + /** + * Read data from the file specified by `fd`. + * + * The callback is given the three arguments, `(err, bytesRead, buffer)`. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffer` properties. + * @since v0.0.2 + * @param buffer The buffer that the data will be written to. + * @param offset The position in `buffer` to write the data to. + * @param length The number of bytes to read. + * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If + * `position` is an integer, the file position will be unchanged. + */ + export function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: ReadPosition | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + /** + * Similar to the above `fs.read` function, this version takes an optional `options` object. + * If not otherwise specified in an `options` object, + * `buffer` defaults to `Buffer.alloc(16384)`, + * `offset` defaults to `0`, + * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 + * `position` defaults to `null` + * @since v12.17.0, 13.11.0 + */ + export function read( + fd: number, + options: ReadAsyncOptions, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, + ): void; + export function read( + fd: number, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void, + ): void; + export namespace read { + /** + * @param fd A file descriptor. + * @param buffer The buffer that the data will be written to. + * @param offset The offset in the buffer at which to start writing. + * @param length The number of bytes to read. + * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. + */ + function __promisify__( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__( + fd: number, + options: ReadAsyncOptions, + ): Promise<{ + bytesRead: number; + buffer: TBuffer; + }>; + function __promisify__(fd: number): Promise<{ + bytesRead: number; + buffer: NodeJS.ArrayBufferView; + }>; + } + /** + * Returns the number of `bytesRead`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link read}. + * @since v0.1.21 + * @param [position='null'] + */ + export function readSync( + fd: number, + buffer: NodeJS.ArrayBufferView, + offset: number, + length: number, + position: ReadPosition | null, + ): number; + /** + * Similar to the above `fs.readSync` function, this version takes an optional `options` object. + * If no `options` object is specified, it will default with the above values. + */ + export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number; + /** + * Asynchronously reads the entire contents of a file. + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', (err, data) => { + * if (err) throw err; + * console.log(data); + * }); + * ``` + * + * The callback is passed two arguments `(err, data)`, where `data` is the + * contents of the file. + * + * If no encoding is specified, then the raw buffer is returned. + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { readFile } from 'node:fs'; + * + * readFile('/etc/passwd', 'utf8', callback); + * ``` + * + * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an + * error will be returned. On FreeBSD, a representation of the directory's contents + * will be returned. + * + * ```js + * import { readFile } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFile('', (err, data) => { + * // => [Error: EISDIR: illegal operation on a directory, read ] + * }); + * + * // FreeBSD + * readFile('', (err, data) => { + * // => null, + * }); + * ``` + * + * It is possible to abort an ongoing request using an `AbortSignal`. If a + * request is aborted the callback is called with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs'; + * + * const controller = new AbortController(); + * const signal = controller.signal; + * readFile(fileInfo[0].name, { signal }, (err, buf) => { + * // ... + * }); + * // When you want to abort the request + * controller.abort(); + * ``` + * + * The `fs.readFile()` function buffers the entire file. To minimize memory costs, + * when possible prefer streaming via `fs.createReadStream()`. + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * @since v0.1.29 + * @param path filename or file descriptor + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding?: null | undefined; + flag?: string | undefined; + } & Abortable) + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void, + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | ({ + encoding: BufferEncoding; + flag?: string | undefined; + } & Abortable) + | BufferEncoding, + callback: (err: NodeJS.ErrnoException | null, data: string) => void, + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFile( + path: PathOrFileDescriptor, + options: + | (ObjectEncodingOptions & { + flag?: string | undefined; + } & Abortable) + | BufferEncoding + | undefined + | null, + callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, + ): void; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + */ + export function readFile( + path: PathOrFileDescriptor, + callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void, + ): void; + export namespace readFile { + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function __promisify__( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null, + ): Promise; + } + /** + * Returns the contents of the `path`. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readFile}. + * + * If the `encoding` option is specified then this function returns a + * string. Otherwise it returns a buffer. + * + * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific. + * + * ```js + * import { readFileSync } from 'node:fs'; + * + * // macOS, Linux, and Windows + * readFileSync(''); + * // => [Error: EISDIR: illegal operation on a directory, read ] + * + * // FreeBSD + * readFileSync(''); // => + * ``` + * @since v0.1.8 + * @param path filename or file descriptor + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: { + encoding?: null | undefined; + flag?: string | undefined; + } | null, + ): Buffer; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options: + | { + encoding: BufferEncoding; + flag?: string | undefined; + } + | BufferEncoding, + ): string; + /** + * Synchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + export function readFileSync( + path: PathOrFileDescriptor, + options?: + | (ObjectEncodingOptions & { + flag?: string | undefined; + }) + | BufferEncoding + | null, + ): string | Buffer; + export type WriteFileOptions = + | ( + & ObjectEncodingOptions + & Abortable + & { + mode?: Mode | undefined; + flag?: string | undefined; + flush?: boolean | undefined; + } + ) + | BufferEncoding + | null; + /** + * When `file` is a filename, asynchronously writes data to the file, replacing the + * file if it already exists. `data` can be a string or a buffer. + * + * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using + * a file descriptor. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, (err) => { + * if (err) throw err; + * console.log('The file has been saved!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { writeFile } from 'node:fs'; + * + * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); + * ``` + * + * It is unsafe to use `fs.writeFile()` multiple times on the same file without + * waiting for the callback. For this scenario, {@link createWriteStream} is + * recommended. + * + * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that + * performs multiple `write` calls internally to write the buffer passed to it. + * For performance sensitive code consider using {@link createWriteStream}. + * + * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs'; + * import { Buffer } from 'node:buffer'; + * + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * writeFile('message.txt', data, { signal }, (err) => { + * // When a request is aborted - the callback is called with an AbortError + * }); + * // When the request should be aborted + * controller.abort(); + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFile( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function writeFile( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + callback: NoParamCallback, + ): void; + export namespace writeFile { + /** + * Asynchronously writes data to a file, replacing the file if it already exists. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'w'` is used. + */ + function __promisify__( + path: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): Promise; + } + /** + * Returns `undefined`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writeFile}. + * @since v0.1.29 + * @param file filename or file descriptor + */ + export function writeFileSync( + file: PathOrFileDescriptor, + data: string | NodeJS.ArrayBufferView, + options?: WriteFileOptions, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', (err) => { + * if (err) throw err; + * console.log('The "data to append" was appended to file!'); + * }); + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFile } from 'node:fs'; + * + * appendFile('message.txt', 'data to append', 'utf8', callback); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { open, close, appendFile } from 'node:fs'; + * + * function closeFd(fd) { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * + * open('message.txt', 'a', (err, fd) => { + * if (err) throw err; + * + * try { + * appendFile(fd, 'data to append', 'utf8', (err) => { + * closeFd(fd); + * if (err) throw err; + * }); + * } catch (err) { + * closeFd(fd); + * throw err; + * } + * }); + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFile( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options: WriteFileOptions, + callback: NoParamCallback, + ): void; + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + */ + export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; + export namespace appendFile { + /** + * Asynchronously append data to a file, creating the file if it does not exist. + * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + * If a file descriptor is provided, the underlying file will _not_ be closed automatically. + * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. + * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `mode` is not supplied, the default of `0o666` is used. + * If `mode` is a string, it is parsed as an octal integer. + * If `flag` is not supplied, the default of `'a'` is used. + */ + function __promisify__( + file: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): Promise; + } + /** + * Synchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * The `mode` option only affects the newly created file. See {@link open} for more details. + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * try { + * appendFileSync('message.txt', 'data to append'); + * console.log('The "data to append" was appended to file!'); + * } catch (err) { + * // Handle the error + * } + * ``` + * + * If `options` is a string, then it specifies the encoding: + * + * ```js + * import { appendFileSync } from 'node:fs'; + * + * appendFileSync('message.txt', 'data to append', 'utf8'); + * ``` + * + * The `path` may be specified as a numeric file descriptor that has been opened + * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will + * not be closed automatically. + * + * ```js + * import { openSync, closeSync, appendFileSync } from 'node:fs'; + * + * let fd; + * + * try { + * fd = openSync('message.txt', 'a'); + * appendFileSync(fd, 'data to append', 'utf8'); + * } catch (err) { + * // Handle the error + * } finally { + * if (fd !== undefined) + * closeSync(fd); + * } + * ``` + * @since v0.6.7 + * @param path filename or file descriptor + */ + export function appendFileSync( + path: PathOrFileDescriptor, + data: string | Uint8Array, + options?: WriteFileOptions, + ): void; + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export interface WatchFileOptions { + bigint?: boolean | undefined; + persistent?: boolean | undefined; + interval?: number | undefined; + } + /** + * Watch for changes on `filename`. The callback `listener` will be called each + * time the file is accessed. + * + * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates + * whether the process should continue to run as long as files are being watched. + * The `options` object may specify an `interval` property indicating how often the + * target should be polled in milliseconds. + * + * The `listener` gets two arguments the current stat object and the previous + * stat object: + * + * ```js + * import { watchFile } from 'node:fs'; + * + * watchFile('message.text', (curr, prev) => { + * console.log(`the current mtime is: ${curr.mtime}`); + * console.log(`the previous mtime was: ${prev.mtime}`); + * }); + * ``` + * + * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, + * the numeric values in these objects are specified as `BigInt`s. + * + * To be notified when the file was modified, not just accessed, it is necessary + * to compare `curr.mtimeMs` and `prev.mtimeMs`. + * + * When an `fs.watchFile` operation results in an `ENOENT` error, it + * will invoke the listener once, with all the fields zeroed (or, for dates, the + * Unix Epoch). If the file is created later on, the listener will be called + * again, with the latest stat objects. This is a change in functionality since + * v0.10. + * + * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. + * + * When a file being watched by `fs.watchFile()` disappears and reappears, + * then the contents of `previous` in the second callback event (the file's + * reappearance) will be the same as the contents of `previous` in the first + * callback event (its disappearance). + * + * This happens when: + * + * * the file is deleted, followed by a restore + * * the file is renamed and then renamed a second time back to its original name + * @since v0.1.31 + */ + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint?: false | undefined; + }) + | undefined, + listener: StatsListener, + ): StatWatcher; + export function watchFile( + filename: PathLike, + options: + | (WatchFileOptions & { + bigint: true; + }) + | undefined, + listener: BigIntStatsListener, + ): StatWatcher; + /** + * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; + /** + * Stop watching for changes on `filename`. If `listener` is specified, only that + * particular listener is removed. Otherwise, _all_ listeners are removed, + * effectively stopping watching of `filename`. + * + * Calling `fs.unwatchFile()` with a filename that is not being watched is a + * no-op, not an error. + * + * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. + * @since v0.1.31 + * @param listener Optional, a listener previously attached using `fs.watchFile()` + */ + export function unwatchFile(filename: PathLike, listener?: StatsListener): void; + export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; + export interface WatchOptions extends Abortable { + encoding?: BufferEncoding | "buffer" | undefined; + persistent?: boolean | undefined; + recursive?: boolean | undefined; + } + export type WatchEventType = "rename" | "change"; + export type WatchListener = (event: WatchEventType, filename: T | null) => void; + export type StatsListener = (curr: Stats, prev: Stats) => void; + export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; + /** + * Watch for changes on `filename`, where `filename` is either a file or a + * directory. + * + * The second argument is optional. If `options` is provided as a string, it + * specifies the `encoding`. Otherwise `options` should be passed as an object. + * + * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file + * which triggered the event. + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. + * + * If a `signal` is passed, aborting the corresponding AbortController will close + * the returned `fs.FSWatcher`. + * @since v0.5.10 + * @param listener + */ + export function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: "buffer"; + }) + | "buffer", + listener?: WatchListener, + ): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch( + filename: PathLike, + options?: WatchOptions | BufferEncoding | null, + listener?: WatchListener, + ): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + export function watch( + filename: PathLike, + options: WatchOptions | string, + listener?: WatchListener, + ): FSWatcher; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; + /** + * Test whether or not the given path exists by checking with the file system. + * Then call the `callback` argument with either true or false: + * + * ```js + * import { exists } from 'node:fs'; + * + * exists('/etc/passwd', (e) => { + * console.log(e ? 'it exists' : 'no passwd!'); + * }); + * ``` + * + * **The parameters for this callback are not consistent with other Node.js** + * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback + * has only one boolean parameter. This is one reason `fs.access()` is recommended + * instead of `fs.exists()`. + * + * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file does not exist. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { exists, open, close } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * console.error('myfile already exists'); + * } else { + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { open, close, exists } from 'node:fs'; + * + * exists('myfile', (e) => { + * if (e) { + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * } else { + * console.error('myfile does not exist'); + * } + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for existence and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the existence of a file only if the file won't be + * used directly, for example when its existence is a signal from another + * process. + * @since v0.0.2 + * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. + */ + export function exists(path: PathLike, callback: (exists: boolean) => void): void; + /** @deprecated */ + export namespace exists { + /** + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike): Promise; + } + /** + * Returns `true` if the path exists, `false` otherwise. + * + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link exists}. + * + * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other + * Node.js callbacks. `fs.existsSync()` does not use a callback. + * + * ```js + * import { existsSync } from 'node:fs'; + * + * if (existsSync('/etc/passwd')) + * console.log('The path exists.'); + * ``` + * @since v0.1.21 + */ + export function existsSync(path: PathLike): boolean; + export namespace constants { + // File Access Constants + /** Constant for fs.access(). File is visible to the calling process. */ + const F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + const R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + const W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + const X_OK: number; + // File Copy Constants + /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ + const COPYFILE_EXCL: number; + /** + * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. + */ + const COPYFILE_FICLONE: number; + /** + * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. + * If the underlying platform does not support copy-on-write, then the operation will fail with an error. + */ + const COPYFILE_FICLONE_FORCE: number; + // File Open Constants + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + const O_RDONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + const O_WRONLY: number; + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + const O_RDWR: number; + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + const O_CREAT: number; + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + const O_EXCL: number; + /** + * Constant for fs.open(). Flag indicating that if path identifies a terminal device, + * opening the path shall not cause that terminal to become the controlling terminal for the process + * (if the process does not already have one). + */ + const O_NOCTTY: number; + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + const O_TRUNC: number; + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + const O_APPEND: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + const O_DIRECTORY: number; + /** + * constant for fs.open(). + * Flag indicating reading accesses to the file system will no longer result in + * an update to the atime information associated with the file. + * This flag is available on Linux operating systems only. + */ + const O_NOATIME: number; + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + const O_NOFOLLOW: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + const O_SYNC: number; + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ + const O_DSYNC: number; + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + const O_SYMLINK: number; + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + const O_DIRECT: number; + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + const O_NONBLOCK: number; + // File Type Constants + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + const S_IFMT: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + const S_IFREG: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + const S_IFDIR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + const S_IFCHR: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + const S_IFBLK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + const S_IFIFO: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + const S_IFLNK: number; + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + const S_IFSOCK: number; + // File Mode Constants + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + const S_IRWXU: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + const S_IRUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + const S_IWUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + const S_IXUSR: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + const S_IRWXG: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + const S_IRGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + const S_IWGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + const S_IXGRP: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + const S_IRWXO: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + const S_IROTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + const S_IWOTH: number; + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + const S_IXOTH: number; + /** + * When set, a memory file mapping is used to access the file. This flag + * is available on Windows operating systems only. On other operating systems, + * this flag is ignored. + */ + const UV_FS_O_FILEMAP: number; + } + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * The final argument, `callback`, is a callback function that is invoked with + * a possible error argument. If any of the accessibility checks fail, the error + * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. + * + * ```js + * import { access, constants } from 'node:fs'; + * + * const file = 'package.json'; + * + * // Check if the file exists in the current directory. + * access(file, constants.F_OK, (err) => { + * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); + * }); + * + * // Check if the file is readable. + * access(file, constants.R_OK, (err) => { + * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); + * }); + * + * // Check if the file is writable. + * access(file, constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); + * }); + * + * // Check if the file is readable and writable. + * access(file, constants.R_OK | constants.W_OK, (err) => { + * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); + * }); + * ``` + * + * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing + * so introduces a race condition, since other processes may change the file's + * state between the two calls. Instead, user code should open/read/write the + * file directly and handle the error raised if the file is not accessible. + * + * **write (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * + * access('myfile', (err) => { + * if (!err) { + * console.error('myfile already exists'); + * return; + * } + * + * open('myfile', 'wx', (err, fd) => { + * if (err) throw err; + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **write (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'wx', (err, fd) => { + * if (err) { + * if (err.code === 'EEXIST') { + * console.error('myfile already exists'); + * return; + * } + * + * throw err; + * } + * + * try { + * writeMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * **read (NOT RECOMMENDED)** + * + * ```js + * import { access, open, close } from 'node:fs'; + * access('myfile', (err) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * open('myfile', 'r', (err, fd) => { + * if (err) throw err; + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * }); + * ``` + * + * **read (RECOMMENDED)** + * + * ```js + * import { open, close } from 'node:fs'; + * + * open('myfile', 'r', (err, fd) => { + * if (err) { + * if (err.code === 'ENOENT') { + * console.error('myfile does not exist'); + * return; + * } + * + * throw err; + * } + * + * try { + * readMyData(fd); + * } finally { + * close(fd, (err) => { + * if (err) throw err; + * }); + * } + * }); + * ``` + * + * The "not recommended" examples above check for accessibility and then use the + * file; the "recommended" examples are better because they use the file directly + * and handle the error, if any. + * + * In general, check for the accessibility of a file only if the file will not be + * used directly, for example when its accessibility is a signal from another + * process. + * + * On Windows, access-control policies (ACLs) on a directory may limit access to + * a file or directory. The `fs.access()` function, however, does not check the + * ACL and therefore may report that a path is accessible even if the ACL restricts + * the user from reading or writing to it. + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + */ + export function access(path: PathLike, callback: NoParamCallback): void; + export namespace access { + /** + * Asynchronously tests a user's permissions for the file specified by path. + * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * URL support is _experimental_. + */ + function __promisify__(path: PathLike, mode?: number): Promise; + } + /** + * Synchronously tests a user's permissions for the file or directory specified + * by `path`. The `mode` argument is an optional integer that specifies the + * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and + * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, + * the method will return `undefined`. + * + * ```js + * import { accessSync, constants } from 'node:fs'; + * + * try { + * accessSync('etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can read/write'); + * } catch (err) { + * console.error('no access!'); + * } + * ``` + * @since v0.11.15 + * @param [mode=fs.constants.F_OK] + */ + export function accessSync(path: PathLike, mode?: number): void; + interface StreamOptions { + flags?: string | undefined; + encoding?: BufferEncoding | undefined; + fd?: number | promises.FileHandle | undefined; + mode?: number | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + signal?: AbortSignal | null | undefined; + highWaterMark?: number | undefined; + } + interface FSImplementation { + open?: (...args: any[]) => any; + close?: (...args: any[]) => any; + } + interface CreateReadStreamFSImplementation extends FSImplementation { + read: (...args: any[]) => any; + } + interface CreateWriteStreamFSImplementation extends FSImplementation { + write: (...args: any[]) => any; + writev?: (...args: any[]) => any; + } + interface ReadStreamOptions extends StreamOptions { + fs?: CreateReadStreamFSImplementation | null | undefined; + end?: number | undefined; + } + interface WriteStreamOptions extends StreamOptions { + fs?: CreateWriteStreamFSImplementation | null | undefined; + flush?: boolean | undefined; + } + /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is + * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the + * current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use + * the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. + * + * If `fd` points to a character device that only supports blocking reads + * (such as keyboard or sound card), read operations do not finish until data is + * available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, + * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is + * also required. + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * // Create a stream from some character device. + * const stream = createReadStream('/dev/input/event0'); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * `mode` sets the file mode (permission and sticky bits), but only if the + * file was created. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { createReadStream } from 'node:fs'; + * + * createReadStream('sample.txt', { start: 90, end: 99 }); + * ``` + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` option to be set to `r+` rather than the + * default `w`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce + * performance as some optimizations (`_writev()`) + * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override + * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. + * + * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be + * emitted. `fd` should be blocking; non-blocking `fd`s + * should be passed to `net.Socket`. + * + * If `options` is a string, then it specifies the encoding. + * @since v0.1.31 + */ + export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other + * than a possible + * exception are given to the completion callback. + * @since v0.1.96 + */ + export function fdatasync(fd: number, callback: NoParamCallback): void; + export namespace fdatasync { + /** + * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. + * @param fd A file descriptor. + */ + function __promisify__(fd: number): Promise; + } + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. + * @since v0.1.96 + */ + export function fdatasyncSync(fd: number): void; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. No arguments other than a possible exception are given to the + * callback function. Node.js makes no guarantees about the atomicity of the copy + * operation. If an error occurs after the destination file has been opened for + * writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFile, constants } from 'node:fs'; + * + * function callback(err) { + * if (err) throw err; + * console.log('source.txt was copied to destination.txt'); + * } + * + * // destination.txt will be created or overwritten by default. + * copyFile('source.txt', 'destination.txt', callback); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; + export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; + export namespace copyFile { + function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; + } + /** + * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. Returns `undefined`. Node.js makes no guarantees about the + * atomicity of the copy operation. If an error occurs after the destination file + * has been opened for writing, Node.js will attempt to remove the destination. + * + * `mode` is an optional integer that specifies the behavior + * of the copy operation. It is possible to create a mask consisting of the bitwise + * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). + * + * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already + * exists. + * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a + * copy-on-write reflink. If the platform does not support copy-on-write, then a + * fallback copy mechanism is used. + * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to + * create a copy-on-write reflink. If the platform does not support + * copy-on-write, then the operation will fail. + * + * ```js + * import { copyFileSync, constants } from 'node:fs'; + * + * // destination.txt will be created or overwritten by default. + * copyFileSync('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * ``` + * @since v8.5.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] modifiers for copy operation. + */ + export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; + /** + * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. + * + * `position` is the offset from the beginning of the file where this data + * should be written. If `typeof position !== 'number'`, the data will be written + * at the current position. + * + * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. + * + * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. + * + * It is unsafe to use `fs.writev()` multiple times on the same file without + * waiting for the callback. For this scenario, use {@link createWriteStream}. + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] + */ + export function writev( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void, + ): void; + export function writev( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void, + ): void; + export interface WriteVResult { + bytesWritten: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace writev { + function __promisify__( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + position?: number, + ): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link writev}. + * @since v12.9.0 + * @param [position='null'] + * @return The number of bytes written. + */ + export function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + /** + * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s + * using `readv()`. + * + * `position` is the offset from the beginning of the file from where data + * should be read. If `typeof position !== 'number'`, the data will be read + * from the current position. + * + * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. + * + * If this method is invoked as its `util.promisify()` ed version, it returns + * a promise for an `Object` with `bytesRead` and `buffers` properties. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + */ + export function readv( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void, + ): void; + export function readv( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + position: number, + cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void, + ): void; + export interface ReadVResult { + bytesRead: number; + buffers: NodeJS.ArrayBufferView[]; + } + export namespace readv { + function __promisify__( + fd: number, + buffers: readonly NodeJS.ArrayBufferView[], + position?: number, + ): Promise; + } + /** + * For detailed information, see the documentation of the asynchronous version of + * this API: {@link readv}. + * @since v13.13.0, v12.17.0 + * @param [position='null'] + * @return The number of bytes read. + */ + export function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; + + export interface OpenAsBlobOptions { + /** + * An optional mime type for the blob. + * + * @default 'undefined' + */ + type?: string | undefined; + } + + /** + * Returns a `Blob` whose data is backed by the given file. + * + * The file must not be modified after the `Blob` is created. Any modifications + * will cause reading the `Blob` data to fail with a `DOMException` error. + * Synchronous stat operations on the file when the `Blob` is created, and before + * each read in order to detect whether the file data has been modified on disk. + * + * ```js + * import { openAsBlob } from 'node:fs'; + * + * const blob = await openAsBlob('the.file.txt'); + * const ab = await blob.arrayBuffer(); + * blob.stream(); + * ``` + * @since v19.8.0 + * @experimental + */ + export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; + + export interface OpenDirOptions { + /** + * @default 'utf8' + */ + encoding?: BufferEncoding | undefined; + /** + * Number of directory entries that are buffered + * internally when reading from the directory. Higher values lead to better + * performance but higher memory usage. + * @default 32 + */ + bufferSize?: number | undefined; + /** + * @default false + */ + recursive?: boolean; + } + /** + * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; + /** + * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for + * more details. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * @since v12.12.0 + */ + export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; + export function opendir( + path: PathLike, + options: OpenDirOptions, + cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, + ): void; + export namespace opendir { + function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; + } + export interface BigIntStats extends StatsBase { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; + } + export interface BigIntOptions { + bigint: true; + } + export interface StatOptions { + bigint?: boolean | undefined; + } + export interface StatSyncOptions extends StatOptions { + throwIfNoEntry?: boolean | undefined; + } + interface CopyOptionsBase { + /** + * Dereference symlinks + * @default false + */ + dereference?: boolean; + /** + * When `force` is `false`, and the destination + * exists, throw an error. + * @default false + */ + errorOnExist?: boolean; + /** + * Overwrite existing file or directory. _The copy + * operation will ignore errors if you set this to false and the destination + * exists. Use the `errorOnExist` option to change this behavior. + * @default true + */ + force?: boolean; + /** + * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} + */ + mode?: number; + /** + * When `true` timestamps from `src` will + * be preserved. + * @default false + */ + preserveTimestamps?: boolean; + /** + * Copy directories recursively. + * @default false + */ + recursive?: boolean; + /** + * When true, path resolution for symlinks will be skipped + * @default false + */ + verbatimSymlinks?: boolean; + } + export interface CopyOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean | Promise; + } + export interface CopySyncOptions extends CopyOptionsBase { + /** + * Function to filter copied files/directories. Return + * `true` to copy the item, `false` to ignore it. + */ + filter?(source: string, destination: string): boolean; + } + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cp( + source: string | URL, + destination: string | URL, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + export function cp( + source: string | URL, + destination: string | URL, + opts: CopyOptions, + callback: (err: NodeJS.ErrnoException | null) => void, + ): void; + /** + * Synchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + */ + export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; +} +declare module "node:fs" { + export * from "fs"; +} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts new file mode 100644 index 0000000..3199063 --- /dev/null +++ b/node_modules/@types/node/fs/promises.d.ts @@ -0,0 +1,1245 @@ +/** + * The `fs/promises` API provides asynchronous file system methods that return + * promises. + * + * The promise APIs use the underlying Node.js threadpool to perform file + * system operations off the event loop thread. These operations are not + * synchronized or threadsafe. Care must be taken when performing multiple + * concurrent modifications on the same file or data corruption may occur. + * @since v10.0.0 + */ +declare module "fs/promises" { + import { Abortable } from "node:events"; + import { Stream } from "node:stream"; + import { ReadableStream } from "node:stream/web"; + import { + BigIntStats, + BigIntStatsFs, + BufferEncodingOption, + constants as fsConstants, + CopyOptions, + Dir, + Dirent, + MakeDirectoryOptions, + Mode, + ObjectEncodingOptions, + OpenDirOptions, + OpenMode, + PathLike, + ReadStream, + ReadVResult, + RmDirOptions, + RmOptions, + StatFsOptions, + StatOptions, + Stats, + StatsFs, + TimeLike, + WatchEventType, + WatchOptions, + WriteStream, + WriteVResult, + } from "node:fs"; + import { Interface as ReadlineInterface } from "node:readline"; + interface FileChangeInfo { + eventType: WatchEventType; + filename: T | null; + } + interface FlagAndOpenMode { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + } + interface FileReadResult { + bytesRead: number; + buffer: T; + } + interface FileReadOptions { + /** + * @default `Buffer.alloc(0xffff)` + */ + buffer?: T; + /** + * @default 0 + */ + offset?: number | null; + /** + * @default `buffer.byteLength` + */ + length?: number | null; + position?: number | null; + } + interface CreateReadStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + end?: number | undefined; + highWaterMark?: number | undefined; + } + interface CreateWriteStreamOptions { + encoding?: BufferEncoding | null | undefined; + autoClose?: boolean | undefined; + emitClose?: boolean | undefined; + start?: number | undefined; + highWaterMark?: number | undefined; + flush?: boolean | undefined; + } + interface ReadableWebStreamOptions { + /** + * Whether to open a normal or a `'bytes'` stream. + * @since v20.0.0 + */ + type?: "bytes" | undefined; + } + // TODO: Add `EventEmitter` close + interface FileHandle { + /** + * The numeric file descriptor managed by the {FileHandle} object. + * @since v10.0.0 + */ + readonly fd: number; + /** + * Alias of `filehandle.writeFile()`. + * + * When operating on file handles, the mode cannot be changed from what it was set + * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + appendFile( + data: string | Uint8Array, + options?: + | (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) + | BufferEncoding + | null, + ): Promise; + /** + * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). + * @since v10.0.0 + * @param uid The file's new owner's user id. + * @param gid The file's new group's group id. + * @return Fulfills with `undefined` upon success. + */ + chown(uid: number, gid: number): Promise; + /** + * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). + * @since v10.0.0 + * @param mode the file mode bit mask. + * @return Fulfills with `undefined` upon success. + */ + chmod(mode: Mode): Promise; + /** + * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream + * returned by this method has a default `highWaterMark` of 64 KiB. + * + * `options` can include `start` and `end` values to read a range of bytes from + * the file instead of the entire file. Both `start` and `end` are inclusive and + * start counting at 0, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is + * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from + * the current file position. The `encoding` can be any one of those accepted by `Buffer`. + * + * If the `FileHandle` points to a character device that only supports blocking + * reads (such as keyboard or sound card), read operations do not finish until data + * is available. This can prevent the process from exiting and the stream from + * closing naturally. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('/dev/input/event0'); + * // Create a stream from some character device. + * const stream = fd.createReadStream(); + * setTimeout(() => { + * stream.close(); // This may not close the stream. + * // Artificially marking end-of-stream, as if the underlying resource had + * // indicated end-of-file by itself, allows the stream to close. + * // This does not cancel pending read operations, and if there is such an + * // operation, the process may still not be able to exit successfully + * // until it finishes. + * stream.push(null); + * stream.read(0); + * }, 100); + * ``` + * + * If `autoClose` is false, then the file descriptor won't be closed, even if + * there's an error. It is the application's responsibility to close it and make + * sure there's no file descriptor leak. If `autoClose` is set to true (default + * behavior), on `'error'` or `'end'` the file descriptor will be closed + * automatically. + * + * An example to read the last 10 bytes of a file which is 100 bytes long: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const fd = await open('sample.txt'); + * fd.createReadStream({ start: 90, end: 99 }); + * ``` + * @since v16.11.0 + */ + createReadStream(options?: CreateReadStreamOptions): ReadStream; + /** + * `options` may also include a `start` option to allow writing data at some + * position past the beginning of the file, allowed values are in the + * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than + * replacing it may require the `flags` `open` option to be set to `r+` rather than + * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. + * + * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, + * then the file descriptor won't be closed, even if there's an error. + * It is the application's responsibility to close it and make sure there's no + * file descriptor leak. + * + * By default, the stream will emit a `'close'` event after it has been + * destroyed. Set the `emitClose` option to `false` to change this behavior. + * @since v16.11.0 + */ + createWriteStream(options?: CreateWriteStreamOptions): WriteStream; + /** + * Forces all currently queued I/O operations associated with the file to the + * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. + * + * Unlike `filehandle.sync` this method does not flush modified metadata. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + datasync(): Promise; + /** + * Request that all data for the open file descriptor is flushed to the storage + * device. The specific implementation is operating system and device specific. + * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + sync(): Promise; + /** + * Reads data from the file and stores that in the given buffer. + * + * If the file is not modified concurrently, the end-of-file is reached when the + * number of bytes read is zero. + * @since v10.0.0 + * @param buffer A buffer that will be filled with the file data read. + * @param offset The location in the buffer at which to start filling. + * @param length The number of bytes to read. + * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an + * integer, the current file position will remain unchanged. + * @return Fulfills upon success with an object with two properties: + */ + read( + buffer: T, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise>; + read(options?: FileReadOptions): Promise>; + /** + * Returns a `ReadableStream` that may be used to read the files data. + * + * An error will be thrown if this method is called more than once or is called + * after the `FileHandle` is closed or closing. + * + * ```js + * import { + * open, + * } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const chunk of file.readableWebStream()) + * console.log(chunk); + * + * await file.close(); + * ``` + * + * While the `ReadableStream` will read the file to completion, it will not + * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. + * @since v17.0.0 + * @experimental + */ + readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; + /** + * Asynchronously reads the entire contents of a file. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support reading. + * + * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current + * position till the end of the file. It doesn't always read from the beginning + * of the file. + * @since v10.0.0 + * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the + * data will be a string. + */ + readFile( + options?: { + encoding?: null | undefined; + flag?: OpenMode | undefined; + } | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options: + | { + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. + * The `FileHandle` must have been opened for reading. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + readFile( + options?: + | (ObjectEncodingOptions & { + flag?: OpenMode | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Convenience method to create a `readline` interface and stream over the file. + * See `filehandle.createReadStream()` for the options. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * const file = await open('./some/file/to/read'); + * + * for await (const line of file.readLines()) { + * console.log(line); + * } + * ``` + * @since v18.11.0 + */ + readLines(options?: CreateReadStreamOptions): ReadlineInterface; + /** + * @since v10.0.0 + * @return Fulfills with an {fs.Stats} for the file. + */ + stat( + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + stat( + opts: StatOptions & { + bigint: true; + }, + ): Promise; + stat(opts?: StatOptions): Promise; + /** + * Truncates the file. + * + * If the file was larger than `len` bytes, only the first `len` bytes will be + * retained in the file. + * + * The following example retains only the first four bytes of the file: + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle = null; + * try { + * filehandle = await open('temp.txt', 'r+'); + * await filehandle.truncate(4); + * } finally { + * await filehandle?.close(); + * } + * ``` + * + * If the file previously was shorter than `len` bytes, it is extended, and the + * extended part is filled with null bytes (`'\0'`): + * + * If `len` is negative then `0` will be used. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + truncate(len?: number): Promise; + /** + * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. + * @since v10.0.0 + */ + utimes(atime: TimeLike, mtime: TimeLike): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * The promise is fulfilled with no arguments upon success. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `FileHandle` has to support writing. + * + * It is unsafe to use `filehandle.writeFile()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). + * + * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the + * current position till the end of the file. It doesn't always write from the + * beginning of the file. + * @since v10.0.0 + */ + writeFile( + data: string | Uint8Array, + options?: + | (ObjectEncodingOptions & FlagAndOpenMode & Abortable & { flush?: boolean | undefined }) + | BufferEncoding + | null, + ): Promise; + /** + * Write `buffer` to the file. + * + * The promise is fulfilled with an object containing two properties: + * + * It is unsafe to use `filehandle.write()` multiple times on the same file + * without waiting for the promise to be fulfilled (or rejected). For this + * scenario, use `filehandle.createWriteStream()`. + * + * On Linux, positional writes do not work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v10.0.0 + * @param offset The start position from within `buffer` where the data to write begins. + * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. + * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current + * position. See the POSIX pwrite(2) documentation for more detail. + */ + write( + buffer: TBuffer, + offset?: number | null, + length?: number | null, + position?: number | null, + ): Promise<{ + bytesWritten: number; + buffer: TBuffer; + }>; + write( + data: string, + position?: number | null, + encoding?: BufferEncoding | null, + ): Promise<{ + bytesWritten: number; + buffer: string; + }>; + /** + * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. + * + * The promise is fulfilled with an object containing a two properties: + * + * It is unsafe to call `writev()` multiple times on the same file without waiting + * for the promise to be fulfilled (or rejected). + * + * On Linux, positional writes don't work when the file is opened in append mode. + * The kernel ignores the position argument and always appends the data to + * the end of the file. + * @since v12.9.0 + * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current + * position. + */ + writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise; + /** + * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s + * @since v13.13.0, v12.17.0 + * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. + * @return Fulfills upon success an object containing two properties: + */ + readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise; + /** + * Closes the file handle after waiting for any pending operation on the handle to + * complete. + * + * ```js + * import { open } from 'node:fs/promises'; + * + * let filehandle; + * try { + * filehandle = await open('thefile.txt', 'r'); + * } finally { + * await filehandle?.close(); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + close(): Promise; + /** + * An alias for {@link FileHandle.close()}. + * @since v20.4.0 + */ + [Symbol.asyncDispose](): Promise; + } + const constants: typeof fsConstants; + /** + * Tests a user's permissions for the file or directory specified by `path`. + * The `mode` argument is an optional integer that specifies the accessibility + * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` + * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for + * possible values of `mode`. + * + * If the accessibility check is successful, the promise is fulfilled with no + * value. If any of the accessibility checks fail, the promise is rejected + * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and + * written by the current process. + * + * ```js + * import { access, constants } from 'node:fs/promises'; + * + * try { + * await access('/etc/passwd', constants.R_OK | constants.W_OK); + * console.log('can access'); + * } catch { + * console.error('cannot access'); + * } + * ``` + * + * Using `fsPromises.access()` to check for the accessibility of a file before + * calling `fsPromises.open()` is not recommended. Doing so introduces a race + * condition, since other processes may change the file's state between the two + * calls. Instead, user code should open/read/write the file directly and handle + * the error raised if the file is not accessible. + * @since v10.0.0 + * @param [mode=fs.constants.F_OK] + * @return Fulfills with `undefined` upon success. + */ + function access(path: PathLike, mode?: number): Promise; + /** + * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it + * already exists. + * + * No guarantees are made about the atomicity of the copy operation. If an + * error occurs after the destination file has been opened for writing, an attempt + * will be made to remove the destination. + * + * ```js + * import { copyFile, constants } from 'node:fs/promises'; + * + * try { + * await copyFile('source.txt', 'destination.txt'); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * + * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. + * try { + * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); + * console.log('source.txt was copied to destination.txt'); + * } catch { + * console.error('The file could not be copied'); + * } + * ``` + * @since v10.0.0 + * @param src source filename to copy + * @param dest destination filename of the copy operation + * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. + * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) + * @return Fulfills with `undefined` upon success. + */ + function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; + /** + * Opens a `FileHandle`. + * + * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. + * + * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented + * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains + * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). + * @since v10.0.0 + * @param [flags='r'] See `support of file system `flags``. + * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. + * @return Fulfills with a {FileHandle} object. + */ + function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; + /** + * Renames `oldPath` to `newPath`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rename(oldPath: PathLike, newPath: PathLike): Promise; + /** + * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. + * @since v10.0.0 + * @param [len=0] + * @return Fulfills with `undefined` upon success. + */ + function truncate(path: PathLike, len?: number): Promise; + /** + * Removes the directory identified by `path`. + * + * Using `fsPromises.rmdir()` on a file (not a directory) results in the + * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. + * + * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function rmdir(path: PathLike, options?: RmDirOptions): Promise; + /** + * Removes files and directories (modeled on the standard POSIX `rm` utility). + * @since v14.14.0 + * @return Fulfills with `undefined` upon success. + */ + function rm(path: PathLike, options?: RmOptions): Promise; + /** + * Asynchronously creates a directory. + * + * The optional `options` argument can be an integer specifying `mode` (permission + * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory + * that exists results in a + * rejection only when `recursive` is false. + * + * ```js + * import { mkdir } from 'node:fs/promises'; + * + * try { + * const projectFolder = new URL('./test/project/', import.meta.url); + * const createDir = await mkdir(projectFolder, { recursive: true }); + * + * console.log(`created ${createDir}`); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * @since v10.0.0 + * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. + */ + function mkdir( + path: PathLike, + options: MakeDirectoryOptions & { + recursive: true; + }, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir( + path: PathLike, + options?: + | Mode + | (MakeDirectoryOptions & { + recursive?: false | undefined; + }) + | null, + ): Promise; + /** + * Asynchronous mkdir(2) - create a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders + * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. + */ + function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; + /** + * Reads the contents of a directory. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned + * will be passed as `Buffer` objects. + * + * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. + * + * ```js + * import { readdir } from 'node:fs/promises'; + * + * try { + * const files = await readdir(path); + * for (const file of files) + * console.log(file); + * } catch (err) { + * console.error(err); + * } + * ``` + * @since v10.0.0 + * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options: + | { + encoding: "buffer"; + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + } + | "buffer", + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readdir( + path: PathLike, + options?: + | (ObjectEncodingOptions & { + withFileTypes?: false | undefined; + recursive?: boolean | undefined; + }) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronous readdir(3) - read a directory. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. + */ + function readdir( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean | undefined; + }, + ): Promise; + /** + * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is + * fulfilled with the`linkString` upon success. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the link path returned. If the `encoding` is set to `'buffer'`, the link path + * returned will be passed as a `Buffer` object. + * @since v10.0.0 + * @return Fulfills with the `linkString` upon success. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous readlink(2) - read value of a symbolic link. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise; + /** + * Creates a symbolic link. + * + * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will + * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not + * exist, `'file'` will be used. Windows junction points require the destination + * path to be absolute. When using `'junction'`, the `target` argument will + * automatically be normalized to absolute path. Junction points on NTFS volumes + * can only point to directories. + * @since v10.0.0 + * @param [type='null'] + * @return Fulfills with `undefined` upon success. + */ + function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; + /** + * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, + * in which case the link itself is stat-ed, not the file that it refers to. + * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. + */ + function lstat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function lstat( + path: PathLike, + opts: StatOptions & { + bigint: true; + }, + ): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v10.0.0 + * @return Fulfills with the {fs.Stats} object for the given `path`. + */ + function stat( + path: PathLike, + opts?: StatOptions & { + bigint?: false | undefined; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + }, + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; + /** + * @since v19.6.0, v18.15.0 + * @return Fulfills with the {fs.StatFs} object for the given `path`. + */ + function statfs( + path: PathLike, + opts?: StatFsOptions & { + bigint?: false | undefined; + }, + ): Promise; + function statfs( + path: PathLike, + opts: StatFsOptions & { + bigint: true; + }, + ): Promise; + function statfs(path: PathLike, opts?: StatFsOptions): Promise; + /** + * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function link(existingPath: PathLike, newPath: PathLike): Promise; + /** + * If `path` refers to a symbolic link, then the link is removed without affecting + * the file or directory to which that link refers. If the `path` refers to a file + * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function unlink(path: PathLike): Promise; + /** + * Changes the permissions of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the permissions on a symbolic link. + * + * This method is only implemented on macOS. + * @deprecated Since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchmod(path: PathLike, mode: Mode): Promise; + /** + * Changes the ownership on a symbolic link. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function lchown(path: PathLike, uid: number, gid: number): Promise; + /** + * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a + * symbolic link, then the link is not dereferenced: instead, the timestamps of + * the symbolic link itself are changed. + * @since v14.5.0, v12.19.0 + * @return Fulfills with `undefined` upon success. + */ + function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Changes the ownership of a file. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function chown(path: PathLike, uid: number, gid: number): Promise; + /** + * Change the file system timestamps of the object referenced by `path`. + * + * The `atime` and `mtime` arguments follow these rules: + * + * * Values can be either numbers representing Unix epoch time, `Date`s, or a + * numeric string like `'123456789.0'`. + * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. + * @since v10.0.0 + * @return Fulfills with `undefined` upon success. + */ + function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; + /** + * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. + * + * Only paths that can be converted to UTF8 strings are supported. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use for + * the path. If the `encoding` is set to `'buffer'`, the path returned will be + * passed as a `Buffer` object. + * + * On Linux, when Node.js is linked against musl libc, the procfs file system must + * be mounted on `/proc` in order for this function to work. Glibc does not have + * this restriction. + * @since v10.0.0 + * @return Fulfills with the resolved path upon success. + */ + function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath(path: PathLike, options: BufferEncodingOption): Promise; + /** + * Asynchronous realpath(3) - return the canonicalized absolute pathname. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function realpath( + path: PathLike, + options?: ObjectEncodingOptions | BufferEncoding | null, + ): Promise; + /** + * Creates a unique temporary directory. A unique directory name is generated by + * appending six random characters to the end of the provided `prefix`. Due to + * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some + * platforms, notably the BSDs, can return more than six random characters, and + * replace trailing `X` characters in `prefix` with random characters. + * + * The optional `options` argument can be a string specifying an encoding, or an + * object with an `encoding` property specifying the character encoding to use. + * + * ```js + * import { mkdtemp } from 'node:fs/promises'; + * import { join } from 'node:path'; + * import { tmpdir } from 'node:os'; + * + * try { + * await mkdtemp(join(tmpdir(), 'foo-')); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * The `fsPromises.mkdtemp()` method will append the six randomly selected + * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing + * platform-specific path separator + * (`require('node:path').sep`). + * @since v10.0.0 + * @return Fulfills with a string containing the file system path of the newly created temporary directory. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; + /** + * Asynchronously creates a unique temporary directory. + * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. + * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. + */ + function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; + /** + * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an + * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an + * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. + * + * The `encoding` option is ignored if `data` is a buffer. + * + * If `options` is a string, then it specifies the encoding. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * Any specified `FileHandle` has to support writing. + * + * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file + * without waiting for the promise to be settled. + * + * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience + * method that performs multiple `write` calls internally to write the buffer + * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. + * + * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. + * Cancelation is "best effort", and some amount of data is likely still + * to be written. + * + * ```js + * import { writeFile } from 'node:fs/promises'; + * import { Buffer } from 'node:buffer'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const data = new Uint8Array(Buffer.from('Hello Node.js')); + * const promise = writeFile('message.txt', data, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.writeFile` performs. + * @since v10.0.0 + * @param file filename or `FileHandle` + * @return Fulfills with `undefined` upon success. + */ + function writeFile( + file: PathLike | FileHandle, + data: + | string + | NodeJS.ArrayBufferView + | Iterable + | AsyncIterable + | Stream, + options?: + | (ObjectEncodingOptions & { + mode?: Mode | undefined; + flag?: OpenMode | undefined; + /** + * If all data is successfully written to the file, and `flush` + * is `true`, `filehandle.sync()` is used to flush the data. + * @default false + */ + flush?: boolean | undefined; + } & Abortable) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronously append data to a file, creating the file if it does not yet + * exist. `data` can be a string or a `Buffer`. + * + * If `options` is a string, then it specifies the `encoding`. + * + * The `mode` option only affects the newly created file. See `fs.open()` for more details. + * + * The `path` may be specified as a `FileHandle` that has been opened + * for appending (using `fsPromises.open()`). + * @since v10.0.0 + * @param path filename or {FileHandle} + * @return Fulfills with `undefined` upon success. + */ + function appendFile( + path: PathLike | FileHandle, + data: string | Uint8Array, + options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * + * If no encoding is specified (using `options.encoding`), the data is returned + * as a `Buffer` object. Otherwise, the data will be a string. + * + * If `options` is a string, then it specifies the encoding. + * + * When the `path` is a directory, the behavior of `fsPromises.readFile()` is + * platform-specific. On macOS, Linux, and Windows, the promise will be rejected + * with an error. On FreeBSD, a representation of the directory's contents will be + * returned. + * + * An example of reading a `package.json` file located in the same directory of the + * running code: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * try { + * const filePath = new URL('./package.json', import.meta.url); + * const contents = await readFile(filePath, { encoding: 'utf8' }); + * console.log(contents); + * } catch (err) { + * console.error(err.message); + * } + * ``` + * + * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a + * request is aborted the promise returned is rejected with an `AbortError`: + * + * ```js + * import { readFile } from 'node:fs/promises'; + * + * try { + * const controller = new AbortController(); + * const { signal } = controller; + * const promise = readFile(fileName, { signal }); + * + * // Abort the request before the promise settles. + * controller.abort(); + * + * await promise; + * } catch (err) { + * // When a request is aborted - err is an AbortError + * console.error(err); + * } + * ``` + * + * Aborting an ongoing request does not abort individual operating + * system requests but rather the internal buffering `fs.readFile` performs. + * + * Any specified `FileHandle` has to support reading. + * @since v10.0.0 + * @param path filename or `FileHandle` + * @return Fulfills with the contents of the file. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | ({ + encoding?: null | undefined; + flag?: OpenMode | undefined; + } & Abortable) + | null, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options: + | ({ + encoding: BufferEncoding; + flag?: OpenMode | undefined; + } & Abortable) + | BufferEncoding, + ): Promise; + /** + * Asynchronously reads the entire contents of a file. + * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. + * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. + * @param options An object that may contain an optional flag. + * If a flag is not provided, it defaults to `'r'`. + */ + function readFile( + path: PathLike | FileHandle, + options?: + | ( + & ObjectEncodingOptions + & Abortable + & { + flag?: OpenMode | undefined; + } + ) + | BufferEncoding + | null, + ): Promise; + /** + * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. + * + * Creates an `fs.Dir`, which contains all further functions for reading from + * and cleaning up the directory. + * + * The `encoding` option sets the encoding for the `path` while opening the + * directory and subsequent read operations. + * + * Example using async iteration: + * + * ```js + * import { opendir } from 'node:fs/promises'; + * + * try { + * const dir = await opendir('./'); + * for await (const dirent of dir) + * console.log(dirent.name); + * } catch (err) { + * console.error(err); + * } + * ``` + * + * When using the async iterator, the `fs.Dir` object will be automatically + * closed after the iterator exits. + * @since v12.12.0 + * @return Fulfills with an {fs.Dir}. + */ + function opendir(path: PathLike, options?: OpenDirOptions): Promise; + /** + * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. + * + * ```js + * const { watch } = require('node:fs/promises'); + * + * const ac = new AbortController(); + * const { signal } = ac; + * setTimeout(() => ac.abort(), 10000); + * + * (async () => { + * try { + * const watcher = watch(__filename, { signal }); + * for await (const event of watcher) + * console.log(event); + * } catch (err) { + * if (err.name === 'AbortError') + * return; + * throw err; + * } + * })(); + * ``` + * + * On most platforms, `'rename'` is emitted whenever a filename appears or + * disappears in the directory. + * + * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. + * @since v15.9.0, v14.18.0 + * @return of objects with the properties: + */ + function watch( + filename: PathLike, + options: + | (WatchOptions & { + encoding: "buffer"; + }) + | "buffer", + ): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; + /** + * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. + * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. + * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. + * If `encoding` is not supplied, the default of `'utf8'` is used. + * If `persistent` is not supplied, the default of `true` is used. + * If `recursive` is not supplied, the default of `false` is used. + */ + function watch( + filename: PathLike, + options: WatchOptions | string, + ): AsyncIterable> | AsyncIterable>; + /** + * Asynchronously copies the entire directory structure from `src` to `dest`, + * including subdirectories and files. + * + * When copying a directory to another directory, globs are not supported and + * behavior is similar to `cp dir1/ dir2/`. + * @since v16.7.0 + * @experimental + * @param src source path to copy. + * @param dest destination path to copy to. + * @return Fulfills with `undefined` upon success. + */ + function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; +} +declare module "node:fs/promises" { + export * from "fs/promises"; +} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts new file mode 100644 index 0000000..5f25006 --- /dev/null +++ b/node_modules/@types/node/globals.d.ts @@ -0,0 +1,411 @@ +export {}; // Make this a module + +// #region Fetch and friends +// Conditional type aliases, used at the end of this file. +// Will either be empty if lib-dom is included, or the undici version otherwise. +type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request; +type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response; +type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData; +type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers; +type _RequestInit = typeof globalThis extends { onmessage: any } ? {} + : import("undici-types").RequestInit; +type _ResponseInit = typeof globalThis extends { onmessage: any } ? {} + : import("undici-types").ResponseInit; +type _File = typeof globalThis extends { onmessage: any } ? {} : import("node:buffer").File; +// #endregion Fetch and friends + +declare global { + // Declare "static" methods in Error + interface ErrorConstructor { + /** Create .stack property on a target object */ + captureStackTrace(targetObject: object, constructorOpt?: Function): void; + + /** + * Optional override for formatting stack traces + * + * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces + */ + prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; + + stackTraceLimit: number; + } + + /*-----------------------------------------------* + * * + * GLOBAL * + * * + ------------------------------------------------*/ + + // For backwards compability + interface NodeRequire extends NodeJS.Require {} + interface RequireResolve extends NodeJS.RequireResolve {} + interface NodeModule extends NodeJS.Module {} + + var process: NodeJS.Process; + var console: Console; + + var __filename: string; + var __dirname: string; + + var require: NodeRequire; + var module: NodeModule; + + // Same as module.exports + var exports: any; + + /** + * Only available if `--expose-gc` is passed to the process. + */ + var gc: undefined | (() => void); + + // #region borrowed + // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib + /** A controller object that allows you to abort one or more DOM requests as and when desired. */ + interface AbortController { + /** + * Returns the AbortSignal object associated with this object. + */ + + readonly signal: AbortSignal; + /** + * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. + */ + abort(reason?: any): void; + } + + /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ + interface AbortSignal extends EventTarget { + /** + * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. + */ + readonly aborted: boolean; + readonly reason: any; + onabort: null | ((this: AbortSignal, event: Event) => any); + throwIfAborted(): void; + } + + var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T + : { + prototype: AbortController; + new(): AbortController; + }; + + var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T + : { + prototype: AbortSignal; + new(): AbortSignal; + abort(reason?: any): AbortSignal; + timeout(milliseconds: number): AbortSignal; + }; + // #endregion borrowed + + // #region Disposable + interface SymbolConstructor { + /** + * A method that is used to release resources held by an object. Called by the semantics of the `using` statement. + */ + readonly dispose: unique symbol; + + /** + * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement. + */ + readonly asyncDispose: unique symbol; + } + + interface Disposable { + [Symbol.dispose](): void; + } + + interface AsyncDisposable { + [Symbol.asyncDispose](): PromiseLike; + } + // #endregion Disposable + + // #region ArrayLike.at() + interface RelativeIndexable { + /** + * Takes an integer value and returns the item at that index, + * allowing for positive and negative integers. + * Negative integers count back from the last item in the array. + */ + at(index: number): T | undefined; + } + interface String extends RelativeIndexable {} + interface Array extends RelativeIndexable {} + interface ReadonlyArray extends RelativeIndexable {} + interface Int8Array extends RelativeIndexable {} + interface Uint8Array extends RelativeIndexable {} + interface Uint8ClampedArray extends RelativeIndexable {} + interface Int16Array extends RelativeIndexable {} + interface Uint16Array extends RelativeIndexable {} + interface Int32Array extends RelativeIndexable {} + interface Uint32Array extends RelativeIndexable {} + interface Float32Array extends RelativeIndexable {} + interface Float64Array extends RelativeIndexable {} + interface BigInt64Array extends RelativeIndexable {} + interface BigUint64Array extends RelativeIndexable {} + // #endregion ArrayLike.at() end + + /** + * @since v17.0.0 + * + * Creates a deep clone of an object. + */ + function structuredClone( + value: T, + transfer?: { transfer: ReadonlyArray }, + ): T; + + /*----------------------------------------------* + * * + * GLOBAL INTERFACES * + * * + *-----------------------------------------------*/ + namespace NodeJS { + interface CallSite { + /** + * Value of "this" + */ + getThis(): unknown; + + /** + * Type of "this" as a string. + * This is the name of the function stored in the constructor field of + * "this", if available. Otherwise the object's [[Class]] internal + * property. + */ + getTypeName(): string | null; + + /** + * Current function + */ + getFunction(): Function | undefined; + + /** + * Name of the current function, typically its name property. + * If a name property is not available an attempt will be made to try + * to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + * Name of the property [of "this" or one of its prototypes] that holds + * the current function + */ + getMethodName(): string | null; + + /** + * Name of the script [if this function was defined in a script] + */ + getFileName(): string | undefined; + + /** + * Current line number [if this function was defined in a script] + */ + getLineNumber(): number | null; + + /** + * Current column number [if this function was defined in a script] + */ + getColumnNumber(): number | null; + + /** + * A call site object representing the location where eval was called + * [if this function was created using a call to eval] + */ + getEvalOrigin(): string | undefined; + + /** + * Is this a toplevel invocation, that is, is "this" the global object? + */ + isToplevel(): boolean; + + /** + * Does this call take place in code defined by a call to eval? + */ + isEval(): boolean; + + /** + * Is this call in native V8 code? + */ + isNative(): boolean; + + /** + * Is this a constructor call? + */ + isConstructor(): boolean; + + /** + * is this an async call (i.e. await, Promise.all(), or Promise.any())? + */ + isAsync(): boolean; + + /** + * is this an async call to Promise.all()? + */ + isPromiseAll(): boolean; + + /** + * returns the index of the promise element that was followed in + * Promise.all() or Promise.any() for async stack traces, or null + * if the CallSite is not an async + */ + getPromiseIndex(): number | null; + + getScriptNameOrSourceURL(): string; + getScriptHash(): string; + + getEnclosingColumnNumber(): number; + getEnclosingLineNumber(): number; + getPosition(): number; + + toString(): string; + } + + interface ErrnoException extends Error { + errno?: number | undefined; + code?: string | undefined; + path?: string | undefined; + syscall?: string | undefined; + } + + interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: BufferEncoding): this; + pause(): this; + resume(): this; + isPaused(): boolean; + pipe(destination: T, options?: { end?: boolean | undefined }): T; + unpipe(destination?: WritableStream): this; + unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; + wrap(oldStream: ReadableStream): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + + interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + end(cb?: () => void): this; + end(data: string | Uint8Array, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; + } + + interface ReadWriteStream extends ReadableStream, WritableStream {} + + interface RefCounted { + ref(): this; + unref(): this; + } + + type TypedArray = + | Uint8Array + | Uint8ClampedArray + | Uint16Array + | Uint32Array + | Int8Array + | Int16Array + | Int32Array + | BigUint64Array + | BigInt64Array + | Float32Array + | Float64Array; + type ArrayBufferView = TypedArray | DataView; + + interface Require { + (id: string): any; + resolve: RequireResolve; + cache: Dict; + /** + * @deprecated + */ + extensions: RequireExtensions; + main: Module | undefined; + } + + interface RequireResolve { + (id: string, options?: { paths?: string[] | undefined }): string; + paths(request: string): string[] | null; + } + + interface RequireExtensions extends Dict<(m: Module, filename: string) => any> { + ".js": (m: Module, filename: string) => any; + ".json": (m: Module, filename: string) => any; + ".node": (m: Module, filename: string) => any; + } + interface Module { + /** + * `true` if the module is running during the Node.js preload + */ + isPreloading: boolean; + exports: any; + require: Require; + id: string; + filename: string; + loaded: boolean; + /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */ + parent: Module | null | undefined; + children: Module[]; + /** + * @since v11.14.0 + * + * The directory name of the module. This is usually the same as the path.dirname() of the module.id. + */ + path: string; + paths: string[]; + } + + interface Dict { + [key: string]: T | undefined; + } + + interface ReadOnlyDict { + readonly [key: string]: T | undefined; + } + } + + interface RequestInit extends _RequestInit {} + + function fetch( + input: string | URL | globalThis.Request, + init?: RequestInit, + ): Promise; + + interface Request extends _Request {} + var Request: typeof globalThis extends { + onmessage: any; + Request: infer T; + } ? T + : typeof import("undici-types").Request; + + interface ResponseInit extends _ResponseInit {} + + interface Response extends _Response {} + var Response: typeof globalThis extends { + onmessage: any; + Response: infer T; + } ? T + : typeof import("undici-types").Response; + + interface FormData extends _FormData {} + var FormData: typeof globalThis extends { + onmessage: any; + FormData: infer T; + } ? T + : typeof import("undici-types").FormData; + + interface Headers extends _Headers {} + var Headers: typeof globalThis extends { + onmessage: any; + Headers: infer T; + } ? T + : typeof import("undici-types").Headers; + + interface File extends _File {} + var File: typeof globalThis extends { + onmessage: any; + File: infer T; + } ? T + : typeof import("node:buffer").File; +} diff --git a/node_modules/@types/node/globals.global.d.ts b/node_modules/@types/node/globals.global.d.ts new file mode 100644 index 0000000..ef1198c --- /dev/null +++ b/node_modules/@types/node/globals.global.d.ts @@ -0,0 +1 @@ +declare var global: typeof globalThis; diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts new file mode 100644 index 0000000..6953c74 --- /dev/null +++ b/node_modules/@types/node/http.d.ts @@ -0,0 +1,1889 @@ +/** + * To use the HTTP server and client one must `require('node:http')`. + * + * The HTTP interfaces in Node.js are designed to support many features + * of the protocol which have been traditionally difficult to use. + * In particular, large, possibly chunk-encoded, messages. The interface is + * careful to never buffer entire requests or responses, so the + * user is able to stream data. + * + * HTTP message headers are represented by an object like this: + * + * ```json + * { "content-length": "123", + * "content-type": "text/plain", + * "connection": "keep-alive", + * "host": "example.com", + * "accept": "*" } + * ``` + * + * Keys are lowercased. Values are not modified. + * + * In order to support the full spectrum of possible HTTP applications, the Node.js + * HTTP API is very low-level. It deals with stream handling and message + * parsing only. It parses a message into headers and body but it does not + * parse the actual headers or the body. + * + * See `message.headers` for details on how duplicate headers are handled. + * + * The raw headers as they were received are retained in the `rawHeaders`property, which is an array of `[key, value, key2, value2, ...]`. For + * example, the previous message header object might have a `rawHeaders`list like the following: + * + * ```js + * [ 'ConTent-Length', '123456', + * 'content-LENGTH', '123', + * 'content-type', 'text/plain', + * 'CONNECTION', 'keep-alive', + * 'Host', 'example.com', + * 'accepT', '*' ] + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/http.js) + */ +declare module "http" { + import * as stream from "node:stream"; + import { URL } from "node:url"; + import { LookupOptions } from "node:dns"; + import { EventEmitter } from "node:events"; + import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net"; + // incoming headers will never contain number + interface IncomingHttpHeaders extends NodeJS.Dict { + accept?: string | undefined; + "accept-language"?: string | undefined; + "accept-patch"?: string | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + "alt-svc"?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + connection?: string | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-type"?: string | undefined; + cookie?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + location?: string | undefined; + origin?: string | undefined; + pragma?: string | undefined; + "proxy-authenticate"?: string | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "retry-after"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | undefined; + "sec-websocket-version"?: string | undefined; + "set-cookie"?: string[] | undefined; + "strict-transport-security"?: string | undefined; + tk?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + upgrade?: string | undefined; + "user-agent"?: string | undefined; + vary?: string | undefined; + via?: string | undefined; + warning?: string | undefined; + "www-authenticate"?: string | undefined; + } + // outgoing headers allows numbers (as they are converted internally to strings) + type OutgoingHttpHeader = number | string | string[]; + interface OutgoingHttpHeaders extends NodeJS.Dict { + accept?: string | string[] | undefined; + "accept-charset"?: string | string[] | undefined; + "accept-encoding"?: string | string[] | undefined; + "accept-language"?: string | string[] | undefined; + "accept-ranges"?: string | undefined; + "access-control-allow-credentials"?: string | undefined; + "access-control-allow-headers"?: string | undefined; + "access-control-allow-methods"?: string | undefined; + "access-control-allow-origin"?: string | undefined; + "access-control-expose-headers"?: string | undefined; + "access-control-max-age"?: string | undefined; + "access-control-request-headers"?: string | undefined; + "access-control-request-method"?: string | undefined; + age?: string | undefined; + allow?: string | undefined; + authorization?: string | undefined; + "cache-control"?: string | undefined; + "cdn-cache-control"?: string | undefined; + connection?: string | string[] | undefined; + "content-disposition"?: string | undefined; + "content-encoding"?: string | undefined; + "content-language"?: string | undefined; + "content-length"?: string | number | undefined; + "content-location"?: string | undefined; + "content-range"?: string | undefined; + "content-security-policy"?: string | undefined; + "content-security-policy-report-only"?: string | undefined; + cookie?: string | string[] | undefined; + dav?: string | string[] | undefined; + dnt?: string | undefined; + date?: string | undefined; + etag?: string | undefined; + expect?: string | undefined; + expires?: string | undefined; + forwarded?: string | undefined; + from?: string | undefined; + host?: string | undefined; + "if-match"?: string | undefined; + "if-modified-since"?: string | undefined; + "if-none-match"?: string | undefined; + "if-range"?: string | undefined; + "if-unmodified-since"?: string | undefined; + "last-modified"?: string | undefined; + link?: string | string[] | undefined; + location?: string | undefined; + "max-forwards"?: string | undefined; + origin?: string | undefined; + prgama?: string | string[] | undefined; + "proxy-authenticate"?: string | string[] | undefined; + "proxy-authorization"?: string | undefined; + "public-key-pins"?: string | undefined; + "public-key-pins-report-only"?: string | undefined; + range?: string | undefined; + referer?: string | undefined; + "referrer-policy"?: string | undefined; + refresh?: string | undefined; + "retry-after"?: string | undefined; + "sec-websocket-accept"?: string | undefined; + "sec-websocket-extensions"?: string | string[] | undefined; + "sec-websocket-key"?: string | undefined; + "sec-websocket-protocol"?: string | string[] | undefined; + "sec-websocket-version"?: string | undefined; + server?: string | undefined; + "set-cookie"?: string | string[] | undefined; + "strict-transport-security"?: string | undefined; + te?: string | undefined; + trailer?: string | undefined; + "transfer-encoding"?: string | undefined; + "user-agent"?: string | undefined; + upgrade?: string | undefined; + "upgrade-insecure-requests"?: string | undefined; + vary?: string | undefined; + via?: string | string[] | undefined; + warning?: string | undefined; + "www-authenticate"?: string | string[] | undefined; + "x-content-type-options"?: string | undefined; + "x-dns-prefetch-control"?: string | undefined; + "x-frame-options"?: string | undefined; + "x-xss-protection"?: string | undefined; + } + interface ClientRequestArgs { + _defaultAgent?: Agent | undefined; + agent?: Agent | boolean | undefined; + auth?: string | null | undefined; + createConnection?: + | (( + options: ClientRequestArgs, + oncreate: (err: Error | null, socket: stream.Duplex) => void, + ) => stream.Duplex | null | undefined) + | undefined; + defaultPort?: number | string | undefined; + family?: number | undefined; + headers?: OutgoingHttpHeaders | undefined; + hints?: LookupOptions["hints"]; + host?: string | null | undefined; + hostname?: string | null | undefined; + insecureHTTPParser?: boolean | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + lookup?: LookupFunction | undefined; + /** + * @default 16384 + */ + maxHeaderSize?: number | undefined; + method?: string | undefined; + path?: string | null | undefined; + port?: number | string | null | undefined; + protocol?: string | null | undefined; + setHost?: boolean | undefined; + signal?: AbortSignal | undefined; + socketPath?: string | undefined; + timeout?: number | undefined; + uniqueHeaders?: Array | undefined; + joinDuplicateHeaders?: boolean; + } + interface ServerOptions< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > { + /** + * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. + */ + IncomingMessage?: Request | undefined; + /** + * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. + */ + ServerResponse?: Response | undefined; + /** + * Sets the timeout value in milliseconds for receiving the entire request from the client. + * @see Server.requestTimeout for more information. + * @default 300000 + * @since v18.0.0 + */ + requestTimeout?: number | undefined; + /** + * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. + * @default false + * @since v18.14.0 + */ + joinDuplicateHeaders?: boolean; + /** + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * @see Server.keepAliveTimeout for more information. + * @default 5000 + * @since v18.0.0 + */ + keepAliveTimeout?: number | undefined; + /** + * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. + * @default 30000 + */ + connectionsCheckingInterval?: number | undefined; + /** + * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. + * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. + * Default: @see stream.getDefaultHighWaterMark(). + * @since v20.1.0 + */ + highWaterMark?: number | undefined; + /** + * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. + * Using the insecure parser should be avoided. + * See --insecure-http-parser for more information. + * @default false + */ + insecureHTTPParser?: boolean | undefined; + /** + * Optionally overrides the value of + * `--max-http-header-size` for requests received by this server, i.e. + * the maximum length of request headers in bytes. + * @default 16384 + * @since v13.3.0 + */ + maxHeaderSize?: number | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default true + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + /** + * A list of response headers that should be sent only once. + * If the header's value is an array, the items will be joined using `; `. + */ + uniqueHeaders?: Array | undefined; + } + type RequestListener< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; + /** + * @since v0.1.17 + */ + class Server< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + > extends NetServer { + constructor(requestListener?: RequestListener); + constructor(options: ServerOptions, requestListener?: RequestListener); + /** + * Sets the timeout value for sockets, and emits a `'timeout'` event on + * the Server object, passing the socket as an argument, if a timeout + * occurs. + * + * If there is a `'timeout'` event listener on the Server object, then it + * will be called with the timed-out socket as an argument. + * + * By default, the Server does not timeout sockets. However, if a callback + * is assigned to the Server's `'timeout'` event, timeouts must be handled + * explicitly. + * @since v0.9.12 + * @param [msecs=0 (no timeout)] + */ + setTimeout(msecs?: number, callback?: () => void): this; + setTimeout(callback: () => void): this; + /** + * Limits maximum incoming headers count. If set to 0, no limit will be applied. + * @since v0.7.0 + */ + maxHeadersCount: number | null; + /** + * The maximum number of requests socket can handle + * before closing keep alive connection. + * + * A value of `0` will disable the limit. + * + * When the limit is reached it will set the `Connection` header value to `close`, + * but will not actually close the connection, subsequent requests sent + * after the limit is reached will get `503 Service Unavailable` as a response. + * @since v16.10.0 + */ + maxRequestsPerSocket: number | null; + /** + * The number of milliseconds of inactivity before a socket is presumed + * to have timed out. + * + * A value of `0` will disable the timeout behavior on incoming connections. + * + * The socket timeout logic is set up on connection, so changing this + * value only affects new connections to the server, not any existing connections. + * @since v0.9.12 + */ + timeout: number; + /** + * Limit the amount of time the parser will wait to receive the complete HTTP + * headers. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v11.3.0, v10.14.0 + */ + headersTimeout: number; + /** + * The number of milliseconds of inactivity a server needs to wait for additional + * incoming data, after it has finished writing the last response, before a socket + * will be destroyed. If the server receives new data before the keep-alive + * timeout has fired, it will reset the regular inactivity timeout, i.e.,`server.timeout`. + * + * A value of `0` will disable the keep-alive timeout behavior on incoming + * connections. + * A value of `0` makes the http server behave similarly to Node.js versions prior + * to 8.0.0, which did not have a keep-alive timeout. + * + * The socket timeout logic is set up on connection, so changing this value only + * affects new connections to the server, not any existing connections. + * @since v8.0.0 + */ + keepAliveTimeout: number; + /** + * Sets the timeout value in milliseconds for receiving the entire request from + * the client. + * + * If the timeout expires, the server responds with status 408 without + * forwarding the request to the request listener and then closes the connection. + * + * It must be set to a non-zero value (e.g. 120 seconds) to protect against + * potential Denial-of-Service attacks in case the server is deployed without a + * reverse proxy in front. + * @since v14.11.0 + */ + requestTimeout: number; + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request + * or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "checkContinue", listener: RequestListener): this; + addListener(event: "checkExpectation", listener: RequestListener): this; + addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; + addListener( + event: "connect", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + addListener(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; + addListener(event: "request", listener: RequestListener): this; + addListener( + event: "upgrade", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit( + event: "checkContinue", + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit( + event: "checkExpectation", + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: "clientError", err: Error, socket: stream.Duplex): boolean; + emit(event: "connect", req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + emit(event: "dropRequest", req: InstanceType, socket: stream.Duplex): boolean; + emit( + event: "request", + req: InstanceType, + res: InstanceType & { req: InstanceType }, + ): boolean; + emit(event: "upgrade", req: InstanceType, socket: stream.Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "checkContinue", listener: RequestListener): this; + on(event: "checkExpectation", listener: RequestListener): this; + on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; + on(event: "connect", listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + on(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; + on(event: "request", listener: RequestListener): this; + on(event: "upgrade", listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "checkContinue", listener: RequestListener): this; + once(event: "checkExpectation", listener: RequestListener): this; + once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; + once( + event: "connect", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + once(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; + once(event: "request", listener: RequestListener): this; + once( + event: "upgrade", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "checkContinue", listener: RequestListener): this; + prependListener(event: "checkExpectation", listener: RequestListener): this; + prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; + prependListener( + event: "connect", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependListener( + event: "dropRequest", + listener: (req: InstanceType, socket: stream.Duplex) => void, + ): this; + prependListener(event: "request", listener: RequestListener): this; + prependListener( + event: "upgrade", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "checkContinue", listener: RequestListener): this; + prependOnceListener(event: "checkExpectation", listener: RequestListener): this; + prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; + prependOnceListener( + event: "connect", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + prependOnceListener( + event: "dropRequest", + listener: (req: InstanceType, socket: stream.Duplex) => void, + ): this; + prependOnceListener(event: "request", listener: RequestListener): this; + prependOnceListener( + event: "upgrade", + listener: (req: InstanceType, socket: stream.Duplex, head: Buffer) => void, + ): this; + } + /** + * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from + * the perspective of the participants of an HTTP transaction. + * @since v0.1.17 + */ + class OutgoingMessage extends stream.Writable { + readonly req: Request; + chunkedEncoding: boolean; + shouldKeepAlive: boolean; + useChunkedEncodingByDefault: boolean; + sendDate: boolean; + /** + * @deprecated Use `writableEnded` instead. + */ + finished: boolean; + /** + * Read-only. `true` if the headers were sent, otherwise `false`. + * @since v0.9.3 + */ + readonly headersSent: boolean; + /** + * Alias of `outgoingMessage.socket`. + * @since v0.3.0 + * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. + */ + readonly connection: Socket | null; + /** + * Reference to the underlying socket. Usually, users will not want to access + * this property. + * + * After calling `outgoingMessage.end()`, this property will be nulled. + * @since v0.3.0 + */ + readonly socket: Socket | null; + constructor(); + /** + * Once a socket is associated with the message and is connected,`socket.setTimeout()` will be called with `msecs` as the first parameter. + * @since v0.9.12 + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * Sets a single header value. If the header already exists in the to-be-sent + * headers, its value will be replaced. Use an array of strings to send multiple + * headers with the same name. + * @since v0.4.0 + * @param name Header name + * @param value Header value + */ + setHeader(name: string, value: number | string | readonly string[]): this; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple + * times. + * + * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. + * + * Depending of the value of `options.uniqueHeaders` when the client request or the + * server were created, this will end up in the header being sent multiple times or + * a single time with values joined using `; `. + * @since v18.3.0, v16.17.0 + * @param name Header name + * @param value Header value + */ + appendHeader(name: string, value: string | readonly string[]): this; + /** + * Gets the value of the HTTP header with the given name. If that header is not + * set, the returned value will be `undefined`. + * @since v0.4.0 + * @param name Name of header + */ + getHeader(name: string): number | string | string[] | undefined; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow + * copy is used, array values may be mutated without additional calls to + * various header-related HTTP module methods. The keys of the returned + * object are the header names and the values are the respective header + * values. All header names are lowercase. + * + * The object returned by the `outgoingMessage.getHeaders()` method does + * not prototypically inherit from the JavaScript `Object`. This means that + * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, + * and others are not defined and will not work. + * + * ```js + * outgoingMessage.setHeader('Foo', 'bar'); + * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = outgoingMessage.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v7.7.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All names are lowercase. + * @since v7.7.0 + */ + getHeaderNames(): string[]; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name is case-insensitive. + * + * ```js + * const hasContentType = outgoingMessage.hasHeader('content-type'); + * ``` + * @since v7.7.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that is queued for implicit sending. + * + * ```js + * outgoingMessage.removeHeader('Content-Encoding'); + * ``` + * @since v0.4.0 + * @param name Header name + */ + removeHeader(name: string): void; + /** + * Adds HTTP trailers (headers but at the end of the message) to the message. + * + * Trailers will **only** be emitted if the message is chunked encoded. If not, + * the trailers will be silently discarded. + * + * HTTP requires the `Trailer` header to be sent to emit trailers, + * with a list of header field names in its value, e.g. + * + * ```js + * message.writeHead(200, { 'Content-Type': 'text/plain', + * 'Trailer': 'Content-MD5' }); + * message.write(fileData); + * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); + * message.end(); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v0.3.0 + */ + addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; + /** + * Flushes the message headers. + * + * For efficiency reason, Node.js normally buffers the message headers + * until `outgoingMessage.end()` is called or the first chunk of message data + * is written. It then tries to pack the headers and data into a single TCP + * packet. + * + * It is usually desired (it saves a TCP round-trip), but not when the first + * data is not sent until possibly much later. `outgoingMessage.flushHeaders()`bypasses the optimization and kickstarts the message. + * @since v1.6.0 + */ + flushHeaders(): void; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v0.1.17 + */ + class ServerResponse extends OutgoingMessage { + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v0.4.0 + */ + statusCode: number; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status message that will be sent to the client when + * the headers get flushed. If this is left as `undefined` then the standard + * message for the status code will be used. + * + * ```js + * response.statusMessage = 'Not found'; + * ``` + * + * After response header was sent to the client, this property indicates the + * status message which was sent out. + * @since v0.11.8 + */ + statusMessage: string; + /** + * If set to `true`, Node.js will check whether the `Content-Length`header value and the size of the body, in bytes, are equal. + * Mismatching the `Content-Length` header value will result + * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * @since v18.10.0, v16.18.0 + */ + strictContentLength: boolean; + constructor(req: Request); + assignSocket(socket: Socket): void; + detachSocket(socket: Socket): void; + /** + * Sends an HTTP/1.1 100 Continue message to the client, indicating that + * the request body should be sent. See the `'checkContinue'` event on`Server`. + * @since v0.3.0 + */ + writeContinue(callback?: () => void): void; + /** + * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. The optional `callback` argument will be called when + * the response message has been written. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * 'x-trace-id': 'id for diagnostics', + * }); + * + * const earlyHintsCallback = () => console.log('early hints message sent'); + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }, earlyHintsCallback); + * ``` + * @since v18.11.0 + * @param hints An object containing the values of headers + * @param callback Will be called when the response message has been written + */ + writeEarlyHints(hints: Record, callback?: () => void): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * Optionally one can give a human-readable `statusMessage` as the second + * argument. + * + * `headers` may be an `Array` where the keys and values are in the same list. + * It is _not_ a list of tuples. So, the even-numbered offsets are key values, + * and the odd-numbered offsets are the associated values. The array is in the same + * format as `request.rawHeaders`. + * + * Returns a reference to the `ServerResponse`, so that calls can be chained. + * + * ```js + * const body = 'hello world'; + * response + * .writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain', + * }) + * .end(body); + * ``` + * + * This method must only be called once on a message and it must + * be called before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * If this method is called and `response.setHeader()` has not been called, + * it will directly write the supplied header values onto the network channel + * without caching internally, and the `response.getHeader()` on the header + * will not yield the expected result. If progressive population of headers is + * desired with potential future retrieval and modification, use `response.setHeader()` instead. + * + * ```js + * // Returns content-type = text/plain + * const server = http.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain' }); + * res.end('ok'); + * }); + * ``` + * + * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js + * will check whether `Content-Length` and the length of the body which has + * been transmitted are equal or not. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a \[`Error`\]\[\] being thrown. + * @since v0.1.30 + */ + writeHead( + statusCode: number, + statusMessage?: string, + headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], + ): this; + writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; + /** + * Sends a HTTP/1.1 102 Processing message to the client, indicating that + * the request body should be sent. + * @since v10.0.0 + */ + writeProcessing(): void; + } + interface InformationEvent { + statusCode: number; + statusMessage: string; + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + headers: IncomingHttpHeaders; + rawHeaders: string[]; + } + /** + * This object is created internally and returned from {@link request}. It + * represents an _in-progress_ request whose header has already been queued. The + * header is still mutable using the `setHeader(name, value)`,`getHeader(name)`, `removeHeader(name)` API. The actual header will + * be sent along with the first data chunk or when calling `request.end()`. + * + * To get the response, add a listener for `'response'` to the request object.`'response'` will be emitted from the request object when the response + * headers have been received. The `'response'` event is executed with one + * argument which is an instance of {@link IncomingMessage}. + * + * During the `'response'` event, one can add listeners to the + * response object; particularly to listen for the `'data'` event. + * + * If no `'response'` handler is added, then the response will be + * entirely discarded. However, if a `'response'` event handler is added, + * then the data from the response object **must** be consumed, either by + * calling `response.read()` whenever there is a `'readable'` event, or + * by adding a `'data'` handler, or by calling the `.resume()` method. + * Until the data is consumed, the `'end'` event will not fire. Also, until + * the data is read it will consume memory that can eventually lead to a + * 'process out of memory' error. + * + * For backward compatibility, `res` will only emit `'error'` if there is an`'error'` listener registered. + * + * Set `Content-Length` header to limit the response body size. + * If `response.strictContentLength` is set to `true`, mismatching the`Content-Length` header value will result in an `Error` being thrown, + * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. + * + * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. + * @since v0.1.17 + */ + class ClientRequest extends OutgoingMessage { + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v0.11.14 + * @deprecated Since v17.0.0,v16.12.0 - Check `destroyed` instead. + */ + aborted: boolean; + /** + * The request host. + * @since v14.5.0, v12.19.0 + */ + host: string; + /** + * The request protocol. + * @since v14.5.0, v12.19.0 + */ + protocol: string; + /** + * When sending request through a keep-alive enabled agent, the underlying socket + * might be reused. But if server closes connection at unfortunate time, client + * may run into a 'ECONNRESET' error. + * + * ```js + * import http from 'node:http'; + * + * // Server has a 5 seconds keep-alive timeout by default + * http + * .createServer((req, res) => { + * res.write('hello\n'); + * res.end(); + * }) + * .listen(3000); + * + * setInterval(() => { + * // Adapting a keep-alive agent + * http.get('http://localhost:3000', { agent }, (res) => { + * res.on('data', (data) => { + * // Do nothing + * }); + * }); + * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout + * ``` + * + * By marking a request whether it reused socket or not, we can do + * automatic error retry base on it. + * + * ```js + * import http from 'node:http'; + * const agent = new http.Agent({ keepAlive: true }); + * + * function retriableRequest() { + * const req = http + * .get('http://localhost:3000', { agent }, (res) => { + * // ... + * }) + * .on('error', (err) => { + * // Check if retry is needed + * if (req.reusedSocket && err.code === 'ECONNRESET') { + * retriableRequest(); + * } + * }); + * } + * + * retriableRequest(); + * ``` + * @since v13.0.0, v12.16.0 + */ + reusedSocket: boolean; + /** + * Limits maximum response headers count. If set to 0, no limit will be applied. + */ + maxHeadersCount: number; + constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); + /** + * The request method. + * @since v0.1.97 + */ + method: string; + /** + * The request path. + * @since v0.4.0 + */ + path: string; + /** + * Marks the request as aborting. Calling this will cause remaining data + * in the response to be dropped and the socket to be destroyed. + * @since v0.3.8 + * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. + */ + abort(): void; + onSocket(socket: Socket): void; + /** + * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. + * @since v0.5.9 + * @param timeout Milliseconds before a request times out. + * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. + * @since v0.5.9 + */ + setNoDelay(noDelay?: boolean): void; + /** + * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. + * @since v0.5.9 + */ + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + /** + * Returns an array containing the unique names of the current outgoing raw + * headers. Header names are returned with their exact casing being set. + * + * ```js + * request.setHeader('Foo', 'bar'); + * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = request.getRawHeaderNames(); + * // headerNames === ['Foo', 'Set-Cookie'] + * ``` + * @since v15.13.0, v14.17.0 + */ + getRawHeaderNames(): string[]; + /** + * @deprecated + */ + addListener(event: "abort", listener: () => void): this; + addListener( + event: "connect", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + addListener(event: "continue", listener: () => void): this; + addListener(event: "information", listener: (info: InformationEvent) => void): this; + addListener(event: "response", listener: (response: IncomingMessage) => void): this; + addListener(event: "socket", listener: (socket: Socket) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener( + event: "upgrade", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + on(event: "abort", listener: () => void): this; + on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: "continue", listener: () => void): this; + on(event: "information", listener: (info: InformationEvent) => void): this; + on(event: "response", listener: (response: IncomingMessage) => void): this; + on(event: "socket", listener: (socket: Socket) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + once(event: "abort", listener: () => void): this; + once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: "continue", listener: () => void): this; + once(event: "information", listener: (info: InformationEvent) => void): this; + once(event: "response", listener: (response: IncomingMessage) => void): this; + once(event: "socket", listener: (socket: Socket) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + prependListener(event: "abort", listener: () => void): this; + prependListener( + event: "connect", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependListener(event: "continue", listener: () => void): this; + prependListener(event: "information", listener: (info: InformationEvent) => void): this; + prependListener(event: "response", listener: (response: IncomingMessage) => void): this; + prependListener(event: "socket", listener: (socket: Socket) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener( + event: "upgrade", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + /** + * @deprecated + */ + prependOnceListener(event: "abort", listener: () => void): this; + prependOnceListener( + event: "connect", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependOnceListener(event: "continue", listener: () => void): this; + prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this; + prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this; + prependOnceListener(event: "socket", listener: (socket: Socket) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener( + event: "upgrade", + listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void, + ): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to + * access response + * status, headers, and data. + * + * Different from its `socket` value which is a subclass of `stream.Duplex`, the`IncomingMessage` itself extends `stream.Readable` and is created separately to + * parse and emit the incoming HTTP headers and payload, as the underlying socket + * may be reused multiple times in case of keep-alive. + * @since v0.1.17 + */ + class IncomingMessage extends stream.Readable { + constructor(socket: Socket); + /** + * The `message.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. + */ + aborted: boolean; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. + * Probably either `'1.1'` or `'1.0'`. + * + * Also `message.httpVersionMajor` is the first integer and`message.httpVersionMinor` is the second. + * @since v0.1.1 + */ + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + /** + * The `message.complete` property will be `true` if a complete HTTP message has + * been received and successfully parsed. + * + * This property is particularly useful as a means of determining if a client or + * server fully transmitted a message before a connection was terminated: + * + * ```js + * const req = http.request({ + * host: '127.0.0.1', + * port: 8080, + * method: 'POST', + * }, (res) => { + * res.resume(); + * res.on('end', () => { + * if (!res.complete) + * console.error( + * 'The connection was terminated while the message was still being sent'); + * }); + * }); + * ``` + * @since v0.3.0 + */ + complete: boolean; + /** + * Alias for `message.socket`. + * @since v0.1.90 + * @deprecated Since v16.0.0 - Use `socket`. + */ + connection: Socket; + /** + * The `net.Socket` object associated with the connection. + * + * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the + * client's authentication details. + * + * This property is guaranteed to be an instance of the `net.Socket` class, + * a subclass of `stream.Duplex`, unless the user specified a socket + * type other than `net.Socket` or internally nulled. + * @since v0.3.0 + */ + socket: Socket; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * Duplicates in raw headers are handled in the following ways, depending on the + * header name: + * + * * Duplicates of `age`, `authorization`, `content-length`, `content-type`,`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,`last-modified`, `location`, + * `max-forwards`, `proxy-authorization`, `referer`,`retry-after`, `server`, or `user-agent` are discarded. + * To allow duplicate values of the headers listed above to be joined, + * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more + * information. + * * `set-cookie` is always an array. Duplicates are added to the array. + * * For duplicate `cookie` headers, the values are joined together with `; `. + * * For all other headers, the values are joined together with `, `. + * @since v0.1.5 + */ + headers: IncomingHttpHeaders; + /** + * Similar to `message.headers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': ['curl/7.22.0'], + * // host: ['127.0.0.1:8000'], + * // accept: ['*'] } + * console.log(request.headersDistinct); + * ``` + * @since v18.3.0, v16.17.0 + */ + headersDistinct: NodeJS.Dict; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v0.11.6 + */ + rawHeaders: string[]; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v0.3.0 + */ + trailers: NodeJS.Dict; + /** + * Similar to `message.trailers`, but there is no join logic and the values are + * always arrays of strings, even for headers received just once. + * Only populated at the `'end'` event. + * @since v18.3.0, v16.17.0 + */ + trailersDistinct: NodeJS.Dict; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v0.11.6 + */ + rawTrailers: string[]; + /** + * Calls `message.socket.setTimeout(msecs, callback)`. + * @since v0.5.9 + */ + setTimeout(msecs: number, callback?: () => void): this; + /** + * **Only valid for request obtained from {@link Server}.** + * + * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. + * @since v0.1.1 + */ + method?: string | undefined; + /** + * **Only valid for request obtained from {@link Server}.** + * + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. Take the following request: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * To parse the URL into its parts: + * + * ```js + * new URL(request.url, `http://${request.headers.host}`); + * ``` + * + * When `request.url` is `'/status?name=ryan'` and `request.headers.host` is`'localhost:3000'`: + * + * ```console + * $ node + * > new URL(request.url, `http://${request.headers.host}`) + * URL { + * href: 'http://localhost:3000/status?name=ryan', + * origin: 'http://localhost:3000', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'localhost:3000', + * hostname: 'localhost', + * port: '3000', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v0.1.90 + */ + url?: string | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The 3-digit HTTP response status code. E.G. `404`. + * @since v0.1.1 + */ + statusCode?: number | undefined; + /** + * **Only valid for response obtained from {@link ClientRequest}.** + * + * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. + * @since v0.11.10 + */ + statusMessage?: string | undefined; + /** + * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`is provided, an `'error'` event is emitted on the socket and `error` is passed + * as an argument to any listeners on the event. + * @since v0.3.0 + */ + destroy(error?: Error): this; + } + interface AgentOptions extends Partial { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean | undefined; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number | undefined; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number | undefined; + /** + * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. + */ + maxTotalSockets?: number | undefined; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number | undefined; + /** + * Socket timeout in milliseconds. This will set the timeout after the socket is connected. + */ + timeout?: number | undefined; + /** + * Scheduling strategy to apply when picking the next free socket to use. + * @default `lifo` + */ + scheduling?: "fifo" | "lifo" | undefined; + } + /** + * An `Agent` is responsible for managing connection persistence + * and reuse for HTTP clients. It maintains a queue of pending requests + * for a given host and port, reusing a single socket connection for each + * until the queue is empty, at which time the socket is either destroyed + * or put into a pool where it is kept to be used again for requests to the + * same host and port. Whether it is destroyed or pooled depends on the`keepAlive` `option`. + * + * Pooled connections have TCP Keep-Alive enabled for them, but servers may + * still close idle connections, in which case they will be removed from the + * pool and a new connection will be made when a new HTTP request is made for + * that host and port. Servers may also refuse to allow multiple requests + * over the same connection, in which case the connection will have to be + * remade for every request and cannot be pooled. The `Agent` will still make + * the requests to that server, but each one will occur over a new connection. + * + * When a connection is closed by the client or the server, it is removed + * from the pool. Any unused sockets in the pool will be unrefed so as not + * to keep the Node.js process running when there are no outstanding requests. + * (see `socket.unref()`). + * + * It is good practice, to `destroy()` an `Agent` instance when it is no + * longer in use, because unused sockets consume OS resources. + * + * Sockets are removed from an agent when the socket emits either + * a `'close'` event or an `'agentRemove'` event. When intending to keep one + * HTTP request open for a long time without keeping it in the agent, something + * like the following may be done: + * + * ```js + * http.get(options, (res) => { + * // Do stuff + * }).on('socket', (socket) => { + * socket.emit('agentRemove'); + * }); + * ``` + * + * An agent may also be used for an individual request. By providing`{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options + * will be used + * for the client connection. + * + * `agent:false`: + * + * ```js + * http.get({ + * hostname: 'localhost', + * port: 80, + * path: '/', + * agent: false, // Create a new agent just for this one request + * }, (res) => { + * // Do stuff with response + * }); + * ``` + * @since v0.3.4 + */ + class Agent extends EventEmitter { + /** + * By default set to 256. For agents with `keepAlive` enabled, this + * sets the maximum number of sockets that will be left open in the free + * state. + * @since v0.11.7 + */ + maxFreeSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open per origin. Origin is the returned value of `agent.getName()`. + * @since v0.3.6 + */ + maxSockets: number; + /** + * By default set to `Infinity`. Determines how many concurrent sockets the agent + * can have open. Unlike `maxSockets`, this parameter applies across all origins. + * @since v14.5.0, v12.19.0 + */ + maxTotalSockets: number; + /** + * An object which contains arrays of sockets currently awaiting use by + * the agent when `keepAlive` is enabled. Do not modify. + * + * Sockets in the `freeSockets` list will be automatically destroyed and + * removed from the array on `'timeout'`. + * @since v0.11.4 + */ + readonly freeSockets: NodeJS.ReadOnlyDict; + /** + * An object which contains arrays of sockets currently in use by the + * agent. Do not modify. + * @since v0.3.6 + */ + readonly sockets: NodeJS.ReadOnlyDict; + /** + * An object which contains queues of requests that have not yet been assigned to + * sockets. Do not modify. + * @since v0.5.9 + */ + readonly requests: NodeJS.ReadOnlyDict; + constructor(opts?: AgentOptions); + /** + * Destroy any sockets that are currently in use by the agent. + * + * It is usually not necessary to do this. However, if using an + * agent with `keepAlive` enabled, then it is best to explicitly shut down + * the agent when it is no longer needed. Otherwise, + * sockets might stay open for quite a long time before the server + * terminates them. + * @since v0.11.4 + */ + destroy(): void; + } + const METHODS: string[]; + const STATUS_CODES: { + [errorCode: number]: string | undefined; + [errorCode: string]: string | undefined; + }; + /** + * Returns a new instance of {@link Server}. + * + * The `requestListener` is a function which is automatically + * added to the `'request'` event. + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * + * ```js + * import http from 'node:http'; + * + * // Create a local server to receive data from + * const server = http.createServer(); + * + * // Listen to the request event + * server.on('request', (request, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.1.13 + */ + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >(requestListener?: RequestListener): Server; + function createServer< + Request extends typeof IncomingMessage = typeof IncomingMessage, + Response extends typeof ServerResponse = typeof ServerResponse, + >( + options: ServerOptions, + requestListener?: RequestListener, + ): Server; + // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, + // create interface RequestOptions would make the naming more clear to developers + interface RequestOptions extends ClientRequestArgs {} + /** + * `options` in `socket.connect()` are also supported. + * + * Node.js maintains several connections per server to make HTTP requests. + * This function allows one to transparently issue requests. + * + * `url` can be a string or a `URL` object. If `url` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * If both `url` and `options` are specified, the objects are merged, with the`options` properties taking precedence. + * + * The optional `callback` parameter will be added as a one-time listener for + * the `'response'` event. + * + * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * import http from 'node:http'; + * import { Buffer } from 'node:buffer'; + * + * const postData = JSON.stringify({ + * 'msg': 'Hello World!', + * }); + * + * const options = { + * hostname: 'www.google.com', + * port: 80, + * path: '/upload', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'Content-Length': Buffer.byteLength(postData), + * }, + * }; + * + * const req = http.request(options, (res) => { + * console.log(`STATUS: ${res.statusCode}`); + * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); + * res.setEncoding('utf8'); + * res.on('data', (chunk) => { + * console.log(`BODY: ${chunk}`); + * }); + * res.on('end', () => { + * console.log('No more data in response.'); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(`problem with request: ${e.message}`); + * }); + * + * // Write data to request body + * req.write(postData); + * req.end(); + * ``` + * + * In the example `req.end()` was called. With `http.request()` one + * must always call `req.end()` to signify the end of the request - + * even if there is no data being written to the request body. + * + * If any error is encountered during the request (be that with DNS resolution, + * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted + * on the returned request object. As with all `'error'` events, if no listeners + * are registered the error will be thrown. + * + * There are a few special headers that should be noted. + * + * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to + * the server should be persisted until the next request. + * * Sending a 'Content-Length' header will disable the default chunked encoding. + * * Sending an 'Expect' header will immediately send the request headers. + * Usually, when sending 'Expect: 100-continue', both a timeout and a listener + * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more + * information. + * * Sending an Authorization header will override using the `auth` option + * to compute basic authentication. + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('http://abc:xyz@example.com'); + * + * const req = http.request(options, (res) => { + * // ... + * }); + * ``` + * + * In a successful request, the following events will be emitted in the following + * order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * (`'data'` will not be emitted at all if the response body is empty, for + * instance, in most redirects) + * * `'end'` on the `res` object + * * `'close'` + * + * In the case of a connection error, the following events will be emitted: + * + * * `'socket'` + * * `'error'` + * * `'close'` + * + * In the case of a premature connection close before the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * In the case of a premature connection close after the response is received, + * the following events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (connection closed here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'` + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.destroy()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.destroy()` called here) + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * + * If `req.destroy()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.destroy()` called here) + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message `'Error: aborted'`and code `'ECONNRESET'`, or the error with which `req.destroy()` was called + * * `'close'` + * * `'close'` on the `res` object + * + * If `req.abort()` is called before a socket is assigned, the following + * events will be emitted in the following order: + * + * * (`req.abort()` called here) + * * `'abort'` + * * `'close'` + * + * If `req.abort()` is called before the connection succeeds, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * (`req.abort()` called here) + * * `'abort'` + * * `'error'` with an error with message `'Error: socket hang up'` and code`'ECONNRESET'` + * * `'close'` + * + * If `req.abort()` is called after the response is received, the following + * events will be emitted in the following order: + * + * * `'socket'` + * * `'response'` + * * `'data'` any number of times, on the `res` object + * * (`req.abort()` called here) + * * `'abort'` + * * `'aborted'` on the `res` object + * * `'error'` on the `res` object with an error with message`'Error: aborted'` and code `'ECONNRESET'`. + * * `'close'` + * * `'close'` on the `res` object + * + * Setting the `timeout` option or using the `setTimeout()` function will + * not abort the request or do anything besides add a `'timeout'` event. + * + * Passing an `AbortSignal` and then calling `abort()` on the corresponding`AbortController` will behave the same way as calling `.destroy()` on the + * request. Specifically, the `'error'` event will be emitted with an error with + * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'`and the `cause`, if one was provided. + * @since v0.3.6 + */ + function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: IncomingMessage) => void, + ): ClientRequest; + /** + * Since most requests are GET requests without bodies, Node.js provides this + * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()`automatically. The callback must take care to + * consume the response + * data for reasons stated in {@link ClientRequest} section. + * + * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. + * + * JSON fetching example: + * + * ```js + * http.get('http://localhost:8000/', (res) => { + * const { statusCode } = res; + * const contentType = res.headers['content-type']; + * + * let error; + * // Any 2xx status code signals a successful response but + * // here we're only checking for 200. + * if (statusCode !== 200) { + * error = new Error('Request Failed.\n' + + * `Status Code: ${statusCode}`); + * } else if (!/^application\/json/.test(contentType)) { + * error = new Error('Invalid content-type.\n' + + * `Expected application/json but received ${contentType}`); + * } + * if (error) { + * console.error(error.message); + * // Consume response data to free up memory + * res.resume(); + * return; + * } + * + * res.setEncoding('utf8'); + * let rawData = ''; + * res.on('data', (chunk) => { rawData += chunk; }); + * res.on('end', () => { + * try { + * const parsedData = JSON.parse(rawData); + * console.log(parsedData); + * } catch (e) { + * console.error(e.message); + * } + * }); + * }).on('error', (e) => { + * console.error(`Got error: ${e.message}`); + * }); + * + * // Create a local server to receive data from + * const server = http.createServer((req, res) => { + * res.writeHead(200, { 'Content-Type': 'application/json' }); + * res.end(JSON.stringify({ + * data: 'Hello World!', + * })); + * }); + * + * server.listen(8000); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. + */ + function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; + function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + /** + * Performs the low-level validations on the provided `name` that are done when`res.setHeader(name, value)` is called. + * + * Passing illegal value as `name` will result in a `TypeError` being thrown, + * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Example: + * + * ```js + * import { validateHeaderName } from 'node:http'; + * + * try { + * validateHeaderName(''); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' + * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' + * } + * ``` + * @since v14.3.0 + * @param [label='Header name'] Label for error message. + */ + function validateHeaderName(name: string): void; + /** + * Performs the low-level validations on the provided `value` that are done when`res.setHeader(name, value)` is called. + * + * Passing illegal value as `value` will result in a `TypeError` being thrown. + * + * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. + * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. + * + * It is not necessary to use this method before passing headers to an HTTP request + * or response. The HTTP module will automatically validate such headers. + * + * Examples: + * + * ```js + * import { validateHeaderValue } from 'node:http'; + * + * try { + * validateHeaderValue('x-my-header', undefined); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true + * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' + * } + * + * try { + * validateHeaderValue('x-my-header', 'oʊmɪɡə'); + * } catch (err) { + * console.error(err instanceof TypeError); // --> true + * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true + * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' + * } + * ``` + * @since v14.3.0 + * @param name Header name + * @param value Header value + */ + function validateHeaderValue(name: string, value: string): void; + /** + * Set the maximum number of idle HTTP parsers. + * @since v18.8.0, v16.18.0 + * @param [max=1000] + */ + function setMaxIdleHTTPParsers(max: number): void; + let globalAgent: Agent; + /** + * Read-only property specifying the maximum allowed size of HTTP headers in bytes. + * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. + */ + const maxHeaderSize: number; +} +declare module "node:http" { + export * from "http"; +} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts new file mode 100644 index 0000000..2fb2d6a --- /dev/null +++ b/node_modules/@types/node/http2.d.ts @@ -0,0 +1,2418 @@ +/** + * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. + * It can be accessed using: + * + * ```js + * const http2 = require('node:http2'); + * ``` + * @since v8.4.0 + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/http2.js) + */ +declare module "http2" { + import EventEmitter = require("node:events"); + import * as fs from "node:fs"; + import * as net from "node:net"; + import * as stream from "node:stream"; + import * as tls from "node:tls"; + import * as url from "node:url"; + import { + IncomingHttpHeaders as Http1IncomingHttpHeaders, + IncomingMessage, + OutgoingHttpHeaders, + ServerResponse, + } from "node:http"; + export { OutgoingHttpHeaders } from "node:http"; + export interface IncomingHttpStatusHeader { + ":status"?: number | undefined; + } + export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { + ":path"?: string | undefined; + ":method"?: string | undefined; + ":authority"?: string | undefined; + ":scheme"?: string | undefined; + } + // Http2Stream + export interface StreamPriorityOptions { + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + silent?: boolean | undefined; + } + export interface StreamState { + localWindowSize?: number | undefined; + state?: number | undefined; + localClose?: number | undefined; + remoteClose?: number | undefined; + sumDependencyWeight?: number | undefined; + weight?: number | undefined; + } + export interface ServerStreamResponseOptions { + endStream?: boolean | undefined; + waitForTrailers?: boolean | undefined; + } + export interface StatOptions { + offset: number; + length: number; + } + export interface ServerStreamFileResponseOptions { + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean; + waitForTrailers?: boolean | undefined; + offset?: number | undefined; + length?: number | undefined; + } + export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { + onError?(err: NodeJS.ErrnoException): void; + } + export interface Http2Stream extends stream.Duplex { + /** + * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, + * the `'aborted'` event will have been emitted. + * @since v8.4.0 + */ + readonly aborted: boolean; + /** + * This property shows the number of characters currently buffered to be written. + * See `net.Socket.bufferSize` for details. + * @since v11.2.0, v10.16.0 + */ + readonly bufferSize: number; + /** + * Set to `true` if the `Http2Stream` instance has been closed. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer + * usable. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Set to `true` if the `END_STREAM` flag was set in the request or response + * HEADERS frame received, indicating that no additional data should be received + * and the readable side of the `Http2Stream` will be closed. + * @since v10.11.0 + */ + readonly endAfterHeaders: boolean; + /** + * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. + * @since v8.4.0 + */ + readonly id?: number | undefined; + /** + * Set to `true` if the `Http2Stream` instance has not yet been assigned a + * numeric stream identifier. + * @since v9.4.0 + */ + readonly pending: boolean; + /** + * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is + * destroyed after either receiving an `RST_STREAM` frame from the connected peer, + * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. + * @since v8.4.0 + */ + readonly rstCode: number; + /** + * An object containing the outbound headers sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentHeaders: OutgoingHttpHeaders; + /** + * An array of objects containing the outbound informational (additional) headers + * sent for this `Http2Stream`. + * @since v9.5.0 + */ + readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; + /** + * An object containing the outbound trailers sent for this `HttpStream`. + * @since v9.5.0 + */ + readonly sentTrailers?: OutgoingHttpHeaders | undefined; + /** + * A reference to the `Http2Session` instance that owns this `Http2Stream`. The + * value will be `undefined` after the `Http2Stream` instance is destroyed. + * @since v8.4.0 + */ + readonly session: Http2Session | undefined; + /** + * Provides miscellaneous information about the current state of the `Http2Stream`. + * + * A current state of this `Http2Stream`. + * @since v8.4.0 + */ + readonly state: StreamState; + /** + * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the + * connected HTTP/2 peer. + * @since v8.4.0 + * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. + * @param callback An optional function registered to listen for the `'close'` event. + */ + close(code?: number, callback?: () => void): void; + /** + * Updates the priority for this `Http2Stream` instance. + * @since v8.4.0 + */ + priority(options: StreamPriorityOptions): void; + /** + * ```js + * const http2 = require('node:http2'); + * const client = http2.connect('http://example.org:8000'); + * const { NGHTTP2_CANCEL } = http2.constants; + * const req = client.request({ ':path': '/' }); + * + * // Cancel the stream if there's no activity after 5 seconds + * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); + * ``` + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method + * will cause the `Http2Stream` to be immediately closed and must only be + * called after the `'wantTrailers'` event has been emitted. When sending a + * request or sending a response, the `options.waitForTrailers` option must be set + * in order to keep the `Http2Stream` open after the final `DATA` frame so that + * trailers can be sent. + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond(undefined, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ xyz: 'abc' }); + * }); + * stream.end('Hello World'); + * }); + * ``` + * + * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header + * fields (e.g. `':method'`, `':path'`, etc). + * @since v10.0.0 + */ + sendTrailers(headers: OutgoingHttpHeaders): void; + addListener(event: "aborted", listener: () => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: "streamClosed", listener: (code: number) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + addListener(event: "wantTrailers", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "aborted"): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "frameError", frameType: number, errorCode: number): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: "streamClosed", code: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "wantTrailers"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "aborted", listener: () => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: "streamClosed", listener: (code: number) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + on(event: "wantTrailers", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "aborted", listener: () => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: "streamClosed", listener: (code: number) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + once(event: "wantTrailers", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "aborted", listener: () => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "streamClosed", listener: (code: number) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependListener(event: "wantTrailers", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "aborted", listener: () => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener(event: "wantTrailers", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Stream extends Http2Stream { + addListener(event: "continue", listener: () => {}): this; + addListener( + event: "headers", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + addListener( + event: "response", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "continue"): boolean; + emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "continue", listener: () => {}): this; + on( + event: "headers", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + on( + event: "response", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "continue", listener: () => {}): this; + once( + event: "headers", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + once( + event: "response", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "continue", listener: () => {}): this; + prependListener( + event: "headers", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependListener( + event: "response", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "continue", listener: () => {}): this; + prependOnceListener( + event: "headers", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; + prependOnceListener( + event: "response", + listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, + ): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ServerHttp2Stream extends Http2Stream { + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote + * client's most recent `SETTINGS` frame. Will be `true` if the remote peer + * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. + * @since v8.4.0 + */ + readonly pushAllowed: boolean; + /** + * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. + * @since v8.4.0 + */ + additionalHeaders(headers: OutgoingHttpHeaders): void; + /** + * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { + * if (err) throw err; + * pushStream.respond({ ':status': 200 }); + * pushStream.end('some pushed data'); + * }); + * stream.end('some data'); + * }); + * ``` + * + * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass + * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. + * + * Calling `http2stream.pushStream()` from within a pushed stream is not permitted + * and will throw an error. + * @since v8.4.0 + * @param callback Callback that is called once the push stream has been initiated. + */ + pushStream( + headers: OutgoingHttpHeaders, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + pushStream( + headers: OutgoingHttpHeaders, + options?: StreamPriorityOptions, + callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, + ): void; + /** + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }); + * stream.end('some data'); + * }); + * ``` + * + * Initiates a response. When the `options.waitForTrailers` option is set, the`'wantTrailers'` event will be emitted immediately after queuing the last chunk + * of payload data to be sent. The `http2stream.sendTrailers()` method can then be + * used to sent trailing header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respond({ ':status': 200 }, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * stream.end('some data'); + * }); + * ``` + * @since v8.4.0 + */ + respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; + /** + * Initiates a response whose data is read from the given file descriptor. No + * validation is performed on the given file descriptor. If an error occurs while + * attempting to read data using the file descriptor, the `Http2Stream` will be + * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * ```js + * const http2 = require('node:http2'); + * const fs = require('node:fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers); + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will perform an `fs.fstat()` call to + * collect details on the provided file descriptor. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The file descriptor or `FileHandle` is not closed when the stream is closed, + * so it will need to be closed manually once it is no longer needed. + * Using the same file descriptor concurrently for multiple streams + * is not supported and may result in data loss. Re-using a file descriptor + * after a stream has finished is supported. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. + * + * ```js + * const http2 = require('node:http2'); + * const fs = require('node:fs'); + * + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * const fd = fs.openSync('/some/file', 'r'); + * + * const stat = fs.fstatSync(fd); + * const headers = { + * 'content-length': stat.size, + * 'last-modified': stat.mtime.toUTCString(), + * 'content-type': 'text/plain; charset=utf-8', + * }; + * stream.respondWithFD(fd, headers, { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * + * stream.on('close', () => fs.closeSync(fd)); + * }); + * ``` + * @since v8.4.0 + * @param fd A readable file descriptor. + */ + respondWithFD( + fd: number | fs.promises.FileHandle, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptions, + ): void; + /** + * Sends a regular file as the response. The `path` must specify a regular file + * or an `'error'` event will be emitted on the `Http2Stream` object. + * + * When used, the `Http2Stream` object's `Duplex` interface will be closed + * automatically. + * + * The optional `options.statCheck` function may be specified to give user code + * an opportunity to set additional content headers based on the `fs.Stat` details + * of the given file: + * + * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. If the `onError` callback is + * defined, then it will be called. Otherwise + * the stream will be destroyed. + * + * Example using a file path: + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * headers['last-modified'] = stat.mtime.toUTCString(); + * } + * + * function onError(err) { + * // stream.respond() can throw if the stream has been destroyed by + * // the other side. + * try { + * if (err.code === 'ENOENT') { + * stream.respond({ ':status': 404 }); + * } else { + * stream.respond({ ':status': 500 }); + * } + * } catch (err) { + * // Perform actual error handling. + * console.error(err); + * } + * stream.end(); + * } + * + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck, onError }); + * }); + * ``` + * + * The `options.statCheck` function may also be used to cancel the send operation + * by returning `false`. For instance, a conditional request may check the stat + * results to determine if the file has been modified to return an appropriate `304` response: + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * function statCheck(stat, headers) { + * // Check the stat here... + * stream.respond({ ':status': 304 }); + * return false; // Cancel the send operation + * } + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { statCheck }); + * }); + * ``` + * + * The `content-length` header field will be automatically set. + * + * The `offset` and `length` options may be used to limit the response to a + * specific range subset. This can be used, for instance, to support HTTP Range + * requests. + * + * The `options.onError` function may also be used to handle all the errors + * that could happen before the delivery of the file is initiated. The + * default behavior is to destroy the stream. + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * will be emitted immediately after queuing the last chunk of payload data to be + * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing + * header fields to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer(); + * server.on('stream', (stream) => { + * stream.respondWithFile('/some/file', + * { 'content-type': 'text/plain; charset=utf-8' }, + * { waitForTrailers: true }); + * stream.on('wantTrailers', () => { + * stream.sendTrailers({ ABC: 'some value to send' }); + * }); + * }); + * ``` + * @since v8.4.0 + */ + respondWithFile( + path: string, + headers?: OutgoingHttpHeaders, + options?: ServerStreamFileResponseOptionsWithError, + ): void; + } + // Http2Session + export interface Settings { + headerTableSize?: number | undefined; + enablePush?: boolean | undefined; + initialWindowSize?: number | undefined; + maxFrameSize?: number | undefined; + maxConcurrentStreams?: number | undefined; + maxHeaderListSize?: number | undefined; + enableConnectProtocol?: boolean | undefined; + } + export interface ClientSessionRequestOptions { + endStream?: boolean | undefined; + exclusive?: boolean | undefined; + parent?: number | undefined; + weight?: number | undefined; + waitForTrailers?: boolean | undefined; + signal?: AbortSignal | undefined; + } + export interface SessionState { + effectiveLocalWindowSize?: number | undefined; + effectiveRecvDataLength?: number | undefined; + nextStreamID?: number | undefined; + localWindowSize?: number | undefined; + lastProcStreamID?: number | undefined; + remoteWindowSize?: number | undefined; + outboundQueueSize?: number | undefined; + deflateDynamicTableSize?: number | undefined; + inflateDynamicTableSize?: number | undefined; + } + export interface Http2Session extends EventEmitter { + /** + * Value will be `undefined` if the `Http2Session` is not yet connected to a + * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or + * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. + * @since v9.4.0 + */ + readonly alpnProtocol?: string | undefined; + /** + * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. + * @since v9.4.0 + */ + readonly closed: boolean; + /** + * Will be `true` if this `Http2Session` instance is still connecting, will be set + * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. + * @since v10.0.0 + */ + readonly connecting: boolean; + /** + * Will be `true` if this `Http2Session` instance has been destroyed and must no + * longer be used, otherwise `false`. + * @since v8.4.0 + */ + readonly destroyed: boolean; + /** + * Value is `undefined` if the `Http2Session` session socket has not yet been + * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, + * and `false` if the `Http2Session` is connected to any other kind of socket + * or stream. + * @since v9.4.0 + */ + readonly encrypted?: boolean | undefined; + /** + * A prototype-less object describing the current local settings of this `Http2Session`. The local settings are local to _this_`Http2Session` instance. + * @since v8.4.0 + */ + readonly localSettings: Settings; + /** + * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property + * will return an `Array` of origins for which the `Http2Session` may be + * considered authoritative. + * + * The `originSet` property is only available when using a secure TLS connection. + * @since v9.4.0 + */ + readonly originSet?: string[] | undefined; + /** + * Indicates whether the `Http2Session` is currently waiting for acknowledgment of + * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. Will be `false` once all sent `SETTINGS` frames have been acknowledged. + * @since v8.4.0 + */ + readonly pendingSettingsAck: boolean; + /** + * A prototype-less object describing the current remote settings of this`Http2Session`. The remote settings are set by the _connected_ HTTP/2 peer. + * @since v8.4.0 + */ + readonly remoteSettings: Settings; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * limits available methods to ones safe to use with HTTP/2. + * + * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw + * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. + * + * `setTimeout` method will be called on this `Http2Session`. + * + * All other interactions will be routed directly to the socket. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * Provides miscellaneous information about the current state of the`Http2Session`. + * + * An object describing the current status of this `Http2Session`. + * @since v8.4.0 + */ + readonly state: SessionState; + /** + * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a + * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a + * client. + * @since v8.4.0 + */ + readonly type: number; + /** + * Gracefully closes the `Http2Session`, allowing any existing streams to + * complete on their own and preventing new `Http2Stream` instances from being + * created. Once closed, `http2session.destroy()`_might_ be called if there + * are no open `Http2Stream` instances. + * + * If specified, the `callback` function is registered as a handler for the`'close'` event. + * @since v9.4.0 + */ + close(callback?: () => void): void; + /** + * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. + * + * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. + * + * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. + * @since v8.4.0 + * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. + * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. + */ + destroy(error?: Error, code?: number): void; + /** + * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. + * @since v9.4.0 + * @param code An HTTP/2 error code + * @param lastStreamID The numeric ID of the last processed `Http2Stream` + * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. + */ + goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; + /** + * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must + * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. + * + * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. + * + * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and + * returned with the ping acknowledgment. + * + * The callback will be invoked with three arguments: an error argument that will + * be `null` if the `PING` was successfully acknowledged, a `duration` argument + * that reports the number of milliseconds elapsed since the ping was sent and the + * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. + * + * ```js + * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { + * if (!err) { + * console.log(`Ping acknowledged in ${duration} milliseconds`); + * console.log(`With payload '${payload.toString()}'`); + * } + * }); + * ``` + * + * If the `payload` argument is not specified, the default payload will be the + * 64-bit timestamp (little endian) marking the start of the `PING` duration. + * @since v8.9.3 + * @param payload Optional ping payload. + */ + ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; + ping( + payload: NodeJS.ArrayBufferView, + callback: (err: Error | null, duration: number, payload: Buffer) => void, + ): boolean; + /** + * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. + * @since v9.4.0 + */ + ref(): void; + /** + * Sets the local endpoint's window size. + * The `windowSize` is the total window size to set, not + * the delta. + * + * ```js + * const http2 = require('node:http2'); + * + * const server = http2.createServer(); + * const expectedWindowSize = 2 ** 20; + * server.on('connect', (session) => { + * + * // Set local window size to be 2 ** 20 + * session.setLocalWindowSize(expectedWindowSize); + * }); + * ``` + * @since v15.3.0, v14.18.0 + */ + setLocalWindowSize(windowSize: number): void; + /** + * Used to set a callback function that is called when there is no activity on + * the `Http2Session` after `msecs` milliseconds. The given `callback` is + * registered as a listener on the `'timeout'` event. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. + * + * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new + * settings. + * + * The new settings will not become effective until the `SETTINGS` acknowledgment + * is received and the `'localSettings'` event is emitted. It is possible to send + * multiple `SETTINGS` frames while acknowledgment is still pending. + * @since v8.4.0 + * @param callback Callback that is called once the session is connected or right away if the session is already connected. + */ + settings( + settings: Settings, + callback?: (err: Error | null, settings: Settings, duration: number) => void, + ): void; + /** + * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. + * @since v9.4.0 + */ + unref(): void; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener( + event: "frameError", + listener: (frameType: number, errorCode: number, streamID: number) => void, + ): this; + addListener( + event: "goaway", + listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, + ): this; + addListener(event: "localSettings", listener: (settings: Settings) => void): this; + addListener(event: "ping", listener: () => void): this; + addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; + emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData?: Buffer): boolean; + emit(event: "localSettings", settings: Settings): boolean; + emit(event: "ping"): boolean; + emit(event: "remoteSettings", settings: Settings): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void): this; + on(event: "localSettings", listener: (settings: Settings) => void): this; + on(event: "ping", listener: () => void): this; + on(event: "remoteSettings", listener: (settings: Settings) => void): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; + once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void): this; + once(event: "localSettings", listener: (settings: Settings) => void): this; + once(event: "ping", listener: () => void): this; + once(event: "remoteSettings", listener: (settings: Settings) => void): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener( + event: "frameError", + listener: (frameType: number, errorCode: number, streamID: number) => void, + ): this; + prependListener( + event: "goaway", + listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, + ): this; + prependListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependListener(event: "ping", listener: () => void): this; + prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener( + event: "frameError", + listener: (frameType: number, errorCode: number, streamID: number) => void, + ): this; + prependOnceListener( + event: "goaway", + listener: (errorCode: number, lastStreamID: number, opaqueData?: Buffer) => void, + ): this; + prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "ping", listener: () => void): this; + prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface ClientHttp2Session extends Http2Session { + /** + * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an + * HTTP/2 request to the connected server. + * + * When a `ClientHttp2Session` is first created, the socket may not yet be + * connected. if `clienthttp2session.request()` is called during this time, the + * actual request will be deferred until the socket is ready to go. + * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown. + * + * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. + * + * ```js + * const http2 = require('node:http2'); + * const clientSession = http2.connect('https://localhost:1234'); + * const { + * HTTP2_HEADER_PATH, + * HTTP2_HEADER_STATUS, + * } = http2.constants; + * + * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); + * req.on('response', (headers) => { + * console.log(headers[HTTP2_HEADER_STATUS]); + * req.on('data', (chunk) => { // .. }); + * req.on('end', () => { // .. }); + * }); + * ``` + * + * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event + * is emitted immediately after queuing the last chunk of payload data to be sent. + * The `http2stream.sendTrailers()` method can then be called to send trailing + * headers to the peer. + * + * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically + * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. + * + * When `options.signal` is set with an `AbortSignal` and then `abort` on the + * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. + * + * The `:method` and `:path` pseudo-headers are not specified within `headers`, + * they respectively default to: + * + * * `:method` \= `'GET'` + * * `:path` \= `/` + * @since v8.4.0 + */ + request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; + addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + addListener(event: "origin", listener: (origins: string[]) => void): this; + addListener( + event: "connect", + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + addListener( + event: "stream", + listener: ( + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ) => void, + ): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; + emit(event: "origin", origins: readonly string[]): boolean; + emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit( + event: "stream", + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + on(event: "origin", listener: (origins: string[]) => void): this; + on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on( + event: "stream", + listener: ( + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ) => void, + ): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + once(event: "origin", listener: (origins: string[]) => void): this; + once( + event: "connect", + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + once( + event: "stream", + listener: ( + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ) => void, + ): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependListener(event: "origin", listener: (origins: string[]) => void): this; + prependListener( + event: "connect", + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + prependListener( + event: "stream", + listener: ( + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ) => void, + ): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; + prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; + prependOnceListener( + event: "connect", + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + prependOnceListener( + event: "stream", + listener: ( + stream: ClientHttp2Stream, + headers: IncomingHttpHeaders & IncomingHttpStatusHeader, + flags: number, + ) => void, + ): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface AlternativeServiceOptions { + origin: number | string | url.URL; + } + export interface ServerHttp2Session extends Http2Session { + readonly server: Http2Server | Http2SecureServer; + /** + * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. + * + * ```js + * const http2 = require('node:http2'); + * + * const server = http2.createServer(); + * server.on('session', (session) => { + * // Set altsvc for origin https://example.org:80 + * session.altsvc('h2=":8000"', 'https://example.org:80'); + * }); + * + * server.on('stream', (stream) => { + * // Set altsvc for a specific stream + * stream.session.altsvc('h2=":8000"', stream.id); + * }); + * ``` + * + * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate + * service is associated with the origin of the given `Http2Stream`. + * + * The `alt` and origin string _must_ contain only ASCII bytes and are + * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given + * domain. + * + * When a string is passed for the `originOrStream` argument, it will be parsed as + * a URL and the origin will be derived. For instance, the origin for the + * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * @since v9.4.0 + * @param alt A description of the alternative service configuration as defined by `RFC 7838`. + * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the + * `http2stream.id` property. + */ + altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; + /** + * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client + * to advertise the set of origins for which the server is capable of providing + * authoritative responses. + * + * ```js + * const http2 = require('node:http2'); + * const options = getSecureOptionsSomehow(); + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * server.on('session', (session) => { + * session.origin('https://example.com', 'https://example.org'); + * }); + * ``` + * + * When a string is passed as an `origin`, it will be parsed as a URL and the + * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given + * string + * cannot be parsed as a URL or if a valid origin cannot be derived. + * + * A `URL` object, or any object with an `origin` property, may be passed as + * an `origin`, in which case the value of the `origin` property will be + * used. The value of the `origin` property _must_ be a properly serialized + * ASCII origin. + * + * Alternatively, the `origins` option may be used when creating a new HTTP/2 + * server using the `http2.createSecureServer()` method: + * + * ```js + * const http2 = require('node:http2'); + * const options = getSecureOptionsSomehow(); + * options.origins = ['https://example.com', 'https://example.org']; + * const server = http2.createSecureServer(options); + * server.on('stream', (stream) => { + * stream.respond(); + * stream.end('ok'); + * }); + * ``` + * @since v10.12.0 + * @param origins One or more URL Strings passed as separate arguments. + */ + origin( + ...origins: Array< + | string + | url.URL + | { + origin: string; + } + > + ): void; + addListener( + event: "connect", + listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + addListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; + on( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once( + event: "connect", + listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + once( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + event: "connect", + listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + prependListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + event: "connect", + listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): this; + prependOnceListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + // Http2Server + export interface SessionOptions { + maxDeflateDynamicTableSize?: number | undefined; + maxSessionMemory?: number | undefined; + maxHeaderListPairs?: number | undefined; + maxOutstandingPings?: number | undefined; + maxSendHeaderBlockLength?: number | undefined; + paddingStrategy?: number | undefined; + peerMaxConcurrentStreams?: number | undefined; + settings?: Settings | undefined; + remoteCustomSettings?: number[] | undefined; + /** + * Specifies a timeout in milliseconds that + * a server should wait when an [`'unknownProtocol'`][] is emitted. If the + * socket has not been destroyed by that time the server will destroy it. + * @default 100000 + */ + unknownProtocolTimeout?: number | undefined; + selectPadding?(frameLen: number, maxFrameLen: number): number; + } + export interface ClientSessionOptions extends SessionOptions { + maxReservedRemoteStreams?: number | undefined; + createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; + protocol?: "http:" | "https:" | undefined; + } + export interface ServerSessionOptions extends SessionOptions { + Http1IncomingMessage?: typeof IncomingMessage | undefined; + Http1ServerResponse?: typeof ServerResponse | undefined; + Http2ServerRequest?: typeof Http2ServerRequest | undefined; + Http2ServerResponse?: typeof Http2ServerResponse | undefined; + } + export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} + export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {} + export interface ServerOptions extends ServerSessionOptions {} + export interface SecureServerOptions extends SecureServerSessionOptions { + allowHTTP1?: boolean | undefined; + origins?: string[] | undefined; + } + interface HTTP2ServerCommon { + setTimeout(msec?: number, callback?: () => void): this; + /** + * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. + * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. + */ + updateSettings(settings: Settings): void; + } + export interface Http2Server extends net.Server, HTTP2ServerCommon { + addListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + addListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + on(event: "timeout", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + once(event: "timeout", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependOnceListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export interface Http2SecureServer extends tls.Server, HTTP2ServerCommon { + addListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + addListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + addListener(event: "sessionError", listener: (err: Error) => void): this; + addListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + addListener(event: "timeout", listener: () => void): this; + addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; + emit(event: "session", session: ServerHttp2Session): boolean; + emit(event: "sessionError", err: Error): boolean; + emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; + emit(event: "timeout"): boolean; + emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + on(event: "session", listener: (session: ServerHttp2Session) => void): this; + on(event: "sessionError", listener: (err: Error) => void): this; + on( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + on(event: "timeout", listener: () => void): this; + on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; + once(event: "session", listener: (session: ServerHttp2Session) => void): this; + once(event: "sessionError", listener: (err: Error) => void): this; + once( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + once(event: "timeout", listener: () => void): this; + once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependListener(event: "sessionError", listener: (err: Error) => void): this; + prependListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependListener(event: "timeout", listener: () => void): this; + prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener( + event: "checkContinue", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependOnceListener( + event: "request", + listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): this; + prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; + prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; + prependOnceListener( + event: "stream", + listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, + ): this; + prependOnceListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, + * headers, and + * data. + * @since v8.4.0 + */ + export class Http2ServerRequest extends stream.Readable { + constructor( + stream: ServerHttp2Stream, + headers: IncomingHttpHeaders, + options: stream.ReadableOptions, + rawHeaders: readonly string[], + ); + /** + * The `request.aborted` property will be `true` if the request has + * been aborted. + * @since v10.1.0 + */ + readonly aborted: boolean; + /** + * The request authority pseudo header field. Because HTTP/2 allows requests + * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. + * @since v8.4.0 + */ + readonly authority: string; + /** + * See `request.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * The `request.complete` property will be `true` if the request has + * been completed, aborted, or destroyed. + * @since v12.10.0 + */ + readonly complete: boolean; + /** + * The request/response headers object. + * + * Key-value pairs of header names and values. Header names are lower-cased. + * + * ```js + * // Prints something like: + * // + * // { 'user-agent': 'curl/7.22.0', + * // host: '127.0.0.1:8000', + * // accept: '*' } + * console.log(request.headers); + * ``` + * + * See `HTTP/2 Headers Object`. + * + * In HTTP/2, the request path, host name, protocol, and method are represented as + * special headers prefixed with the `:` character (e.g. `':path'`). These special + * headers will be included in the `request.headers` object. Care must be taken not + * to inadvertently modify these special headers or errors may occur. For instance, + * removing all headers from the request will cause errors to occur: + * + * ```js + * removeAllHeaders(request.headers); + * assert(request.url); // Fails because the :path header has been removed + * ``` + * @since v8.4.0 + */ + readonly headers: IncomingHttpHeaders; + /** + * In case of server request, the HTTP version sent by the client. In the case of + * client response, the HTTP version of the connected-to server. Returns `'2.0'`. + * + * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. + * @since v8.4.0 + */ + readonly httpVersion: string; + readonly httpVersionMinor: number; + readonly httpVersionMajor: number; + /** + * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. + * @since v8.4.0 + */ + readonly method: string; + /** + * The raw request/response headers list exactly as they were received. + * + * The keys and values are in the same list. It is _not_ a + * list of tuples. So, the even-numbered offsets are key values, and the + * odd-numbered offsets are the associated values. + * + * Header names are not lowercased, and duplicates are not merged. + * + * ```js + * // Prints something like: + * // + * // [ 'user-agent', + * // 'this is invalid because there can be only one', + * // 'User-Agent', + * // 'curl/7.22.0', + * // 'Host', + * // '127.0.0.1:8000', + * // 'ACCEPT', + * // '*' ] + * console.log(request.rawHeaders); + * ``` + * @since v8.4.0 + */ + readonly rawHeaders: string[]; + /** + * The raw request/response trailer keys and values exactly as they were + * received. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly rawTrailers: string[]; + /** + * The request scheme pseudo header field indicating the scheme + * portion of the target URL. + * @since v8.4.0 + */ + readonly scheme: string; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `request.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. + * + * `setTimeout` method will be called on `request.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. With TLS support, + * use `request.socket.getPeerCertificate()` to obtain the client's + * authentication details. + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the request. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * The request/response trailers object. Only populated at the `'end'` event. + * @since v8.4.0 + */ + readonly trailers: IncomingHttpHeaders; + /** + * Request URL string. This contains only the URL that is present in the actual + * HTTP request. If the request is: + * + * ```http + * GET /status?name=ryan HTTP/1.1 + * Accept: text/plain + * ``` + * + * Then `request.url` will be: + * + * ```js + * '/status?name=ryan' + * ``` + * + * To parse the url into its parts, `new URL()` can be used: + * + * ```console + * $ node + * > new URL('/status?name=ryan', 'http://example.com') + * URL { + * href: 'http://example.com/status?name=ryan', + * origin: 'http://example.com', + * protocol: 'http:', + * username: '', + * password: '', + * host: 'example.com', + * hostname: 'example.com', + * port: '', + * pathname: '/status', + * search: '?name=ryan', + * searchParams: URLSearchParams { 'name' => 'ryan' }, + * hash: '' + * } + * ``` + * @since v8.4.0 + */ + url: string; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream`s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + read(size?: number): Buffer | string | null; + addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "aborted", hadError: boolean, code: number): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + /** + * This object is created internally by an HTTP server, not by the user. It is + * passed as the second parameter to the `'request'` event. + * @since v8.4.0 + */ + export class Http2ServerResponse extends stream.Writable { + constructor(stream: ServerHttp2Stream); + /** + * See `response.socket`. + * @since v8.4.0 + * @deprecated Since v13.0.0 - Use `socket`. + */ + readonly connection: net.Socket | tls.TLSSocket; + /** + * Append a single header value to the header object. + * + * If the value is an array, this is equivalent to calling this method multiple times. + * + * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. + * + * Attempting to set a header field name or value that contains invalid characters will result in a + * [TypeError](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-typeerror) being thrown. + * + * ```js + * // Returns headers including "set-cookie: a" and "set-cookie: b" + * const server = http2.createServer((req, res) => { + * res.setHeader('set-cookie', 'a'); + * res.appendHeader('set-cookie', 'b'); + * res.writeHead(200); + * res.end('ok'); + * }); + * ``` + * @since v20.12.0 + */ + appendHeader(name: string, value: string | string[]): void; + /** + * Boolean value that indicates whether the response has completed. Starts + * as `false`. After `response.end()` executes, the value will be `true`. + * @since v8.4.0 + * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. + */ + readonly finished: boolean; + /** + * True if headers were sent, false otherwise (read-only). + * @since v8.4.0 + */ + readonly headersSent: boolean; + /** + * A reference to the original HTTP2 `request` object. + * @since v15.7.0 + */ + readonly req: Http2ServerRequest; + /** + * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but + * applies getters, setters, and methods based on HTTP/2 logic. + * + * `destroyed`, `readable`, and `writable` properties will be retrieved from and + * set on `response.stream`. + * + * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. + * + * `setTimeout` method will be called on `response.stream.session`. + * + * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for + * more information. + * + * All other interactions will be routed directly to the socket. + * + * ```js + * const http2 = require('node:http2'); + * const server = http2.createServer((req, res) => { + * const ip = req.socket.remoteAddress; + * const port = req.socket.remotePort; + * res.end(`Your IP address is ${ip} and your source port is ${port}.`); + * }).listen(3000); + * ``` + * @since v8.4.0 + */ + readonly socket: net.Socket | tls.TLSSocket; + /** + * The `Http2Stream` object backing the response. + * @since v8.4.0 + */ + readonly stream: ServerHttp2Stream; + /** + * When true, the Date header will be automatically generated and sent in + * the response if it is not already present in the headers. Defaults to true. + * + * This should only be disabled for testing; HTTP requires the Date header + * in responses. + * @since v8.4.0 + */ + sendDate: boolean; + /** + * When using implicit headers (not calling `response.writeHead()` explicitly), + * this property controls the status code that will be sent to the client when + * the headers get flushed. + * + * ```js + * response.statusCode = 404; + * ``` + * + * After response header was sent to the client, this property indicates the + * status code which was sent out. + * @since v8.4.0 + */ + statusCode: number; + /** + * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns + * an empty string. + * @since v8.4.0 + */ + statusMessage: ""; + /** + * This method adds HTTP trailing headers (a header but at the end of the + * message) to the response. + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + addTrailers(trailers: OutgoingHttpHeaders): void; + /** + * This method signals to the server that all of the response headers and body + * have been sent; that server should consider this message complete. + * The method, `response.end()`, MUST be called on each response. + * + * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. + * + * If `callback` is specified, it will be called when the response stream + * is finished. + * @since v8.4.0 + */ + end(callback?: () => void): this; + end(data: string | Uint8Array, callback?: () => void): this; + end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; + /** + * Reads out a header that has already been queued but not sent to the client. + * The name is case-insensitive. + * + * ```js + * const contentType = response.getHeader('content-type'); + * ``` + * @since v8.4.0 + */ + getHeader(name: string): string; + /** + * Returns an array containing the unique names of the current outgoing headers. + * All header names are lowercase. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headerNames = response.getHeaderNames(); + * // headerNames === ['foo', 'set-cookie'] + * ``` + * @since v8.4.0 + */ + getHeaderNames(): string[]; + /** + * Returns a shallow copy of the current outgoing headers. Since a shallow copy + * is used, array values may be mutated without additional calls to various + * header-related http module methods. The keys of the returned object are the + * header names and the values are the respective header values. All header names + * are lowercase. + * + * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * ```js + * response.setHeader('Foo', 'bar'); + * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); + * + * const headers = response.getHeaders(); + * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } + * ``` + * @since v8.4.0 + */ + getHeaders(): OutgoingHttpHeaders; + /** + * Returns `true` if the header identified by `name` is currently set in the + * outgoing headers. The header name matching is case-insensitive. + * + * ```js + * const hasContentType = response.hasHeader('content-type'); + * ``` + * @since v8.4.0 + */ + hasHeader(name: string): boolean; + /** + * Removes a header that has been queued for implicit sending. + * + * ```js + * response.removeHeader('Content-Encoding'); + * ``` + * @since v8.4.0 + */ + removeHeader(name: string): void; + /** + * Sets a single header value for implicit headers. If this header already exists + * in the to-be-sent headers, its value will be replaced. Use an array of strings + * here to send multiple headers with the same name. + * + * ```js + * response.setHeader('Content-Type', 'text/html; charset=utf-8'); + * ``` + * + * or + * + * ```js + * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * @since v8.4.0 + */ + setHeader(name: string, value: number | string | readonly string[]): void; + /** + * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is + * provided, then it is added as a listener on the `'timeout'` event on + * the response object. + * + * If no `'timeout'` listener is added to the request, the response, or + * the server, then `Http2Stream` s are destroyed when they time out. If a + * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. + * @since v8.4.0 + */ + setTimeout(msecs: number, callback?: () => void): void; + /** + * If this method is called and `response.writeHead()` has not been called, + * it will switch to implicit header mode and flush the implicit headers. + * + * This sends a chunk of the response body. This method may + * be called multiple times to provide successive parts of the body. + * + * In the `node:http` module, the response body is omitted when the + * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. + * + * `chunk` can be a string or a buffer. If `chunk` is a string, + * the second parameter specifies how to encode it into a byte stream. + * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk + * of data is flushed. + * + * This is the raw HTTP body and has nothing to do with higher-level multi-part + * body encodings that may be used. + * + * The first time `response.write()` is called, it will send the buffered + * header information and the first chunk of the body to the client. The second + * time `response.write()` is called, Node.js assumes data will be streamed, + * and sends the new data separately. That is, the response is buffered up to the + * first chunk of the body. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. + * @since v8.4.0 + */ + write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; + write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; + /** + * Sends a status `100 Continue` to the client, indicating that the request body + * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. + * @since v8.4.0 + */ + writeContinue(): void; + /** + * Sends a status `103 Early Hints` to the client with a Link header, + * indicating that the user agent can preload/preconnect the linked resources. + * The `hints` is an object containing the values of headers to be sent with + * early hints message. + * + * **Example** + * + * ```js + * const earlyHintsLink = '; rel=preload; as=style'; + * response.writeEarlyHints({ + * 'link': earlyHintsLink, + * }); + * + * const earlyHintsLinks = [ + * '; rel=preload; as=style', + * '; rel=preload; as=script', + * ]; + * response.writeEarlyHints({ + * 'link': earlyHintsLinks, + * }); + * ``` + * @since v18.11.0 + */ + writeEarlyHints(hints: Record): void; + /** + * Sends a response header to the request. The status code is a 3-digit HTTP + * status code, like `404`. The last argument, `headers`, are the response headers. + * + * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. + * + * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be + * passed as the second argument. However, because the `statusMessage` has no + * meaning within HTTP/2, the argument will have no effect and a process warning + * will be emitted. + * + * ```js + * const body = 'hello world'; + * response.writeHead(200, { + * 'Content-Length': Buffer.byteLength(body), + * 'Content-Type': 'text/plain; charset=utf-8', + * }); + * ``` + * + * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a + * given encoding. On outbound messages, Node.js does not check if Content-Length + * and the length of the body being transmitted are equal or not. However, when + * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. + * + * This method may be called at most one time on a message before `response.end()` is called. + * + * If `response.write()` or `response.end()` are called before calling + * this, the implicit/mutable headers will be calculated and call this function. + * + * When headers have been set with `response.setHeader()`, they will be merged + * with any headers passed to `response.writeHead()`, with the headers passed + * to `response.writeHead()` given precedence. + * + * ```js + * // Returns content-type = text/plain + * const server = http2.createServer((req, res) => { + * res.setHeader('Content-Type', 'text/html; charset=utf-8'); + * res.setHeader('X-Foo', 'bar'); + * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); + * res.end('ok'); + * }); + * ``` + * + * Attempting to set a header field name or value that contains invalid characters + * will result in a `TypeError` being thrown. + * @since v8.4.0 + */ + writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; + writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; + /** + * Call `http2stream.pushStream()` with the given headers, and wrap the + * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback + * parameter if successful. When `Http2ServerRequest` is closed, the callback is + * called with an error `ERR_HTTP2_INVALID_STREAM`. + * @since v8.4.0 + * @param headers An object describing the headers + * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of + * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method + */ + createPushResponse( + headers: OutgoingHttpHeaders, + callback: (err: Error | null, res: Http2ServerResponse) => void, + ): void; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (error: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", error: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: stream.Readable): boolean; + emit(event: "unpipe", src: stream.Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (error: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (error: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (error: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (error: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + export namespace constants { + const NGHTTP2_SESSION_SERVER: number; + const NGHTTP2_SESSION_CLIENT: number; + const NGHTTP2_STREAM_STATE_IDLE: number; + const NGHTTP2_STREAM_STATE_OPEN: number; + const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; + const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; + const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; + const NGHTTP2_STREAM_STATE_CLOSED: number; + const NGHTTP2_NO_ERROR: number; + const NGHTTP2_PROTOCOL_ERROR: number; + const NGHTTP2_INTERNAL_ERROR: number; + const NGHTTP2_FLOW_CONTROL_ERROR: number; + const NGHTTP2_SETTINGS_TIMEOUT: number; + const NGHTTP2_STREAM_CLOSED: number; + const NGHTTP2_FRAME_SIZE_ERROR: number; + const NGHTTP2_REFUSED_STREAM: number; + const NGHTTP2_CANCEL: number; + const NGHTTP2_COMPRESSION_ERROR: number; + const NGHTTP2_CONNECT_ERROR: number; + const NGHTTP2_ENHANCE_YOUR_CALM: number; + const NGHTTP2_INADEQUATE_SECURITY: number; + const NGHTTP2_HTTP_1_1_REQUIRED: number; + const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; + const NGHTTP2_FLAG_NONE: number; + const NGHTTP2_FLAG_END_STREAM: number; + const NGHTTP2_FLAG_END_HEADERS: number; + const NGHTTP2_FLAG_ACK: number; + const NGHTTP2_FLAG_PADDED: number; + const NGHTTP2_FLAG_PRIORITY: number; + const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; + const DEFAULT_SETTINGS_ENABLE_PUSH: number; + const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; + const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; + const MAX_MAX_FRAME_SIZE: number; + const MIN_MAX_FRAME_SIZE: number; + const MAX_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_DEFAULT_WEIGHT: number; + const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; + const NGHTTP2_SETTINGS_ENABLE_PUSH: number; + const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; + const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; + const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; + const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; + const PADDING_STRATEGY_NONE: number; + const PADDING_STRATEGY_MAX: number; + const PADDING_STRATEGY_CALLBACK: number; + const HTTP2_HEADER_STATUS: string; + const HTTP2_HEADER_METHOD: string; + const HTTP2_HEADER_AUTHORITY: string; + const HTTP2_HEADER_SCHEME: string; + const HTTP2_HEADER_PATH: string; + const HTTP2_HEADER_ACCEPT_CHARSET: string; + const HTTP2_HEADER_ACCEPT_ENCODING: string; + const HTTP2_HEADER_ACCEPT_LANGUAGE: string; + const HTTP2_HEADER_ACCEPT_RANGES: string; + const HTTP2_HEADER_ACCEPT: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; + const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; + const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; + const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; + const HTTP2_HEADER_AGE: string; + const HTTP2_HEADER_ALLOW: string; + const HTTP2_HEADER_AUTHORIZATION: string; + const HTTP2_HEADER_CACHE_CONTROL: string; + const HTTP2_HEADER_CONNECTION: string; + const HTTP2_HEADER_CONTENT_DISPOSITION: string; + const HTTP2_HEADER_CONTENT_ENCODING: string; + const HTTP2_HEADER_CONTENT_LANGUAGE: string; + const HTTP2_HEADER_CONTENT_LENGTH: string; + const HTTP2_HEADER_CONTENT_LOCATION: string; + const HTTP2_HEADER_CONTENT_MD5: string; + const HTTP2_HEADER_CONTENT_RANGE: string; + const HTTP2_HEADER_CONTENT_TYPE: string; + const HTTP2_HEADER_COOKIE: string; + const HTTP2_HEADER_DATE: string; + const HTTP2_HEADER_ETAG: string; + const HTTP2_HEADER_EXPECT: string; + const HTTP2_HEADER_EXPIRES: string; + const HTTP2_HEADER_FROM: string; + const HTTP2_HEADER_HOST: string; + const HTTP2_HEADER_IF_MATCH: string; + const HTTP2_HEADER_IF_MODIFIED_SINCE: string; + const HTTP2_HEADER_IF_NONE_MATCH: string; + const HTTP2_HEADER_IF_RANGE: string; + const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; + const HTTP2_HEADER_LAST_MODIFIED: string; + const HTTP2_HEADER_LINK: string; + const HTTP2_HEADER_LOCATION: string; + const HTTP2_HEADER_MAX_FORWARDS: string; + const HTTP2_HEADER_PREFER: string; + const HTTP2_HEADER_PROXY_AUTHENTICATE: string; + const HTTP2_HEADER_PROXY_AUTHORIZATION: string; + const HTTP2_HEADER_RANGE: string; + const HTTP2_HEADER_REFERER: string; + const HTTP2_HEADER_REFRESH: string; + const HTTP2_HEADER_RETRY_AFTER: string; + const HTTP2_HEADER_SERVER: string; + const HTTP2_HEADER_SET_COOKIE: string; + const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; + const HTTP2_HEADER_TRANSFER_ENCODING: string; + const HTTP2_HEADER_TE: string; + const HTTP2_HEADER_UPGRADE: string; + const HTTP2_HEADER_USER_AGENT: string; + const HTTP2_HEADER_VARY: string; + const HTTP2_HEADER_VIA: string; + const HTTP2_HEADER_WWW_AUTHENTICATE: string; + const HTTP2_HEADER_HTTP2_SETTINGS: string; + const HTTP2_HEADER_KEEP_ALIVE: string; + const HTTP2_HEADER_PROXY_CONNECTION: string; + const HTTP2_METHOD_ACL: string; + const HTTP2_METHOD_BASELINE_CONTROL: string; + const HTTP2_METHOD_BIND: string; + const HTTP2_METHOD_CHECKIN: string; + const HTTP2_METHOD_CHECKOUT: string; + const HTTP2_METHOD_CONNECT: string; + const HTTP2_METHOD_COPY: string; + const HTTP2_METHOD_DELETE: string; + const HTTP2_METHOD_GET: string; + const HTTP2_METHOD_HEAD: string; + const HTTP2_METHOD_LABEL: string; + const HTTP2_METHOD_LINK: string; + const HTTP2_METHOD_LOCK: string; + const HTTP2_METHOD_MERGE: string; + const HTTP2_METHOD_MKACTIVITY: string; + const HTTP2_METHOD_MKCALENDAR: string; + const HTTP2_METHOD_MKCOL: string; + const HTTP2_METHOD_MKREDIRECTREF: string; + const HTTP2_METHOD_MKWORKSPACE: string; + const HTTP2_METHOD_MOVE: string; + const HTTP2_METHOD_OPTIONS: string; + const HTTP2_METHOD_ORDERPATCH: string; + const HTTP2_METHOD_PATCH: string; + const HTTP2_METHOD_POST: string; + const HTTP2_METHOD_PRI: string; + const HTTP2_METHOD_PROPFIND: string; + const HTTP2_METHOD_PROPPATCH: string; + const HTTP2_METHOD_PUT: string; + const HTTP2_METHOD_REBIND: string; + const HTTP2_METHOD_REPORT: string; + const HTTP2_METHOD_SEARCH: string; + const HTTP2_METHOD_TRACE: string; + const HTTP2_METHOD_UNBIND: string; + const HTTP2_METHOD_UNCHECKOUT: string; + const HTTP2_METHOD_UNLINK: string; + const HTTP2_METHOD_UNLOCK: string; + const HTTP2_METHOD_UPDATE: string; + const HTTP2_METHOD_UPDATEREDIRECTREF: string; + const HTTP2_METHOD_VERSION_CONTROL: string; + const HTTP_STATUS_CONTINUE: number; + const HTTP_STATUS_SWITCHING_PROTOCOLS: number; + const HTTP_STATUS_PROCESSING: number; + const HTTP_STATUS_OK: number; + const HTTP_STATUS_CREATED: number; + const HTTP_STATUS_ACCEPTED: number; + const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; + const HTTP_STATUS_NO_CONTENT: number; + const HTTP_STATUS_RESET_CONTENT: number; + const HTTP_STATUS_PARTIAL_CONTENT: number; + const HTTP_STATUS_MULTI_STATUS: number; + const HTTP_STATUS_ALREADY_REPORTED: number; + const HTTP_STATUS_IM_USED: number; + const HTTP_STATUS_MULTIPLE_CHOICES: number; + const HTTP_STATUS_MOVED_PERMANENTLY: number; + const HTTP_STATUS_FOUND: number; + const HTTP_STATUS_SEE_OTHER: number; + const HTTP_STATUS_NOT_MODIFIED: number; + const HTTP_STATUS_USE_PROXY: number; + const HTTP_STATUS_TEMPORARY_REDIRECT: number; + const HTTP_STATUS_PERMANENT_REDIRECT: number; + const HTTP_STATUS_BAD_REQUEST: number; + const HTTP_STATUS_UNAUTHORIZED: number; + const HTTP_STATUS_PAYMENT_REQUIRED: number; + const HTTP_STATUS_FORBIDDEN: number; + const HTTP_STATUS_NOT_FOUND: number; + const HTTP_STATUS_METHOD_NOT_ALLOWED: number; + const HTTP_STATUS_NOT_ACCEPTABLE: number; + const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; + const HTTP_STATUS_REQUEST_TIMEOUT: number; + const HTTP_STATUS_CONFLICT: number; + const HTTP_STATUS_GONE: number; + const HTTP_STATUS_LENGTH_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_FAILED: number; + const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; + const HTTP_STATUS_URI_TOO_LONG: number; + const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; + const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; + const HTTP_STATUS_EXPECTATION_FAILED: number; + const HTTP_STATUS_TEAPOT: number; + const HTTP_STATUS_MISDIRECTED_REQUEST: number; + const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; + const HTTP_STATUS_LOCKED: number; + const HTTP_STATUS_FAILED_DEPENDENCY: number; + const HTTP_STATUS_UNORDERED_COLLECTION: number; + const HTTP_STATUS_UPGRADE_REQUIRED: number; + const HTTP_STATUS_PRECONDITION_REQUIRED: number; + const HTTP_STATUS_TOO_MANY_REQUESTS: number; + const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; + const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; + const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; + const HTTP_STATUS_NOT_IMPLEMENTED: number; + const HTTP_STATUS_BAD_GATEWAY: number; + const HTTP_STATUS_SERVICE_UNAVAILABLE: number; + const HTTP_STATUS_GATEWAY_TIMEOUT: number; + const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; + const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; + const HTTP_STATUS_INSUFFICIENT_STORAGE: number; + const HTTP_STATUS_LOOP_DETECTED: number; + const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; + const HTTP_STATUS_NOT_EXTENDED: number; + const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; + } + /** + * This symbol can be set as a property on the HTTP/2 headers object with + * an array value in order to provide a list of headers considered sensitive. + */ + export const sensitiveHeaders: symbol; + /** + * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called + * so instances returned may be safely modified for use. + * @since v8.4.0 + */ + export function getDefaultSettings(): Settings; + /** + * Returns a `Buffer` instance containing serialized representation of the given + * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended + * for use with the `HTTP2-Settings` header field. + * + * ```js + * const http2 = require('node:http2'); + * + * const packed = http2.getPackedSettings({ enablePush: false }); + * + * console.log(packed.toString('base64')); + * // Prints: AAIAAAAA + * ``` + * @since v8.4.0 + */ + export function getPackedSettings(settings: Settings): Buffer; + /** + * Returns a `HTTP/2 Settings Object` containing the deserialized settings from + * the given `Buffer` as generated by `http2.getPackedSettings()`. + * @since v8.4.0 + * @param buf The packed settings. + */ + export function getUnpackedSettings(buf: Uint8Array): Settings; + /** + * Returns a `net.Server` instance that creates and manages `Http2Session` instances. + * + * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when + * communicating + * with browser clients. + * + * ```js + * const http2 = require('node:http2'); + * + * // Create an unencrypted HTTP/2 server. + * // Since there are no browsers known that support + * // unencrypted HTTP/2, the use of `http2.createSecureServer()` + * // is necessary when communicating with browser clients. + * const server = http2.createServer(); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8000); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2Server; + export function createServer( + options: ServerOptions, + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2Server; + /** + * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. + * + * ```js + * const http2 = require('node:http2'); + * const fs = require('node:fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * }; + * + * // Create a secure HTTP/2 server + * const server = http2.createSecureServer(options); + * + * server.on('stream', (stream, headers) => { + * stream.respond({ + * 'content-type': 'text/html; charset=utf-8', + * ':status': 200, + * }); + * stream.end('

Hello World

'); + * }); + * + * server.listen(8443); + * ``` + * @since v8.4.0 + * @param onRequestHandler See `Compatibility API` + */ + export function createSecureServer( + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2SecureServer; + export function createSecureServer( + options: SecureServerOptions, + onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, + ): Http2SecureServer; + /** + * Returns a `ClientHttp2Session` instance. + * + * ```js + * const http2 = require('node:http2'); + * const client = http2.connect('https://localhost:1234'); + * + * // Use the client + * + * client.close(); + * ``` + * @since v8.4.0 + * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port + * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. + * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. + */ + export function connect( + authority: string | url.URL, + listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + export function connect( + authority: string | url.URL, + options?: ClientSessionOptions | SecureClientSessionOptions, + listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, + ): ClientHttp2Session; + /** + * Create an HTTP/2 server session from an existing socket. + * @param socket A Duplex Stream + * @param options Any `{@link createServer}` options can be provided. + * @since v20.12.0 + */ + export function performServerHandshake(socket: stream.Duplex, options?: ServerOptions): ServerHttp2Session; +} +declare module "node:http2" { + export * from "http2"; +} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts new file mode 100644 index 0000000..797202a --- /dev/null +++ b/node_modules/@types/node/https.d.ts @@ -0,0 +1,550 @@ +/** + * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a + * separate module. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/https.js) + */ +declare module "https" { + import { Duplex } from "node:stream"; + import * as tls from "node:tls"; + import * as http from "node:http"; + import { URL } from "node:url"; + type ServerOptions< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; + type RequestOptions = + & http.RequestOptions + & tls.SecureContextOptions + & { + checkServerIdentity?: typeof tls.checkServerIdentity | undefined; + rejectUnauthorized?: boolean | undefined; // Defaults to true + servername?: string | undefined; // SNI TLS Extension + }; + interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { + rejectUnauthorized?: boolean | undefined; + maxCachedSessions?: number | undefined; + } + /** + * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. + * @since v0.4.5 + */ + class Agent extends http.Agent { + constructor(options?: AgentOptions); + options: AgentOptions; + } + interface Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends http.Server {} + /** + * See `http.Server` for more information. + * @since v0.3.4 + */ + class Server< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + > extends tls.Server { + constructor(requestListener?: http.RequestListener); + constructor( + options: ServerOptions, + requestListener?: http.RequestListener, + ); + /** + * Closes all connections connected to this server. + * @since v18.2.0 + */ + closeAllConnections(): void; + /** + * Closes all connections connected to this server which are not sending a request or waiting for a response. + * @since v18.2.0 + */ + closeIdleConnections(): void; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + addListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + addListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + addListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Duplex) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "checkContinue", listener: http.RequestListener): this; + addListener(event: "checkExpectation", listener: http.RequestListener): this; + addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; + addListener( + event: "connect", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + addListener(event: "request", listener: http.RequestListener): this; + addListener( + event: "upgrade", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + emit(event: string, ...args: any[]): boolean; + emit(event: "keylog", line: Buffer, tlsSocket: tls.TLSSocket): boolean; + emit( + event: "newSession", + sessionId: Buffer, + sessionData: Buffer, + callback: (err: Error, resp: Buffer) => void, + ): boolean; + emit( + event: "OCSPRequest", + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ): boolean; + emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; + emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Duplex): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit( + event: "checkContinue", + req: InstanceType, + res: InstanceType & { + req: InstanceType; + }, + ): boolean; + emit( + event: "checkExpectation", + req: InstanceType, + res: InstanceType & { + req: InstanceType; + }, + ): boolean; + emit(event: "clientError", err: Error, socket: Duplex): boolean; + emit(event: "connect", req: InstanceType, socket: Duplex, head: Buffer): boolean; + emit( + event: "request", + req: InstanceType, + res: InstanceType & { + req: InstanceType; + }, + ): boolean; + emit(event: "upgrade", req: InstanceType, socket: Duplex, head: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + on( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + on( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + on( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Duplex) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "checkContinue", listener: http.RequestListener): this; + on(event: "checkExpectation", listener: http.RequestListener): this; + on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; + on(event: "connect", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + on(event: "request", listener: http.RequestListener): this; + on(event: "upgrade", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + once( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + once( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + once( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Duplex) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "checkContinue", listener: http.RequestListener): this; + once(event: "checkExpectation", listener: http.RequestListener): this; + once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; + once(event: "connect", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + once(event: "request", listener: http.RequestListener): this; + once(event: "upgrade", listener: (req: InstanceType, socket: Duplex, head: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Duplex) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "checkContinue", listener: http.RequestListener): this; + prependListener(event: "checkExpectation", listener: http.RequestListener): this; + prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; + prependListener( + event: "connect", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependListener(event: "request", listener: http.RequestListener): this; + prependListener( + event: "upgrade", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void, + ): this; + prependOnceListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependOnceListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void, + ): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "checkContinue", listener: http.RequestListener): this; + prependOnceListener(event: "checkExpectation", listener: http.RequestListener): this; + prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; + prependOnceListener( + event: "connect", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + prependOnceListener(event: "request", listener: http.RequestListener): this; + prependOnceListener( + event: "upgrade", + listener: (req: InstanceType, socket: Duplex, head: Buffer) => void, + ): this; + } + /** + * ```js + * // curl -k https://localhost:8000/ + * const https = require('node:https'); + * const fs = require('node:fs'); + * + * const options = { + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * + * Or + * + * ```js + * const https = require('node:https'); + * const fs = require('node:fs'); + * + * const options = { + * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), + * passphrase: 'sample', + * }; + * + * https.createServer(options, (req, res) => { + * res.writeHead(200); + * res.end('hello world\n'); + * }).listen(8000); + * ``` + * @since v0.3.4 + * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. + * @param requestListener A listener to be added to the `'request'` event. + */ + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >(requestListener?: http.RequestListener): Server; + function createServer< + Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, + Response extends typeof http.ServerResponse = typeof http.ServerResponse, + >( + options: ServerOptions, + requestListener?: http.RequestListener, + ): Server; + /** + * Makes a request to a secure web server. + * + * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`, + * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to + * upload a file with a POST request, then write to the `ClientRequest` object. + * + * ```js + * const https = require('node:https'); + * + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * }; + * + * const req = https.request(options, (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * }); + * + * req.on('error', (e) => { + * console.error(e); + * }); + * req.end(); + * ``` + * + * Example using options from `tls.connect()`: + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * }; + * options.agent = new https.Agent(options); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Alternatively, opt out of connection pooling by not using an `Agent`. + * + * ```js + * const options = { + * hostname: 'encrypted.google.com', + * port: 443, + * path: '/', + * method: 'GET', + * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), + * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), + * agent: false, + * }; + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example using a `URL` as `options`: + * + * ```js + * const options = new URL('https://abc:xyz@example.com'); + * + * const req = https.request(options, (res) => { + * // ... + * }); + * ``` + * + * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): + * + * ```js + * const tls = require('node:tls'); + * const https = require('node:https'); + * const crypto = require('node:crypto'); + * + * function sha256(s) { + * return crypto.createHash('sha256').update(s).digest('base64'); + * } + * const options = { + * hostname: 'github.com', + * port: 443, + * path: '/', + * method: 'GET', + * checkServerIdentity: function(host, cert) { + * // Make sure the certificate is issued to the host we are connected to + * const err = tls.checkServerIdentity(host, cert); + * if (err) { + * return err; + * } + * + * // Pin the public key, similar to HPKP pin-sha256 pinning + * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; + * if (sha256(cert.pubkey) !== pubkey256) { + * const msg = 'Certificate verification error: ' + + * `The public key of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // Pin the exact certificate, rather than the pub key + * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + + * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; + * if (cert.fingerprint256 !== cert256) { + * const msg = 'Certificate verification error: ' + + * `The certificate of '${cert.subject.CN}' ` + + * 'does not match our pinned fingerprint'; + * return new Error(msg); + * } + * + * // This loop is informational only. + * // Print the certificate and public key fingerprints of all certs in the + * // chain. Its common to pin the public key of the issuer on the public + * // internet, while pinning the public key of the service in sensitive + * // environments. + * do { + * console.log('Subject Common Name:', cert.subject.CN); + * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); + * + * hash = crypto.createHash('sha256'); + * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); + * + * lastprint256 = cert.fingerprint256; + * cert = cert.issuerCertificate; + * } while (cert.fingerprint256 !== lastprint256); + * + * }, + * }; + * + * options.agent = new https.Agent(options); + * const req = https.request(options, (res) => { + * console.log('All OK. Server matched our pinned cert or public key'); + * console.log('statusCode:', res.statusCode); + * // Print the HPKP values + * console.log('headers:', res.headers['public-key-pins']); + * + * res.on('data', (d) => {}); + * }); + * + * req.on('error', (e) => { + * console.error(e.message); + * }); + * req.end(); + * ``` + * + * Outputs for example: + * + * ```text + * Subject Common Name: github.com + * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 + * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= + * Subject Common Name: DigiCert SHA2 Extended Validation Server CA + * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A + * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= + * Subject Common Name: DigiCert High Assurance EV Root CA + * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF + * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= + * All OK. Server matched our pinned cert or public key + * statusCode: 200 + * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; + * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; + * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains + * ``` + * @since v0.3.6 + * @param options Accepts all `options` from `request`, with some differences in default values: + */ + function request( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function request( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + /** + * Like `http.get()` but for HTTPS. + * + * `options` can be an object, a string, or a `URL` object. If `options` is a + * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. + * + * ```js + * const https = require('node:https'); + * + * https.get('https://encrypted.google.com/', (res) => { + * console.log('statusCode:', res.statusCode); + * console.log('headers:', res.headers); + * + * res.on('data', (d) => { + * process.stdout.write(d); + * }); + * + * }).on('error', (e) => { + * console.error(e); + * }); + * ``` + * @since v0.3.6 + * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. + */ + function get( + options: RequestOptions | string | URL, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + function get( + url: string | URL, + options: RequestOptions, + callback?: (res: http.IncomingMessage) => void, + ): http.ClientRequest; + let globalAgent: Agent; +} +declare module "node:https" { + export * from "https"; +} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts new file mode 100644 index 0000000..f043abe --- /dev/null +++ b/node_modules/@types/node/index.d.ts @@ -0,0 +1,89 @@ +/** + * License for programmatically and manually incorporated + * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc + * + * Copyright Node.js contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +// NOTE: These definitions support NodeJS and TypeScript 4.9+. + +// Reference required types from the default lib: +/// +/// +/// +/// + +// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +/// diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts new file mode 100644 index 0000000..5395db6 --- /dev/null +++ b/node_modules/@types/node/inspector.d.ts @@ -0,0 +1,2746 @@ +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + + +/** + * The `node:inspector` module provides an API for interacting with the V8 + * inspector. + * + * It can be accessed using: + * + * ```js + * import * as inspector from 'node:inspector/promises'; + * ``` + * + * or + * + * ```js + * import * as inspector from 'node:inspector'; + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/inspector.js) + */ +declare module 'inspector' { + import EventEmitter = require('node:events'); + interface InspectorNotification { + method: string; + params: T; + } + namespace Schema { + /** + * Description of the protocol domain. + */ + interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Domain[]; + } + } + namespace Runtime { + /** + * Unique script identifier. + */ + type ScriptId = string; + /** + * Unique object identifier. + */ + type RemoteObjectId = string; + /** + * Primitive value which cannot be JSON-stringified. + */ + type UnserializableValue = string; + /** + * Mirror object referencing original JavaScript object. + */ + interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string | undefined; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: RemoteObjectId | undefined; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: ObjectPreview | undefined; + /** + * @experimental + */ + customPreview?: CustomPreview | undefined; + } + /** + * @experimental + */ + interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: RemoteObjectId; + bindRemoteObjectFunctionId: RemoteObjectId; + configObjectId?: RemoteObjectId | undefined; + } + /** + * Object containing abbreviated remote object value. + * @experimental + */ + interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + /** + * String representation of the object. + */ + description?: string | undefined; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: EntryPreview[] | undefined; + } + /** + * @experimental + */ + interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string | undefined; + /** + * Nested value preview. + */ + valuePreview?: ObjectPreview | undefined; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string | undefined; + } + /** + * @experimental + */ + interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: ObjectPreview | undefined; + /** + * Preview of the value. + */ + value: ObjectPreview; + } + /** + * Object property descriptor. + */ + interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean | undefined; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: RemoteObject | undefined; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: RemoteObject | undefined; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean | undefined; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean | undefined; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: RemoteObject | undefined; + } + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: RemoteObject | undefined; + } + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + interface CallArgument { + /** + * Primitive value or serializable javascript object. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: UnserializableValue | undefined; + /** + * Remote object handle. + */ + objectId?: RemoteObjectId | undefined; + } + /** + * Id of an execution context. + */ + type ExecutionContextId = number; + /** + * Description of an isolated world. + */ + interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {} | undefined; + } + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: ScriptId | undefined; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string | undefined; + /** + * JavaScript stack trace if available. + */ + stackTrace?: StackTrace | undefined; + /** + * Exception object if available. + */ + exception?: RemoteObject | undefined; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: ExecutionContextId | undefined; + } + /** + * Number of milliseconds since epoch. + */ + type Timestamp = number; + /** + * Stack entry for runtime errors and assertions. + */ + interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + /** + * Call frames for assertions or error messages. + */ + interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string | undefined; + /** + * JavaScript function name. + */ + callFrames: CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: StackTrace | undefined; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + * @experimental + */ + parentId?: StackTraceId | undefined; + } + /** + * Unique identifier of current debugger. + * @experimental + */ + type UniqueDebuggerId = string; + /** + * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. + * @experimental + */ + interface StackTraceId { + id: string; + debuggerId?: UniqueDebuggerId | undefined; + } + interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: ExecutionContextId | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + } + interface CallFunctionOnParameterType { + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Identifier of the object to call function on. Either objectId or executionContextId should be specified. + */ + objectId?: RemoteObjectId | undefined; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: CallArgument[] | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should be treated as initiated by user in the UI. + */ + userGesture?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + /** + * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. + */ + objectGroup?: string | undefined; + } + interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean | undefined; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean | undefined; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean | undefined; + } + interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: RemoteObjectId; + } + interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: ExecutionContextId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean | undefined; + /** + * Whether execution should await for resulting value and return once awaited promise is resolved. + */ + awaitPromise?: boolean | undefined; + } + interface QueryObjectsParameterType { + /** + * Identifier of the prototype to return objects for. + */ + prototypeObjectId: RemoteObjectId; + } + interface GlobalLexicalScopeNamesParameterType { + /** + * Specifies in which execution context to lookup global scope variables. + */ + executionContextId?: ExecutionContextId | undefined; + } + interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: InternalPropertyDescriptor[] | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: ScriptId | undefined; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface RunScriptReturnType { + /** + * Run result. + */ + result: RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: ExceptionDetails | undefined; + } + interface QueryObjectsReturnType { + /** + * Array with objects. + */ + objects: RemoteObject; + } + interface GlobalLexicalScopeNamesReturnType { + names: string[]; + } + interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: ExecutionContextDescription; + } + interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: ExecutionContextId; + } + interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Timestamp; + exceptionDetails: ExceptionDetails; + } + interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionThrown. + */ + exceptionId: number; + } + interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: StackTrace | undefined; + /** + * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. + * @experimental + */ + context?: string | undefined; + } + interface InspectRequestedEventDataType { + object: RemoteObject; + hints: {}; + } + } + namespace Debugger { + /** + * Breakpoint identifier. + */ + type BreakpointId = string; + /** + * Call frame identifier. + */ + type CallFrameId = string; + /** + * Location in the source code. + */ + interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + } + /** + * Location in the source code. + * @experimental + */ + interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + */ + functionLocation?: Location | undefined; + /** + * Location in the source code. + */ + location: Location; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Scope chain for this call frame. + */ + scopeChain: Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject | undefined; + } + /** + * Scope description. + */ + interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string | undefined; + /** + * Location in the source code where scope starts + */ + startLocation?: Location | undefined; + /** + * Location in the source code where scope ends + */ + endLocation?: Location | undefined; + } + /** + * Search match for resource. + */ + interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number | undefined; + type?: string | undefined; + } + interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string | undefined; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string | undefined; + /** + * Script hash of the resources to set breakpoint on. + */ + scriptHash?: string | undefined; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number | undefined; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string | undefined; + } + interface RemoveBreakpointParameterType { + breakpointId: BreakpointId; + } + interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Location | undefined; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean | undefined; + } + interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Location; + targetCallFrames?: string | undefined; + } + interface PauseOnAsyncCallParameterType { + /** + * Debugger will pause when async call with given stack trace is started. + */ + parentStackTraceId: Runtime.StackTraceId; + } + interface StepIntoParameterType { + /** + * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. + * @experimental + */ + breakOnAsyncCall?: boolean | undefined; + } + interface GetStackTraceParameterType { + stackTraceId: Runtime.StackTraceId; + } + interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + } + interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean | undefined; + } + interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + } + interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string | undefined; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean | undefined; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean | undefined; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean | undefined; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + */ + throwOnSideEffect?: boolean | undefined; + } + interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: CallFrameId; + } + interface SetReturnValueParameterType { + /** + * New return value. + */ + newValue: Runtime.CallArgument; + } + interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: ScriptPosition[]; + } + interface EnableReturnType { + /** + * Unique identifier of the debugger. + * @experimental + */ + debuggerId: Runtime.UniqueDebuggerId; + } + interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Location[]; + } + interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Location; + } + interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: BreakLocation[]; + } + interface GetStackTraceReturnType { + stackTrace: Runtime.StackTrace; + } + interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: SearchMatch[]; + } + interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: CallFrame[] | undefined; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + } + interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails | undefined; + } + interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {} | undefined; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + /** + * True, if this script has sourceURL. + */ + hasSourceURL?: boolean | undefined; + /** + * True, if this script is ES6 module. + */ + isModule?: boolean | undefined; + /** + * This script length. + */ + length?: number | undefined; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace | undefined; + } + interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: BreakpointId; + /** + * Actual breakpoint location. + */ + location: Location; + } + interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {} | undefined; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[] | undefined; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace | undefined; + /** + * Async stack trace, if any. + * @experimental + */ + asyncStackTraceId?: Runtime.StackTraceId | undefined; + /** + * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. + * @experimental + */ + asyncCallStackTraceId?: Runtime.StackTraceId | undefined; + } + } + namespace Console { + /** + * Console message. + */ + interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string | undefined; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number | undefined; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number | undefined; + } + interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: ConsoleMessage; + } + } + namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + */ + hitCount?: number | undefined; + /** + * Child node ids. + */ + children?: number[] | undefined; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string | undefined; + /** + * An array of source position ticks. + */ + positionTicks?: PositionTickInfo[] | undefined; + } + /** + * Profile. + */ + interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[] | undefined; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[] | undefined; + } + /** + * Specifies a number of samples attributed to a certain source position. + */ + interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + /** + * Coverage data for a source range. + */ + interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + /** + * Coverage data for a JavaScript function. + */ + interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: CoverageRange[]; + /** + * Whether coverage data for this function has block granularity. + */ + isBlockCoverage: boolean; + } + /** + * Coverage data for a JavaScript script. + */ + interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: FunctionCoverage[]; + } + /** + * Describes a type collected during runtime. + * @experimental + */ + interface TypeObject { + /** + * Name of a type collected with type profiling. + */ + name: string; + } + /** + * Source offset and types for a parameter or return value. + * @experimental + */ + interface TypeProfileEntry { + /** + * Source offset of the parameter or end of function for return values. + */ + offset: number; + /** + * The types for this parameter or return value. + */ + types: TypeObject[]; + } + /** + * Type profile data collected during runtime for a JavaScript script. + * @experimental + */ + interface ScriptTypeProfile { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Type profile entries for parameters and return values of the functions in the script. + */ + entries: TypeProfileEntry[]; + } + interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean | undefined; + /** + * Collect block-based coverage. + */ + detailed?: boolean | undefined; + } + interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profile; + } + interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: ScriptCoverage[]; + } + interface TakeTypeProfileReturnType { + /** + * Type profile for all scripts since startTypeProfile() was turned on. + */ + result: ScriptTypeProfile[]; + } + interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string | undefined; + } + } + namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + type HeapSnapshotObjectId = string; + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: SamplingHeapProfileNode[]; + } + /** + * Profile. + */ + interface SamplingHeapProfile { + head: SamplingHeapProfileNode; + } + interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean | undefined; + } + interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean | undefined; + } + interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean | undefined; + } + interface GetObjectByHeapObjectIdParameterType { + objectId: HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + } + interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapSnapshotObjectId; + } + interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number | undefined; + } + interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapSnapshotObjectId; + } + interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: SamplingHeapProfile; + } + interface GetSamplingProfileReturnType { + /** + * Return the sampling profile being collected. + */ + profile: SamplingHeapProfile; + } + interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean | undefined; + } + interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + namespace NodeTracing { + interface TraceConfig { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: string | undefined; + /** + * Included category filters. + */ + includedCategories: string[]; + } + interface StartParameterType { + traceConfig: TraceConfig; + } + interface GetCategoriesReturnType { + /** + * A list of supported tracing categories. + */ + categories: string[]; + } + interface DataCollectedEventDataType { + value: Array<{}>; + } + } + namespace NodeWorker { + type WorkerID = string; + /** + * Unique identifier of attached debugging session. + */ + type SessionID = string; + interface WorkerInfo { + workerId: WorkerID; + type: string; + title: string; + url: string; + } + interface SendMessageToWorkerParameterType { + message: string; + /** + * Identifier of the session. + */ + sessionId: SessionID; + } + interface EnableParameterType { + /** + * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` + * message to run them. + */ + waitForDebuggerOnStart: boolean; + } + interface DetachParameterType { + sessionId: SessionID; + } + interface AttachedToWorkerEventDataType { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + workerInfo: WorkerInfo; + waitingForDebugger: boolean; + } + interface DetachedFromWorkerEventDataType { + /** + * Detached session identifier. + */ + sessionId: SessionID; + } + interface ReceivedMessageFromWorkerEventDataType { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + } + } + namespace NodeRuntime { + interface NotifyWhenWaitingForDisconnectParameterType { + enabled: boolean; + } + } + /** + * The `inspector.Session` is used for dispatching messages to the V8 inspector + * back-end and receiving message responses and notifications. + */ + class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. + * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + /** + * Connects a session to the inspector back-end. + * @since v8.0.0 + */ + connect(): void; + /** + * Immediately close the session. All pending message callbacks will be called + * with an error. `session.connect()` will need to be called to be able to send + * messages again. Reconnected session will lose all inspector state, such as + * enabled agents or configured breakpoints. + * @since v8.0.0 + */ + disconnect(): void; + /** + * Posts a message to the inspector back-end. `callback` will be notified when + * a response is received. `callback` is a function that accepts two optional + * arguments: error and message-specific result. + * + * ```js + * session.post('Runtime.evaluate', { expression: '2 + 2' }, + * (error, { result }) => console.log(result)); + * // Output: { type: 'number', value: 4, description: '4' } + * ``` + * + * The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). + * + * Node.js inspector supports all the Chrome DevTools Protocol domains declared + * by V8\. Chrome DevTools Protocol domain provides an interface for interacting + * with one of the runtime agents used to inspect the application state and listen + * to the run-time events. + * + * ## Example usage + * + * Apart from the debugger, various V8 Profilers are available through the DevTools + * protocol. + * @since v8.0.0 + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + /** + * Returns supported domains. + */ + post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + /** + * Add handler to promise with given promise object id. + */ + post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + /** + * Releases remote object with given id. + */ + post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; + /** + * Releases all remote objects that belong to a given group. + */ + post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): void; + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; + /** + * Disables reporting of execution contexts creation. + */ + post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; + /** + * Discards collected exceptions and console API calls. + */ + post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; + /** + * Compiles expression. + */ + post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + /** + * Runs script with given id in a given context. + */ + post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; + /** + * Returns all let, const and class variables from global scope. + */ + post( + method: 'Runtime.globalLexicalScopeNames', + params?: Runtime.GlobalLexicalScopeNamesParameterType, + callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void + ): void; + post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; + /** + * Disables debugger for given page. + */ + post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + /** + * Removes JavaScript breakpoint. + */ + post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + */ + post( + method: 'Debugger.getPossibleBreakpoints', + params?: Debugger.GetPossibleBreakpointsParameterType, + callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void + ): void; + post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + /** + * Continues execution until specific location is reached. + */ + post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; + /** + * @experimental + */ + post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; + /** + * Steps over the statement. + */ + post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; + /** + * Steps into the function call. + */ + post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; + /** + * Steps out of the function call. + */ + post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; + /** + * Stops on the next JavaScript statement. + */ + post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; + /** + * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; + /** + * Resumes JavaScript execution. + */ + post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; + /** + * Returns stack trace with given stackTraceId. + * @experimental + */ + post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; + /** + * Searches for given string in script content. + */ + post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + /** + * Edits JavaScript source live. + */ + post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + /** + * Restarts particular call frame from the beginning. + */ + post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + /** + * Returns source for the script with given id. + */ + post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; + /** + * Evaluates expression on a given call frame. + */ + post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; + /** + * Changes return value in top frame. Available only at return break position. + * @experimental + */ + post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; + /** + * Enables or disables async call stacks tracking. + */ + post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): void; + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): void; + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: 'Console.enable', callback?: (err: Error | null) => void): void; + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: 'Console.disable', callback?: (err: Error | null) => void): void; + /** + * Does nothing. + */ + post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; + post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + */ + post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + */ + post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + */ + post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + */ + post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + /** + * Enable type profile. + * @experimental + */ + post(method: 'Profiler.startTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Disable type profile. Disabling releases type profile data collected so far. + * @experimental + */ + post(method: 'Profiler.stopTypeProfile', callback?: (err: Error | null) => void): void; + /** + * Collect type profile. + * @experimental + */ + post(method: 'Profiler.takeTypeProfile', callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; + post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; + post( + method: 'HeapProfiler.getObjectByHeapObjectId', + params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, + callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void + ): void; + post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; + post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; + /** + * Gets supported tracing categories. + */ + post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; + /** + * Start trace events collection. + */ + post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; + /** + * Stop trace events collection. Remaining collected events will be sent as a sequence of + * dataCollected events followed by tracingComplete event. + */ + post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; + /** + * Sends protocol message over session with given id. + */ + post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; + /** + * Instructs the inspector to attach to running workers. Will also attach to new workers + * as they start + */ + post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; + /** + * Detaches from all running workers and disables attaching to new workers as they are started. + */ + post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; + /** + * Detached from the worker with given sessionId. + */ + post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; + /** + * Enable the `NodeRuntime.waitingForDisconnect`. + */ + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; + post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; + // Events + addListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: 'inspectorNotification', message: InspectorNotification<{}>): boolean; + emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; + emit(event: 'Runtime.executionContextsCleared'): boolean; + emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; + emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; + emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; + emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; + emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; + emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; + emit(event: 'Debugger.paused', message: InspectorNotification): boolean; + emit(event: 'Debugger.resumed'): boolean; + emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; + emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.resetProfiles'): boolean; + emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; + emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; + emit(event: 'NodeTracing.tracingComplete'): boolean; + emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; + emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; + on(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + on(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + on(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + once(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + once(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification<{}>) => void): this; + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; + /** + * Issued when console API was called. + */ + prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; + /** + * Issued when new console message is added. + */ + prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; + prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; + /** + * Contains an bucket of collected trace events. + */ + prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + */ + prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; + /** + * Issued when attached to a worker. + */ + prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; + /** + * Issued when detached from the worker. + */ + prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * Notifies about a new protocol message received from the session + * (session ID is provided in attachedToWorker notification). + */ + prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; + /** + * This event is fired instead of `Runtime.executionContextDestroyed` when + * enabled. + * It is fired when the Node process finished all code execution and is + * waiting for all frontends to disconnect. + */ + prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; + } + /** + * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has + * started. + * + * If wait is `true`, will block until a client has connected to the inspect port + * and flow control has been passed to the debugger client. + * + * See the `security warning` regarding the `host` parameter usage. + * @param [port='what was specified on the CLI'] Port to listen on for inspector connections. Optional. + * @param [host='what was specified on the CLI'] Host to listen on for inspector connections. Optional. + * @param [wait=false] Block until a client has connected. Optional. + * @returns Disposable that calls `inspector.close()`. + */ + function open(port?: number, host?: string, wait?: boolean): Disposable; + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + function close(): void; + /** + * Return the URL of the active inspector, or `undefined` if there is none. + * + * ```console + * $ node --inspect -p 'inspector.url()' + * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * For help, see: https://nodejs.org/en/docs/inspector + * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 + * + * $ node --inspect=localhost:3000 -p 'inspector.url()' + * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * For help, see: https://nodejs.org/en/docs/inspector + * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a + * + * $ node -p 'inspector.url()' + * undefined + * ``` + */ + function url(): string | undefined; + /** + * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. + * + * An exception will be thrown if there is no active inspector. + * @since v12.7.0 + */ + function waitForDebugger(): void; +} +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module 'node:inspector' { + export * from 'inspector'; +} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts new file mode 100644 index 0000000..c38a9b8 --- /dev/null +++ b/node_modules/@types/node/module.d.ts @@ -0,0 +1,315 @@ +/** + * @since v0.3.7 + * @experimental + */ +declare module "module" { + import { URL } from "node:url"; + import { MessagePort } from "node:worker_threads"; + namespace Module { + /** + * The `module.syncBuiltinESMExports()` method updates all the live bindings for + * builtin `ES Modules` to match the properties of the `CommonJS` exports. It + * does not add or remove exported names from the `ES Modules`. + * + * ```js + * const fs = require('node:fs'); + * const assert = require('node:assert'); + * const { syncBuiltinESMExports } = require('node:module'); + * + * fs.readFile = newAPI; + * + * delete fs.readFileSync; + * + * function newAPI() { + * // ... + * } + * + * fs.newAPI = newAPI; + * + * syncBuiltinESMExports(); + * + * import('node:fs').then((esmFS) => { + * // It syncs the existing readFile property with the new value + * assert.strictEqual(esmFS.readFile, newAPI); + * // readFileSync has been deleted from the required fs + * assert.strictEqual('readFileSync' in fs, false); + * // syncBuiltinESMExports() does not remove readFileSync from esmFS + * assert.strictEqual('readFileSync' in esmFS, true); + * // syncBuiltinESMExports() does not add names + * assert.strictEqual(esmFS.newAPI, undefined); + * }); + * ``` + * @since v12.12.0 + */ + function syncBuiltinESMExports(): void; + /** + * `path` is the resolved path for the file for which a corresponding source map + * should be fetched. + * @since v13.7.0, v12.17.0 + * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. + */ + function findSourceMap(path: string, error?: Error): SourceMap; + interface SourceMapPayload { + file: string; + version: number; + sources: string[]; + sourcesContent: string[]; + names: string[]; + mappings: string; + sourceRoot: string; + } + interface SourceMapping { + generatedLine: number; + generatedColumn: number; + originalSource: string; + originalLine: number; + originalColumn: number; + } + interface SourceOrigin { + /** + * The name of the range in the source map, if one was provided + */ + name?: string; + /** + * The file name of the original source, as reported in the SourceMap + */ + fileName: string; + /** + * The 1-indexed lineNumber of the corresponding call site in the original source + */ + lineNumber: number; + /** + * The 1-indexed columnNumber of the corresponding call site in the original source + */ + columnNumber: number; + } + /** + * @since v13.7.0, v12.17.0 + */ + class SourceMap { + /** + * Getter for the payload used to construct the `SourceMap` instance. + */ + readonly payload: SourceMapPayload; + constructor(payload: SourceMapPayload); + /** + * Given a line offset and column offset in the generated source + * file, returns an object representing the SourceMap range in the + * original file if found, or an empty object if not. + * + * The object returned contains the following keys: + * + * The returned value represents the raw range as it appears in the + * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and + * column numbers as they appear in Error messages and CallSite + * objects. + * + * To get the corresponding 1-indexed line and column numbers from a + * lineNumber and columnNumber as they are reported by Error stacks + * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` + * @param lineOffset The zero-indexed line number offset in the generated source + * @param columnOffset The zero-indexed column number offset in the generated source + */ + findEntry(lineOffset: number, columnOffset: number): SourceMapping; + /** + * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, + * find the corresponding call site location in the original source. + * + * If the `lineNumber` and `columnNumber` provided are not found in any source map, + * then an empty object is returned. + * @param lineNumber The 1-indexed line number of the call site in the generated source + * @param columnNumber The 1-indexed column number of the call site in the generated source + */ + findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; + } + /** @deprecated Use `ImportAttributes` instead */ + interface ImportAssertions extends ImportAttributes {} + interface ImportAttributes extends NodeJS.Dict { + type?: string | undefined; + } + type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm"; + type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; + interface GlobalPreloadContext { + port: MessagePort; + } + /** + * @deprecated This hook will be removed in a future version. + * Use `initialize` instead. When a loader has an `initialize` export, `globalPreload` will be ignored. + * + * Sometimes it might be necessary to run some code inside of the same global scope that the application runs in. + * This hook allows the return of a string that is run as a sloppy-mode script on startup. + * + * @param context Information to assist the preload code + * @return Code to run before application startup + */ + type GlobalPreloadHook = (context: GlobalPreloadContext) => string; + /** + * The `initialize` hook provides a way to define a custom function that runs in the hooks thread + * when the hooks module is initialized. Initialization happens when the hooks module is registered via `register`. + * + * This hook can receive data from a `register` invocation, including ports and other transferrable objects. + * The return value of `initialize` can be a `Promise`, in which case it will be awaited before the main application thread execution resumes. + */ + type InitializeHook = (data: Data) => void | Promise; + interface ResolveHookContext { + /** + * Export conditions of the relevant `package.json` + */ + conditions: string[]; + /** + * @deprecated Use `importAttributes` instead + */ + importAssertions: ImportAttributes; + /** + * An object whose key-value pairs represent the assertions for the module to import + */ + importAttributes: ImportAttributes; + /** + * The module importing this one, or undefined if this is the Node.js entry point + */ + parentURL: string | undefined; + } + interface ResolveFnOutput { + /** + * A hint to the load hook (it might be ignored) + */ + format?: ModuleFormat | null | undefined; + /** + * @deprecated Use `importAttributes` instead + */ + importAssertions?: ImportAttributes | undefined; + /** + * The import attributes to use when caching the module (optional; if excluded the input will be used) + */ + importAttributes?: ImportAttributes | undefined; + /** + * A signal that this hook intends to terminate the chain of `resolve` hooks. + * @default false + */ + shortCircuit?: boolean | undefined; + /** + * The absolute URL to which this input resolves + */ + url: string; + } + /** + * The `resolve` hook chain is responsible for resolving file URL for a given module specifier and parent URL, and optionally its format (such as `'module'`) as a hint to the `load` hook. + * If a format is specified, the load hook is ultimately responsible for providing the final `format` value (and it is free to ignore the hint provided by `resolve`); + * if `resolve` provides a format, a custom `load` hook is required even if only to pass the value to the Node.js default `load` hook. + * + * @param specifier The specified URL path of the module to be resolved + * @param context + * @param nextResolve The subsequent `resolve` hook in the chain, or the Node.js default `resolve` hook after the last user-supplied resolve hook + */ + type ResolveHook = ( + specifier: string, + context: ResolveHookContext, + nextResolve: ( + specifier: string, + context?: ResolveHookContext, + ) => ResolveFnOutput | Promise, + ) => ResolveFnOutput | Promise; + interface LoadHookContext { + /** + * Export conditions of the relevant `package.json` + */ + conditions: string[]; + /** + * The format optionally supplied by the `resolve` hook chain + */ + format: ModuleFormat; + /** + * @deprecated Use `importAttributes` instead + */ + importAssertions: ImportAttributes; + /** + * An object whose key-value pairs represent the assertions for the module to import + */ + importAttributes: ImportAttributes; + } + interface LoadFnOutput { + format: ModuleFormat; + /** + * A signal that this hook intends to terminate the chain of `resolve` hooks. + * @default false + */ + shortCircuit?: boolean | undefined; + /** + * The source for Node.js to evaluate + */ + source?: ModuleSource; + } + /** + * The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed. + * It is also in charge of validating the import assertion. + * + * @param url The URL/path of the module to be loaded + * @param context Metadata about the module + * @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook + */ + type LoadHook = ( + url: string, + context: LoadHookContext, + nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise, + ) => LoadFnOutput | Promise; + } + interface RegisterOptions { + parentURL: string | URL; + data?: Data | undefined; + transferList?: any[] | undefined; + } + interface Module extends NodeModule {} + class Module { + static runMain(): void; + static wrap(code: string): string; + static createRequire(path: string | URL): NodeRequire; + static builtinModules: string[]; + static isBuiltin(moduleName: string): boolean; + static Module: typeof Module; + static register( + specifier: string | URL, + parentURL?: string | URL, + options?: RegisterOptions, + ): void; + static register(specifier: string | URL, options?: RegisterOptions): void; + constructor(id: string, parent?: Module); + } + global { + interface ImportMeta { + /** + * The directory name of the current module. This is the same as the `path.dirname()` of the `import.meta.filename`. + * **Caveat:** only present on `file:` modules. + */ + dirname: string; + /** + * The full absolute path and filename of the current module, with symlinks resolved. + * This is the same as the `url.fileURLToPath()` of the `import.meta.url`. + * **Caveat:** only local modules support this property. Modules not using the `file:` protocol will not provide it. + */ + filename: string; + /** + * The absolute `file:` URL of the module. + */ + url: string; + /** + * Provides a module-relative resolution function scoped to each module, returning + * the URL string. + * + * Second `parent` parameter is only used when the `--experimental-import-meta-resolve` + * command flag enabled. + * + * @since v20.6.0 + * + * @param specifier The module specifier to resolve relative to `parent`. + * @param parent The absolute parent module URL to resolve from. + * @returns The absolute (`file:`) URL string for the resolved module. + */ + resolve(specifier: string, parent?: string | URL | undefined): string; + } + } + export = Module; +} +declare module "node:module" { + import module = require("module"); + export = module; +} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts new file mode 100644 index 0000000..3010c1d --- /dev/null +++ b/node_modules/@types/node/net.d.ts @@ -0,0 +1,996 @@ +/** + * > Stability: 2 - Stable + * + * The `node:net` module provides an asynchronous network API for creating stream-based + * TCP or `IPC` servers ({@link createServer}) and clients + * ({@link createConnection}). + * + * It can be accessed using: + * + * ```js + * const net = require('node:net'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/net.js) + */ +declare module "net" { + import * as stream from "node:stream"; + import { Abortable, EventEmitter } from "node:events"; + import * as dns from "node:dns"; + type LookupFunction = ( + hostname: string, + options: dns.LookupOptions, + callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, + ) => void; + interface AddressInfo { + address: string; + family: string; + port: number; + } + interface SocketConstructorOpts { + fd?: number | undefined; + allowHalfOpen?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + signal?: AbortSignal; + } + interface OnReadOpts { + buffer: Uint8Array | (() => Uint8Array); + /** + * This function is called for every chunk of incoming data. + * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. + * Return false from this function to implicitly pause() the socket. + */ + callback(bytesWritten: number, buf: Uint8Array): boolean; + } + interface ConnectOpts { + /** + * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. + * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will + * still be emitted as normal and methods like pause() and resume() will also behave as expected. + */ + onread?: OnReadOpts | undefined; + } + interface TcpSocketConnectOpts extends ConnectOpts { + port: number; + host?: string | undefined; + localAddress?: string | undefined; + localPort?: number | undefined; + hints?: number | undefined; + family?: number | undefined; + lookup?: LookupFunction | undefined; + noDelay?: boolean | undefined; + keepAlive?: boolean | undefined; + keepAliveInitialDelay?: number | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamily?: boolean | undefined; + /** + * @since v18.13.0 + */ + autoSelectFamilyAttemptTimeout?: number | undefined; + } + interface IpcSocketConnectOpts extends ConnectOpts { + path: string; + } + type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; + type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; + /** + * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint + * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also + * an `EventEmitter`. + * + * A `net.Socket` can be created by the user and used directly to interact with + * a server. For example, it is returned by {@link createConnection}, + * so the user can use it to talk to the server. + * + * It can also be created by Node.js and passed to the user when a connection + * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use + * it to interact with the client. + * @since v0.3.4 + */ + class Socket extends stream.Duplex { + constructor(options?: SocketConstructorOpts); + /** + * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. + * If the socket is still writable it implicitly calls `socket.end()`. + * @since v0.3.4 + */ + destroySoon(): void; + /** + * Sends data on the socket. The second parameter specifies the encoding in the + * case of a string. It defaults to UTF8 encoding. + * + * Returns `true` if the entire data was flushed successfully to the kernel + * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. + * + * The optional `callback` parameter will be executed when the data is finally + * written out, which may not be immediately. + * + * See `Writable` stream `write()` method for more + * information. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + */ + write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; + write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean; + /** + * Initiate a connection on a given socket. + * + * Possible signatures: + * + * * `socket.connect(options[, connectListener])` + * * `socket.connect(path[, connectListener])` for `IPC` connections. + * * `socket.connect(port[, host][, connectListener])` for TCP connections. + * * Returns: `net.Socket` The socket itself. + * + * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, + * instead of a `'connect'` event, an `'error'` event will be emitted with + * the error passed to the `'error'` listener. + * The last parameter `connectListener`, if supplied, will be added as a listener + * for the `'connect'` event **once**. + * + * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined + * behavior. + */ + connect(options: SocketConnectOpts, connectionListener?: () => void): this; + connect(port: number, host: string, connectionListener?: () => void): this; + connect(port: number, connectionListener?: () => void): this; + connect(path: string, connectionListener?: () => void): this; + /** + * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. + * @since v0.1.90 + * @return The socket itself. + */ + setEncoding(encoding?: BufferEncoding): this; + /** + * Pauses the reading of data. That is, `'data'` events will not be emitted. + * Useful to throttle back an upload. + * @return The socket itself. + */ + pause(): this; + /** + * Close the TCP connection by sending an RST packet and destroy the stream. + * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. + * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. + * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. + * @since v18.3.0, v16.17.0 + */ + resetAndDestroy(): this; + /** + * Resumes reading after a call to `socket.pause()`. + * @return The socket itself. + */ + resume(): this; + /** + * Sets the socket to timeout after `timeout` milliseconds of inactivity on + * the socket. By default `net.Socket` do not have a timeout. + * + * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to + * end the connection. + * + * ```js + * socket.setTimeout(3000); + * socket.on('timeout', () => { + * console.log('socket timeout'); + * socket.end(); + * }); + * ``` + * + * If `timeout` is 0, then the existing idle timeout is disabled. + * + * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. + * @since v0.1.90 + * @return The socket itself. + */ + setTimeout(timeout: number, callback?: () => void): this; + /** + * Enable/disable the use of Nagle's algorithm. + * + * When a TCP connection is created, it will have Nagle's algorithm enabled. + * + * Nagle's algorithm delays data before it is sent via the network. It attempts + * to optimize throughput at the expense of latency. + * + * Passing `true` for `noDelay` or not passing an argument will disable Nagle's + * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's + * algorithm. + * @since v0.1.90 + * @param [noDelay=true] + * @return The socket itself. + */ + setNoDelay(noDelay?: boolean): this; + /** + * Enable/disable keep-alive functionality, and optionally set the initial + * delay before the first keepalive probe is sent on an idle socket. + * + * Set `initialDelay` (in milliseconds) to set the delay between the last + * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default + * (or previous) setting. + * + * Enabling the keep-alive functionality will set the following socket options: + * + * * `SO_KEEPALIVE=1` + * * `TCP_KEEPIDLE=initialDelay` + * * `TCP_KEEPCNT=10` + * * `TCP_KEEPINTVL=1` + * @since v0.1.92 + * @param [enable=false] + * @param [initialDelay=0] + * @return The socket itself. + */ + setKeepAlive(enable?: boolean, initialDelay?: number): this; + /** + * Returns the bound `address`, the address `family` name and `port` of the + * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` + * @since v0.1.90 + */ + address(): AddressInfo | {}; + /** + * Calling `unref()` on a socket will allow the program to exit if this is the only + * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + unref(): this; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). + * If the socket is `ref`ed calling `ref` again will have no effect. + * @since v0.9.1 + * @return The socket itself. + */ + ref(): this; + /** + * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` + * and it is an array of the addresses that have been attempted. + * + * Each address is a string in the form of `$IP:$PORT`. + * If the connection was successful, then the last address is the one that the socket is currently connected to. + * @since v19.4.0 + */ + readonly autoSelectFamilyAttemptedAddresses: string[]; + /** + * This property shows the number of characters buffered for writing. The buffer + * may contain strings whose length after encoding is not yet known. So this number + * is only an approximation of the number of bytes in the buffer. + * + * `net.Socket` has the property that `socket.write()` always works. This is to + * help users get up and running quickly. The computer cannot always keep up + * with the amount of data that is written to a socket. The network connection + * simply might be too slow. Node.js will internally queue up the data written to a + * socket and send it out over the wire when it is possible. + * + * The consequence of this internal buffering is that memory may grow. + * Users who experience large or growing `bufferSize` should attempt to + * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. + * @since v0.3.8 + * @deprecated Since v14.6.0 - Use `writableLength` instead. + */ + readonly bufferSize: number; + /** + * The amount of received bytes. + * @since v0.5.3 + */ + readonly bytesRead: number; + /** + * The amount of bytes sent. + * @since v0.5.3 + */ + readonly bytesWritten: number; + /** + * If `true`,`socket.connect(options[, connectListener])` was + * called and has not yet finished. It will stay `true` until the socket becomes + * connected, then it is set to `false` and the `'connect'` event is emitted. Note + * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. + * @since v6.1.0 + */ + readonly connecting: boolean; + /** + * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting + * (see `socket.connecting`). + * @since v11.2.0, v10.16.0 + */ + readonly pending: boolean; + /** + * See `writable.destroyed` for further details. + */ + readonly destroyed: boolean; + /** + * The string representation of the local IP address the remote client is + * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client + * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. + * @since v0.9.6 + */ + readonly localAddress?: string; + /** + * The numeric representation of the local port. For example, `80` or `21`. + * @since v0.9.6 + */ + readonly localPort?: number; + /** + * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. + * @since v18.8.0, v16.18.0 + */ + readonly localFamily?: string; + /** + * This property represents the state of the connection as a string. + * + * * If the stream is connecting `socket.readyState` is `opening`. + * * If the stream is readable and writable, it is `open`. + * * If the stream is readable and not writable, it is `readOnly`. + * * If the stream is not readable and writable, it is `writeOnly`. + * @since v0.5.0 + */ + readonly readyState: SocketReadyState; + /** + * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remoteAddress?: string | undefined; + /** + * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.11.14 + */ + readonly remoteFamily?: string | undefined; + /** + * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if + * the socket is destroyed (for example, if the client disconnected). + * @since v0.5.10 + */ + readonly remotePort?: number | undefined; + /** + * The socket timeout in milliseconds as set by `socket.setTimeout()`. + * It is `undefined` if a timeout has not been set. + * @since v10.7.0 + */ + readonly timeout?: number | undefined; + /** + * Half-closes the socket. i.e., it sends a FIN packet. It is possible the + * server will still send some data. + * + * See `writable.end()` for further details. + * @since v0.1.90 + * @param [encoding='utf8'] Only used when data is `string`. + * @param callback Optional callback for when the socket is finished. + * @return The socket itself. + */ + end(callback?: () => void): this; + end(buffer: Uint8Array | string, callback?: () => void): this; + end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. connectionAttempt + * 4. connectionAttemptFailed + * 5. connectionAttemptTimeout + * 6. data + * 7. drain + * 8. end + * 9. error + * 10. lookup + * 11. ready + * 12. timeout + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: (hadError: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; + addListener( + event: "connectionAttemptFailed", + listener: (ip: string, port: number, family: number) => void, + ): this; + addListener( + event: "connectionAttemptTimeout", + listener: (ip: string, port: number, family: number) => void, + ): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener( + event: "lookup", + listener: (err: Error, address: string, family: string | number, host: string) => void, + ): this; + addListener(event: "ready", listener: () => void): this; + addListener(event: "timeout", listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close", hadError: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean; + emit(event: "connectionAttemptFailed", ip: string, port: number, family: number): boolean; + emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "ready"): boolean; + emit(event: "timeout"): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: (hadError: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; + on(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this; + on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on( + event: "lookup", + listener: (err: Error, address: string, family: string | number, host: string) => void, + ): this; + on(event: "ready", listener: () => void): this; + on(event: "timeout", listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: (hadError: boolean) => void): this; + once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; + once(event: "connectionAttemptFailed", listener: (ip: string, port: number, family: number) => void): this; + once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once( + event: "lookup", + listener: (err: Error, address: string, family: string | number, host: string) => void, + ): this; + once(event: "ready", listener: () => void): this; + once(event: "timeout", listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: (hadError: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; + prependListener( + event: "connectionAttemptFailed", + listener: (ip: string, port: number, family: number) => void, + ): this; + prependListener( + event: "connectionAttemptTimeout", + listener: (ip: string, port: number, family: number) => void, + ): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener( + event: "lookup", + listener: (err: Error, address: string, family: string | number, host: string) => void, + ): this; + prependListener(event: "ready", listener: () => void): this; + prependListener(event: "timeout", listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: (hadError: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener( + event: "connectionAttempt", + listener: (ip: string, port: number, family: number) => void, + ): this; + prependOnceListener( + event: "connectionAttemptFailed", + listener: (ip: string, port: number, family: number) => void, + ): this; + prependOnceListener( + event: "connectionAttemptTimeout", + listener: (ip: string, port: number, family: number) => void, + ): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener( + event: "lookup", + listener: (err: Error, address: string, family: string | number, host: string) => void, + ): this; + prependOnceListener(event: "ready", listener: () => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + interface ListenOptions extends Abortable { + port?: number | undefined; + host?: string | undefined; + backlog?: number | undefined; + path?: string | undefined; + exclusive?: boolean | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + /** + * @default false + */ + ipv6Only?: boolean | undefined; + } + interface ServerOpts { + /** + * Indicates whether half-opened TCP connections are allowed. + * @default false + */ + allowHalfOpen?: boolean | undefined; + /** + * Indicates whether the socket should be paused on incoming connections. + * @default false + */ + pauseOnConnect?: boolean | undefined; + /** + * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. + * @default false + * @since v16.5.0 + */ + noDelay?: boolean | undefined; + /** + * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, + * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. + * @default false + * @since v16.5.0 + */ + keepAlive?: boolean | undefined; + /** + * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. + * @default 0 + * @since v16.5.0 + */ + keepAliveInitialDelay?: number | undefined; + } + interface DropArgument { + localAddress?: string; + localPort?: number; + localFamily?: string; + remoteAddress?: string; + remotePort?: number; + remoteFamily?: string; + } + /** + * This class is used to create a TCP or `IPC` server. + * @since v0.1.90 + */ + class Server extends EventEmitter { + constructor(connectionListener?: (socket: Socket) => void); + constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); + /** + * Start a server listening for connections. A `net.Server` can be a TCP or + * an `IPC` server depending on what it listens to. + * + * Possible signatures: + * + * * `server.listen(handle[, backlog][, callback])` + * * `server.listen(options[, callback])` + * * `server.listen(path[, backlog][, callback])` for `IPC` servers + * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` + * event. + * + * All `listen()` methods can take a `backlog` parameter to specify the maximum + * length of the queue of pending connections. The actual length will be determined + * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn`on Linux. The default value of this parameter is 511 (not 512). + * + * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for + * details). + * + * The `server.listen()` method can be called again if and only if there was an + * error during the first `server.listen()` call or `server.close()` has been + * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. + * + * One of the most common errors raised when listening is `EADDRINUSE`. + * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry + * after a certain amount of time: + * + * ```js + * server.on('error', (e) => { + * if (e.code === 'EADDRINUSE') { + * console.error('Address in use, retrying...'); + * setTimeout(() => { + * server.close(); + * server.listen(PORT, HOST); + * }, 1000); + * } + * }); + * ``` + */ + listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, hostname?: string, listeningListener?: () => void): this; + listen(port?: number, backlog?: number, listeningListener?: () => void): this; + listen(port?: number, listeningListener?: () => void): this; + listen(path: string, backlog?: number, listeningListener?: () => void): this; + listen(path: string, listeningListener?: () => void): this; + listen(options: ListenOptions, listeningListener?: () => void): this; + listen(handle: any, backlog?: number, listeningListener?: () => void): this; + listen(handle: any, listeningListener?: () => void): this; + /** + * Stops the server from accepting new connections and keeps existing + * connections. This function is asynchronous, the server is finally closed + * when all connections are ended and the server emits a `'close'` event. + * The optional `callback` will be called once the `'close'` event occurs. Unlike + * that event, it will be called with an `Error` as its only argument if the server + * was not open when it was closed. + * @since v0.1.90 + * @param callback Called when the server is closed. + */ + close(callback?: (err?: Error) => void): this; + /** + * Returns the bound `address`, the address `family` name, and `port` of the server + * as reported by the operating system if listening on an IP socket + * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. + * + * For a server listening on a pipe or Unix domain socket, the name is returned + * as a string. + * + * ```js + * const server = net.createServer((socket) => { + * socket.end('goodbye\n'); + * }).on('error', (err) => { + * // Handle errors here. + * throw err; + * }); + * + * // Grab an arbitrary unused port. + * server.listen(() => { + * console.log('opened server on', server.address()); + * }); + * ``` + * + * `server.address()` returns `null` before the `'listening'` event has been + * emitted or after calling `server.close()`. + * @since v0.1.90 + */ + address(): AddressInfo | string | null; + /** + * Asynchronously get the number of concurrent connections on the server. Works + * when sockets were sent to forks. + * + * Callback should take two arguments `err` and `count`. + * @since v0.9.7 + */ + getConnections(cb: (error: Error | null, count: number) => void): void; + /** + * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). + * If the server is `ref`ed calling `ref()` again will have no effect. + * @since v0.9.1 + */ + ref(): this; + /** + * Calling `unref()` on a server will allow the program to exit if this is the only + * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. + * @since v0.9.1 + */ + unref(): this; + /** + * Set this property to reject connections when the server's connection count gets + * high. + * + * It is not recommended to use this option once a socket has been sent to a child + * with `child_process.fork()`. + * @since v0.2.0 + */ + maxConnections: number; + connections: number; + /** + * Indicates whether or not the server is listening for connections. + * @since v5.7.0 + */ + readonly listening: boolean; + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + * 5. drop + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "drop", listener: (data?: DropArgument) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "drop", data?: DropArgument): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "drop", listener: (data?: DropArgument) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "drop", listener: (data?: DropArgument) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "drop", listener: (data?: DropArgument) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this; + /** + * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. + * @since v20.5.0 + */ + [Symbol.asyncDispose](): Promise; + } + type IPVersion = "ipv4" | "ipv6"; + /** + * The `BlockList` object can be used with some network APIs to specify rules for + * disabling inbound or outbound access to specific IP addresses, IP ranges, or + * IP subnets. + * @since v15.0.0, v14.18.0 + */ + class BlockList { + /** + * Adds a rule to block the given IP address. + * @since v15.0.0, v14.18.0 + * @param address An IPv4 or IPv6 address. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addAddress(address: string, type?: IPVersion): void; + addAddress(address: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). + * @since v15.0.0, v14.18.0 + * @param start The starting IPv4 or IPv6 address in the range. + * @param end The ending IPv4 or IPv6 address in the range. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addRange(start: string, end: string, type?: IPVersion): void; + addRange(start: SocketAddress, end: SocketAddress): void; + /** + * Adds a rule to block a range of IP addresses specified as a subnet mask. + * @since v15.0.0, v14.18.0 + * @param net The network IPv4 or IPv6 address. + * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + addSubnet(net: SocketAddress, prefix: number): void; + addSubnet(net: string, prefix: number, type?: IPVersion): void; + /** + * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. + * + * ```js + * const blockList = new net.BlockList(); + * blockList.addAddress('123.123.123.123'); + * blockList.addRange('10.0.0.1', '10.0.0.10'); + * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); + * + * console.log(blockList.check('123.123.123.123')); // Prints: true + * console.log(blockList.check('10.0.0.3')); // Prints: true + * console.log(blockList.check('222.111.111.222')); // Prints: false + * + * // IPv6 notation for IPv4 addresses works: + * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true + * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true + * ``` + * @since v15.0.0, v14.18.0 + * @param address The IP address to check + * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. + */ + check(address: SocketAddress): boolean; + check(address: string, type?: IPVersion): boolean; + /** + * The list of rules added to the blocklist. + * @since v15.0.0, v14.18.0 + */ + rules: readonly string[]; + } + interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { + timeout?: number | undefined; + } + type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; + /** + * Creates a new TCP or `IPC` server. + * + * If `allowHalfOpen` is set to `true`, when the other end of the socket + * signals the end of transmission, the server will only send back the end of + * transmission when `socket.end()` is explicitly called. For example, in the + * context of TCP, when a FIN packed is received, a FIN packed is sent + * back only when `socket.end()` is explicitly called. Until then the + * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. + * + * If `pauseOnConnect` is set to `true`, then the socket associated with each + * incoming connection will be paused, and no data will be read from its handle. + * This allows connections to be passed between processes without any data being + * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. + * + * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. + * + * Here is an example of a TCP echo server which listens for connections + * on port 8124: + * + * ```js + * const net = require('node:net'); + * const server = net.createServer((c) => { + * // 'connection' listener. + * console.log('client connected'); + * c.on('end', () => { + * console.log('client disconnected'); + * }); + * c.write('hello\r\n'); + * c.pipe(c); + * }); + * server.on('error', (err) => { + * throw err; + * }); + * server.listen(8124, () => { + * console.log('server bound'); + * }); + * ``` + * + * Test this by using `telnet`: + * + * ```bash + * telnet localhost 8124 + * ``` + * + * To listen on the socket `/tmp/echo.sock`: + * + * ```js + * server.listen('/tmp/echo.sock', () => { + * console.log('server bound'); + * }); + * ``` + * + * Use `nc` to connect to a Unix domain socket server: + * + * ```bash + * nc -U /tmp/echo.sock + * ``` + * @since v0.5.0 + * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. + */ + function createServer(connectionListener?: (socket: Socket) => void): Server; + function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; + /** + * Aliases to {@link createConnection}. + * + * Possible signatures: + * + * * {@link connect} + * * {@link connect} for `IPC` connections. + * * {@link connect} for TCP connections. + */ + function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; + function connect(port: number, host?: string, connectionListener?: () => void): Socket; + function connect(path: string, connectionListener?: () => void): Socket; + /** + * A factory function, which creates a new {@link Socket}, + * immediately initiates connection with `socket.connect()`, + * then returns the `net.Socket` that starts the connection. + * + * When the connection is established, a `'connect'` event will be emitted + * on the returned socket. The last parameter `connectListener`, if supplied, + * will be added as a listener for the `'connect'` event **once**. + * + * Possible signatures: + * + * * {@link createConnection} + * * {@link createConnection} for `IPC` connections. + * * {@link createConnection} for TCP connections. + * + * The {@link connect} function is an alias to this function. + */ + function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; + function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; + function createConnection(path: string, connectionListener?: () => void): Socket; + /** + * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. + * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. + * @since v19.4.0 + */ + function getDefaultAutoSelectFamily(): boolean; + /** + * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. + * @since v19.4.0 + */ + function setDefaultAutoSelectFamily(value: boolean): void; + /** + * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * The initial default value is `250`. + * @since v19.8.0 + */ + function getDefaultAutoSelectFamilyAttemptTimeout(): number; + /** + * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. + * @since v19.8.0 + */ + function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; + /** + * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 + * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. + * + * ```js + * net.isIP('::1'); // returns 6 + * net.isIP('127.0.0.1'); // returns 4 + * net.isIP('127.000.000.001'); // returns 0 + * net.isIP('127.0.0.1/24'); // returns 0 + * net.isIP('fhqwhgads'); // returns 0 + * ``` + * @since v0.3.0 + */ + function isIP(input: string): number; + /** + * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no + * leading zeroes. Otherwise, returns `false`. + * + * ```js + * net.isIPv4('127.0.0.1'); // returns true + * net.isIPv4('127.000.000.001'); // returns false + * net.isIPv4('127.0.0.1/24'); // returns false + * net.isIPv4('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv4(input: string): boolean; + /** + * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. + * + * ```js + * net.isIPv6('::1'); // returns true + * net.isIPv6('fhqwhgads'); // returns false + * ``` + * @since v0.3.0 + */ + function isIPv6(input: string): boolean; + interface SocketAddressInitOptions { + /** + * The network address as either an IPv4 or IPv6 string. + * @default 127.0.0.1 + */ + address?: string | undefined; + /** + * @default `'ipv4'` + */ + family?: IPVersion | undefined; + /** + * An IPv6 flow-label used only if `family` is `'ipv6'`. + * @default 0 + */ + flowlabel?: number | undefined; + /** + * An IP port. + * @default 0 + */ + port?: number | undefined; + } + /** + * @since v15.14.0, v14.18.0 + */ + class SocketAddress { + constructor(options: SocketAddressInitOptions); + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly address: string; + /** + * Either \`'ipv4'\` or \`'ipv6'\`. + * @since v15.14.0, v14.18.0 + */ + readonly family: IPVersion; + /** + * @since v15.14.0, v14.18.0 + */ + readonly port: number; + /** + * @since v15.14.0, v14.18.0 + */ + readonly flowlabel: number; + } +} +declare module "node:net" { + export * from "net"; +} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts new file mode 100644 index 0000000..b727c3e --- /dev/null +++ b/node_modules/@types/node/os.d.ts @@ -0,0 +1,495 @@ +/** + * The `node:os` module provides operating system-related utility methods and + * properties. It can be accessed using: + * + * ```js + * const os = require('node:os'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/os.js) + */ +declare module "os" { + interface CpuInfo { + model: string; + speed: number; + times: { + /** The number of milliseconds the CPU has spent in user mode. */ + user: number; + /** The number of milliseconds the CPU has spent in nice mode. */ + nice: number; + /** The number of milliseconds the CPU has spent in sys mode. */ + sys: number; + /** The number of milliseconds the CPU has spent in idle mode. */ + idle: number; + /** The number of milliseconds the CPU has spent in irq mode. */ + irq: number; + }; + } + interface NetworkInterfaceBase { + address: string; + netmask: string; + mac: string; + internal: boolean; + cidr: string | null; + } + interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { + family: "IPv4"; + scopeid?: undefined; + } + interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { + family: "IPv6"; + scopeid: number; + } + interface UserInfo { + username: T; + uid: number; + gid: number; + shell: T | null; + homedir: T; + } + type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; + /** + * Returns the host name of the operating system as a string. + * @since v0.3.3 + */ + function hostname(): string; + /** + * Returns an array containing the 1, 5, and 15 minute load averages. + * + * The load average is a measure of system activity calculated by the operating + * system and expressed as a fractional number. + * + * The load average is a Unix-specific concept. On Windows, the return value is + * always `[0, 0, 0]`. + * @since v0.3.3 + */ + function loadavg(): number[]; + /** + * Returns the system uptime in number of seconds. + * @since v0.3.3 + */ + function uptime(): number; + /** + * Returns the amount of free system memory in bytes as an integer. + * @since v0.3.3 + */ + function freemem(): number; + /** + * Returns the total amount of system memory in bytes as an integer. + * @since v0.3.3 + */ + function totalmem(): number; + /** + * Returns an array of objects containing information about each logical CPU core. + * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. + * + * The properties included on each object include: + * + * ```js + * [ + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 252020, + * nice: 0, + * sys: 30340, + * idle: 1070356870, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 306960, + * nice: 0, + * sys: 26980, + * idle: 1071569080, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 248450, + * nice: 0, + * sys: 21750, + * idle: 1070919370, + * irq: 0, + * }, + * }, + * { + * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', + * speed: 2926, + * times: { + * user: 256880, + * nice: 0, + * sys: 19430, + * idle: 1070905480, + * irq: 20, + * }, + * }, + * ] + * ``` + * + * `nice` values are POSIX-only. On Windows, the `nice` values of all processors + * are always 0. + * + * `os.cpus().length` should not be used to calculate the amount of parallelism + * available to an application. Use {@link availableParallelism} for this purpose. + * @since v0.3.3 + */ + function cpus(): CpuInfo[]; + /** + * Returns an estimate of the default amount of parallelism a program should use. + * Always returns a value greater than zero. + * + * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). + * @since v19.4.0, v18.14.0 + */ + function availableParallelism(): number; + /** + * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it + * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. + * + * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information + * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. + * @since v0.3.3 + */ + function type(): string; + /** + * Returns the operating system as a string. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See + * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v0.3.3 + */ + function release(): string; + /** + * Returns an object containing network interfaces that have been assigned a + * network address. + * + * Each key on the returned object identifies a network interface. The associated + * value is an array of objects that each describe an assigned network address. + * + * The properties available on the assigned network address object include: + * + * ```js + * { + * lo: [ + * { + * address: '127.0.0.1', + * netmask: '255.0.0.0', + * family: 'IPv4', + * mac: '00:00:00:00:00:00', + * internal: true, + * cidr: '127.0.0.1/8' + * }, + * { + * address: '::1', + * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', + * family: 'IPv6', + * mac: '00:00:00:00:00:00', + * scopeid: 0, + * internal: true, + * cidr: '::1/128' + * } + * ], + * eth0: [ + * { + * address: '192.168.1.108', + * netmask: '255.255.255.0', + * family: 'IPv4', + * mac: '01:02:03:0a:0b:0c', + * internal: false, + * cidr: '192.168.1.108/24' + * }, + * { + * address: 'fe80::a00:27ff:fe4e:66a1', + * netmask: 'ffff:ffff:ffff:ffff::', + * family: 'IPv6', + * mac: '01:02:03:0a:0b:0c', + * scopeid: 1, + * internal: false, + * cidr: 'fe80::a00:27ff:fe4e:66a1/64' + * } + * ] + * } + * ``` + * @since v0.6.0 + */ + function networkInterfaces(): NodeJS.Dict; + /** + * Returns the string path of the current user's home directory. + * + * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it + * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. + * + * On Windows, it uses the `USERPROFILE` environment variable if defined. + * Otherwise it uses the path to the profile directory of the current user. + * @since v2.3.0 + */ + function homedir(): string; + /** + * Returns information about the currently effective user. On POSIX platforms, + * this is typically a subset of the password file. The returned object includes + * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. + * + * The value of `homedir` returned by `os.userInfo()` is provided by the operating + * system. This differs from the result of `os.homedir()`, which queries + * environment variables for the home directory before falling back to the + * operating system response. + * + * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. + * @since v6.0.0 + */ + function userInfo(options: { encoding: "buffer" }): UserInfo; + function userInfo(options?: { encoding: BufferEncoding }): UserInfo; + type SignalConstants = { + [key in NodeJS.Signals]: number; + }; + namespace constants { + const UV_UDP_REUSEADDR: number; + namespace signals {} + const signals: SignalConstants; + namespace errno { + const E2BIG: number; + const EACCES: number; + const EADDRINUSE: number; + const EADDRNOTAVAIL: number; + const EAFNOSUPPORT: number; + const EAGAIN: number; + const EALREADY: number; + const EBADF: number; + const EBADMSG: number; + const EBUSY: number; + const ECANCELED: number; + const ECHILD: number; + const ECONNABORTED: number; + const ECONNREFUSED: number; + const ECONNRESET: number; + const EDEADLK: number; + const EDESTADDRREQ: number; + const EDOM: number; + const EDQUOT: number; + const EEXIST: number; + const EFAULT: number; + const EFBIG: number; + const EHOSTUNREACH: number; + const EIDRM: number; + const EILSEQ: number; + const EINPROGRESS: number; + const EINTR: number; + const EINVAL: number; + const EIO: number; + const EISCONN: number; + const EISDIR: number; + const ELOOP: number; + const EMFILE: number; + const EMLINK: number; + const EMSGSIZE: number; + const EMULTIHOP: number; + const ENAMETOOLONG: number; + const ENETDOWN: number; + const ENETRESET: number; + const ENETUNREACH: number; + const ENFILE: number; + const ENOBUFS: number; + const ENODATA: number; + const ENODEV: number; + const ENOENT: number; + const ENOEXEC: number; + const ENOLCK: number; + const ENOLINK: number; + const ENOMEM: number; + const ENOMSG: number; + const ENOPROTOOPT: number; + const ENOSPC: number; + const ENOSR: number; + const ENOSTR: number; + const ENOSYS: number; + const ENOTCONN: number; + const ENOTDIR: number; + const ENOTEMPTY: number; + const ENOTSOCK: number; + const ENOTSUP: number; + const ENOTTY: number; + const ENXIO: number; + const EOPNOTSUPP: number; + const EOVERFLOW: number; + const EPERM: number; + const EPIPE: number; + const EPROTO: number; + const EPROTONOSUPPORT: number; + const EPROTOTYPE: number; + const ERANGE: number; + const EROFS: number; + const ESPIPE: number; + const ESRCH: number; + const ESTALE: number; + const ETIME: number; + const ETIMEDOUT: number; + const ETXTBSY: number; + const EWOULDBLOCK: number; + const EXDEV: number; + const WSAEINTR: number; + const WSAEBADF: number; + const WSAEACCES: number; + const WSAEFAULT: number; + const WSAEINVAL: number; + const WSAEMFILE: number; + const WSAEWOULDBLOCK: number; + const WSAEINPROGRESS: number; + const WSAEALREADY: number; + const WSAENOTSOCK: number; + const WSAEDESTADDRREQ: number; + const WSAEMSGSIZE: number; + const WSAEPROTOTYPE: number; + const WSAENOPROTOOPT: number; + const WSAEPROTONOSUPPORT: number; + const WSAESOCKTNOSUPPORT: number; + const WSAEOPNOTSUPP: number; + const WSAEPFNOSUPPORT: number; + const WSAEAFNOSUPPORT: number; + const WSAEADDRINUSE: number; + const WSAEADDRNOTAVAIL: number; + const WSAENETDOWN: number; + const WSAENETUNREACH: number; + const WSAENETRESET: number; + const WSAECONNABORTED: number; + const WSAECONNRESET: number; + const WSAENOBUFS: number; + const WSAEISCONN: number; + const WSAENOTCONN: number; + const WSAESHUTDOWN: number; + const WSAETOOMANYREFS: number; + const WSAETIMEDOUT: number; + const WSAECONNREFUSED: number; + const WSAELOOP: number; + const WSAENAMETOOLONG: number; + const WSAEHOSTDOWN: number; + const WSAEHOSTUNREACH: number; + const WSAENOTEMPTY: number; + const WSAEPROCLIM: number; + const WSAEUSERS: number; + const WSAEDQUOT: number; + const WSAESTALE: number; + const WSAEREMOTE: number; + const WSASYSNOTREADY: number; + const WSAVERNOTSUPPORTED: number; + const WSANOTINITIALISED: number; + const WSAEDISCON: number; + const WSAENOMORE: number; + const WSAECANCELLED: number; + const WSAEINVALIDPROCTABLE: number; + const WSAEINVALIDPROVIDER: number; + const WSAEPROVIDERFAILEDINIT: number; + const WSASYSCALLFAILURE: number; + const WSASERVICE_NOT_FOUND: number; + const WSATYPE_NOT_FOUND: number; + const WSA_E_NO_MORE: number; + const WSA_E_CANCELLED: number; + const WSAEREFUSED: number; + } + namespace dlopen { + const RTLD_LAZY: number; + const RTLD_NOW: number; + const RTLD_GLOBAL: number; + const RTLD_LOCAL: number; + const RTLD_DEEPBIND: number; + } + namespace priority { + const PRIORITY_LOW: number; + const PRIORITY_BELOW_NORMAL: number; + const PRIORITY_NORMAL: number; + const PRIORITY_ABOVE_NORMAL: number; + const PRIORITY_HIGH: number; + const PRIORITY_HIGHEST: number; + } + } + const devNull: string; + /** + * The operating system-specific end-of-line marker. + * * `\n` on POSIX + * * `\r\n` on Windows + */ + const EOL: string; + /** + * Returns the operating system CPU architecture for which the Node.js binary was + * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, + * and `'x64'`. + * + * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch). + * @since v0.5.0 + */ + function arch(): string; + /** + * Returns a string identifying the kernel version. + * + * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v13.11.0, v12.17.0 + */ + function version(): string; + /** + * Returns a string identifying the operating system platform for which + * the Node.js binary was compiled. The value is set at compile time. + * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. + * + * The return value is equivalent to `process.platform`. + * + * The value `'android'` may also be returned if Node.js is built on the Android + * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.5.0 + */ + function platform(): NodeJS.Platform; + /** + * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`. + * + * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not + * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. + * @since v18.9.0, v16.18.0 + */ + function machine(): string; + /** + * Returns the operating system's default directory for temporary files as a + * string. + * @since v0.9.9 + */ + function tmpdir(): string; + /** + * Returns a string identifying the endianness of the CPU for which the Node.js + * binary was compiled. + * + * Possible values are `'BE'` for big endian and `'LE'` for little endian. + * @since v0.9.4 + */ + function endianness(): "BE" | "LE"; + /** + * Returns the scheduling priority for the process specified by `pid`. If `pid` is + * not provided or is `0`, the priority of the current process is returned. + * @since v10.10.0 + * @param [pid=0] The process ID to retrieve scheduling priority for. + */ + function getPriority(pid?: number): number; + /** + * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. + * + * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows + * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range + * mapping may cause the return value to be slightly different on Windows. To avoid + * confusion, set `priority` to one of the priority constants. + * + * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user + * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. + * @since v10.10.0 + * @param [pid=0] The process ID to set scheduling priority for. + * @param priority The scheduling priority to assign to the process. + */ + function setPriority(priority: number): void; + function setPriority(pid: number, priority: number): void; +} +declare module "node:os" { + export * from "os"; +} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json new file mode 100644 index 0000000..ad54625 --- /dev/null +++ b/node_modules/@types/node/package.json @@ -0,0 +1,217 @@ +{ + "name": "@types/node", + "version": "20.12.12", + "description": "TypeScript definitions for node", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", + "license": "MIT", + "contributors": [ + { + "name": "Microsoft TypeScript", + "githubUsername": "Microsoft", + "url": "https://github.com/Microsoft" + }, + { + "name": "Alberto Schiabel", + "githubUsername": "jkomyno", + "url": "https://github.com/jkomyno" + }, + { + "name": "Alvis HT Tang", + "githubUsername": "alvis", + "url": "https://github.com/alvis" + }, + { + "name": "Andrew Makarov", + "githubUsername": "r3nya", + "url": "https://github.com/r3nya" + }, + { + "name": "Benjamin Toueg", + "githubUsername": "btoueg", + "url": "https://github.com/btoueg" + }, + { + "name": "Chigozirim C.", + "githubUsername": "smac89", + "url": "https://github.com/smac89" + }, + { + "name": "David Junger", + "githubUsername": "touffy", + "url": "https://github.com/touffy" + }, + { + "name": "Deividas Bakanas", + "githubUsername": "DeividasBakanas", + "url": "https://github.com/DeividasBakanas" + }, + { + "name": "Eugene Y. Q. Shen", + "githubUsername": "eyqs", + "url": "https://github.com/eyqs" + }, + { + "name": "Hannes Magnusson", + "githubUsername": "Hannes-Magnusson-CK", + "url": "https://github.com/Hannes-Magnusson-CK" + }, + { + "name": "Huw", + "githubUsername": "hoo29", + "url": "https://github.com/hoo29" + }, + { + "name": "Kelvin Jin", + "githubUsername": "kjin", + "url": "https://github.com/kjin" + }, + { + "name": "Klaus Meinhardt", + "githubUsername": "ajafff", + "url": "https://github.com/ajafff" + }, + { + "name": "Lishude", + "githubUsername": "islishude", + "url": "https://github.com/islishude" + }, + { + "name": "Mariusz Wiktorczyk", + "githubUsername": "mwiktorczyk", + "url": "https://github.com/mwiktorczyk" + }, + { + "name": "Mohsen Azimi", + "githubUsername": "mohsen1", + "url": "https://github.com/mohsen1" + }, + { + "name": "Nikita Galkin", + "githubUsername": "galkin", + "url": "https://github.com/galkin" + }, + { + "name": "Parambir Singh", + "githubUsername": "parambirs", + "url": "https://github.com/parambirs" + }, + { + "name": "Sebastian Silbermann", + "githubUsername": "eps1lon", + "url": "https://github.com/eps1lon" + }, + { + "name": "Thomas den Hollander", + "githubUsername": "ThomasdenH", + "url": "https://github.com/ThomasdenH" + }, + { + "name": "Wilco Bakker", + "githubUsername": "WilcoBakker", + "url": "https://github.com/WilcoBakker" + }, + { + "name": "wwwy3y3", + "githubUsername": "wwwy3y3", + "url": "https://github.com/wwwy3y3" + }, + { + "name": "Samuel Ainsworth", + "githubUsername": "samuela", + "url": "https://github.com/samuela" + }, + { + "name": "Kyle Uehlein", + "githubUsername": "kuehlein", + "url": "https://github.com/kuehlein" + }, + { + "name": "Thanik Bhongbhibhat", + "githubUsername": "bhongy", + "url": "https://github.com/bhongy" + }, + { + "name": "Marcin Kopacz", + "githubUsername": "chyzwar", + "url": "https://github.com/chyzwar" + }, + { + "name": "Trivikram Kamat", + "githubUsername": "trivikr", + "url": "https://github.com/trivikr" + }, + { + "name": "Junxiao Shi", + "githubUsername": "yoursunny", + "url": "https://github.com/yoursunny" + }, + { + "name": "Ilia Baryshnikov", + "githubUsername": "qwelias", + "url": "https://github.com/qwelias" + }, + { + "name": "ExE Boss", + "githubUsername": "ExE-Boss", + "url": "https://github.com/ExE-Boss" + }, + { + "name": "Piotr Błażejewicz", + "githubUsername": "peterblazejewicz", + "url": "https://github.com/peterblazejewicz" + }, + { + "name": "Anna Henningsen", + "githubUsername": "addaleax", + "url": "https://github.com/addaleax" + }, + { + "name": "Victor Perin", + "githubUsername": "victorperin", + "url": "https://github.com/victorperin" + }, + { + "name": "Yongsheng Zhang", + "githubUsername": "ZYSzys", + "url": "https://github.com/ZYSzys" + }, + { + "name": "NodeJS Contributors", + "githubUsername": "NodeJS", + "url": "https://github.com/NodeJS" + }, + { + "name": "Linus Unnebäck", + "githubUsername": "LinusU", + "url": "https://github.com/LinusU" + }, + { + "name": "wafuwafu13", + "githubUsername": "wafuwafu13", + "url": "https://github.com/wafuwafu13" + }, + { + "name": "Matteo Collina", + "githubUsername": "mcollina", + "url": "https://github.com/mcollina" + }, + { + "name": "Dmitry Semigradsky", + "githubUsername": "Semigradsky", + "url": "https://github.com/Semigradsky" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/node" + }, + "scripts": {}, + "dependencies": { + "undici-types": "~5.26.4" + }, + "typesPublisherContentHash": "402e23fae4726c16c2a42ec4d2c7348a15cefadefe71ba6808b89ecca3e73a79", + "typeScriptVersion": "4.7" +} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts new file mode 100644 index 0000000..e98c7c3 --- /dev/null +++ b/node_modules/@types/node/path.d.ts @@ -0,0 +1,191 @@ +declare module "path/posix" { + import path = require("path"); + export = path; +} +declare module "path/win32" { + import path = require("path"); + export = path; +} +/** + * The `node:path` module provides utilities for working with file and directory + * paths. It can be accessed using: + * + * ```js + * const path = require('node:path'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/path.js) + */ +declare module "path" { + namespace path { + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + interface FormatInputPathObject { + /** + * The root of the path such as '/' or 'c:\' + */ + root?: string | undefined; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir?: string | undefined; + /** + * The file name including extension (if any) such as 'index.html' + */ + base?: string | undefined; + /** + * The file extension (if any) such as '.html' + */ + ext?: string | undefined; + /** + * The file name without extension (if any) such as 'index' + */ + name?: string | undefined; + } + interface PlatformPath { + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param path string path to normalize. + * @throws {TypeError} if `path` is not a string. + */ + normalize(path: string): string; + /** + * Join all arguments together and normalize the resulting path. + * + * @param paths paths to join. + * @throws {TypeError} if any of the path segments is not a string. + */ + join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} parameter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, + * until an absolute path is found. If after using all {from} paths still no absolute path is found, + * the current working directory is used as well. The resulting path is normalized, + * and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param paths A sequence of paths or path segments. + * @throws {TypeError} if any of the arguments is not a string. + */ + resolve(...paths: string[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * If the given {path} is a zero-length string, `false` will be returned. + * + * @param path path to test. + * @throws {TypeError} if `path` is not a string. + */ + isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to} based on the current working directory. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @throws {TypeError} if either `from` or `to` is not a string. + */ + relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + dirname(path: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param path the path to evaluate. + * @param suffix optionally, an extension to remove from the result. + * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. + */ + basename(path: string, suffix?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. + * + * @param path the path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + extname(path: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + readonly sep: "\\" | "/"; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + readonly delimiter: ";" | ":"; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param path path to evaluate. + * @throws {TypeError} if `path` is not a string. + */ + parse(path: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathObject path to evaluate. + */ + format(pathObject: FormatInputPathObject): string; + /** + * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. + * If path is not a string, path will be returned without modifications. + * This method is meaningful only on Windows system. + * On POSIX systems, the method is non-operational and always returns path without modifications. + */ + toNamespacedPath(path: string): string; + /** + * Posix specific pathing. + * Same as parent object on posix. + */ + readonly posix: PlatformPath; + /** + * Windows specific pathing. + * Same as parent object on windows + */ + readonly win32: PlatformPath; + } + } + const path: path.PlatformPath; + export = path; +} +declare module "node:path" { + import path = require("path"); + export = path; +} +declare module "node:path/posix" { + import path = require("path/posix"); + export = path; +} +declare module "node:path/win32" { + import path = require("path/win32"); + export = path; +} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts new file mode 100644 index 0000000..6ba48e0 --- /dev/null +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -0,0 +1,645 @@ +/** + * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for + * Node.js-specific performance measurements. + * + * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): + * + * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) + * * [Performance Timeline](https://w3c.github.io/performance-timeline/) + * * [User Timing](https://www.w3.org/TR/user-timing/) + * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/) + * + * ```js + * const { PerformanceObserver, performance } = require('node:perf_hooks'); + * + * const obs = new PerformanceObserver((items) => { + * console.log(items.getEntries()[0].duration); + * performance.clearMarks(); + * }); + * obs.observe({ type: 'measure' }); + * performance.measure('Start to Now'); + * + * performance.mark('A'); + * doSomeLongRunningProcess(() => { + * performance.measure('A to Now', 'A'); + * + * performance.mark('B'); + * performance.measure('A to B', 'A', 'B'); + * }); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/perf_hooks.js) + */ +declare module "perf_hooks" { + import { AsyncResource } from "node:async_hooks"; + type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns" | "net"; + interface NodeGCPerformanceDetail { + /** + * When `performanceEntry.entryType` is equal to 'gc', the `performance.kind` property identifies + * the type of garbage collection operation that occurred. + * See perf_hooks.constants for valid values. + */ + readonly kind?: number | undefined; + /** + * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` + * property contains additional information about garbage collection operation. + * See perf_hooks.constants for valid values. + */ + readonly flags?: number | undefined; + } + /** + * The constructor of this class is not exposed to users directly. + * @since v8.5.0 + */ + class PerformanceEntry { + protected constructor(); + /** + * The total number of milliseconds elapsed for this entry. This value will not + * be meaningful for all Performance Entry types. + * @since v8.5.0 + */ + readonly duration: number; + /** + * The name of the performance entry. + * @since v8.5.0 + */ + readonly name: string; + /** + * The high resolution millisecond timestamp marking the starting time of the + * Performance Entry. + * @since v8.5.0 + */ + readonly startTime: number; + /** + * The type of the performance entry. It may be one of: + * + * * `'node'` (Node.js only) + * * `'mark'` (available on the Web) + * * `'measure'` (available on the Web) + * * `'gc'` (Node.js only) + * * `'function'` (Node.js only) + * * `'http2'` (Node.js only) + * * `'http'` (Node.js only) + * @since v8.5.0 + */ + readonly entryType: EntryType; + /** + * Additional detail specific to the `entryType`. + * @since v16.0.0 + */ + readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type. + toJSON(): any; + } + /** + * Exposes marks created via the `Performance.mark()` method. + * @since v18.2.0, v16.17.0 + */ + class PerformanceMark extends PerformanceEntry { + readonly duration: 0; + readonly entryType: "mark"; + } + /** + * Exposes measures created via the `Performance.measure()` method. + * + * The constructor of this class is not exposed to users directly. + * @since v18.2.0, v16.17.0 + */ + class PerformanceMeasure extends PerformanceEntry { + readonly entryType: "measure"; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Provides timing details for Node.js itself. The constructor of this class + * is not exposed to users. + * @since v8.5.0 + */ + class PerformanceNodeTiming extends PerformanceEntry { + /** + * The high resolution millisecond timestamp at which the Node.js process + * completed bootstrapping. If bootstrapping has not yet finished, the property + * has the value of -1. + * @since v8.5.0 + */ + readonly bootstrapComplete: number; + /** + * The high resolution millisecond timestamp at which the Node.js environment was + * initialized. + * @since v8.5.0 + */ + readonly environment: number; + /** + * The high resolution millisecond timestamp of the amount of time the event loop + * has been idle within the event loop's event provider (e.g. `epoll_wait`). This + * does not take CPU usage into consideration. If the event loop has not yet + * started (e.g., in the first tick of the main script), the property has the + * value of 0. + * @since v14.10.0, v12.19.0 + */ + readonly idleTime: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * exited. If the event loop has not yet exited, the property has the value of -1\. + * It can only have a value of not -1 in a handler of the `'exit'` event. + * @since v8.5.0 + */ + readonly loopExit: number; + /** + * The high resolution millisecond timestamp at which the Node.js event loop + * started. If the event loop has not yet started (e.g., in the first tick of the + * main script), the property has the value of -1. + * @since v8.5.0 + */ + readonly loopStart: number; + /** + * The high resolution millisecond timestamp at which the V8 platform was + * initialized. + * @since v8.5.0 + */ + readonly v8Start: number; + } + interface EventLoopUtilization { + idle: number; + active: number; + utilization: number; + } + /** + * @param util1 The result of a previous call to eventLoopUtilization() + * @param util2 The result of a previous call to eventLoopUtilization() prior to util1 + */ + type EventLoopUtilityFunction = ( + util1?: EventLoopUtilization, + util2?: EventLoopUtilization, + ) => EventLoopUtilization; + interface MarkOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * An optional timestamp to be used as the mark time. + * @default `performance.now()`. + */ + startTime?: number | undefined; + } + interface MeasureOptions { + /** + * Additional optional detail to include with the mark. + */ + detail?: unknown | undefined; + /** + * Duration between start and end times. + */ + duration?: number | undefined; + /** + * Timestamp to be used as the end time, or a string identifying a previously recorded mark. + */ + end?: number | string | undefined; + /** + * Timestamp to be used as the start time, or a string identifying a previously recorded mark. + */ + start?: number | string | undefined; + } + interface TimerifyOptions { + /** + * A histogram object created using + * `perf_hooks.createHistogram()` that will record runtime durations in + * nanoseconds. + */ + histogram?: RecordableHistogram | undefined; + } + interface Performance { + /** + * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. + * If name is provided, removes only the named mark. + * @param name + */ + clearMarks(name?: string): void; + /** + * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. + * If name is provided, removes only the named measure. + * @param name + * @since v16.7.0 + */ + clearMeasures(name?: string): void; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. + * If you are only interested in performance entries of certain types or that have certain names, see + * `performance.getEntriesByType()` and `performance.getEntriesByName()`. + * @since v16.7.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. + * @param name + * @param type + * @since v16.7.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` + * whose `performanceEntry.entryType` is equal to `type`. + * @param type + * @since v16.7.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; + /** + * Creates a new PerformanceMark entry in the Performance Timeline. + * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', + * and whose performanceEntry.duration is always 0. + * Performance marks are used to mark specific significant moments in the Performance Timeline. + * @param name + * @return The PerformanceMark entry that was created + */ + mark(name?: string, options?: MarkOptions): PerformanceMark; + /** + * Creates a new PerformanceMeasure entry in the Performance Timeline. + * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', + * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. + * + * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify + * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, + * then startMark is set to timeOrigin by default. + * + * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp + * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. + * @param name + * @param startMark + * @param endMark + * @return The PerformanceMeasure entry that was created + */ + measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure; + measure(name: string, options: MeasureOptions): PerformanceMeasure; + /** + * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. + */ + readonly nodeTiming: PerformanceNodeTiming; + /** + * @return the current high resolution millisecond timestamp + */ + now(): number; + /** + * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. + */ + readonly timeOrigin: number; + /** + * Wraps a function within a new function that measures the running time of the wrapped function. + * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. + * @param fn + */ + timerify any>(fn: T, options?: TimerifyOptions): T; + /** + * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. + * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). + * No other CPU idle time is taken into consideration. + */ + eventLoopUtilization: EventLoopUtilityFunction; + } + interface PerformanceObserverEntryList { + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime`. + * + * ```js + * const { + * performance, + * PerformanceObserver, + * } = require('node:perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntries()); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 81.465639, + * * duration: 0, + * * detail: null + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 81.860064, + * * duration: 0, + * * detail: null + * * } + * * ] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntries(): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is + * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. + * + * ```js + * const { + * performance, + * PerformanceObserver, + * } = require('node:perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByName('meow')); + * + * * [ + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 98.545991, + * * duration: 0, + * * detail: null + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('nope')); // [] + * + * console.log(perfObserverList.getEntriesByName('test', 'mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 63.518931, + * * duration: 0, + * * detail: null + * * } + * * ] + * + * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ entryTypes: ['mark', 'measure'] }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; + /** + * Returns a list of `PerformanceEntry` objects in chronological order + * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. + * + * ```js + * const { + * performance, + * PerformanceObserver, + * } = require('node:perf_hooks'); + * + * const obs = new PerformanceObserver((perfObserverList, observer) => { + * console.log(perfObserverList.getEntriesByType('mark')); + * + * * [ + * * PerformanceEntry { + * * name: 'test', + * * entryType: 'mark', + * * startTime: 55.897834, + * * duration: 0, + * * detail: null + * * }, + * * PerformanceEntry { + * * name: 'meow', + * * entryType: 'mark', + * * startTime: 56.350146, + * * duration: 0, + * * detail: null + * * } + * * ] + * + * performance.clearMarks(); + * performance.clearMeasures(); + * observer.disconnect(); + * }); + * obs.observe({ type: 'mark' }); + * + * performance.mark('test'); + * performance.mark('meow'); + * ``` + * @since v8.5.0 + */ + getEntriesByType(type: EntryType): PerformanceEntry[]; + } + type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; + /** + * @since v8.5.0 + */ + class PerformanceObserver extends AsyncResource { + constructor(callback: PerformanceObserverCallback); + /** + * Disconnects the `PerformanceObserver` instance from all notifications. + * @since v8.5.0 + */ + disconnect(): void; + /** + * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`: + * + * ```js + * const { + * performance, + * PerformanceObserver, + * } = require('node:perf_hooks'); + * + * const obs = new PerformanceObserver((list, observer) => { + * // Called once asynchronously. `list` contains three items. + * }); + * obs.observe({ type: 'mark' }); + * + * for (let n = 0; n < 3; n++) + * performance.mark(`test${n}`); + * ``` + * @since v8.5.0 + */ + observe( + options: + | { + entryTypes: readonly EntryType[]; + buffered?: boolean | undefined; + } + | { + type: EntryType; + buffered?: boolean | undefined; + }, + ): void; + } + namespace constants { + const NODE_PERFORMANCE_GC_MAJOR: number; + const NODE_PERFORMANCE_GC_MINOR: number; + const NODE_PERFORMANCE_GC_INCREMENTAL: number; + const NODE_PERFORMANCE_GC_WEAKCB: number; + const NODE_PERFORMANCE_GC_FLAGS_NO: number; + const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; + const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; + const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; + const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; + const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; + } + const performance: Performance; + interface EventLoopMonitorOptions { + /** + * The sampling rate in milliseconds. + * Must be greater than zero. + * @default 10 + */ + resolution?: number | undefined; + } + interface Histogram { + /** + * Returns a `Map` object detailing the accumulated percentile distribution. + * @since v11.10.0 + */ + readonly percentiles: Map; + /** + * The number of times the event loop delay exceeded the maximum 1 hour event + * loop delay threshold. + * @since v11.10.0 + */ + readonly exceeds: number; + /** + * The minimum recorded event loop delay. + * @since v11.10.0 + */ + readonly min: number; + /** + * The maximum recorded event loop delay. + * @since v11.10.0 + */ + readonly max: number; + /** + * The mean of the recorded event loop delays. + * @since v11.10.0 + */ + readonly mean: number; + /** + * The standard deviation of the recorded event loop delays. + * @since v11.10.0 + */ + readonly stddev: number; + /** + * Resets the collected histogram data. + * @since v11.10.0 + */ + reset(): void; + /** + * Returns the value at the given percentile. + * @since v11.10.0 + * @param percentile A percentile value in the range (0, 100]. + */ + percentile(percentile: number): number; + } + interface IntervalHistogram extends Histogram { + /** + * Enables the update interval timer. Returns `true` if the timer was + * started, `false` if it was already started. + * @since v11.10.0 + */ + enable(): boolean; + /** + * Disables the update interval timer. Returns `true` if the timer was + * stopped, `false` if it was already stopped. + * @since v11.10.0 + */ + disable(): boolean; + } + interface RecordableHistogram extends Histogram { + /** + * @since v15.9.0, v14.18.0 + * @param val The amount to record in the histogram. + */ + record(val: number | bigint): void; + /** + * Calculates the amount of time (in nanoseconds) that has passed since the + * previous call to `recordDelta()` and records that amount in the histogram. + * + * ## Examples + * @since v15.9.0, v14.18.0 + */ + recordDelta(): void; + /** + * Adds the values from `other` to this histogram. + * @since v17.4.0, v16.14.0 + */ + add(other: RecordableHistogram): void; + } + /** + * _This property is an extension by Node.js. It is not available in Web browsers._ + * + * Creates an `IntervalHistogram` object that samples and reports the event loop + * delay over time. The delays will be reported in nanoseconds. + * + * Using a timer to detect approximate event loop delay works because the + * execution of timers is tied specifically to the lifecycle of the libuv + * event loop. That is, a delay in the loop will cause a delay in the execution + * of the timer, and those delays are specifically what this API is intended to + * detect. + * + * ```js + * const { monitorEventLoopDelay } = require('node:perf_hooks'); + * const h = monitorEventLoopDelay({ resolution: 20 }); + * h.enable(); + * // Do something. + * h.disable(); + * console.log(h.min); + * console.log(h.max); + * console.log(h.mean); + * console.log(h.stddev); + * console.log(h.percentiles); + * console.log(h.percentile(50)); + * console.log(h.percentile(99)); + * ``` + * @since v11.10.0 + */ + function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; + interface CreateHistogramOptions { + /** + * The minimum recordable value. Must be an integer value greater than 0. + * @default 1 + */ + min?: number | bigint | undefined; + /** + * The maximum recordable value. Must be an integer value greater than min. + * @default Number.MAX_SAFE_INTEGER + */ + max?: number | bigint | undefined; + /** + * The number of accuracy digits. Must be a number between 1 and 5. + * @default 3 + */ + figures?: number | undefined; + } + /** + * Returns a `RecordableHistogram`. + * @since v15.9.0, v14.18.0 + */ + function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; + import { performance as _performance } from "perf_hooks"; + global { + /** + * `performance` is a global reference for `require('perf_hooks').performance` + * https://nodejs.org/api/globals.html#performance + * @since v16.0.0 + */ + var performance: typeof globalThis extends { + onmessage: any; + performance: infer T; + } ? T + : typeof _performance; + } +} +declare module "node:perf_hooks" { + export * from "perf_hooks"; +} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts new file mode 100644 index 0000000..ac7233f --- /dev/null +++ b/node_modules/@types/node/process.d.ts @@ -0,0 +1,1747 @@ +declare module "process" { + import * as net from "node:net"; + import * as os from "node:os"; + import * as tty from "node:tty"; + import { Worker } from "node:worker_threads"; + global { + var process: NodeJS.Process; + namespace NodeJS { + // this namespace merge is here because these are specifically used + // as the type for process.stdin, process.stdout, and process.stderr. + // they can't live in tty.d.ts because we need to disambiguate the imported name. + interface ReadStream extends tty.ReadStream {} + interface WriteStream extends tty.WriteStream {} + interface MemoryUsageFn { + /** + * The `process.memoryUsage()` method iterate over each page to gather informations about memory + * usage which can be slow depending on the program memory allocations. + */ + (): MemoryUsage; + /** + * method returns an integer representing the Resident Set Size (RSS) in bytes. + */ + rss(): number; + } + interface MemoryUsage { + /** + * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the + * process, including all C++ and JavaScript objects and code. + */ + rss: number; + /** + * Refers to V8's memory usage. + */ + heapTotal: number; + /** + * Refers to V8's memory usage. + */ + heapUsed: number; + external: number; + /** + * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included + * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s + * may not be tracked in that case. + */ + arrayBuffers: number; + } + interface CpuUsage { + user: number; + system: number; + } + interface ProcessRelease { + name: string; + sourceUrl?: string | undefined; + headersUrl?: string | undefined; + libUrl?: string | undefined; + lts?: string | undefined; + } + interface ProcessVersions extends Dict { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + type Platform = + | "aix" + | "android" + | "darwin" + | "freebsd" + | "haiku" + | "linux" + | "openbsd" + | "sunos" + | "win32" + | "cygwin" + | "netbsd"; + type Architecture = + | "arm" + | "arm64" + | "ia32" + | "loong64" + | "mips" + | "mipsel" + | "ppc" + | "ppc64" + | "riscv64" + | "s390" + | "s390x" + | "x64"; + type Signals = + | "SIGABRT" + | "SIGALRM" + | "SIGBUS" + | "SIGCHLD" + | "SIGCONT" + | "SIGFPE" + | "SIGHUP" + | "SIGILL" + | "SIGINT" + | "SIGIO" + | "SIGIOT" + | "SIGKILL" + | "SIGPIPE" + | "SIGPOLL" + | "SIGPROF" + | "SIGPWR" + | "SIGQUIT" + | "SIGSEGV" + | "SIGSTKFLT" + | "SIGSTOP" + | "SIGSYS" + | "SIGTERM" + | "SIGTRAP" + | "SIGTSTP" + | "SIGTTIN" + | "SIGTTOU" + | "SIGUNUSED" + | "SIGURG" + | "SIGUSR1" + | "SIGUSR2" + | "SIGVTALRM" + | "SIGWINCH" + | "SIGXCPU" + | "SIGXFSZ" + | "SIGBREAK" + | "SIGLOST" + | "SIGINFO"; + type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; + type MultipleResolveType = "resolve" | "reject"; + type BeforeExitListener = (code: number) => void; + type DisconnectListener = () => void; + type ExitListener = (code: number) => void; + type RejectionHandledListener = (promise: Promise) => void; + type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; + /** + * Most of the time the unhandledRejection will be an Error, but this should not be relied upon + * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. + */ + type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; + type WarningListener = (warning: Error) => void; + type MessageListener = (message: unknown, sendHandle: unknown) => void; + type SignalsListener = (signal: Signals) => void; + type MultipleResolveListener = ( + type: MultipleResolveType, + promise: Promise, + value: unknown, + ) => void; + type WorkerListener = (worker: Worker) => void; + interface Socket extends ReadWriteStream { + isTTY?: true | undefined; + } + // Alias for compatibility + interface ProcessEnv extends Dict { + /** + * Can be used to change the default timezone at runtime + */ + TZ?: string; + } + interface HRTime { + (time?: [number, number]): [number, number]; + /** + * The `bigint` version of the `{@link hrtime()}` method returning the current high-resolution real time in nanoseconds as a `bigint`. + * + * Unlike `{@link hrtime()}`, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. + * ```js + * import { hrtime } from 'node:process'; + * + * const start = hrtime.bigint(); + * // 191051479007711n + * + * setTimeout(() => { + * const end = hrtime.bigint(); + * // 191052633396993n + * + * console.log(`Benchmark took ${end - start} nanoseconds`); + * // Benchmark took 1154389282 nanoseconds + * }, 1000); + * ``` + */ + bigint(): bigint; + } + interface ProcessPermission { + /** + * Verifies that the process is able to access the given scope and reference. + * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` + * will check if the process has ALL file system read permissions. + * + * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. + * + * The available scopes are: + * + * * `fs` - All File System + * * `fs.read` - File System read operations + * * `fs.write` - File System write operations + * * `child` - Child process spawning operations + * * `worker` - Worker thread spawning operation + * + * ```js + * // Check if the process has permission to read the README file + * process.permission.has('fs.read', './README.md'); + * // Check if the process has read permission operations + * process.permission.has('fs.read'); + * ``` + * @since v20.0.0 + */ + has(scope: string, reference?: string): boolean; + } + interface ProcessReport { + /** + * Directory where the report is written. + * working directory of the Node.js process. + * @default '' indicating that reports are written to the current + */ + directory: string; + /** + * Filename where the report is written. + * The default value is the empty string. + * @default '' the output filename will be comprised of a timestamp, + * PID, and sequence number. + */ + filename: string; + /** + * Returns a JSON-formatted diagnostic report for the running process. + * The report's JavaScript stack trace is taken from err, if present. + */ + getReport(err?: Error): string; + /** + * If true, a diagnostic report is generated on fatal errors, + * such as out of memory errors or failed C++ assertions. + * @default false + */ + reportOnFatalError: boolean; + /** + * If true, a diagnostic report is generated when the process + * receives the signal specified by process.report.signal. + * @default false + */ + reportOnSignal: boolean; + /** + * If true, a diagnostic report is generated on uncaught exception. + * @default false + */ + reportOnUncaughtException: boolean; + /** + * The signal used to trigger the creation of a diagnostic report. + * @default 'SIGUSR2' + */ + signal: Signals; + /** + * Writes a diagnostic report to a file. If filename is not provided, the default filename + * includes the date, time, PID, and a sequence number. + * The report's JavaScript stack trace is taken from err, if present. + * + * @param fileName Name of the file where the report is written. + * This should be a relative path, that will be appended to the directory specified in + * `process.report.directory`, or the current working directory of the Node.js process, + * if unspecified. + * @param error A custom error used for reporting the JavaScript stack. + * @return Filename of the generated report. + */ + writeReport(fileName?: string): string; + writeReport(error?: Error): string; + writeReport(fileName?: string, err?: Error): string; + } + interface ResourceUsage { + fsRead: number; + fsWrite: number; + involuntaryContextSwitches: number; + ipcReceived: number; + ipcSent: number; + majorPageFault: number; + maxRSS: number; + minorPageFault: number; + sharedMemorySize: number; + signalsCount: number; + swappedOut: number; + systemCPUTime: number; + unsharedDataSize: number; + unsharedStackSize: number; + userCPUTime: number; + voluntaryContextSwitches: number; + } + interface EmitWarningOptions { + /** + * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. + * + * @default 'Warning' + */ + type?: string | undefined; + /** + * A unique identifier for the warning instance being emitted. + */ + code?: string | undefined; + /** + * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. + * + * @default process.emitWarning + */ + ctor?: Function | undefined; + /** + * Additional text to include with the error. + */ + detail?: string | undefined; + } + interface ProcessConfig { + readonly target_defaults: { + readonly cflags: any[]; + readonly default_configuration: string; + readonly defines: string[]; + readonly include_dirs: string[]; + readonly libraries: string[]; + }; + readonly variables: { + readonly clang: number; + readonly host_arch: string; + readonly node_install_npm: boolean; + readonly node_install_waf: boolean; + readonly node_prefix: string; + readonly node_shared_openssl: boolean; + readonly node_shared_v8: boolean; + readonly node_shared_zlib: boolean; + readonly node_use_dtrace: boolean; + readonly node_use_etw: boolean; + readonly node_use_openssl: boolean; + readonly target_arch: string; + readonly v8_no_strict_aliasing: number; + readonly v8_use_snapshot: boolean; + readonly visibility: string; + }; + } + interface Process extends EventEmitter { + /** + * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is + * a `Writable` stream. + * + * For example, to copy `process.stdin` to `process.stdout`: + * + * ```js + * import { stdin, stdout } from 'node:process'; + * + * stdin.pipe(stdout); + * ``` + * + * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stdout: WriteStream & { + fd: 1; + }; + /** + * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is + * a `Writable` stream. + * + * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. + */ + stderr: WriteStream & { + fd: 2; + }; + /** + * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is + * a `Readable` stream. + * + * For details of how to read from `stdin` see `readable.read()`. + * + * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that + * is compatible with scripts written for Node.js prior to v0.10\. + * For more information see `Stream compatibility`. + * + * In "old" streams mode the `stdin` stream is paused by default, so one + * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. + */ + stdin: ReadStream & { + fd: 0; + }; + /** + * The `process.argv` property returns an array containing the command-line + * arguments passed when the Node.js process was launched. The first element will + * be {@link execPath}. See `process.argv0` if access to the original value + * of `argv[0]` is needed. The second element will be the path to the JavaScript + * file being executed. The remaining elements will be any additional command-line + * arguments. + * + * For example, assuming the following script for `process-args.js`: + * + * ```js + * import { argv } from 'node:process'; + * + * // print process.argv + * argv.forEach((val, index) => { + * console.log(`${index}: ${val}`); + * }); + * ``` + * + * Launching the Node.js process as: + * + * ```bash + * node process-args.js one two=three four + * ``` + * + * Would generate the output: + * + * ```text + * 0: /usr/local/bin/node + * 1: /Users/mjr/work/node/process-args.js + * 2: one + * 3: two=three + * 4: four + * ``` + * @since v0.1.27 + */ + argv: string[]; + /** + * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. + * + * ```console + * $ bash -c 'exec -a customArgv0 ./node' + * > process.argv[0] + * '/Volumes/code/external/node/out/Release/node' + * > process.argv0 + * 'customArgv0' + * ``` + * @since v6.4.0 + */ + argv0: string; + /** + * The `process.execArgv` property returns the set of Node.js-specific command-line + * options passed when the Node.js process was launched. These options do not + * appear in the array returned by the {@link argv} property, and do not + * include the Node.js executable, the name of the script, or any options following + * the script name. These options are useful in order to spawn child processes with + * the same execution environment as the parent. + * + * ```bash + * node --harmony script.js --version + * ``` + * + * Results in `process.execArgv`: + * + * ```js + * ['--harmony'] + * ``` + * + * And `process.argv`: + * + * ```js + * ['/usr/local/bin/node', 'script.js', '--version'] + * ``` + * + * Refer to `Worker constructor` for the detailed behavior of worker + * threads with this property. + * @since v0.7.7 + */ + execArgv: string[]; + /** + * The `process.execPath` property returns the absolute pathname of the executable + * that started the Node.js process. Symbolic links, if any, are resolved. + * + * ```js + * '/usr/local/bin/node' + * ``` + * @since v0.1.100 + */ + execPath: string; + /** + * The `process.abort()` method causes the Node.js process to exit immediately and + * generate a core file. + * + * This feature is not available in `Worker` threads. + * @since v0.7.0 + */ + abort(): never; + /** + * The `process.chdir()` method changes the current working directory of the + * Node.js process or throws an exception if doing so fails (for instance, if + * the specified `directory` does not exist). + * + * ```js + * import { chdir, cwd } from 'node:process'; + * + * console.log(`Starting directory: ${cwd()}`); + * try { + * chdir('/tmp'); + * console.log(`New directory: ${cwd()}`); + * } catch (err) { + * console.error(`chdir: ${err}`); + * } + * ``` + * + * This feature is not available in `Worker` threads. + * @since v0.1.17 + */ + chdir(directory: string): void; + /** + * The `process.cwd()` method returns the current working directory of the Node.js + * process. + * + * ```js + * import { cwd } from 'node:process'; + * + * console.log(`Current directory: ${cwd()}`); + * ``` + * @since v0.1.8 + */ + cwd(): string; + /** + * The port used by the Node.js debugger when enabled. + * + * ```js + * import process from 'node:process'; + * + * process.debugPort = 5858; + * ``` + * @since v0.7.2 + */ + debugPort: number; + /** + * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and + * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` + * unless there are specific reasons such as custom dlopen flags or loading from ES modules. + * + * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v20.x/api/os.html#dlopen-constants)` + * documentation for details. + * + * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon + * are then accessible via `module.exports`. + * + * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. + * In this example the constant is assumed to be available. + * + * ```js + * import { dlopen } from 'node:process'; + * import { constants } from 'node:os'; + * import { fileURLToPath } from 'node:url'; + * + * const module = { exports: {} }; + * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), + * constants.dlopen.RTLD_NOW); + * module.exports.foo(); + * ``` + */ + dlopen(module: object, filename: string, flags?: number): void; + /** + * The `process.emitWarning()` method can be used to emit custom or application + * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string. + * emitWarning('Something happened!'); + * // Emits: (node: 56338) Warning: Something happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using a string and a type. + * emitWarning('Something Happened!', 'CustomWarning'); + * // Emits: (node:56338) CustomWarning: Something Happened! + * ``` + * + * ```js + * import { emitWarning } from 'node:process'; + * + * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ```js + * + * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. + * + * ```js + * import process from 'node:process'; + * + * process.on('warning', (warning) => { + * console.warn(warning.name); // 'Warning' + * console.warn(warning.message); // 'Something happened!' + * console.warn(warning.code); // 'MY_WARNING' + * console.warn(warning.stack); // Stack trace + * console.warn(warning.detail); // 'This is some additional information' + * }); + * ``` + * + * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler + * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): + * + * ```js + * import { emitWarning } from 'node:process'; + * + * // Emit a warning using an Error object. + * const myWarning = new Error('Something happened!'); + * // Use the Error name property to specify the type name + * myWarning.name = 'CustomWarning'; + * myWarning.code = 'WARN001'; + * + * emitWarning(myWarning); + * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! + * ``` + * + * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. + * + * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. + * + * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: + * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. + * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. + * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. + * @since v8.0.0 + * @param warning The warning to emit. + */ + emitWarning(warning: string | Error, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, ctor?: Function): void; + emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; + emitWarning(warning: string | Error, options?: EmitWarningOptions): void; + /** + * The `process.env` property returns an object containing the user environment. + * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). + * + * An example of this object looks like: + * + * ```js + * { + * TERM: 'xterm-256color', + * SHELL: '/usr/local/bin/bash', + * USER: 'maciej', + * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', + * PWD: '/Users/maciej', + * EDITOR: 'vim', + * SHLVL: '1', + * HOME: '/Users/maciej', + * LOGNAME: 'maciej', + * _: '/usr/local/bin/node' + * } + * ``` + * + * It is possible to modify this object, but such modifications will not be + * reflected outside the Node.js process, or (unless explicitly requested) + * to other `Worker` threads. + * In other words, the following example would not work: + * + * ```bash + * node -e 'process.env.foo = "bar"' && echo $foo + * ``` + * + * While the following will: + * + * ```js + * import { env } from 'node:process'; + * + * env.foo = 'bar'; + * console.log(env.foo); + * ``` + * + * Assigning a property on `process.env` will implicitly convert the value + * to a string. **This behavior is deprecated.** Future versions of Node.js may + * throw an error when the value is not a string, number, or boolean. + * + * ```js + * import { env } from 'node:process'; + * + * env.test = null; + * console.log(env.test); + * // => 'null' + * env.test = undefined; + * console.log(env.test); + * // => 'undefined' + * ``` + * + * Use `delete` to delete a property from `process.env`. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * delete env.TEST; + * console.log(env.TEST); + * // => undefined + * ``` + * + * On Windows operating systems, environment variables are case-insensitive. + * + * ```js + * import { env } from 'node:process'; + * + * env.TEST = 1; + * console.log(env.test); + * // => 1 + * ``` + * + * Unless explicitly specified when creating a `Worker` instance, + * each `Worker` thread has its own copy of `process.env`, based on its + * parent thread's `process.env`, or whatever was specified as the `env` option + * to the `Worker` constructor. Changes to `process.env` will not be visible + * across `Worker` threads, and only the main thread can make changes that + * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner + * unlike the main thread. + * @since v0.1.27 + */ + env: ProcessEnv; + /** + * The `process.exit()` method instructs Node.js to terminate the process + * synchronously with an exit status of `code`. If `code` is omitted, exit uses + * either the 'success' code `0` or the value of `process.exitCode` if it has been + * set. Node.js will not terminate until all the `'exit'` event listeners are + * called. + * + * To exit with a 'failure' code: + * + * ```js + * import { exit } from 'node:process'; + * + * exit(1); + * ``` + * + * The shell that executed Node.js should see the exit code as `1`. + * + * Calling `process.exit()` will force the process to exit as quickly as possible + * even if there are still asynchronous operations pending that have not yet + * completed fully, including I/O operations to `process.stdout` and `process.stderr`. + * + * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ + * _work pending_ in the event loop. The `process.exitCode` property can be set to + * tell the process which exit code to use when the process exits gracefully. + * + * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being + * truncated and lost: + * + * ```js + * import { exit } from 'node:process'; + * + * // This is an example of what *not* to do: + * if (someConditionNotMet()) { + * printUsageToStdout(); + * exit(1); + * } + * ``` + * + * The reason this is problematic is because writes to `process.stdout` in Node.js + * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js + * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. + * + * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding + * scheduling any additional work for the event loop: + * + * ```js + * import process from 'node:process'; + * + * // How to properly set the exit code while letting + * // the process exit gracefully. + * if (someConditionNotMet()) { + * printUsageToStdout(); + * process.exitCode = 1; + * } + * ``` + * + * If it is necessary to terminate the Node.js process due to an error condition, + * throwing an _uncaught_ error and allowing the process to terminate accordingly + * is safer than calling `process.exit()`. + * + * In `Worker` threads, this function stops the current thread rather + * than the current process. + * @since v0.1.13 + * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. + */ + exit(code?: number | string | null | undefined): never; + /** + * A number which will be the process exit code, when the process either + * exits gracefully, or is exited via {@link exit} without specifying + * a code. + * + * Specifying a code to {@link exit} will override any + * previous setting of `process.exitCode`. + * @default undefined + * @since v0.11.8 + */ + exitCode?: number | string | number | undefined; + /** + * The `process.getActiveResourcesInfo()` method returns an array of strings containing + * the types of the active resources that are currently keeping the event loop alive. + * + * ```js + * import { getActiveResourcesInfo } from 'node:process'; + * import { setTimeout } from 'node:timers'; + + * console.log('Before:', getActiveResourcesInfo()); + * setTimeout(() => {}, 1000); + * console.log('After:', getActiveResourcesInfo()); + * // Prints: + * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] + * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] + * ``` + * @since v17.3.0, v16.14.0 + */ + getActiveResourcesInfo(): string[]; + /** + * The `process.getgid()` method returns the numerical group identity of the + * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid) { + * console.log(`Current gid: ${process.getgid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.31 + */ + getgid?: () => number; + /** + * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a + * numeric ID or a group name + * string. If a group name is specified, this method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgid && process.setgid) { + * console.log(`Current gid: ${process.getgid()}`); + * try { + * process.setgid(501); + * console.log(`New gid: ${process.getgid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.31 + * @param id The group name or ID + */ + setgid?: (id: number | string) => void; + /** + * The `process.getuid()` method returns the numeric user identity of the process. + * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid) { + * console.log(`Current uid: ${process.getuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.1.28 + */ + getuid?: () => number; + /** + * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a + * numeric ID or a username string. + * If a username is specified, the method blocks while resolving the associated + * numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getuid && process.setuid) { + * console.log(`Current uid: ${process.getuid()}`); + * try { + * process.setuid(501); + * console.log(`New uid: ${process.getuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.1.28 + */ + setuid?: (id: number | string) => void; + /** + * The `process.geteuid()` method returns the numerical effective user identity of + * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + geteuid?: () => number; + /** + * The `process.seteuid()` method sets the effective user identity of the process. + * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username + * string. If a username is specified, the method blocks while resolving the + * associated numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.geteuid && process.seteuid) { + * console.log(`Current uid: ${process.geteuid()}`); + * try { + * process.seteuid(501); + * console.log(`New uid: ${process.geteuid()}`); + * } catch (err) { + * console.log(`Failed to set uid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A user name or ID + */ + seteuid?: (id: number | string) => void; + /** + * The `process.getegid()` method returns the numerical effective group identity + * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid) { + * console.log(`Current gid: ${process.getegid()}`); + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v2.0.0 + */ + getegid?: () => number; + /** + * The `process.setegid()` method sets the effective group identity of the process. + * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group + * name string. If a group name is specified, this method blocks while resolving + * the associated a numeric ID. + * + * ```js + * import process from 'node:process'; + * + * if (process.getegid && process.setegid) { + * console.log(`Current gid: ${process.getegid()}`); + * try { + * process.setegid(501); + * console.log(`New gid: ${process.getegid()}`); + * } catch (err) { + * console.log(`Failed to set gid: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v2.0.0 + * @param id A group name or ID + */ + setegid?: (id: number | string) => void; + /** + * The `process.getgroups()` method returns an array with the supplementary group + * IDs. POSIX leaves it unspecified if the effective group ID is included but + * Node.js ensures it always is. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups) { + * console.log(process.getgroups()); // [ 16, 21, 297 ] + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * @since v0.9.4 + */ + getgroups?: () => number[]; + /** + * The `process.setgroups()` method sets the supplementary group IDs for the + * Node.js process. This is a privileged operation that requires the Node.js + * process to have `root` or the `CAP_SETGID` capability. + * + * The `groups` array can contain numeric group IDs, group names, or both. + * + * ```js + * import process from 'node:process'; + * + * if (process.getgroups && process.setgroups) { + * try { + * process.setgroups([501]); + * console.log(process.getgroups()); // new groups + * } catch (err) { + * console.log(`Failed to set groups: ${err}`); + * } + * } + * ``` + * + * This function is only available on POSIX platforms (i.e. not Windows or + * Android). + * This feature is not available in `Worker` threads. + * @since v0.9.4 + */ + setgroups?: (groups: ReadonlyArray) => void; + /** + * The `process.setUncaughtExceptionCaptureCallback()` function sets a function + * that will be invoked when an uncaught exception occurs, which will receive the + * exception value itself as its first argument. + * + * If such a function is set, the `'uncaughtException'` event will + * not be emitted. If `--abort-on-uncaught-exception` was passed from the + * command line or set through `v8.setFlagsFromString()`, the process will + * not abort. Actions configured to take place on exceptions such as report + * generations will be affected too + * + * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this + * method with a non-`null` argument while another capture function is set will + * throw an error. + * + * Using this function is mutually exclusive with using the deprecated `domain` built-in module. + * @since v9.3.0 + */ + setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; + /** + * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. + * @since v9.3.0 + */ + hasUncaughtExceptionCaptureCallback(): boolean; + /** + * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. + * @since v20.7.0 + * @experimental + */ + readonly sourceMapsEnabled: boolean; + /** + * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for + * stack traces. + * + * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. + * + * Only source maps in JavaScript files that are loaded after source maps has been + * enabled will be parsed and loaded. + * @since v16.6.0, v14.18.0 + * @experimental + */ + setSourceMapsEnabled(value: boolean): void; + /** + * The `process.version` property contains the Node.js version string. + * + * ```js + * import { version } from 'node:process'; + * + * console.log(`Version: ${version}`); + * // Version: v14.8.0 + * ``` + * + * To get the version string without the prepended _v_, use`process.versions.node`. + * @since v0.1.3 + */ + readonly version: string; + /** + * The `process.versions` property returns an object listing the version strings of + * Node.js and its dependencies. `process.versions.modules` indicates the current + * ABI version, which is increased whenever a C++ API changes. Node.js will refuse + * to load modules that were compiled against a different module ABI version. + * + * ```js + * import { versions } from 'node:process'; + * + * console.log(versions); + * ``` + * + * Will generate an object similar to: + * + * ```console + * { node: '20.2.0', + * acorn: '8.8.2', + * ada: '2.4.0', + * ares: '1.19.0', + * base64: '0.5.0', + * brotli: '1.0.9', + * cjs_module_lexer: '1.2.2', + * cldr: '43.0', + * icu: '73.1', + * llhttp: '8.1.0', + * modules: '115', + * napi: '8', + * nghttp2: '1.52.0', + * nghttp3: '0.7.0', + * ngtcp2: '0.8.1', + * openssl: '3.0.8+quic', + * simdutf: '3.2.9', + * tz: '2023c', + * undici: '5.22.0', + * unicode: '15.0', + * uv: '1.44.2', + * uvwasi: '0.0.16', + * v8: '11.3.244.8-node.9', + * zlib: '1.2.13' } + * ``` + * @since v0.2.0 + */ + readonly versions: ProcessVersions; + /** + * The `process.config` property returns a frozen `Object` containing the + * JavaScript representation of the configure options used to compile the current + * Node.js executable. This is the same as the `config.gypi` file that was produced + * when running the `./configure` script. + * + * An example of the possible output looks like: + * + * ```js + * { + * target_defaults: + * { cflags: [], + * default_configuration: 'Release', + * defines: [], + * include_dirs: [], + * libraries: [] }, + * variables: + * { + * host_arch: 'x64', + * napi_build_version: 5, + * node_install_npm: 'true', + * node_prefix: '', + * node_shared_cares: 'false', + * node_shared_http_parser: 'false', + * node_shared_libuv: 'false', + * node_shared_zlib: 'false', + * node_use_openssl: 'true', + * node_shared_openssl: 'false', + * strict_aliasing: 'true', + * target_arch: 'x64', + * v8_use_snapshot: 1 + * } + * } + * ``` + * @since v0.7.7 + */ + readonly config: ProcessConfig; + /** + * The `process.kill()` method sends the `signal` to the process identified by`pid`. + * + * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. + * + * This method will throw an error if the target `pid` does not exist. As a special + * case, a signal of `0` can be used to test for the existence of a process. + * Windows platforms will throw an error if the `pid` is used to kill a process + * group. + * + * Even though the name of this function is `process.kill()`, it is really just a + * signal sender, like the `kill` system call. The signal sent may do something + * other than kill the target process. + * + * ```js + * import process, { kill } from 'node:process'; + * + * process.on('SIGHUP', () => { + * console.log('Got SIGHUP signal.'); + * }); + * + * setTimeout(() => { + * console.log('Exiting.'); + * process.exit(0); + * }, 100); + * + * kill(process.pid, 'SIGHUP'); + * ``` + * + * When `SIGUSR1` is received by a Node.js process, Node.js will start the + * debugger. See `Signal Events`. + * @since v0.0.6 + * @param pid A process ID + * @param [signal='SIGTERM'] The signal to send, either as a string or number. + */ + kill(pid: number, signal?: string | number): true; + /** + * Loads the environment configuration from a `.env` file into `process.env`. If + * the file is not found, error will be thrown. + * + * To load a specific .env file by specifying its path, use the following code: + * + * ```js + * import { loadEnvFile } from 'node:process'; + * + * loadEnvFile('./development.env') + * ``` + * @since v20.12.0 + * @param path The path to the .env file + */ + loadEnvFile(path?: string | URL | Buffer): void; + /** + * The `process.pid` property returns the PID of the process. + * + * ```js + * import { pid } from 'node:process'; + * + * console.log(`This process is pid ${pid}`); + * ``` + * @since v0.1.15 + */ + readonly pid: number; + /** + * The `process.ppid` property returns the PID of the parent of the + * current process. + * + * ```js + * import { ppid } from 'node:process'; + * + * console.log(`The parent process is pid ${ppid}`); + * ``` + * @since v9.2.0, v8.10.0, v6.13.0 + */ + readonly ppid: number; + /** + * The `process.title` property returns the current process title (i.e. returns + * the current value of `ps`). Assigning a new value to `process.title` modifies + * the current value of `ps`. + * + * When a new value is assigned, different platforms will impose different maximum + * length restrictions on the title. Usually such restrictions are quite limited. + * For instance, on Linux and macOS, `process.title` is limited to the size of the + * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 + * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) + * cases. + * + * Assigning a value to `process.title` might not result in an accurate label + * within process manager applications such as macOS Activity Monitor or Windows + * Services Manager. + * @since v0.1.104 + */ + title: string; + /** + * The operating system CPU architecture for which the Node.js binary was compiled. + * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`. + * + * ```js + * import { arch } from 'node:process'; + * + * console.log(`This processor architecture is ${arch}`); + * ``` + * @since v0.5.0 + */ + readonly arch: Architecture; + /** + * The `process.platform` property returns a string identifying the operating + * system platform for which the Node.js binary was compiled. + * + * Currently possible values are: + * + * * `'aix'` + * * `'darwin'` + * * `'freebsd'` + * * `'linux'` + * * `'openbsd'` + * * `'sunos'` + * * `'win32'` + * + * ```js + * import { platform } from 'node:process'; + * + * console.log(`This platform is ${platform}`); + * ``` + * + * The value `'android'` may also be returned if the Node.js is built on the + * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). + * @since v0.1.16 + */ + readonly platform: Platform; + /** + * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at + * runtime, `require.main` may still refer to the original main module in + * modules that were required before the change occurred. Generally, it's + * safe to assume that the two refer to the same module. + * + * As with `require.main`, `process.mainModule` will be `undefined` if there + * is no entry script. + * @since v0.1.17 + * @deprecated Since v14.0.0 - Use `main` instead. + */ + mainModule?: Module | undefined; + memoryUsage: MemoryUsageFn; + /** + * Gets the amount of memory available to the process (in bytes) based on + * limits imposed by the OS. If there is no such constraint, or the constraint + * is unknown, `undefined` is returned. + * + * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more + * information. + * @since v19.6.0, v18.15.0 + * @experimental + */ + constrainedMemory(): number | undefined; + /** + * The `process.cpuUsage()` method returns the user and system CPU time usage of + * the current process, in an object with properties `user` and `system`, whose + * values are microsecond values (millionth of a second). These values measure time + * spent in user and system code respectively, and may end up being greater than + * actual elapsed time if multiple CPU cores are performing work for this process. + * + * The result of a previous call to `process.cpuUsage()` can be passed as the + * argument to the function, to get a diff reading. + * + * ```js + * import { cpuUsage } from 'node:process'; + * + * const startUsage = cpuUsage(); + * // { user: 38579, system: 6986 } + * + * // spin the CPU for 500 milliseconds + * const now = Date.now(); + * while (Date.now() - now < 500); + * + * console.log(cpuUsage(startUsage)); + * // { user: 514883, system: 11226 } + * ``` + * @since v6.1.0 + * @param previousValue A previous return value from calling `process.cpuUsage()` + */ + cpuUsage(previousValue?: CpuUsage): CpuUsage; + /** + * `process.nextTick()` adds `callback` to the "next tick queue". This queue is + * fully drained after the current operation on the JavaScript stack runs to + * completion and before the event loop is allowed to continue. It's possible to + * create an infinite loop if one were to recursively call `process.nextTick()`. + * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. + * + * ```js + * import { nextTick } from 'node:process'; + * + * console.log('start'); + * nextTick(() => { + * console.log('nextTick callback'); + * }); + * console.log('scheduled'); + * // Output: + * // start + * // scheduled + * // nextTick callback + * ``` + * + * This is important when developing APIs in order to give users the opportunity + * to assign event handlers _after_ an object has been constructed but before any + * I/O has occurred: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function MyThing(options) { + * this.setupOptions(options); + * + * nextTick(() => { + * this.startDoingStuff(); + * }); + * } + * + * const thing = new MyThing(); + * thing.getReadyForStuff(); + * + * // thing.startDoingStuff() gets called now, not before. + * ``` + * + * It is very important for APIs to be either 100% synchronous or 100% + * asynchronous. Consider this example: + * + * ```js + * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! + * function maybeSync(arg, cb) { + * if (arg) { + * cb(); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * + * This API is hazardous because in the following case: + * + * ```js + * const maybeTrue = Math.random() > 0.5; + * + * maybeSync(maybeTrue, () => { + * foo(); + * }); + * + * bar(); + * ``` + * + * It is not clear whether `foo()` or `bar()` will be called first. + * + * The following approach is much better: + * + * ```js + * import { nextTick } from 'node:process'; + * + * function definitelyAsync(arg, cb) { + * if (arg) { + * nextTick(cb); + * return; + * } + * + * fs.stat('file', cb); + * } + * ``` + * @since v0.1.26 + * @param args Additional arguments to pass when invoking the `callback` + */ + nextTick(callback: Function, ...args: any[]): void; + /** + * This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag. + * + * `process.permission` is an object whose methods are used to manage permissions for the current process. + * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). + * @since v20.0.0 + */ + permission: ProcessPermission; + /** + * The `process.release` property returns an `Object` containing metadata related + * to the current release, including URLs for the source tarball and headers-only + * tarball. + * + * `process.release` contains the following properties: + * + * ```js + * { + * name: 'node', + * lts: 'Hydrogen', + * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz', + * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz', + * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib' + * } + * ``` + * + * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be + * relied upon to exist. + * @since v3.0.0 + */ + readonly release: ProcessRelease; + features: { + inspector: boolean; + debug: boolean; + uv: boolean; + ipv6: boolean; + tls_alpn: boolean; + tls_sni: boolean; + tls_ocsp: boolean; + tls: boolean; + }; + /** + * `process.umask()` returns the Node.js process's file mode creation mask. Child + * processes inherit the mask from the parent process. + * @since v0.1.19 + * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential + * security vulnerability. There is no safe, cross-platform alternative API. + */ + umask(): number; + /** + * Can only be set if not in worker thread. + */ + umask(mask: string | number): number; + /** + * The `process.uptime()` method returns the number of seconds the current Node.js + * process has been running. + * + * The return value includes fractions of a second. Use `Math.floor()` to get whole + * seconds. + * @since v0.5.0 + */ + uptime(): number; + hrtime: HRTime; + /** + * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. + * If no IPC channel exists, this property is undefined. + * @since v7.1.0 + */ + channel?: { + /** + * This method makes the IPC channel keep the event loop of the process running if .unref() has been called before. + * @since v7.1.0 + */ + ref(): void; + /** + * This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open. + * @since v7.1.0 + */ + unref(): void; + }; + /** + * If Node.js is spawned with an IPC channel, the `process.send()` method can be + * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. + * + * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. + * + * The message goes through serialization and parsing. The resulting message might + * not be the same as what is originally sent. + * @since v0.5.9 + * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: + */ + send?( + message: any, + sendHandle?: any, + options?: { + keepOpen?: boolean | undefined; + }, + callback?: (error: Error | null) => void, + ): boolean; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the + * IPC channel to the parent process, allowing the child process to exit gracefully + * once there are no other connections keeping it alive. + * + * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. + * + * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. + * @since v0.7.2 + */ + disconnect(): void; + /** + * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC + * channel is connected and will return `false` after `process.disconnect()` is called. + * + * Once `process.connected` is `false`, it is no longer possible to send messages + * over the IPC channel using `process.send()`. + * @since v0.7.2 + */ + connected: boolean; + /** + * The `process.allowedNodeEnvironmentFlags` property is a special, + * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. + * + * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag + * representations. `process.allowedNodeEnvironmentFlags.has()` will + * return `true` in the following cases: + * + * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. + * * Flags passed through to V8 (as listed in `--v8-options`) may replace + * one or more _non-leading_ dashes for an underscore, or vice-versa; + * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, + * etc. + * * Flags may contain one or more equals (`=`) characters; all + * characters after and including the first equals will be ignored; + * e.g., `--stack-trace-limit=100`. + * * Flags _must_ be allowable within `NODE_OPTIONS`. + * + * When iterating over `process.allowedNodeEnvironmentFlags`, flags will + * appear only _once_; each will begin with one or more dashes. Flags + * passed through to V8 will contain underscores instead of non-leading + * dashes: + * + * ```js + * import { allowedNodeEnvironmentFlags } from 'node:process'; + * + * allowedNodeEnvironmentFlags.forEach((flag) => { + * // -r + * // --inspect-brk + * // --abort_on_uncaught_exception + * // ... + * }); + * ``` + * + * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail + * silently. + * + * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will + * contain what _would have_ been allowable. + * @since v10.10.0 + */ + allowedNodeEnvironmentFlags: ReadonlySet; + /** + * `process.report` is an object whose methods are used to generate diagnostic + * reports for the current process. Additional documentation is available in the `report documentation`. + * @since v11.8.0 + */ + report?: ProcessReport | undefined; + /** + * ```js + * import { resourceUsage } from 'node:process'; + * + * console.log(resourceUsage()); + * /* + * Will output: + * { + * userCPUTime: 82872, + * systemCPUTime: 4143, + * maxRSS: 33164, + * sharedMemorySize: 0, + * unsharedDataSize: 0, + * unsharedStackSize: 0, + * minorPageFault: 2469, + * majorPageFault: 0, + * swappedOut: 0, + * fsRead: 0, + * fsWrite: 8, + * ipcSent: 0, + * ipcReceived: 0, + * signalsCount: 0, + * voluntaryContextSwitches: 79, + * involuntaryContextSwitches: 1 + * } + * + * ``` + * @since v12.6.0 + * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. + */ + resourceUsage(): ResourceUsage; + /** + * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` + * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() + * method for more information. + * + * ```bash + * $ node --throw-deprecation -p "process.throwDeprecation" + * true + * $ node -p "process.throwDeprecation" + * undefined + * $ node + * > process.emitWarning('test', 'DeprecationWarning'); + * undefined + * > (node:26598) DeprecationWarning: test + * > process.throwDeprecation = true; + * true + * > process.emitWarning('test', 'DeprecationWarning'); + * Thrown: + * [DeprecationWarning: test] { name: 'DeprecationWarning' } + * ``` + * @since v0.9.12 + */ + throwDeprecation: boolean; + /** + * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the + * documentation for the `'warning' event` and the `emitWarning() method` for more information about this + * flag's behavior. + * @since v0.8.0 + */ + traceDeprecation: boolean; + /* EventEmitter */ + addListener(event: "beforeExit", listener: BeforeExitListener): this; + addListener(event: "disconnect", listener: DisconnectListener): this; + addListener(event: "exit", listener: ExitListener): this; + addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; + addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + addListener(event: "warning", listener: WarningListener): this; + addListener(event: "message", listener: MessageListener): this; + addListener(event: Signals, listener: SignalsListener): this; + addListener(event: "multipleResolves", listener: MultipleResolveListener): this; + addListener(event: "worker", listener: WorkerListener): this; + emit(event: "beforeExit", code: number): boolean; + emit(event: "disconnect"): boolean; + emit(event: "exit", code: number): boolean; + emit(event: "rejectionHandled", promise: Promise): boolean; + emit(event: "uncaughtException", error: Error): boolean; + emit(event: "uncaughtExceptionMonitor", error: Error): boolean; + emit(event: "unhandledRejection", reason: unknown, promise: Promise): boolean; + emit(event: "warning", warning: Error): boolean; + emit(event: "message", message: unknown, sendHandle: unknown): this; + emit(event: Signals, signal?: Signals): boolean; + emit( + event: "multipleResolves", + type: MultipleResolveType, + promise: Promise, + value: unknown, + ): this; + emit(event: "worker", listener: WorkerListener): this; + on(event: "beforeExit", listener: BeforeExitListener): this; + on(event: "disconnect", listener: DisconnectListener): this; + on(event: "exit", listener: ExitListener): this; + on(event: "rejectionHandled", listener: RejectionHandledListener): this; + on(event: "uncaughtException", listener: UncaughtExceptionListener): this; + on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; + on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + on(event: "warning", listener: WarningListener): this; + on(event: "message", listener: MessageListener): this; + on(event: Signals, listener: SignalsListener): this; + on(event: "multipleResolves", listener: MultipleResolveListener): this; + on(event: "worker", listener: WorkerListener): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "beforeExit", listener: BeforeExitListener): this; + once(event: "disconnect", listener: DisconnectListener): this; + once(event: "exit", listener: ExitListener): this; + once(event: "rejectionHandled", listener: RejectionHandledListener): this; + once(event: "uncaughtException", listener: UncaughtExceptionListener): this; + once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; + once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + once(event: "warning", listener: WarningListener): this; + once(event: "message", listener: MessageListener): this; + once(event: Signals, listener: SignalsListener): this; + once(event: "multipleResolves", listener: MultipleResolveListener): this; + once(event: "worker", listener: WorkerListener): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "beforeExit", listener: BeforeExitListener): this; + prependListener(event: "disconnect", listener: DisconnectListener): this; + prependListener(event: "exit", listener: ExitListener): this; + prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; + prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependListener(event: "warning", listener: WarningListener): this; + prependListener(event: "message", listener: MessageListener): this; + prependListener(event: Signals, listener: SignalsListener): this; + prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; + prependListener(event: "worker", listener: WorkerListener): this; + prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; + prependOnceListener(event: "disconnect", listener: DisconnectListener): this; + prependOnceListener(event: "exit", listener: ExitListener): this; + prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; + prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; + prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; + prependOnceListener(event: "warning", listener: WarningListener): this; + prependOnceListener(event: "message", listener: MessageListener): this; + prependOnceListener(event: Signals, listener: SignalsListener): this; + prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; + prependOnceListener(event: "worker", listener: WorkerListener): this; + listeners(event: "beforeExit"): BeforeExitListener[]; + listeners(event: "disconnect"): DisconnectListener[]; + listeners(event: "exit"): ExitListener[]; + listeners(event: "rejectionHandled"): RejectionHandledListener[]; + listeners(event: "uncaughtException"): UncaughtExceptionListener[]; + listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[]; + listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; + listeners(event: "warning"): WarningListener[]; + listeners(event: "message"): MessageListener[]; + listeners(event: Signals): SignalsListener[]; + listeners(event: "multipleResolves"): MultipleResolveListener[]; + listeners(event: "worker"): WorkerListener[]; + } + } + } + export = process; +} +declare module "node:process" { + import process = require("process"); + export = process; +} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts new file mode 100644 index 0000000..e947711 --- /dev/null +++ b/node_modules/@types/node/punycode.d.ts @@ -0,0 +1,117 @@ +/** + * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users + * currently depending on the `punycode` module should switch to using the + * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL + * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. + * + * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It + * can be accessed using: + * + * ```js + * const punycode = require('punycode'); + * ``` + * + * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is + * primarily intended for use in Internationalized Domain Names. Because host + * names in URLs are limited to ASCII characters only, Domain Names that contain + * non-ASCII characters must be converted into ASCII using the Punycode scheme. + * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent + * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`. + * + * The `punycode` module provides a simple implementation of the Punycode standard. + * + * The `punycode` module is a third-party dependency used by Node.js and + * made available to developers as a convenience. Fixes or other modifications to + * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. + * @deprecated Since v7.0.0 - Deprecated + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/punycode.js) + */ +declare module "punycode" { + /** + * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only + * characters to the equivalent string of Unicode codepoints. + * + * ```js + * punycode.decode('maana-pta'); // 'mañana' + * punycode.decode('--dqo34k'); // '☃-⌘' + * ``` + * @since v0.5.1 + */ + function decode(string: string): string; + /** + * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. + * + * ```js + * punycode.encode('mañana'); // 'maana-pta' + * punycode.encode('☃-⌘'); // '--dqo34k' + * ``` + * @since v0.5.1 + */ + function encode(string: string): string; + /** + * The `punycode.toUnicode()` method converts a string representing a domain name + * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be + * converted. + * + * ```js + * // decode domain names + * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' + * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' + * punycode.toUnicode('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toUnicode(domain: string): string; + /** + * The `punycode.toASCII()` method converts a Unicode string representing an + * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the + * domain name will be converted. Calling `punycode.toASCII()` on a string that + * already only contains ASCII characters will have no effect. + * + * ```js + * // encode domain names + * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' + * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' + * punycode.toASCII('example.com'); // 'example.com' + * ``` + * @since v0.6.1 + */ + function toASCII(domain: string): string; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const ucs2: ucs2; + interface ucs2 { + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + decode(string: string): number[]; + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + encode(codePoints: readonly number[]): string; + } + /** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ + const version: string; +} +declare module "node:punycode" { + export * from "punycode"; +} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts new file mode 100644 index 0000000..900b9c4 --- /dev/null +++ b/node_modules/@types/node/querystring.d.ts @@ -0,0 +1,153 @@ +/** + * The `node:querystring` module provides utilities for parsing and formatting URL + * query strings. It can be accessed using: + * + * ```js + * const querystring = require('node:querystring'); + * ``` + * + * `querystring` is more performant than `URLSearchParams` but is not a + * standardized API. Use `URLSearchParams` when performance is not critical or + * when compatibility with browser code is desirable. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/querystring.js) + */ +declare module "querystring" { + interface StringifyOptions { + /** + * The function to use when converting URL-unsafe characters to percent-encoding in the query string. + * @default `querystring.escape()` + */ + encodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParseOptions { + /** + * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. + * @default 1000 + */ + maxKeys?: number | undefined; + /** + * The function to use when decoding percent-encoded characters in the query string. + * @default `querystring.unescape()` + */ + decodeURIComponent?: ((str: string) => string) | undefined; + } + interface ParsedUrlQuery extends NodeJS.Dict {} + interface ParsedUrlQueryInput extends + NodeJS.Dict< + | string + | number + | boolean + | readonly string[] + | readonly number[] + | readonly boolean[] + | null + > + {} + /** + * The `querystring.stringify()` method produces a URL query string from a + * given `obj` by iterating through the object's "own properties". + * + * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | + * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | + * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | + * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | + * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to + * empty strings. + * + * ```js + * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); + * // Returns 'foo=bar&baz=qux&baz=quux&corge=' + * + * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); + * // Returns 'foo:bar;baz:qux' + * ``` + * + * By default, characters requiring percent-encoding within the query string will + * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkEncodeURIComponent function already exists, + * + * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, + * { encodeURIComponent: gbkEncodeURIComponent }); + * ``` + * @since v0.1.25 + * @param obj The object to serialize into a URL query string + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] . The substring used to delimit keys and values in the query string. + */ + function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; + /** + * The `querystring.parse()` method parses a URL query string (`str`) into a + * collection of key and value pairs. + * + * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: + * + * ```json + * { + * "foo": "bar", + * "abc": ["xyz", "123"] + * } + * ``` + * + * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, + * `obj.hasOwnProperty()`, and others + * are not defined and _will not work_. + * + * By default, percent-encoded characters within the query string will be assumed + * to use UTF-8 encoding. If an alternative character encoding is used, then an + * alternative `decodeURIComponent` option will need to be specified: + * + * ```js + * // Assuming gbkDecodeURIComponent function already exists... + * + * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, + * { decodeURIComponent: gbkDecodeURIComponent }); + * ``` + * @since v0.1.25 + * @param str The URL query string to parse + * @param [sep='&'] The substring used to delimit key and value pairs in the query string. + * @param [eq='='] The substring used to delimit keys and values in the query string. + */ + function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; + /** + * The querystring.encode() function is an alias for querystring.stringify(). + */ + const encode: typeof stringify; + /** + * The querystring.decode() function is an alias for querystring.parse(). + */ + const decode: typeof parse; + /** + * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL + * query strings. + * + * The `querystring.escape()` method is used by `querystring.stringify()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement percent-encoding implementation if + * necessary by assigning `querystring.escape` to an alternative function. + * @since v0.1.25 + */ + function escape(str: string): string; + /** + * The `querystring.unescape()` method performs decoding of URL percent-encoded + * characters on the given `str`. + * + * The `querystring.unescape()` method is used by `querystring.parse()` and is + * generally not expected to be used directly. It is exported primarily to allow + * application code to provide a replacement decoding implementation if + * necessary by assigning `querystring.unescape` to an alternative function. + * + * By default, the `querystring.unescape()` method will attempt to use the + * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, + * a safer equivalent that does not throw on malformed URLs will be used. + * @since v0.1.25 + */ + function unescape(str: string): string; +} +declare module "node:querystring" { + export * from "querystring"; +} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts new file mode 100644 index 0000000..a69c667 --- /dev/null +++ b/node_modules/@types/node/readline.d.ts @@ -0,0 +1,540 @@ +/** + * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream + * (such as [`process.stdin`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time. + * + * To use the promise-based APIs: + * + * ```js + * import * as readline from 'node:readline/promises'; + * ``` + * + * To use the callback and sync APIs: + * + * ```js + * import * as readline from 'node:readline'; + * ``` + * + * The following simple example illustrates the basic use of the `node:readline` module. + * + * ```js + * import * as readline from 'node:readline/promises'; + * import { stdin as input, stdout as output } from 'node:process'; + * + * const rl = readline.createInterface({ input, output }); + * + * const answer = await rl.question('What do you think of Node.js? '); + * + * console.log(`Thank you for your valuable feedback: ${answer}`); + * + * rl.close(); + * ``` + * + * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be + * received on the `input` stream. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/readline.js) + */ +declare module "readline" { + import { Abortable, EventEmitter } from "node:events"; + import * as promises from "node:readline/promises"; + export { promises }; + export interface Key { + sequence?: string | undefined; + name?: string | undefined; + ctrl?: boolean | undefined; + meta?: boolean | undefined; + shift?: boolean | undefined; + } + /** + * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a + * single `input` [Readable](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v0.1.104 + */ + export class Interface extends EventEmitter { + readonly terminal: boolean; + /** + * The current input data being processed by node. + * + * This can be used when collecting input from a TTY stream to retrieve the + * current value that has been processed thus far, prior to the `line` event + * being emitted. Once the `line` event has been emitted, this property will + * be an empty string. + * + * Be aware that modifying the value during the instance runtime may have + * unintended consequences if `rl.cursor` is not also controlled. + * + * **If not using a TTY stream for input, use the `'line'` event.** + * + * One possible use case would be as follows: + * + * ```js + * const values = ['lorem ipsum', 'dolor sit amet']; + * const rl = readline.createInterface(process.stdin); + * const showResults = debounce(() => { + * console.log( + * '\n', + * values.filter((val) => val.startsWith(rl.line)).join(' '), + * ); + * }, 300); + * process.stdin.on('keypress', (c, k) => { + * showResults(); + * }); + * ``` + * @since v0.1.98 + */ + readonly line: string; + /** + * The cursor position relative to `rl.line`. + * + * This will track where the current cursor lands in the input string, when + * reading input from a TTY stream. The position of cursor determines the + * portion of the input string that will be modified as input is processed, + * as well as the column where the terminal caret will be rendered. + * @since v0.1.98 + */ + readonly cursor: number; + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ); + /** + * NOTE: According to the documentation: + * + * > Instances of the `readline.Interface` class are constructed using the + * > `readline.createInterface()` method. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor + */ + protected constructor(options: ReadLineOptions); + /** + * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + * @since v15.3.0, v14.17.0 + * @return the current prompt string + */ + getPrompt(): string; + /** + * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. + * @since v0.1.98 + */ + setPrompt(prompt: string): void; + /** + * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new + * location at which to provide input. + * + * When called, `rl.prompt()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. + * @since v0.1.98 + * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. + */ + prompt(preserveCursor?: boolean): void; + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * The `callback` function passed to `rl.question()` does not follow the typical + * pattern of accepting an `Error` object or `null` as the first argument. + * The `callback` is called with the provided answer as the only argument. + * + * An error will be thrown if calling `rl.question()` after `rl.close()`. + * + * Example usage: + * + * ```js + * rl.question('What is your favorite food? ', (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * ``` + * + * Using an `AbortController` to cancel a question. + * + * ```js + * const ac = new AbortController(); + * const signal = ac.signal; + * + * rl.question('What is your favorite food? ', { signal }, (answer) => { + * console.log(`Oh, so your favorite food is ${answer}`); + * }); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * setTimeout(() => ac.abort(), 10000); + * ``` + * @since v0.3.3 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @param callback A callback function that is invoked with the user's input in response to the `query`. + */ + question(query: string, callback: (answer: string) => void): void; + question(query: string, options: Abortable, callback: (answer: string) => void): void; + /** + * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed + * later if necessary. + * + * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. + * @since v0.3.4 + */ + pause(): this; + /** + * The `rl.resume()` method resumes the `input` stream if it has been paused. + * @since v0.3.4 + */ + resume(): this; + /** + * The `rl.close()` method closes the `Interface` instance and + * relinquishes control over the `input` and `output` streams. When called, + * the `'close'` event will be emitted. + * + * Calling `rl.close()` does not immediately stop other events (including `'line'`) + * from being emitted by the `Interface` instance. + * @since v0.1.98 + */ + close(): void; + /** + * The `rl.write()` method will write either `data` or a key sequence identified + * by `key` to the `output`. The `key` argument is supported only if `output` is + * a `TTY` text terminal. See `TTY keybindings` for a list of key + * combinations. + * + * If `key` is specified, `data` is ignored. + * + * When called, `rl.write()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. + * + * ```js + * rl.write('Delete this!'); + * // Simulate Ctrl+U to delete the line written previously + * rl.write(null, { ctrl: true, name: 'u' }); + * ``` + * + * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. + * @since v0.1.98 + */ + write(data: string | Buffer, key?: Key): void; + write(data: undefined | null | string | Buffer, key: Key): void; + /** + * Returns the real position of the cursor in relation to the input + * prompt + string. Long input (wrapping) strings, as well as multiple + * line prompts are included in the calculations. + * @since v13.5.0, v12.16.0 + */ + getCursorPos(): CursorPos; + /** + * events.EventEmitter + * 1. close + * 2. line + * 3. pause + * 4. resume + * 5. SIGCONT + * 6. SIGINT + * 7. SIGTSTP + * 8. history + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + addListener(event: "history", listener: (history: string[]) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + emit(event: "history", history: string[]): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + on(event: "history", listener: (history: string[]) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + once(event: "history", listener: (history: string[]) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + prependListener(event: "history", listener: (history: string[]) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: "history", listener: (history: string[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + export type ReadLine = Interface; // type forwarded for backwards compatibility + export type Completer = (line: string) => CompleterResult; + export type AsyncCompleter = ( + line: string, + callback: (err?: null | Error, result?: CompleterResult) => void, + ) => void; + export type CompleterResult = [string[], string]; + export interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream | undefined; + completer?: Completer | AsyncCompleter | undefined; + terminal?: boolean | undefined; + /** + * Initial list of history lines. This option makes sense + * only if `terminal` is set to `true` by the user or by an internal `output` + * check, otherwise the history caching mechanism is not initialized at all. + * @default [] + */ + history?: string[] | undefined; + historySize?: number | undefined; + prompt?: string | undefined; + crlfDelay?: number | undefined; + /** + * If `true`, when a new input line added + * to the history list duplicates an older one, this removes the older line + * from the list. + * @default false + */ + removeHistoryDuplicates?: boolean | undefined; + escapeCodeTimeout?: number | undefined; + tabSize?: number | undefined; + } + /** + * The `readline.createInterface()` method creates a new `readline.Interface` instance. + * + * ```js + * const readline = require('node:readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readline.Interface` instance is created, the most common case is to + * listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * + * When creating a `readline.Interface` using `stdin` as input, the program + * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without + * waiting for user input, call `process.stdin.unref()`. + * @since v0.1.98 + */ + export function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + export function createInterface(options: ReadLineOptions): Interface; + /** + * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. + * + * Optionally, `interface` specifies a `readline.Interface` instance for which + * autocompletion is disabled when copy-pasted input is detected. + * + * If the `stream` is a `TTY`, then it must be in raw mode. + * + * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop + * the `input` from emitting `'keypress'` events. + * + * ```js + * readline.emitKeypressEvents(process.stdin); + * if (process.stdin.isTTY) + * process.stdin.setRawMode(true); + * ``` + * + * ## Example: Tiny CLI + * + * The following example illustrates the use of `readline.Interface` class to + * implement a small command-line interface: + * + * ```js + * const readline = require('node:readline'); + * const rl = readline.createInterface({ + * input: process.stdin, + * output: process.stdout, + * prompt: 'OHAI> ', + * }); + * + * rl.prompt(); + * + * rl.on('line', (line) => { + * switch (line.trim()) { + * case 'hello': + * console.log('world!'); + * break; + * default: + * console.log(`Say what? I might have heard '${line.trim()}'`); + * break; + * } + * rl.prompt(); + * }).on('close', () => { + * console.log('Have a great day!'); + * process.exit(0); + * }); + * ``` + * + * ## Example: Read file stream line-by-Line + * + * A common use case for `readline` is to consume an input file one line at a + * time. The easiest way to do so is leveraging the `fs.ReadStream` API as + * well as a `for await...of` loop: + * + * ```js + * const fs = require('node:fs'); + * const readline = require('node:readline'); + * + * async function processLineByLine() { + * const fileStream = fs.createReadStream('input.txt'); + * + * const rl = readline.createInterface({ + * input: fileStream, + * crlfDelay: Infinity, + * }); + * // Note: we use the crlfDelay option to recognize all instances of CR LF + * // ('\r\n') in input.txt as a single line break. + * + * for await (const line of rl) { + * // Each line in input.txt will be successively available here as `line`. + * console.log(`Line from file: ${line}`); + * } + * } + * + * processLineByLine(); + * ``` + * + * Alternatively, one could use the `'line'` event: + * + * ```js + * const fs = require('node:fs'); + * const readline = require('node:readline'); + * + * const rl = readline.createInterface({ + * input: fs.createReadStream('sample.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * console.log(`Line from file: ${line}`); + * }); + * ``` + * + * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: + * + * ```js + * const { once } = require('node:events'); + * const { createReadStream } = require('node:fs'); + * const { createInterface } = require('node:readline'); + * + * (async function processLineByLine() { + * try { + * const rl = createInterface({ + * input: createReadStream('big-file.txt'), + * crlfDelay: Infinity, + * }); + * + * rl.on('line', (line) => { + * // Process the line. + * }); + * + * await once(rl, 'close'); + * + * console.log('File processed.'); + * } catch (err) { + * console.error(err); + * } + * })(); + * ``` + * @since v0.7.7 + */ + export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; + export type Direction = -1 | 0 | 1; + export interface CursorPos { + rows: number; + cols: number; + } + /** + * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream + * in a specified direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; + /** + * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from + * the current position of the cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; + /** + * The `readline.cursorTo()` method moves cursor to the specified position in a + * given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; + /** + * The `readline.moveCursor()` method moves the cursor _relative_ to its current + * position in a given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; +} +declare module "node:readline" { + export * from "readline"; +} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts new file mode 100644 index 0000000..f2826bb --- /dev/null +++ b/node_modules/@types/node/readline/promises.d.ts @@ -0,0 +1,150 @@ +/** + * @since v17.0.0 + * @experimental + */ +declare module "readline/promises" { + import { AsyncCompleter, Completer, Direction, Interface as _Interface, ReadLineOptions } from "node:readline"; + import { Abortable } from "node:events"; + /** + * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a + * single `input` `Readable` stream and a single `output` `Writable` stream. + * The `output` stream is used to print prompts for user input that arrives on, + * and is read from, the `input` stream. + * @since v17.0.0 + */ + class Interface extends _Interface { + /** + * The `rl.question()` method displays the `query` by writing it to the `output`, + * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. + * + * When called, `rl.question()` will resume the `input` stream if it has been + * paused. + * + * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. + * + * If the question is called after `rl.close()`, it returns a rejected promise. + * + * Example usage: + * + * ```js + * const answer = await rl.question('What is your favorite food? '); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * + * Using an `AbortSignal` to cancel a question. + * + * ```js + * const signal = AbortSignal.timeout(10_000); + * + * signal.addEventListener('abort', () => { + * console.log('The food question timed out'); + * }, { once: true }); + * + * const answer = await rl.question('What is your favorite food? ', { signal }); + * console.log(`Oh, so your favorite food is ${answer}`); + * ``` + * @since v17.0.0 + * @param query A statement or query to write to `output`, prepended to the prompt. + * @return A promise that is fulfilled with the user's input in response to the `query`. + */ + question(query: string): Promise; + question(query: string, options: Abortable): Promise; + } + /** + * @since v17.0.0 + */ + class Readline { + /** + * @param stream A TTY stream. + */ + constructor( + stream: NodeJS.WritableStream, + options?: { + autoCommit?: boolean; + }, + ); + /** + * The `rl.clearLine()` method adds to the internal list of pending action an + * action that clears current line of the associated `stream` in a specified + * direction identified by `dir`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearLine(dir: Direction): this; + /** + * The `rl.clearScreenDown()` method adds to the internal list of pending action an + * action that clears the associated stream from the current position of the + * cursor down. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + clearScreenDown(): this; + /** + * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. + * @since v17.0.0 + */ + commit(): Promise; + /** + * The `rl.cursorTo()` method adds to the internal list of pending action an action + * that moves cursor to the specified position in the associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + cursorTo(x: number, y?: number): this; + /** + * The `rl.moveCursor()` method adds to the internal list of pending action an + * action that moves the cursor _relative_ to its current position in the + * associated `stream`. + * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. + * @since v17.0.0 + * @return this + */ + moveCursor(dx: number, dy: number): this; + /** + * The `rl.rollback` methods clears the internal list of pending actions without + * sending it to the associated `stream`. + * @since v17.0.0 + * @return this + */ + rollback(): this; + } + /** + * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. + * + * ```js + * const readlinePromises = require('node:readline/promises'); + * const rl = readlinePromises.createInterface({ + * input: process.stdin, + * output: process.stdout, + * }); + * ``` + * + * Once the `readlinePromises.Interface` instance is created, the most common case + * is to listen for the `'line'` event: + * + * ```js + * rl.on('line', (line) => { + * console.log(`Received: ${line}`); + * }); + * ``` + * + * If `terminal` is `true` for this instance then the `output` stream will get + * the best compatibility if it defines an `output.columns` property and emits + * a `'resize'` event on the `output` if or when the columns ever change + * (`process.stdout` does this automatically when it is a TTY). + * @since v17.0.0 + */ + function createInterface( + input: NodeJS.ReadableStream, + output?: NodeJS.WritableStream, + completer?: Completer | AsyncCompleter, + terminal?: boolean, + ): Interface; + function createInterface(options: ReadLineOptions): Interface; +} +declare module "node:readline/promises" { + export * from "readline/promises"; +} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts new file mode 100644 index 0000000..d7f8962 --- /dev/null +++ b/node_modules/@types/node/repl.d.ts @@ -0,0 +1,430 @@ +/** + * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation + * that is available both as a standalone program or includible in other + * applications. It can be accessed using: + * + * ```js + * const repl = require('node:repl'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/repl.js) + */ +declare module "repl" { + import { AsyncCompleter, Completer, Interface } from "node:readline"; + import { Context } from "node:vm"; + import { InspectOptions } from "node:util"; + interface ReplOptions { + /** + * The input prompt to display. + * @default "> " + */ + prompt?: string | undefined; + /** + * The `Readable` stream from which REPL input will be read. + * @default process.stdin + */ + input?: NodeJS.ReadableStream | undefined; + /** + * The `Writable` stream to which REPL output will be written. + * @default process.stdout + */ + output?: NodeJS.WritableStream | undefined; + /** + * If `true`, specifies that the output should be treated as a TTY terminal, and have + * ANSI/VT100 escape codes written to it. + * Default: checking the value of the `isTTY` property on the output stream upon + * instantiation. + */ + terminal?: boolean | undefined; + /** + * The function to be used when evaluating each given line of input. + * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can + * error with `repl.Recoverable` to indicate the input was incomplete and prompt for + * additional lines. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions + */ + eval?: REPLEval | undefined; + /** + * Defines if the repl prints output previews or not. + * @default `true` Always `false` in case `terminal` is falsy. + */ + preview?: boolean | undefined; + /** + * If `true`, specifies that the default `writer` function should include ANSI color + * styling to REPL output. If a custom `writer` function is provided then this has no + * effect. + * @default the REPL instance's `terminal` value + */ + useColors?: boolean | undefined; + /** + * If `true`, specifies that the default evaluation function will use the JavaScript + * `global` as the context as opposed to creating a new separate context for the REPL + * instance. The node CLI REPL sets this value to `true`. + * @default false + */ + useGlobal?: boolean | undefined; + /** + * If `true`, specifies that the default writer will not output the return value of a + * command if it evaluates to `undefined`. + * @default false + */ + ignoreUndefined?: boolean | undefined; + /** + * The function to invoke to format the output of each command before writing to `output`. + * @default a wrapper for `util.inspect` + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output + */ + writer?: REPLWriter | undefined; + /** + * An optional function used for custom Tab auto completion. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function + */ + completer?: Completer | AsyncCompleter | undefined; + /** + * A flag that specifies whether the default evaluator executes all JavaScript commands in + * strict mode or default (sloppy) mode. + * Accepted values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; + /** + * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is + * pressed. This cannot be used together with a custom `eval` function. + * @default false + */ + breakEvalOnSigint?: boolean | undefined; + } + type REPLEval = ( + this: REPLServer, + evalCmd: string, + context: Context, + file: string, + cb: (err: Error | null, result: any) => void, + ) => void; + type REPLWriter = (this: REPLServer, obj: any) => string; + /** + * This is the default "writer" value, if none is passed in the REPL options, + * and it can be overridden by custom print functions. + */ + const writer: REPLWriter & { + options: InspectOptions; + }; + type REPLCommandAction = (this: REPLServer, text: string) => void; + interface REPLCommand { + /** + * Help text to be displayed when `.help` is entered. + */ + help?: string | undefined; + /** + * The function to execute, optionally accepting a single string argument. + */ + action: REPLCommandAction; + } + /** + * Instances of `repl.REPLServer` are created using the {@link start} method + * or directly using the JavaScript `new` keyword. + * + * ```js + * const repl = require('node:repl'); + * + * const options = { useColors: true }; + * + * const firstInstance = repl.start(options); + * const secondInstance = new repl.REPLServer(options); + * ``` + * @since v0.1.91 + */ + class REPLServer extends Interface { + /** + * The `vm.Context` provided to the `eval` function to be used for JavaScript + * evaluation. + */ + readonly context: Context; + /** + * @deprecated since v14.3.0 - Use `input` instead. + */ + readonly inputStream: NodeJS.ReadableStream; + /** + * @deprecated since v14.3.0 - Use `output` instead. + */ + readonly outputStream: NodeJS.WritableStream; + /** + * The `Readable` stream from which REPL input will be read. + */ + readonly input: NodeJS.ReadableStream; + /** + * The `Writable` stream to which REPL output will be written. + */ + readonly output: NodeJS.WritableStream; + /** + * The commands registered via `replServer.defineCommand()`. + */ + readonly commands: NodeJS.ReadOnlyDict; + /** + * A value indicating whether the REPL is currently in "editor mode". + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys + */ + readonly editorMode: boolean; + /** + * A value indicating whether the `_` variable has been assigned. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreAssigned: boolean; + /** + * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly last: any; + /** + * A value indicating whether the `_error` variable has been assigned. + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly underscoreErrAssigned: boolean; + /** + * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). + * + * @since v9.8.0 + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable + */ + readonly lastError: any; + /** + * Specified in the REPL options, this is the function to be used when evaluating each + * given line of input. If not specified in the REPL options, this is an async wrapper + * for the JavaScript `eval()` function. + */ + readonly eval: REPLEval; + /** + * Specified in the REPL options, this is a value indicating whether the default + * `writer` function should include ANSI color styling to REPL output. + */ + readonly useColors: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `eval` + * function will use the JavaScript `global` as the context as opposed to creating a new + * separate context for the REPL instance. + */ + readonly useGlobal: boolean; + /** + * Specified in the REPL options, this is a value indicating whether the default `writer` + * function should output the result of a command if it evaluates to `undefined`. + */ + readonly ignoreUndefined: boolean; + /** + * Specified in the REPL options, this is the function to invoke to format the output of + * each command before writing to `outputStream`. If not specified in the REPL options, + * this will be a wrapper for `util.inspect`. + */ + readonly writer: REPLWriter; + /** + * Specified in the REPL options, this is the function to use for custom Tab auto-completion. + */ + readonly completer: Completer | AsyncCompleter; + /** + * Specified in the REPL options, this is a flag that specifies whether the default `eval` + * function should execute all JavaScript commands in strict mode or default (sloppy) mode. + * Possible values are: + * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. + * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to + * prefacing every repl statement with `'use strict'`. + */ + readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; + /** + * NOTE: According to the documentation: + * + * > Instances of `repl.REPLServer` are created using the `repl.start()` method and + * > _should not_ be created directly using the JavaScript `new` keyword. + * + * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver + */ + private constructor(); + /** + * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands + * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following + * properties: + * + * The following example shows two new commands added to the REPL instance: + * + * ```js + * const repl = require('node:repl'); + * + * const replServer = repl.start({ prompt: '> ' }); + * replServer.defineCommand('sayhello', { + * help: 'Say hello', + * action(name) { + * this.clearBufferedCommand(); + * console.log(`Hello, ${name}!`); + * this.displayPrompt(); + * }, + * }); + * replServer.defineCommand('saybye', function saybye() { + * console.log('Goodbye!'); + * this.close(); + * }); + * ``` + * + * The new commands can then be used from within the REPL instance: + * + * ```console + * > .sayhello Node.js User + * Hello, Node.js User! + * > .saybye + * Goodbye! + * ``` + * @since v0.3.0 + * @param keyword The command keyword (_without_ a leading `.` character). + * @param cmd The function to invoke when the command is processed. + */ + defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; + /** + * The `replServer.displayPrompt()` method readies the REPL instance for input + * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input. + * + * When multi-line input is being entered, an ellipsis is printed rather than the + * 'prompt'. + * + * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. + * + * The `replServer.displayPrompt` method is primarily intended to be called from + * within the action function for commands registered using the `replServer.defineCommand()` method. + * @since v0.1.91 + */ + displayPrompt(preserveCursor?: boolean): void; + /** + * The `replServer.clearBufferedCommand()` method clears any command that has been + * buffered but not yet executed. This method is primarily intended to be + * called from within the action function for commands registered using the`replServer.defineCommand()` method. + * @since v9.0.0 + */ + clearBufferedCommand(): void; + /** + * Initializes a history log file for the REPL instance. When executing the + * Node.js binary and using the command-line REPL, a history file is initialized + * by default. However, this is not the case when creating a REPL + * programmatically. Use this method to initialize a history log file when working + * with REPL instances programmatically. + * @since v11.10.0 + * @param historyPath the path to the history file + * @param callback called when history writes are ready or upon error + */ + setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; + /** + * events.EventEmitter + * 1. close - inherited from `readline.Interface` + * 2. line - inherited from `readline.Interface` + * 3. pause - inherited from `readline.Interface` + * 4. resume - inherited from `readline.Interface` + * 5. SIGCONT - inherited from `readline.Interface` + * 6. SIGINT - inherited from `readline.Interface` + * 7. SIGTSTP - inherited from `readline.Interface` + * 8. exit + * 9. reset + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "line", listener: (input: string) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "SIGCONT", listener: () => void): this; + addListener(event: "SIGINT", listener: () => void): this; + addListener(event: "SIGTSTP", listener: () => void): this; + addListener(event: "exit", listener: () => void): this; + addListener(event: "reset", listener: (context: Context) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "line", input: string): boolean; + emit(event: "pause"): boolean; + emit(event: "resume"): boolean; + emit(event: "SIGCONT"): boolean; + emit(event: "SIGINT"): boolean; + emit(event: "SIGTSTP"): boolean; + emit(event: "exit"): boolean; + emit(event: "reset", context: Context): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "close", listener: () => void): this; + on(event: "line", listener: (input: string) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "SIGCONT", listener: () => void): this; + on(event: "SIGINT", listener: () => void): this; + on(event: "SIGTSTP", listener: () => void): this; + on(event: "exit", listener: () => void): this; + on(event: "reset", listener: (context: Context) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "line", listener: (input: string) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "SIGCONT", listener: () => void): this; + once(event: "SIGINT", listener: () => void): this; + once(event: "SIGTSTP", listener: () => void): this; + once(event: "exit", listener: () => void): this; + once(event: "reset", listener: (context: Context) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "line", listener: (input: string) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "SIGCONT", listener: () => void): this; + prependListener(event: "SIGINT", listener: () => void): this; + prependListener(event: "SIGTSTP", listener: () => void): this; + prependListener(event: "exit", listener: () => void): this; + prependListener(event: "reset", listener: (context: Context) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "line", listener: (input: string) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "SIGCONT", listener: () => void): this; + prependOnceListener(event: "SIGINT", listener: () => void): this; + prependOnceListener(event: "SIGTSTP", listener: () => void): this; + prependOnceListener(event: "exit", listener: () => void): this; + prependOnceListener(event: "reset", listener: (context: Context) => void): this; + } + /** + * A flag passed in the REPL options. Evaluates expressions in sloppy mode. + */ + const REPL_MODE_SLOPPY: unique symbol; + /** + * A flag passed in the REPL options. Evaluates expressions in strict mode. + * This is equivalent to prefacing every repl statement with `'use strict'`. + */ + const REPL_MODE_STRICT: unique symbol; + /** + * The `repl.start()` method creates and starts a {@link REPLServer} instance. + * + * If `options` is a string, then it specifies the input prompt: + * + * ```js + * const repl = require('node:repl'); + * + * // a Unix style prompt + * repl.start('$ '); + * ``` + * @since v0.1.91 + */ + function start(options?: string | ReplOptions): REPLServer; + /** + * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. + * + * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors + */ + class Recoverable extends SyntaxError { + err: Error; + constructor(err: Error); + } +} +declare module "node:repl" { + export * from "repl"; +} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts new file mode 100644 index 0000000..6f1d1ea --- /dev/null +++ b/node_modules/@types/node/sea.d.ts @@ -0,0 +1,153 @@ +/** + * This feature allows the distribution of a Node.js application conveniently to a + * system that does not have Node.js installed. + * + * Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing + * the injection of a blob prepared by Node.js, which can contain a bundled script, + * into the `node` binary. During start up, the program checks if anything has been + * injected. If the blob is found, it executes the script in the blob. Otherwise + * Node.js operates as it normally does. + * + * The single executable application feature currently only supports running a + * single embedded script using the `CommonJS` module system. + * + * Users can create a single executable application from their bundled script + * with the `node` binary itself and any tool which can inject resources into the + * binary. + * + * Here are the steps for creating a single executable application using one such + * tool, [postject](https://github.com/nodejs/postject): + * + * 1. Create a JavaScript file: + * ```bash + * echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js + * ``` + * 2. Create a configuration file building a blob that can be injected into the + * single executable application (see `Generating single executable preparation blobs` for details): + * ```bash + * echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json + * ``` + * 3. Generate the blob to be injected: + * ```bash + * node --experimental-sea-config sea-config.json + * ``` + * 4. Create a copy of the `node` executable and name it according to your needs: + * * On systems other than Windows: + * ```bash + * cp $(command -v node) hello + * ``` + * * On Windows: + * ```text + * node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')" + * ``` + * The `.exe` extension is necessary. + * 5. Remove the signature of the binary (macOS and Windows only): + * * On macOS: + * ```bash + * codesign --remove-signature hello + * ``` + * * On Windows (optional): + * [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). + * If this step is + * skipped, ignore any signature-related warning from postject. + * ```powershell + * signtool remove /s hello.exe + * ``` + * 6. Inject the blob into the copied binary by running `postject` with + * the following options: + * * `hello` / `hello.exe` \- The name of the copy of the `node` executable + * created in step 4. + * * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary + * where the contents of the blob will be stored. + * * `sea-prep.blob` \- The name of the blob created in step 1. + * * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been + * injected. + * * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the + * segment in the binary where the contents of the blob will be + * stored. + * To summarize, here is the required command for each platform: + * * On Linux: + * ```bash + * npx postject hello NODE_SEA_BLOB sea-prep.blob \ + * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 + * ``` + * * On Windows - PowerShell: + * ```powershell + * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ` + * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 + * ``` + * * On Windows - Command Prompt: + * ```text + * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^ + * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 + * ``` + * * On macOS: + * ```bash + * npx postject hello NODE_SEA_BLOB sea-prep.blob \ + * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ + * --macho-segment-name NODE_SEA + * ``` + * 7. Sign the binary (macOS and Windows only): + * * On macOS: + * ```bash + * codesign --sign - hello + * ``` + * * On Windows (optional): + * A certificate needs to be present for this to work. However, the unsigned + * binary would still be runnable. + * ```powershell + * signtool sign /fd SHA256 hello.exe + * ``` + * 8. Run the binary: + * * On systems other than Windows + * ```console + * $ ./hello world + * Hello, world! + * ``` + * * On Windows + * ```console + * $ .\hello.exe world + * Hello, world! + * ``` + * @since v19.7.0, v18.16.0 + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v20.12.0/src/node_sea.cc) + */ +declare module "node:sea" { + type AssetKey = string; + /** + * @since v20.12.0 + * @return Whether this script is running inside a single-executable application. + */ + function isSea(): boolean; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAsset(key: AssetKey): ArrayBuffer; + function getAsset(key: AssetKey, encoding: string): string; + /** + * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). + * An error is thrown when no matching asset can be found. + * @since v20.12.0 + */ + function getAssetAsBlob(key: AssetKey, options?: { + type: string; + }): Blob; + /** + * This method can be used to retrieve the assets configured to be bundled into the + * single-executable application at build time. + * An error is thrown when no matching asset can be found. + * + * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not + * return a copy. Instead, it returns the raw asset bundled inside the executable. + * + * For now, users should avoid writing to the returned array buffer. If the + * injected section is not marked as writable or not aligned properly, + * writes to the returned array buffer is likely to result in a crash. + * @since v20.12.0 + */ + function getRawAsset(key: AssetKey): string | ArrayBuffer; +} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts new file mode 100644 index 0000000..b82b2f0 --- /dev/null +++ b/node_modules/@types/node/stream.d.ts @@ -0,0 +1,1707 @@ +/** + * A stream is an abstract interface for working with streaming data in Node.js. + * The `node:stream` module provides an API for implementing the stream interface. + * + * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v20.x/api/http.html#class-httpincomingmessage) + * and [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) are both stream instances. + * + * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v20.x/api/events.html#class-eventemitter). + * + * To access the `node:stream` module: + * + * ```js + * const stream = require('node:stream'); + * ``` + * + * The `node:stream` module is useful for creating new types of stream instances. + * It is usually not necessary to use the `node:stream` module to consume streams. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/stream.js) + */ +declare module "stream" { + import { Abortable, EventEmitter } from "node:events"; + import { Blob as NodeBlob } from "node:buffer"; + import * as streamPromises from "node:stream/promises"; + import * as streamConsumers from "node:stream/consumers"; + import * as streamWeb from "node:stream/web"; + + type ComposeFnParam = (source: any) => void; + + class internal extends EventEmitter { + pipe( + destination: T, + options?: { + end?: boolean | undefined; + }, + ): T; + compose( + stream: T | ComposeFnParam | Iterable | AsyncIterable, + options?: { signal: AbortSignal }, + ): T; + } + import Stream = internal.Stream; + import Readable = internal.Readable; + import ReadableOptions = internal.ReadableOptions; + interface ArrayOptions { + /** + * The maximum concurrent invocations of `fn` to call on the stream at once. + * @default 1 + */ + concurrency?: number; + /** Allows destroying the stream if the signal is aborted. */ + signal?: AbortSignal; + } + class ReadableBase extends Stream implements NodeJS.ReadableStream { + /** + * A utility method for creating Readable Streams out of iterators. + * @since v12.3.0, v10.17.0 + * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. + * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. + */ + static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; + /** + * Returns whether the stream has been read from or cancelled. + * @since v16.8.0 + */ + static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; + /** + * Returns whether the stream was destroyed or errored before emitting `'end'`. + * @since v16.8.0 + * @experimental + */ + readonly readableAborted: boolean; + /** + * Is `true` if it is safe to call {@link read}, which means + * the stream has not been destroyed or emitted `'error'` or `'end'`. + * @since v11.4.0 + */ + readable: boolean; + /** + * Returns whether `'data'` has been emitted. + * @since v16.7.0, v14.18.0 + * @experimental + */ + readonly readableDidRead: boolean; + /** + * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. + * @since v12.7.0 + */ + readonly readableEncoding: BufferEncoding | null; + /** + * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v20.x/api/stream.html#event-end) event is emitted. + * @since v12.9.0 + */ + readonly readableEnded: boolean; + /** + * This property reflects the current state of a `Readable` stream as described + * in the [Three states](https://nodejs.org/docs/latest-v20.x/api/stream.html#three-states) section. + * @since v9.4.0 + */ + readonly readableFlowing: boolean | null; + /** + * Returns the value of `highWaterMark` passed when creating this `Readable`. + * @since v9.3.0 + */ + readonly readableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be read. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly readableLength: number; + /** + * Getter for the property `objectMode` of a given `Readable` stream. + * @since v12.3.0 + */ + readonly readableObjectMode: boolean; + /** + * Is `true` after `readable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + constructor(opts?: ReadableOptions); + _construct?(callback: (error?: Error | null) => void): void; + _read(size: number): void; + /** + * The `readable.read()` method reads data out of the internal buffer and + * returns it. If no data is available to be read, `null` is returned. By default, + * the data is returned as a `Buffer` object unless an encoding has been + * specified using the `readable.setEncoding()` method or the stream is operating + * in object mode. + * + * The optional `size` argument specifies a specific number of bytes to read. If + * `size` bytes are not available to be read, `null` will be returned _unless_ the + * stream has ended, in which case all of the data remaining in the internal buffer + * will be returned. + * + * If the `size` argument is not specified, all of the data contained in the + * internal buffer will be returned. + * + * The `size` argument must be less than or equal to 1 GiB. + * + * The `readable.read()` method should only be called on `Readable` streams + * operating in paused mode. In flowing mode, `readable.read()` is called + * automatically until the internal buffer is fully drained. + * + * ```js + * const readable = getReadableStreamSomehow(); + * + * // 'readable' may be triggered multiple times as data is buffered in + * readable.on('readable', () => { + * let chunk; + * console.log('Stream is readable (new data received in buffer)'); + * // Use a loop to make sure we read all currently available data + * while (null !== (chunk = readable.read())) { + * console.log(`Read ${chunk.length} bytes of data...`); + * } + * }); + * + * // 'end' will be triggered once when there is no more data available + * readable.on('end', () => { + * console.log('Reached end of stream.'); + * }); + * ``` + * + * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks + * are not concatenated. A `while` loop is necessary to consume all data + * currently in the buffer. When reading a large file `.read()` may return `null`, + * having consumed all buffered content so far, but there is still more data to + * come not yet buffered. In this case a new `'readable'` event will be emitted + * when there is more data in the buffer. Finally the `'end'` event will be + * emitted when there is no more data to come. + * + * Therefore to read a file's whole contents from a `readable`, it is necessary + * to collect chunks across multiple `'readable'` events: + * + * ```js + * const chunks = []; + * + * readable.on('readable', () => { + * let chunk; + * while (null !== (chunk = readable.read())) { + * chunks.push(chunk); + * } + * }); + * + * readable.on('end', () => { + * const content = chunks.join(''); + * }); + * ``` + * + * A `Readable` stream in object mode will always return a single item from + * a call to `readable.read(size)`, regardless of the value of the `size` argument. + * + * If the `readable.read()` method returns a chunk of data, a `'data'` event will + * also be emitted. + * + * Calling {@link read} after the `'end'` event has + * been emitted will return `null`. No runtime error will be raised. + * @since v0.9.4 + * @param size Optional argument to specify how much data to read. + */ + read(size?: number): any; + /** + * The `readable.setEncoding()` method sets the character encoding for + * data read from the `Readable` stream. + * + * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data + * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the + * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal + * string format. + * + * The `Readable` stream will properly handle multi-byte characters delivered + * through the stream that would otherwise become improperly decoded if simply + * pulled from the stream as `Buffer` objects. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.setEncoding('utf8'); + * readable.on('data', (chunk) => { + * assert.equal(typeof chunk, 'string'); + * console.log('Got %d characters of string data:', chunk.length); + * }); + * ``` + * @since v0.9.4 + * @param encoding The encoding to use. + */ + setEncoding(encoding: BufferEncoding): this; + /** + * The `readable.pause()` method will cause a stream in flowing mode to stop + * emitting `'data'` events, switching out of flowing mode. Any data that + * becomes available will remain in the internal buffer. + * + * ```js + * const readable = getReadableStreamSomehow(); + * readable.on('data', (chunk) => { + * console.log(`Received ${chunk.length} bytes of data.`); + * readable.pause(); + * console.log('There will be no additional data for 1 second.'); + * setTimeout(() => { + * console.log('Now data will start flowing again.'); + * readable.resume(); + * }, 1000); + * }); + * ``` + * + * The `readable.pause()` method has no effect if there is a `'readable'` event listener. + * @since v0.9.4 + */ + pause(): this; + /** + * The `readable.resume()` method causes an explicitly paused `Readable` stream to + * resume emitting `'data'` events, switching the stream into flowing mode. + * + * The `readable.resume()` method can be used to fully consume the data from a + * stream without actually processing any of that data: + * + * ```js + * getReadableStreamSomehow() + * .resume() + * .on('end', () => { + * console.log('Reached the end, but did not read anything.'); + * }); + * ``` + * + * The `readable.resume()` method has no effect if there is a `'readable'`event listener. + * @since v0.9.4 + */ + resume(): this; + /** + * The `readable.isPaused()` method returns the current operating state of the `Readable`. This is + * used primarily by the mechanism that underlies the `readable.pipe()` method. In most typical cases, + * there will be no reason to use this method directly. + * + * ```js + * const readable = new stream.Readable(); + * + * readable.isPaused(); // === false + * readable.pause(); + * readable.isPaused(); // === true + * readable.resume(); + * readable.isPaused(); // === false + * ``` + * @since v0.11.14 + */ + isPaused(): boolean; + /** + * The `readable.unpipe()` method detaches a `Writable` stream previously attached + * using the {@link pipe} method. + * + * If the `destination` is not specified, then _all_ pipes are detached. + * + * If the `destination` is specified, but no pipe is set up for it, then + * the method does nothing. + * + * ```js + * const fs = require('node:fs'); + * const readable = getReadableStreamSomehow(); + * const writable = fs.createWriteStream('file.txt'); + * // All the data from readable goes into 'file.txt', + * // but only for the first second. + * readable.pipe(writable); + * setTimeout(() => { + * console.log('Stop writing to file.txt.'); + * readable.unpipe(writable); + * console.log('Manually close the file stream.'); + * writable.end(); + * }, 1000); + * ``` + * @since v0.9.4 + * @param destination Optional specific stream to unpipe + */ + unpipe(destination?: NodeJS.WritableStream): this; + /** + * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the + * same as `readable.push(null)`, after which no more data can be written. The EOF + * signal is put at the end of the buffer and any buffered data will still be + * flushed. + * + * The `readable.unshift()` method pushes a chunk of data back into the internal + * buffer. This is useful in certain situations where a stream is being consumed by + * code that needs to "un-consume" some amount of data that it has optimistically + * pulled out of the source, so that the data can be passed on to some other party. + * + * The `stream.unshift(chunk)` method cannot be called after the `'end'` event + * has been emitted or a runtime error will be thrown. + * + * Developers using `stream.unshift()` often should consider switching to + * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. + * + * ```js + * // Pull off a header delimited by \n\n. + * // Use unshift() if we get too much. + * // Call the callback with (error, header, stream). + * const { StringDecoder } = require('node:string_decoder'); + * function parseHeader(stream, callback) { + * stream.on('error', callback); + * stream.on('readable', onReadable); + * const decoder = new StringDecoder('utf8'); + * let header = ''; + * function onReadable() { + * let chunk; + * while (null !== (chunk = stream.read())) { + * const str = decoder.write(chunk); + * if (str.includes('\n\n')) { + * // Found the header boundary. + * const split = str.split(/\n\n/); + * header += split.shift(); + * const remaining = split.join('\n\n'); + * const buf = Buffer.from(remaining, 'utf8'); + * stream.removeListener('error', callback); + * // Remove the 'readable' listener before unshifting. + * stream.removeListener('readable', onReadable); + * if (buf.length) + * stream.unshift(buf); + * // Now the body of the message can be read from the stream. + * callback(null, header, stream); + * return; + * } + * // Still reading the header. + * header += str; + * } + * } + * } + * ``` + * + * Unlike {@link push}, `stream.unshift(chunk)` will not + * end the reading process by resetting the internal reading state of the stream. + * This can cause unexpected results if `readable.unshift()` is called during a + * read (i.e. from within a {@link _read} implementation on a + * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, + * however it is best to simply avoid calling `readable.unshift()` while in the + * process of performing a read. + * @since v0.9.11 + * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array`, or `null`. For object mode + * streams, `chunk` may be any JavaScript value. + * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. + */ + unshift(chunk: any, encoding?: BufferEncoding): void; + /** + * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more + * information.) + * + * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` + * stream that uses + * the old stream as its data source. + * + * It will rarely be necessary to use `readable.wrap()` but the method has been + * provided as a convenience for interacting with older Node.js applications and + * libraries. + * + * ```js + * const { OldReader } = require('./old-api-module.js'); + * const { Readable } = require('node:stream'); + * const oreader = new OldReader(); + * const myReader = new Readable().wrap(oreader); + * + * myReader.on('readable', () => { + * myReader.read(); // etc. + * }); + * ``` + * @since v0.9.4 + * @param stream An "old style" readable stream + */ + wrap(stream: NodeJS.ReadableStream): this; + push(chunk: any, encoding?: BufferEncoding): boolean; + /** + * The iterator created by this method gives users the option to cancel the destruction + * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, + * or if the iterator should destroy the stream if the stream emitted an error during iteration. + * @since v16.3.0 + * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator, + * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream. + * **Default: `true`**. + */ + iterator(options?: { destroyOnReturn?: boolean }): AsyncIterableIterator; + /** + * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. + * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. + * @since v17.4.0, v16.14.0 + * @param fn a function to map over every chunk in the stream. Async or not. + * @returns a stream mapped with the function *fn*. + */ + map(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; + /** + * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called + * and if it returns a truthy value, the chunk will be passed to the result stream. + * If the *fn* function returns a promise - that promise will be `await`ed. + * @since v17.4.0, v16.14.0 + * @param fn a function to filter chunks from the stream. Async or not. + * @returns a stream filtered with the predicate *fn*. + */ + filter( + fn: (data: any, options?: Pick) => boolean | Promise, + options?: ArrayOptions, + ): Readable; + /** + * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. + * If the *fn* function returns a promise - that promise will be `await`ed. + * + * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. + * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option + * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. + * In either case the stream will be destroyed. + * + * This method is different from listening to the `'data'` event in that it uses the `readable` event + * in the underlying machinary and can limit the number of concurrent *fn* calls. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise for when the stream has finished. + */ + forEach( + fn: (data: any, options?: Pick) => void | Promise, + options?: ArrayOptions, + ): Promise; + /** + * This method allows easily obtaining the contents of a stream. + * + * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended + * for interoperability and convenience, not as the primary way to consume streams. + * @since v17.5.0 + * @returns a promise containing an array with the contents of the stream. + */ + toArray(options?: Pick): Promise; + /** + * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream + * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk + * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. + * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. + */ + some( + fn: (data: any, options?: Pick) => boolean | Promise, + options?: ArrayOptions, + ): Promise; + /** + * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream + * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, + * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. + * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, + * or `undefined` if no element was found. + */ + find( + fn: (data: any, options?: Pick) => data is T, + options?: ArrayOptions, + ): Promise; + find( + fn: (data: any, options?: Pick) => boolean | Promise, + options?: ArrayOptions, + ): Promise; + /** + * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream + * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk + * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. + * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. + * @since v17.5.0 + * @param fn a function to call on each chunk of the stream. Async or not. + * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. + */ + every( + fn: (data: any, options?: Pick) => boolean | Promise, + options?: ArrayOptions, + ): Promise; + /** + * This method returns a new stream by applying the given callback to each chunk of the stream + * and then flattening the result. + * + * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams + * will be merged (flattened) into the returned stream. + * @since v17.5.0 + * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. + * @returns a stream flat-mapped with the function *fn*. + */ + flatMap(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; + /** + * This method returns a new stream with the first *limit* chunks dropped from the start. + * @since v17.5.0 + * @param limit the number of chunks to drop from the readable. + * @returns a stream with *limit* chunks dropped from the start. + */ + drop(limit: number, options?: Pick): Readable; + /** + * This method returns a new stream with the first *limit* chunks. + * @since v17.5.0 + * @param limit the number of chunks to take from the readable. + * @returns a stream with *limit* chunks taken. + */ + take(limit: number, options?: Pick): Readable; + /** + * This method returns a new stream with chunks of the underlying stream paired with a counter + * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced. + * @since v17.5.0 + * @returns a stream of indexed pairs. + */ + asIndexedPairs(options?: Pick): Readable; + /** + * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation + * on the previous element. It returns a promise for the final value of the reduction. + * + * If no *initial* value is supplied the first chunk of the stream is used as the initial value. + * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. + * + * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter + * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. + * @since v17.5.0 + * @param fn a reducer function to call over every chunk in the stream. Async or not. + * @param initial the initial value to use in the reduction. + * @returns a promise for the final value of the reduction. + */ + reduce( + fn: (previous: any, data: any, options?: Pick) => T, + initial?: undefined, + options?: Pick, + ): Promise; + reduce( + fn: (previous: T, data: any, options?: Pick) => T, + initial: T, + options?: Pick, + ): Promise; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable + * stream will release any internal resources and subsequent calls to `push()` will be ignored. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, but instead implement `readable._destroy()`. + * @since v8.0.0 + * @param error Error which will be passed as payload in `'error'` event + */ + destroy(error?: Error): this; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. error + * 5. pause + * 6. readable + * 7. resume + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "close"): boolean; + emit(event: "data", chunk: any): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "pause"): boolean; + emit(event: "readable"): boolean; + emit(event: "resume"): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: any) => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "pause", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: any) => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "pause", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "pause", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "resume", listener: () => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + [Symbol.asyncIterator](): AsyncIterableIterator; + /** + * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. + * @since v20.4.0 + */ + [Symbol.asyncDispose](): Promise; + } + import WritableOptions = internal.WritableOptions; + class WritableBase extends Stream implements NodeJS.WritableStream { + /** + * Is `true` if it is safe to call `writable.write()`, which means + * the stream has not been destroyed, errored, or ended. + * @since v11.4.0 + */ + readonly writable: boolean; + /** + * Is `true` after `writable.end()` has been called. This property + * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. + * @since v12.9.0 + */ + readonly writableEnded: boolean; + /** + * Is set to `true` immediately before the `'finish'` event is emitted. + * @since v12.6.0 + */ + readonly writableFinished: boolean; + /** + * Return the value of `highWaterMark` passed when creating this `Writable`. + * @since v9.3.0 + */ + readonly writableHighWaterMark: number; + /** + * This property contains the number of bytes (or objects) in the queue + * ready to be written. The value provides introspection data regarding + * the status of the `highWaterMark`. + * @since v9.4.0 + */ + readonly writableLength: number; + /** + * Getter for the property `objectMode` of a given `Writable` stream. + * @since v12.3.0 + */ + readonly writableObjectMode: boolean; + /** + * Number of times `writable.uncork()` needs to be + * called in order to fully uncork the stream. + * @since v13.2.0, v12.16.0 + */ + readonly writableCorked: number; + /** + * Is `true` after `writable.destroy()` has been called. + * @since v8.0.0 + */ + destroyed: boolean; + /** + * Is `true` after `'close'` has been emitted. + * @since v18.0.0 + */ + readonly closed: boolean; + /** + * Returns error if the stream has been destroyed with an error. + * @since v18.0.0 + */ + readonly errored: Error | null; + /** + * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. + * @since v15.2.0, v14.17.0 + */ + readonly writableNeedDrain: boolean; + constructor(opts?: WritableOptions); + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void, + ): void; + _construct?(callback: (error?: Error | null) => void): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + /** + * The `writable.write()` method writes some data to the stream, and calls the + * supplied `callback` once the data has been fully handled. If an error + * occurs, the `callback` will be called with the error as its + * first argument. The `callback` is called asynchronously and before `'error'` is + * emitted. + * + * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. + * If `false` is returned, further attempts to write data to the stream should + * stop until the `'drain'` event is emitted. + * + * While a stream is not draining, calls to `write()` will buffer `chunk`, and + * return false. Once all currently buffered chunks are drained (accepted for + * delivery by the operating system), the `'drain'` event will be emitted. + * Once `write()` returns false, do not write more chunks + * until the `'drain'` event is emitted. While calling `write()` on a stream that + * is not draining is allowed, Node.js will buffer all written chunks until + * maximum memory usage occurs, at which point it will abort unconditionally. + * Even before it aborts, high memory usage will cause poor garbage collector + * performance and high RSS (which is not typically released back to the system, + * even after the memory is no longer required). Since TCP sockets may never + * drain if the remote peer does not read the data, writing a socket that is + * not draining may lead to a remotely exploitable vulnerability. + * + * Writing data while the stream is not draining is particularly + * problematic for a `Transform`, because the `Transform` streams are paused + * by default until they are piped or a `'data'` or `'readable'` event handler + * is added. + * + * If the data to be written can be generated or fetched on demand, it is + * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is + * possible to respect backpressure and avoid memory issues using the `'drain'` event: + * + * ```js + * function write(data, cb) { + * if (!stream.write(data)) { + * stream.once('drain', cb); + * } else { + * process.nextTick(cb); + * } + * } + * + * // Wait for cb to be called before doing any other write. + * write('hello', () => { + * console.log('Write completed, do more writes now.'); + * }); + * ``` + * + * A `Writable` stream in object mode will always ignore the `encoding` argument. + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param [encoding='utf8'] The encoding, if `chunk` is a string. + * @param callback Callback for when this chunk of data is flushed. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; + /** + * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. + * @since v0.11.15 + * @param encoding The new default encoding + */ + setDefaultEncoding(encoding: BufferEncoding): this; + /** + * Calling the `writable.end()` method signals that no more data will be written + * to the `Writable`. The optional `chunk` and `encoding` arguments allow one + * final additional chunk of data to be written immediately before closing the + * stream. + * + * Calling the {@link write} method after calling {@link end} will raise an error. + * + * ```js + * // Write 'hello, ' and then end with 'world!'. + * const fs = require('node:fs'); + * const file = fs.createWriteStream('example.txt'); + * file.write('hello, '); + * file.end('world!'); + * // Writing more now is not allowed! + * ``` + * @since v0.9.4 + * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any + * JavaScript value other than `null`. + * @param encoding The encoding if `chunk` is a string + * @param callback Callback for when the stream is finished. + */ + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; + /** + * The `writable.cork()` method forces all written data to be buffered in memory. + * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. + * + * The primary intent of `writable.cork()` is to accommodate a situation in which + * several small chunks are written to the stream in rapid succession. Instead of + * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them + * all to `writable._writev()`, if present. This prevents a head-of-line blocking + * situation where data is being buffered while waiting for the first small chunk + * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. + * + * See also: `writable.uncork()`, `writable._writev()`. + * @since v0.11.2 + */ + cork(): void; + /** + * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. + * + * When using `writable.cork()` and `writable.uncork()` to manage the buffering + * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event + * loop phase. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.write('data '); + * process.nextTick(() => stream.uncork()); + * ``` + * + * If the `writable.cork()` method is called multiple times on a stream, the + * same number of calls to `writable.uncork()` must be called to flush the buffered + * data. + * + * ```js + * stream.cork(); + * stream.write('some '); + * stream.cork(); + * stream.write('data '); + * process.nextTick(() => { + * stream.uncork(); + * // The data will not be flushed until uncork() is called a second time. + * stream.uncork(); + * }); + * ``` + * + * See also: `writable.cork()`. + * @since v0.11.2 + */ + uncork(): void; + /** + * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable + * stream has ended and subsequent calls to `write()` or `end()` will result in + * an `ERR_STREAM_DESTROYED` error. + * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. + * Use `end()` instead of destroy if data should flush before close, or wait for + * the `'drain'` event before destroying the stream. + * + * Once `destroy()` has been called any further calls will be a no-op and no + * further errors except from `_destroy()` may be emitted as `'error'`. + * + * Implementors should not override this method, + * but instead implement `writable._destroy()`. + * @since v8.0.0 + * @param error Optional, an error to emit with `'error'` event. + */ + destroy(error?: Error): this; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "close"): boolean; + emit(event: "drain"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + namespace internal { + class Stream extends internal { + constructor(opts?: ReadableOptions); + } + interface StreamOptions extends Abortable { + emitClose?: boolean | undefined; + highWaterMark?: number | undefined; + objectMode?: boolean | undefined; + construct?(this: T, callback: (error?: Error | null) => void): void; + destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void; + autoDestroy?: boolean | undefined; + } + interface ReadableOptions extends StreamOptions { + encoding?: BufferEncoding | undefined; + read?(this: Readable, size: number): void; + } + /** + * @since v0.9.4 + */ + class Readable extends ReadableBase { + /** + * A utility method for creating a `Readable` from a web `ReadableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb( + readableStream: streamWeb.ReadableStream, + options?: Pick, + ): Readable; + /** + * A utility method for creating a web `ReadableStream` from a `Readable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamReadable: Readable): streamWeb.ReadableStream; + } + interface WritableOptions extends StreamOptions { + decodeStrings?: boolean | undefined; + defaultEncoding?: BufferEncoding | undefined; + write?( + this: Writable, + chunk: any, + encoding: BufferEncoding, + callback: (error?: Error | null) => void, + ): void; + writev?( + this: Writable, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void, + ): void; + final?(this: Writable, callback: (error?: Error | null) => void): void; + } + /** + * @since v0.9.4 + */ + class Writable extends WritableBase { + /** + * A utility method for creating a `Writable` from a web `WritableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb( + writableStream: streamWeb.WritableStream, + options?: Pick, + ): Writable; + /** + * A utility method for creating a web `WritableStream` from a `Writable`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamWritable: Writable): streamWeb.WritableStream; + } + interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean | undefined; + readableObjectMode?: boolean | undefined; + writableObjectMode?: boolean | undefined; + readableHighWaterMark?: number | undefined; + writableHighWaterMark?: number | undefined; + writableCorked?: number | undefined; + construct?(this: Duplex, callback: (error?: Error | null) => void): void; + read?(this: Duplex, size: number): void; + write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + writev?( + this: Duplex, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void, + ): void; + final?(this: Duplex, callback: (error?: Error | null) => void): void; + destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void; + } + /** + * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Duplex` streams include: + * + * * `TCP sockets` + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Duplex extends ReadableBase implements WritableBase { + readonly writable: boolean; + readonly writableEnded: boolean; + readonly writableFinished: boolean; + readonly writableHighWaterMark: number; + readonly writableLength: number; + readonly writableObjectMode: boolean; + readonly writableCorked: number; + readonly writableNeedDrain: boolean; + readonly closed: boolean; + readonly errored: Error | null; + /** + * If `false` then the stream will automatically end the writable side when the + * readable side ends. Set initially by the `allowHalfOpen` constructor option, + * which defaults to `true`. + * + * This can be changed manually to change the half-open behavior of an existing + * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. + * @since v0.9.4 + */ + allowHalfOpen: boolean; + constructor(opts?: DuplexOptions); + /** + * A utility method for creating duplex streams. + * + * - `Stream` converts writable stream into writable `Duplex` and readable stream + * to `Duplex`. + * - `Blob` converts into readable `Duplex`. + * - `string` converts into readable `Duplex`. + * - `ArrayBuffer` converts into readable `Duplex`. + * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. + * - `AsyncGeneratorFunction` converts into a readable/writable transform + * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield + * `null`. + * - `AsyncFunction` converts into a writable `Duplex`. Must return + * either `null` or `undefined` + * - `Object ({ writable, readable })` converts `readable` and + * `writable` into `Stream` and then combines them into `Duplex` where the + * `Duplex` will write to the `writable` and read from the `readable`. + * - `Promise` converts into readable `Duplex`. Value `null` is ignored. + * + * @since v16.8.0 + */ + static from( + src: + | Stream + | NodeBlob + | ArrayBuffer + | string + | Iterable + | AsyncIterable + | AsyncGeneratorFunction + | Promise + | Object, + ): Duplex; + _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; + _writev?( + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void, + ): void; + _destroy(error: Error | null, callback: (error?: Error | null) => void): void; + _final(callback: (error?: Error | null) => void): void; + write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean; + write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; + setDefaultEncoding(encoding: BufferEncoding): this; + end(cb?: () => void): this; + end(chunk: any, cb?: () => void): this; + end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this; + cork(): void; + uncork(): void; + /** + * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. + * @since v17.0.0 + * @experimental + */ + static toWeb(streamDuplex: Duplex): { + readable: streamWeb.ReadableStream; + writable: streamWeb.WritableStream; + }; + /** + * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. + * @since v17.0.0 + * @experimental + */ + static fromWeb( + duplexStream: { + readable: streamWeb.ReadableStream; + writable: streamWeb.WritableStream; + }, + options?: Pick< + DuplexOptions, + "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" + >, + ): Duplex; + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. drain + * 4. end + * 5. error + * 6. finish + * 7. pause + * 8. pipe + * 9. readable + * 10. resume + * 11. unpipe + */ + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: any) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pause", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "resume", listener: () => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + emit(event: "close"): boolean; + emit(event: "data", chunk: any): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pause"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "readable"): boolean; + emit(event: "resume"): boolean; + emit(event: "unpipe", src: Readable): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: any) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pause", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "readable", listener: () => void): this; + on(event: "resume", listener: () => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + on(event: string | symbol, listener: (...args: any[]) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: any) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pause", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "readable", listener: () => void): this; + once(event: "resume", listener: () => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + once(event: string | symbol, listener: (...args: any[]) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: any) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pause", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "resume", listener: () => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: any) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pause", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "resume", listener: () => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: any) => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pause", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "resume", listener: () => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + } + type TransformCallback = (error?: Error | null, data?: any) => void; + interface TransformOptions extends DuplexOptions { + construct?(this: Transform, callback: (error?: Error | null) => void): void; + read?(this: Transform, size: number): void; + write?( + this: Transform, + chunk: any, + encoding: BufferEncoding, + callback: (error?: Error | null) => void, + ): void; + writev?( + this: Transform, + chunks: Array<{ + chunk: any; + encoding: BufferEncoding; + }>, + callback: (error?: Error | null) => void, + ): void; + final?(this: Transform, callback: (error?: Error | null) => void): void; + destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void; + transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + flush?(this: Transform, callback: TransformCallback): void; + } + /** + * Transform streams are `Duplex` streams where the output is in some way + * related to the input. Like all `Duplex` streams, `Transform` streams + * implement both the `Readable` and `Writable` interfaces. + * + * Examples of `Transform` streams include: + * + * * `zlib streams` + * * `crypto streams` + * @since v0.9.4 + */ + class Transform extends Duplex { + constructor(opts?: TransformOptions); + _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; + _flush(callback: TransformCallback): void; + } + /** + * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is + * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. + */ + class PassThrough extends Transform {} + /** + * A stream to attach a signal to. + * + * Attaches an AbortSignal to a readable or writeable stream. This lets code + * control stream destruction using an `AbortController`. + * + * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as + * calling `.destroy(new AbortError())` on the stream, and `controller.error(new AbortError())` for webstreams. + * + * ```js + * const fs = require('node:fs'); + * + * const controller = new AbortController(); + * const read = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * // Later, abort the operation closing the stream + * controller.abort(); + * ``` + * + * Or using an `AbortSignal` with a readable stream as an async iterable: + * + * ```js + * const controller = new AbortController(); + * setTimeout(() => controller.abort(), 10_000); // set a timeout + * const stream = addAbortSignal( + * controller.signal, + * fs.createReadStream(('object.json')), + * ); + * (async () => { + * try { + * for await (const chunk of stream) { + * await process(chunk); + * } + * } catch (e) { + * if (e.name === 'AbortError') { + * // The operation was cancelled + * } else { + * throw e; + * } + * } + * })(); + * ``` + * + * Or using an `AbortSignal` with a ReadableStream: + * + * ```js + * const controller = new AbortController(); + * const rs = new ReadableStream({ + * start(controller) { + * controller.enqueue('hello'); + * controller.enqueue('world'); + * controller.close(); + * }, + * }); + * + * addAbortSignal(controller.signal, rs); + * + * finished(rs, (err) => { + * if (err) { + * if (err.name === 'AbortError') { + * // The operation was cancelled + * } + * } + * }); + * + * const reader = rs.getReader(); + * + * reader.read().then(({ value, done }) => { + * console.log(value); // hello + * console.log(done); // false + * controller.abort(); + * }); + * ``` + * @since v15.4.0 + * @param signal A signal representing possible cancellation + * @param stream A stream to attach a signal to. + */ + function addAbortSignal(signal: AbortSignal, stream: T): T; + /** + * Returns the default highWaterMark used by streams. + * Defaults to `16384` (16 KiB), or `16` for `objectMode`. + * @since v19.9.0 + */ + function getDefaultHighWaterMark(objectMode: boolean): number; + /** + * Sets the default highWaterMark used by streams. + * @since v19.9.0 + * @param value highWaterMark value + */ + function setDefaultHighWaterMark(objectMode: boolean, value: number): void; + interface FinishedOptions extends Abortable { + error?: boolean | undefined; + readable?: boolean | undefined; + writable?: boolean | undefined; + } + /** + * A readable and/or writable stream/webstream. + * + * A function to get notified when a stream is no longer readable, writable + * or has experienced an error or a premature close event. + * + * ```js + * const { finished } = require('node:stream'); + * const fs = require('node:fs'); + * + * const rs = fs.createReadStream('archive.tar'); + * + * finished(rs, (err) => { + * if (err) { + * console.error('Stream failed.', err); + * } else { + * console.log('Stream is done reading.'); + * } + * }); + * + * rs.resume(); // Drain the stream. + * ``` + * + * Especially useful in error handling scenarios where a stream is destroyed + * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. + * + * The `finished` API provides [promise version](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamfinishedstream-options). + * + * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been + * invoked. The reason for this is so that unexpected `'error'` events (due to + * incorrect stream implementations) do not cause unexpected crashes. + * If this is unwanted behavior then the returned cleanup function needs to be + * invoked in the callback: + * + * ```js + * const cleanup = finished(rs, (err) => { + * cleanup(); + * // ... + * }); + * ``` + * @since v10.0.0 + * @param stream A readable and/or writable stream. + * @param callback A callback function that takes an optional error argument. + * @returns A cleanup function which removes all registered listeners. + */ + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, + options: FinishedOptions, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, + callback: (err?: NodeJS.ErrnoException | null) => void, + ): () => void; + namespace finished { + function __promisify__( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, + options?: FinishedOptions, + ): Promise; + } + type PipelineSourceFunction = () => Iterable | AsyncIterable; + type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; + type PipelineTransform, U> = + | NodeJS.ReadWriteStream + | (( + source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable + : S, + ) => AsyncIterable); + type PipelineTransformSource = PipelineSource | PipelineTransform; + type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; + type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

; + type PipelineDestination, P> = S extends + PipelineTransformSource ? + | NodeJS.WritableStream + | PipelineDestinationIterableFunction + | PipelineDestinationPromiseFunction + : never; + type PipelineCallback> = S extends + PipelineDestinationPromiseFunction ? (err: NodeJS.ErrnoException | null, value: P) => void + : (err: NodeJS.ErrnoException | null) => void; + type PipelinePromise> = S extends + PipelineDestinationPromiseFunction ? Promise

: Promise; + interface PipelineOptions { + signal?: AbortSignal | undefined; + end?: boolean | undefined; + } + /** + * A module method to pipe between streams and generators forwarding errors and + * properly cleaning up and provide a callback when the pipeline is complete. + * + * ```js + * const { pipeline } = require('node:stream'); + * const fs = require('node:fs'); + * const zlib = require('node:zlib'); + * + * // Use the pipeline API to easily pipe a series of streams + * // together and get notified when the pipeline is fully done. + * + * // A pipeline to gzip a potentially huge tar file efficiently: + * + * pipeline( + * fs.createReadStream('archive.tar'), + * zlib.createGzip(), + * fs.createWriteStream('archive.tar.gz'), + * (err) => { + * if (err) { + * console.error('Pipeline failed.', err); + * } else { + * console.log('Pipeline succeeded.'); + * } + * }, + * ); + * ``` + * + * The `pipeline` API provides a [promise version](https://nodejs.org/docs/latest-v20.x/api/stream.html#streampipelinesource-transforms-destination-options). + * + * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: + * + * * `Readable` streams which have emitted `'end'` or `'close'`. + * * `Writable` streams which have emitted `'finish'` or `'close'`. + * + * `stream.pipeline()` leaves dangling event listeners on the streams + * after the `callback` has been invoked. In the case of reuse of streams after + * failure, this can cause event listener leaks and swallowed errors. If the last + * stream is readable, dangling event listeners will be removed so that the last + * stream can be consumed later. + * + * `stream.pipeline()` closes all the streams when an error is raised. + * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior + * once it would destroy the socket without sending the expected response. + * See the example below: + * + * ```js + * const fs = require('node:fs'); + * const http = require('node:http'); + * const { pipeline } = require('node:stream'); + * + * const server = http.createServer((req, res) => { + * const fileStream = fs.createReadStream('./fileNotExist.txt'); + * pipeline(fileStream, res, (err) => { + * if (err) { + * console.log(err); // No such file + * // this message can't be sent once `pipeline` already destroyed the socket + * return res.end('error!!!'); + * } + * }); + * }); + * ``` + * @since v10.0.0 + * @param callback Called when the pipeline is fully done. + */ + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + callback: PipelineCallback, + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + callback: PipelineCallback, + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + callback: PipelineCallback, + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + callback: PipelineCallback, + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + callback: PipelineCallback, + ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; + function pipeline( + streams: ReadonlyArray, + callback: (err: NodeJS.ErrnoException | null) => void, + ): NodeJS.WritableStream; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array< + NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void) + > + ): NodeJS.WritableStream; + namespace pipeline { + function __promisify__, B extends PipelineDestination>( + source: A, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function __promisify__< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function __promisify__( + streams: ReadonlyArray, + options?: PipelineOptions, + ): Promise; + function __promisify__( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; + } + interface Pipe { + close(): void; + hasRef(): boolean; + ref(): void; + unref(): void; + } + /** + * Returns whether the stream has encountered an error. + * @since v17.3.0, v16.14.0 + * @experimental + */ + function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; + /** + * Returns whether the stream is readable. + * @since v17.4.0, v16.14.0 + * @experimental + */ + function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; + const promises: typeof streamPromises; + const consumers: typeof streamConsumers; + } + export = internal; +} +declare module "node:stream" { + import stream = require("stream"); + export = stream; +} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts new file mode 100644 index 0000000..5ad9cba --- /dev/null +++ b/node_modules/@types/node/stream/consumers.d.ts @@ -0,0 +1,12 @@ +declare module "stream/consumers" { + import { Blob as NodeBlob } from "node:buffer"; + import { Readable } from "node:stream"; + function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; + function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; + function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; + function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; + function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable): Promise; +} +declare module "node:stream/consumers" { + export * from "stream/consumers"; +} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts new file mode 100644 index 0000000..6eac5b7 --- /dev/null +++ b/node_modules/@types/node/stream/promises.d.ts @@ -0,0 +1,83 @@ +declare module "stream/promises" { + import { + FinishedOptions, + PipelineDestination, + PipelineOptions, + PipelinePromise, + PipelineSource, + PipelineTransform, + } from "node:stream"; + function finished( + stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, + options?: FinishedOptions, + ): Promise; + function pipeline, B extends PipelineDestination>( + source: A, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function pipeline< + A extends PipelineSource, + T1 extends PipelineTransform, + T2 extends PipelineTransform, + T3 extends PipelineTransform, + T4 extends PipelineTransform, + B extends PipelineDestination, + >( + source: A, + transform1: T1, + transform2: T2, + transform3: T3, + transform4: T4, + destination: B, + options?: PipelineOptions, + ): PipelinePromise; + function pipeline( + streams: ReadonlyArray, + options?: PipelineOptions, + ): Promise; + function pipeline( + stream1: NodeJS.ReadableStream, + stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, + ...streams: Array + ): Promise; +} +declare module "node:stream/promises" { + export * from "stream/promises"; +} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts new file mode 100644 index 0000000..8dd0ded --- /dev/null +++ b/node_modules/@types/node/stream/web.d.ts @@ -0,0 +1,367 @@ +declare module "stream/web" { + // stub module, pending copy&paste from .d.ts or manual impl + // copy from lib.dom.d.ts + interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream + * through a transform stream (or any other { writable, readable } + * pair). It simply pipes the stream into the writable side of the + * supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + */ + writable: WritableStream; + } + interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. + * The way in which the piping process behaves under various error + * conditions can be customized with a number of passed options. It + * returns a promise that fulfills when the piping process completes + * successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing + * any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate + * as follows: + * + * An error in this source readable stream will abort destination, + * unless preventAbort is truthy. The returned promise will be rejected + * with the source's error, or with any error that occurs during + * aborting the destination. + * + * An error in destination will cancel this source readable stream, + * unless preventCancel is truthy. The returned promise will be rejected + * with the destination's error, or with any error that occurs during + * canceling the source. + * + * When this source readable stream closes, destination will be closed, + * unless preventClose is truthy. The returned promise will be fulfilled + * once this process completes, unless an error is encountered while + * closing the destination, in which case it will be rejected with that + * error. + * + * If destination starts out closed or closing, this source readable + * stream will be canceled, unless preventCancel is true. The returned + * promise will be rejected with an error indicating piping to a closed + * stream failed, or with any error that occurs during canceling the + * source. + * + * The signal option can be set to an AbortSignal to allow aborting an + * ongoing pipe operation via the corresponding AbortController. In this + * case, this source readable stream will be canceled, and destination + * aborted, unless the respective options preventCancel or preventAbort + * are set. + */ + preventClose?: boolean; + signal?: AbortSignal; + } + interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; + } + interface ReadableStreamDefaultReadValueResult { + done: false; + value: T; + } + interface ReadableStreamDefaultReadDoneResult { + done: true; + value?: undefined; + } + type ReadableStreamController = ReadableStreamDefaultController; + type ReadableStreamDefaultReadResult = + | ReadableStreamDefaultReadValueResult + | ReadableStreamDefaultReadDoneResult; + interface ReadableStreamReadValueResult { + done: false; + value: T; + } + interface ReadableStreamReadDoneResult { + done: true; + value?: T; + } + type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; + interface ReadableByteStreamControllerCallback { + (controller: ReadableByteStreamController): void | PromiseLike; + } + interface UnderlyingSinkAbortCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSinkCloseCallback { + (): void | PromiseLike; + } + interface UnderlyingSinkStartCallback { + (controller: WritableStreamDefaultController): any; + } + interface UnderlyingSinkWriteCallback { + (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; + } + interface UnderlyingSourceCancelCallback { + (reason?: any): void | PromiseLike; + } + interface UnderlyingSourcePullCallback { + (controller: ReadableStreamController): void | PromiseLike; + } + interface UnderlyingSourceStartCallback { + (controller: ReadableStreamController): any; + } + interface TransformerFlushCallback { + (controller: TransformStreamDefaultController): void | PromiseLike; + } + interface TransformerStartCallback { + (controller: TransformStreamDefaultController): any; + } + interface TransformerTransformCallback { + (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; + } + interface UnderlyingByteSource { + autoAllocateChunkSize?: number; + cancel?: ReadableStreamErrorCallback; + pull?: ReadableByteStreamControllerCallback; + start?: ReadableByteStreamControllerCallback; + type: "bytes"; + } + interface UnderlyingSource { + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; + type?: undefined; + } + interface UnderlyingSink { + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; + type?: undefined; + write?: UnderlyingSinkWriteCallback; + } + interface ReadableStreamErrorCallback { + (reason: any): void | PromiseLike; + } + /** This Streams API interface represents a readable stream of byte data. */ + interface ReadableStream { + readonly locked: boolean; + cancel(reason?: any): Promise; + getReader(): ReadableStreamDefaultReader; + getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + tee(): [ReadableStream, ReadableStream]; + values(options?: { preventCancel?: boolean }): AsyncIterableIterator; + [Symbol.asyncIterator](): AsyncIterableIterator; + } + const ReadableStream: { + prototype: ReadableStream; + from(iterable: Iterable | AsyncIterable): ReadableStream; + new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; + new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; + }; + interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; + } + interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { + read(view: T): Promise>; + releaseLock(): void; + } + const ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; + }; + const ReadableStreamBYOBReader: any; + const ReadableStreamBYOBRequest: any; + interface ReadableByteStreamController { + readonly byobRequest: undefined; + readonly desiredSize: number | null; + close(): void; + enqueue(chunk: ArrayBufferView): void; + error(error?: any): void; + } + const ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; + }; + interface ReadableStreamDefaultController { + readonly desiredSize: number | null; + close(): void; + enqueue(chunk?: R): void; + error(e?: any): void; + } + const ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; + }; + interface Transformer { + flush?: TransformerFlushCallback; + readableType?: undefined; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; + writableType?: undefined; + } + interface TransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const TransformStream: { + prototype: TransformStream; + new( + transformer?: Transformer, + writableStrategy?: QueuingStrategy, + readableStrategy?: QueuingStrategy, + ): TransformStream; + }; + interface TransformStreamDefaultController { + readonly desiredSize: number | null; + enqueue(chunk?: O): void; + error(reason?: any): void; + terminate(): void; + } + const TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; + }; + /** + * This Streams API interface provides a standard abstraction for writing + * streaming data to a destination, known as a sink. This object comes with + * built-in back pressure and queuing. + */ + interface WritableStream { + readonly locked: boolean; + abort(reason?: any): Promise; + close(): Promise; + getWriter(): WritableStreamDefaultWriter; + } + const WritableStream: { + prototype: WritableStream; + new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; + }; + /** + * This Streams API interface is the object returned by + * WritableStream.getWriter() and once created locks the < writer to the + * WritableStream ensuring that no other streams can write to the underlying + * sink. + */ + interface WritableStreamDefaultWriter { + readonly closed: Promise; + readonly desiredSize: number | null; + readonly ready: Promise; + abort(reason?: any): Promise; + close(): Promise; + releaseLock(): void; + write(chunk?: W): Promise; + } + const WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(stream: WritableStream): WritableStreamDefaultWriter; + }; + /** + * This Streams API interface represents a controller allowing control of a + * WritableStream's state. When constructing a WritableStream, the + * underlying sink is given a corresponding WritableStreamDefaultController + * instance to manipulate. + */ + interface WritableStreamDefaultController { + error(e?: any): void; + } + const WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; + }; + interface QueuingStrategy { + highWaterMark?: number; + size?: QueuingStrategySize; + } + interface QueuingStrategySize { + (chunk?: T): number; + } + interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water + * mark. + * + * Note that the provided high water mark will not be validated ahead of + * time. Instead, if it is negative, NaN, or not a number, the resulting + * ByteLengthQueuingStrategy will cause the corresponding stream + * constructor to throw. + */ + highWaterMark: number; + } + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface ByteLengthQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const ByteLengthQueuingStrategy: { + prototype: ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; + }; + /** + * This Streams API interface provides a built-in byte length queuing + * strategy that can be used when constructing streams. + */ + interface CountQueuingStrategy extends QueuingStrategy { + readonly highWaterMark: number; + readonly size: QueuingStrategySize; + } + const CountQueuingStrategy: { + prototype: CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; + }; + interface TextEncoderStream { + /** Returns "utf-8". */ + readonly encoding: "utf-8"; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextEncoderStream: { + prototype: TextEncoderStream; + new(): TextEncoderStream; + }; + interface TextDecoderOptions { + fatal?: boolean; + ignoreBOM?: boolean; + } + type BufferSource = ArrayBufferView | ArrayBuffer; + interface TextDecoderStream { + /** Returns encoding's name, lower cased. */ + readonly encoding: string; + /** Returns `true` if error mode is "fatal", and `false` otherwise. */ + readonly fatal: boolean; + /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ + readonly ignoreBOM: boolean; + readonly readable: ReadableStream; + readonly writable: WritableStream; + readonly [Symbol.toStringTag]: string; + } + const TextDecoderStream: { + prototype: TextDecoderStream; + new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream; + }; + interface CompressionStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const CompressionStream: { + prototype: CompressionStream; + new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream; + }; + interface DecompressionStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; + } + const DecompressionStream: { + prototype: DecompressionStream; + new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream; + }; +} +declare module "node:stream/web" { + export * from "stream/web"; +} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts new file mode 100644 index 0000000..a8952a9 --- /dev/null +++ b/node_modules/@types/node/string_decoder.d.ts @@ -0,0 +1,67 @@ +/** + * The `node:string_decoder` module provides an API for decoding `Buffer` objects + * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 + * characters. It can be accessed using: + * + * ```js + * const { StringDecoder } = require('node:string_decoder'); + * ``` + * + * The following example shows the basic use of the `StringDecoder` class. + * + * ```js + * const { StringDecoder } = require('node:string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * const cent = Buffer.from([0xC2, 0xA2]); + * console.log(decoder.write(cent)); // Prints: ¢ + * + * const euro = Buffer.from([0xE2, 0x82, 0xAC]); + * console.log(decoder.write(euro)); // Prints: € + * ``` + * + * When a `Buffer` instance is written to the `StringDecoder` instance, an + * internal buffer is used to ensure that the decoded string does not contain + * any incomplete multibyte characters. These are held in the buffer until the + * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. + * + * In the following example, the three UTF-8 encoded bytes of the European Euro + * symbol (`€`) are written over three separate operations: + * + * ```js + * const { StringDecoder } = require('node:string_decoder'); + * const decoder = new StringDecoder('utf8'); + * + * decoder.write(Buffer.from([0xE2])); + * decoder.write(Buffer.from([0x82])); + * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/string_decoder.js) + */ +declare module "string_decoder" { + class StringDecoder { + constructor(encoding?: BufferEncoding); + /** + * Returns a decoded string, ensuring that any incomplete multibyte characters at + * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the + * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. + * @since v0.1.99 + * @param buffer The bytes to decode. + */ + write(buffer: string | Buffer | NodeJS.ArrayBufferView): string; + /** + * Returns any remaining input stored in the internal buffer as a string. Bytes + * representing incomplete UTF-8 and UTF-16 characters will be replaced with + * substitution characters appropriate for the character encoding. + * + * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. + * After `end()` is called, the `stringDecoder` object can be reused for new input. + * @since v0.9.3 + * @param buffer The bytes to decode. + */ + end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string; + } +} +declare module "node:string_decoder" { + export * from "string_decoder"; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts new file mode 100644 index 0000000..2bafdcd --- /dev/null +++ b/node_modules/@types/node/test.d.ts @@ -0,0 +1,1470 @@ +/** + * The `node:test` module facilitates the creation of JavaScript tests. + * To access it: + * + * ```js + * import test from 'node:test'; + * ``` + * + * This module is only available under the `node:` scheme. The following will not + * work: + * + * ```js + * import test from 'test'; + * ``` + * + * Tests created via the `test` module consist of a single function that is + * processed in one of three ways: + * + * 1. A synchronous function that is considered failing if it throws an exception, + * and is considered passing otherwise. + * 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills. + * 3. A function that receives a callback function. If the callback receives any + * truthy value as its first argument, the test is considered failing. If a + * falsy value is passed as the first argument to the callback, the test is + * considered passing. If the test function receives a callback function and + * also returns a `Promise`, the test will fail. + * + * The following example illustrates how tests are written using the `test` module. + * + * ```js + * test('synchronous passing test', (t) => { + * // This test passes because it does not throw an exception. + * assert.strictEqual(1, 1); + * }); + * + * test('synchronous failing test', (t) => { + * // This test fails because it throws an exception. + * assert.strictEqual(1, 2); + * }); + * + * test('asynchronous passing test', async (t) => { + * // This test passes because the Promise returned by the async + * // function is settled and not rejected. + * assert.strictEqual(1, 1); + * }); + * + * test('asynchronous failing test', async (t) => { + * // This test fails because the Promise returned by the async + * // function is rejected. + * assert.strictEqual(1, 2); + * }); + * + * test('failing test using Promises', (t) => { + * // Promises can be used directly as well. + * return new Promise((resolve, reject) => { + * setImmediate(() => { + * reject(new Error('this will cause the test to fail')); + * }); + * }); + * }); + * + * test('callback passing test', (t, done) => { + * // done() is the callback function. When the setImmediate() runs, it invokes + * // done() with no arguments. + * setImmediate(done); + * }); + * + * test('callback failing test', (t, done) => { + * // When the setImmediate() runs, done() is invoked with an Error object and + * // the test fails. + * setImmediate(() => { + * done(new Error('callback failure')); + * }); + * }); + * ``` + * + * If any tests fail, the process exit code is set to `1`. + * @since v18.0.0, v16.17.0 + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/test.js) + */ +declare module "node:test" { + import { Readable } from "node:stream"; + import { AsyncResource } from "node:async_hooks"; + /** + * **Note:** `shard` is used to horizontally parallelize test running across + * machines or processes, ideal for large-scale executions across varied + * environments. It's incompatible with `watch` mode, tailored for rapid + * code iteration by automatically rerunning tests on file changes. + * + * ```js + * import { tap } from 'node:test/reporters'; + * import { run } from 'node:test'; + * import process from 'node:process'; + * import path from 'node:path'; + * + * run({ files: [path.resolve('./tests/test.js')] }) + * .compose(tap) + * .pipe(process.stdout); + * ``` + * @since v18.9.0, v16.19.0 + * @param options Configuration options for running tests. The following properties are supported: + */ + function run(options?: RunOptions): TestsStream; + /** + * The `test()` function is the value imported from the `test` module. Each + * invocation of this function results in reporting the test to the `TestsStream`. + * + * The `TestContext` object passed to the `fn` argument can be used to perform + * actions related to the current test. Examples include skipping the test, adding + * additional diagnostic information, or creating subtests. + * + * `test()` returns a `Promise` that fulfills once the test completes. + * if `test()` is called within a `describe()` block, it fulfills immediately. + * The return value can usually be discarded for top level tests. + * However, the return value from subtests should be used to prevent the parent + * test from finishing first and cancelling the subtest + * as shown in the following example. + * + * ```js + * test('top level test', async (t) => { + * // The setTimeout() in the following subtest would cause it to outlive its + * // parent test if 'await' is removed on the next line. Once the parent test + * // completes, it will cancel any outstanding subtests. + * await t.test('longer running subtest', async (t) => { + * return new Promise((resolve, reject) => { + * setTimeout(resolve, 1000); + * }); + * }); + * }); + * ``` + * + * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for + * canceling tests because a running test might block the application thread and + * thus prevent the scheduled cancellation. + * @since v18.0.0, v16.17.0 + * @param [name='The name'] The name of the test, which is displayed when reporting test results. + * @param options Configuration options for the test. The following properties are supported: + * @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the + * callback function is passed as the second argument. + * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within {@link describe}. + */ + function test(name?: string, fn?: TestFn): Promise; + function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function test(options?: TestOptions, fn?: TestFn): Promise; + function test(fn?: TestFn): Promise; + namespace test { + export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo }; + } + /** + * The `describe()` function imported from the `node:test` module. Each + * invocation of this function results in the creation of a Subtest. + * After invocation of top level `describe` functions, + * all top level tests and suites will execute. + * @param [name='The name'] The name of the suite, which is displayed when reporting test results. + * @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`. + * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object. + * @return Immediately fulfilled with `undefined`. + */ + function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function describe(name?: string, fn?: SuiteFn): Promise; + function describe(options?: TestOptions, fn?: SuiteFn): Promise; + function describe(fn?: SuiteFn): Promise; + namespace describe { + /** + * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`. + */ + function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function skip(name?: string, fn?: SuiteFn): Promise; + function skip(options?: TestOptions, fn?: SuiteFn): Promise; + function skip(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`. + */ + function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function todo(name?: string, fn?: SuiteFn): Promise; + function todo(options?: TestOptions, fn?: SuiteFn): Promise; + function todo(fn?: SuiteFn): Promise; + /** + * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`. + * @since v18.15.0 + */ + function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; + function only(name?: string, fn?: SuiteFn): Promise; + function only(options?: TestOptions, fn?: SuiteFn): Promise; + function only(fn?: SuiteFn): Promise; + } + /** + * Shorthand for `test()`. + * + * The `it()` function is imported from the `node:test` module. + * @since v18.6.0, v16.17.0 + */ + function it(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function it(name?: string, fn?: TestFn): Promise; + function it(options?: TestOptions, fn?: TestFn): Promise; + function it(fn?: TestFn): Promise; + namespace it { + /** + * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`. + */ + function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function skip(name?: string, fn?: TestFn): Promise; + function skip(options?: TestOptions, fn?: TestFn): Promise; + function skip(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`. + */ + function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function todo(name?: string, fn?: TestFn): Promise; + function todo(options?: TestOptions, fn?: TestFn): Promise; + function todo(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`. + * @since v18.15.0 + */ + function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function only(name?: string, fn?: TestFn): Promise; + function only(options?: TestOptions, fn?: TestFn): Promise; + function only(fn?: TestFn): Promise; + } + /** + * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`. + * @since v20.2.0 + */ + function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function skip(name?: string, fn?: TestFn): Promise; + function skip(options?: TestOptions, fn?: TestFn): Promise; + function skip(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`. + * @since v20.2.0 + */ + function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function todo(name?: string, fn?: TestFn): Promise; + function todo(options?: TestOptions, fn?: TestFn): Promise; + function todo(fn?: TestFn): Promise; + /** + * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`. + * @since v20.2.0 + */ + function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; + function only(name?: string, fn?: TestFn): Promise; + function only(options?: TestOptions, fn?: TestFn): Promise; + function only(fn?: TestFn): Promise; + /** + * The type of a function under test. The first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is passed as + * the second argument. + */ + type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; + /** + * The type of a function under Suite. + */ + type SuiteFn = (s: SuiteContext) => void | Promise; + interface TestShard { + /** + * A positive integer between 1 and `` that specifies the index of the shard to run. + */ + index: number; + /** + * A positive integer that specifies the total number of shards to split the test files to. + */ + total: number; + } + interface RunOptions { + /** + * If a number is provided, then that many files would run in parallel. + * If truthy, it would run (number of cpu cores - 1) files in parallel. + * If falsy, it would only run one file at a time. + * If unspecified, subtests inherit this value from their parent. + * @default true + */ + concurrency?: number | boolean | undefined; + /** + * An array containing the list of files to run. + * If unspecified, the test runner execution model will be used. + */ + files?: readonly string[] | undefined; + /** + * Allows aborting an in-progress test execution. + * @default undefined + */ + signal?: AbortSignal | undefined; + /** + * A number of milliseconds the test will fail after. + * If unspecified, subtests inherit this value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + /** + * Sets inspector port of test child process. + * If a nullish value is provided, each process gets its own port, + * incremented from the primary's `process.debugPort`. + */ + inspectPort?: number | (() => number) | undefined; + /** + * That can be used to only run tests whose name matches the provided pattern. + * Test name patterns are interpreted as JavaScript regular expressions. + * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run. + */ + testNamePatterns?: string | RegExp | string[] | RegExp[]; + /** + * If truthy, the test context will only run tests that have the `only` option set + */ + only?: boolean; + /** + * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run. + */ + setup?: (root: Test) => void | Promise; + /** + * Whether to run in watch mode or not. + * @default false + */ + watch?: boolean | undefined; + /** + * Running tests in a specific shard. + * @default undefined + */ + shard?: TestShard | undefined; + } + class Test extends AsyncResource { + concurrency: number; + nesting: number; + only: boolean; + reporter: TestsStream; + runOnlySubtests: boolean; + testNumber: number; + timeout: number | null; + } + /** + * A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. `TestsStream` will emit events, in the + * order of the tests definition + * @since v18.9.0, v16.19.0 + */ + class TestsStream extends Readable implements NodeJS.ReadableStream { + addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; + addListener(event: "test:fail", listener: (data: TestFail) => void): this; + addListener(event: "test:pass", listener: (data: TestPass) => void): this; + addListener(event: "test:plan", listener: (data: TestPlan) => void): this; + addListener(event: "test:start", listener: (data: TestStart) => void): this; + addListener(event: "test:stderr", listener: (data: TestStderr) => void): this; + addListener(event: "test:stdout", listener: (data: TestStdout) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + emit(event: "test:diagnostic", data: DiagnosticData): boolean; + emit(event: "test:fail", data: TestFail): boolean; + emit(event: "test:pass", data: TestPass): boolean; + emit(event: "test:plan", data: TestPlan): boolean; + emit(event: "test:start", data: TestStart): boolean; + emit(event: "test:stderr", data: TestStderr): boolean; + emit(event: "test:stdout", data: TestStdout): boolean; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; + on(event: "test:fail", listener: (data: TestFail) => void): this; + on(event: "test:pass", listener: (data: TestPass) => void): this; + on(event: "test:plan", listener: (data: TestPlan) => void): this; + on(event: "test:start", listener: (data: TestStart) => void): this; + on(event: "test:stderr", listener: (data: TestStderr) => void): this; + on(event: "test:stdout", listener: (data: TestStdout) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; + once(event: "test:fail", listener: (data: TestFail) => void): this; + once(event: "test:pass", listener: (data: TestPass) => void): this; + once(event: "test:plan", listener: (data: TestPlan) => void): this; + once(event: "test:start", listener: (data: TestStart) => void): this; + once(event: "test:stderr", listener: (data: TestStderr) => void): this; + once(event: "test:stdout", listener: (data: TestStdout) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; + prependListener(event: "test:fail", listener: (data: TestFail) => void): this; + prependListener(event: "test:pass", listener: (data: TestPass) => void): this; + prependListener(event: "test:plan", listener: (data: TestPlan) => void): this; + prependListener(event: "test:start", listener: (data: TestStart) => void): this; + prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this; + prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this; + prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this; + prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this; + prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this; + prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this; + prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this; + prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + } + /** + * An instance of `TestContext` is passed to each test function in order to + * interact with the test runner. However, the `TestContext` constructor is not + * exposed as part of the API. + * @since v18.0.0, v16.17.0 + */ + class TestContext { + /** + * This function is used to create a hook running before subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. **Default:** A no-op function. + * @param options Configuration options for the hook. + * @since v20.1.0 + */ + before: typeof before; + /** + * This function is used to create a hook running before each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. **Default:** A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + beforeEach: typeof beforeEach; + /** + * This function is used to create a hook that runs after the current test finishes. + * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. Default: A no-op function. + * @param options Configuration options for the hook. + * @since v18.13.0 + */ + after: typeof after; + /** + * This function is used to create a hook running after each subtest of the current test. + * @param fn The hook function. If the hook uses callbacks, the callback function is passed as + * the second argument. **Default:** A no-op function. + * @param options Configuration options for the hook. + * @since v18.8.0 + */ + afterEach: typeof afterEach; + /** + * This function is used to write diagnostics to the output. Any diagnostic + * information is included at the end of the test's results. This function does + * not return a value. + * + * ```js + * test('top level test', (t) => { + * t.diagnostic('A diagnostic message'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Message to be reported. + */ + diagnostic(message: string): void; + /** + * The name of the test. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * If `shouldRunOnlyTests` is truthy, the test context will only run tests that + * have the `only` option set. Otherwise, all tests are run. If Node.js was not + * started with the `--test-only` command-line option, this function is a + * no-op. + * + * ```js + * test('top level test', (t) => { + * // The test context can be set to run subtests with the 'only' option. + * t.runOnly(true); + * return Promise.all([ + * t.test('this subtest is now skipped'), + * t.test('this subtest is run', { only: true }), + * ]); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param shouldRunOnlyTests Whether or not to run `only` tests. + */ + runOnly(shouldRunOnlyTests: boolean): void; + /** + * ```js + * test('top level test', async (t) => { + * await fetch('some/uri', { signal: t.signal }); + * }); + * ``` + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + /** + * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does + * not terminate execution of the test function. This function does not return a + * value. + * + * ```js + * test('top level test', (t) => { + * // Make sure to return here as well if the test contains additional logic. + * t.skip('this is skipped'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional skip message. + */ + skip(message?: string): void; + /** + * This function adds a `TODO` directive to the test's output. If `message` is + * provided, it is included in the output. Calling `todo()` does not terminate + * execution of the test function. This function does not return a value. + * + * ```js + * test('top level test', (t) => { + * // This test is marked as `TODO` + * t.todo('this is a todo'); + * }); + * ``` + * @since v18.0.0, v16.17.0 + * @param message Optional `TODO` message. + */ + todo(message?: string): void; + /** + * This function is used to create subtests under the current test. This function behaves in + * the same fashion as the top level {@link test} function. + * @since v18.0.0 + * @param name The name of the test, which is displayed when reporting test results. + * Default: The `name` property of fn, or `''` if `fn` does not have a name. + * @param options Configuration options for the test + * @param fn The function under test. This first argument to this function is a + * {@link TestContext} object. If the test uses callbacks, the callback function is + * passed as the second argument. **Default:** A no-op function. + * @returns A {@link Promise} resolved with `undefined` once the test completes. + */ + test: typeof test; + /** + * Each test provides its own MockTracker instance. + */ + readonly mock: MockTracker; + } + + /** + * An instance of `SuiteContext` is passed to each suite function in order to + * interact with the test runner. However, the `SuiteContext` constructor is not + * exposed as part of the API. + * @since v18.7.0, v16.17.0 + */ + class SuiteContext { + /** + * The name of the suite. + * @since v18.8.0, v16.18.0 + */ + readonly name: string; + /** + * Can be used to abort test subtasks when the test has been aborted. + * @since v18.7.0, v16.17.0 + */ + readonly signal: AbortSignal; + } + interface TestOptions { + /** + * If a number is provided, then that many tests would run in parallel. + * If truthy, it would run (number of cpu cores - 1) tests in parallel. + * For subtests, it will be `Infinity` tests in parallel. + * If falsy, it would only run one test at a time. + * If unspecified, subtests inherit this value from their parent. + * @default false + */ + concurrency?: number | boolean | undefined; + /** + * If truthy, and the test context is configured to run `only` tests, then this test will be + * run. Otherwise, the test is skipped. + * @default false + */ + only?: boolean | undefined; + /** + * Allows aborting an in-progress test. + * @since v18.8.0 + */ + signal?: AbortSignal | undefined; + /** + * If truthy, the test is skipped. If a string is provided, that string is displayed in the + * test results as the reason for skipping the test. + * @default false + */ + skip?: boolean | string | undefined; + /** + * A number of milliseconds the test will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + * @since v18.7.0 + */ + timeout?: number | undefined; + /** + * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in + * the test results as the reason why the test is `TODO`. + * @default false + */ + todo?: boolean | string | undefined; + } + /** + * This function is used to create a hook running before running a suite. + * + * ```js + * describe('tests', async () => { + * before(() => console.log('about to run some test')); + * it('is a subtest', () => { + * assert.ok('some relevant assertion here'); + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. The following properties are supported: + */ + function before(fn?: HookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running after running a suite. + * + * ```js + * describe('tests', async () => { + * after(() => console.log('finished running tests')); + * it('is a subtest', () => { + * assert.ok('some relevant assertion here'); + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. The following properties are supported: + */ + function after(fn?: HookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running + * before each subtest of the current suite. + * + * ```js + * describe('tests', async () => { + * beforeEach(() => console.log('about to run a test')); + * it('is a subtest', () => { + * assert.ok('some relevant assertion here'); + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. The following properties are supported: + */ + function beforeEach(fn?: HookFn, options?: HookOptions): void; + /** + * This function is used to create a hook running + * after each subtest of the current test. + * + * ```js + * describe('tests', async () => { + * afterEach(() => console.log('finished running a test')); + * it('is a subtest', () => { + * assert.ok('some relevant assertion here'); + * }); + * }); + * ``` + * @since v18.8.0, v16.18.0 + * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument. + * @param options Configuration options for the hook. The following properties are supported: + */ + function afterEach(fn?: HookFn, options?: HookOptions): void; + /** + * The hook function. If the hook uses callbacks, the callback function is passed as the + * second argument. + */ + type HookFn = (s: SuiteContext, done: (result?: any) => void) => any; + /** + * Configuration options for hooks. + * @since v18.8.0 + */ + interface HookOptions { + /** + * Allows aborting an in-progress hook. + */ + signal?: AbortSignal | undefined; + /** + * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this + * value from their parent. + * @default Infinity + */ + timeout?: number | undefined; + } + interface MockFunctionOptions { + /** + * The number of times that the mock will use the behavior of `implementation`. + * Once the mock function has been called `times` times, + * it will automatically restore the behavior of `original`. + * This value must be an integer greater than zero. + * @default Infinity + */ + times?: number | undefined; + } + interface MockMethodOptions extends MockFunctionOptions { + /** + * If `true`, `object[methodName]` is treated as a getter. + * This option cannot be used with the `setter` option. + */ + getter?: boolean | undefined; + /** + * If `true`, `object[methodName]` is treated as a setter. + * This option cannot be used with the `getter` option. + */ + setter?: boolean | undefined; + } + type Mock = F & { + mock: MockFunctionContext; + }; + type NoOpFunction = (...args: any[]) => undefined; + type FunctionPropertyNames = { + [K in keyof T]: T[K] extends Function ? K : never; + }[keyof T]; + /** + * The `MockTracker` class is used to manage mocking functionality. The test runner + * module provides a top level `mock` export which is a `MockTracker` instance. + * Each test also provides its own `MockTracker` instance via the test context's `mock` property. + * @since v19.1.0, v18.13.0 + */ + class MockTracker { + /** + * This function is used to create a mock function. + * + * The following example creates a mock function that increments a counter by one + * on each invocation. The `times` option is used to modify the mock behavior such + * that the first two invocations add two to the counter instead of one. + * + * ```js + * test('mocks a counting function', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); + * + * assert.strictEqual(fn(), 2); + * assert.strictEqual(fn(), 4); + * assert.strictEqual(fn(), 5); + * assert.strictEqual(fn(), 6); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param [original='A no-op function'] An optional function to create a mock on. + * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and + * then restore the behavior of `original`. + * @param options Optional configuration options for the mock function. The following properties are supported: + * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked function. + */ + fn(original?: F, options?: MockFunctionOptions): Mock; + fn( + original?: F, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock; + /** + * This function is used to create a mock on an existing object method. The + * following example demonstrates how a mock is created on an existing object + * method. + * + * ```js + * test('spies on an object method', (t) => { + * const number = { + * value: 5, + * subtract(a) { + * return this.value - a; + * }, + * }; + * + * t.mock.method(number, 'subtract'); + * assert.strictEqual(number.subtract.mock.calls.length, 0); + * assert.strictEqual(number.subtract(3), 2); + * assert.strictEqual(number.subtract.mock.calls.length, 1); + * + * const call = number.subtract.mock.calls[0]; + * + * assert.deepStrictEqual(call.arguments, [3]); + * assert.strictEqual(call.result, 2); + * assert.strictEqual(call.error, undefined); + * assert.strictEqual(call.target, undefined); + * assert.strictEqual(call.this, number); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param object The object whose method is being mocked. + * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. + * @param implementation An optional function used as the mock implementation for `object[methodName]`. + * @param options Optional configuration options for the mock method. The following properties are supported: + * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the + * behavior of the mocked method. + */ + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method< + MockedObject extends object, + MethodName extends FunctionPropertyNames, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation: Implementation, + options?: MockFunctionOptions, + ): MockedObject[MethodName] extends Function ? Mock + : never; + method( + object: MockedObject, + methodName: keyof MockedObject, + options: MockMethodOptions, + ): Mock; + method( + object: MockedObject, + methodName: keyof MockedObject, + implementation: Function, + options: MockMethodOptions, + ): Mock; + + /** + * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<() => MockedObject[MethodName]>; + getter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<(() => MockedObject[MethodName]) | Implementation>; + /** + * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. + * @since v19.3.0, v18.13.0 + */ + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + >( + object: MockedObject, + methodName: MethodName, + options?: MockFunctionOptions, + ): Mock<(value: MockedObject[MethodName]) => void>; + setter< + MockedObject extends object, + MethodName extends keyof MockedObject, + Implementation extends Function, + >( + object: MockedObject, + methodName: MethodName, + implementation?: Implementation, + options?: MockFunctionOptions, + ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be + * used to reset their behavior or + * otherwise interact with them. + * + * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this + * function manually is recommended. + * @since v19.1.0, v18.13.0 + */ + reset(): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does + * not disassociate the mocks from the `MockTracker` instance. + * @since v19.1.0, v18.13.0 + */ + restoreAll(): void; + timers: MockTimers; + } + const mock: MockTracker; + interface MockFunctionCall< + F extends Function, + ReturnType = F extends (...args: any) => infer T ? T + : F extends abstract new(...args: any) => infer T ? T + : unknown, + Args = F extends (...args: infer Y) => any ? Y + : F extends abstract new(...args: infer Y) => any ? Y + : unknown[], + > { + /** + * An array of the arguments passed to the mock function. + */ + arguments: Args; + /** + * If the mocked function threw then this property contains the thrown value. + */ + error: unknown | undefined; + /** + * The value returned by the mocked function. + * + * If the mocked function threw, it will be `undefined`. + */ + result: ReturnType | undefined; + /** + * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. + */ + stack: Error; + /** + * If the mocked function is a constructor, this field contains the class being constructed. + * Otherwise this will be `undefined`. + */ + target: F extends abstract new(...args: any) => any ? F : undefined; + /** + * The mocked function's `this` value. + */ + this: unknown; + } + /** + * The `MockFunctionContext` class is used to inspect or manipulate the behavior of + * mocks created via the `MockTracker` APIs. + * @since v19.1.0, v18.13.0 + */ + class MockFunctionContext { + /** + * A getter that returns a copy of the internal array used to track calls to the + * mock. Each entry in the array is an object with the following properties. + * @since v19.1.0, v18.13.0 + */ + readonly calls: Array>; + /** + * This function returns the number of times that this mock has been invoked. This + * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. + * @since v19.1.0, v18.13.0 + * @return The number of times that this mock has been invoked. + */ + callCount(): number; + /** + * This function is used to change the behavior of an existing mock. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, and then changes the mock implementation to a different function. + * + * ```js + * test('changes a mock behavior', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementation(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 5); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's new implementation. + */ + mockImplementation(implementation: Function): void; + /** + * This function is used to change the behavior of an existing mock for a single + * invocation. Once invocation `onCall` has occurred, the mock will revert to + * whatever behavior it would have used had `mockImplementationOnce()` not been + * called. + * + * The following example creates a mock function using `t.mock.fn()`, calls the + * mock function, changes the mock implementation to a different function for the + * next invocation, and then resumes its previous behavior. + * + * ```js + * test('changes a mock behavior once', (t) => { + * let cnt = 0; + * + * function addOne() { + * cnt++; + * return cnt; + * } + * + * function addTwo() { + * cnt += 2; + * return cnt; + * } + * + * const fn = t.mock.fn(addOne); + * + * assert.strictEqual(fn(), 1); + * fn.mock.mockImplementationOnce(addTwo); + * assert.strictEqual(fn(), 3); + * assert.strictEqual(fn(), 4); + * }); + * ``` + * @since v19.1.0, v18.13.0 + * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. + * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. + */ + mockImplementationOnce(implementation: Function, onCall?: number): void; + /** + * Resets the call history of the mock function. + * @since v19.3.0, v18.13.0 + */ + resetCalls(): void; + /** + * Resets the implementation of the mock function to its original behavior. The + * mock can still be used after calling this function. + * @since v19.1.0, v18.13.0 + */ + restore(): void; + } + type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date"; + + interface MockTimersOptions { + apis: Timer[]; + now?: number | Date; + } + /** + * Mocking timers is a technique commonly used in software testing to simulate and + * control the behavior of timers, such as `setInterval` and `setTimeout`, + * without actually waiting for the specified time intervals. + * + * The MockTimers API also allows for mocking of the `Date` constructor and + * `setImmediate`/`clearImmediate` functions. + * + * The `MockTracker` provides a top-level `timers` export + * which is a `MockTimers` instance. + * @since v20.4.0 + * @experimental + */ + class MockTimers { + /** + * Enables timer mocking for the specified timers. + * + * **Note:** When you enable mocking for a specific timer, its associated + * clear function will also be implicitly mocked. + * + * **Note:** Mocking `Date` will affect the behavior of the mocked timers + * as they use the same internal clock. + * + * Example usage without setting initial time: + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); + * ``` + * + * The above example enables mocking for the `Date` constructor, `setInterval` timer and + * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, + * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. + * + * Example usage with initial time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: 1000 }); + * ``` + * + * Example usage with initial Date object as time set + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.enable({ apis: ['Date'], now: new Date() }); + * ``` + * + * Alternatively, if you call `mock.timers.enable()` without any parameters: + * + * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) + * will be mocked. + * + * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, + * and `globalThis` will be mocked. + * The `Date` constructor from `globalThis` will be mocked. + * + * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can + * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date + * object. It can either be a positive integer, or another Date object. + * @since v20.4.0 + */ + enable(options?: MockTimersOptions): void; + /** + * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer. + * Note: This method will execute any mocked timers that are in the past from the new time. + * In the below example we are setting a new time for the mocked date. + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * test('sets the time of a date object', (context) => { + * // Optionally choose what to mock + * context.mock.timers.enable({ apis: ['Date'], now: 100 }); + * assert.strictEqual(Date.now(), 100); + * // Advance in time will also advance the date + * context.mock.timers.setTime(1000); + * context.mock.timers.tick(200); + * assert.strictEqual(Date.now(), 1200); + * }); + * ``` + */ + setTime(time: number): void; + /** + * This function restores the default behavior of all mocks that were previously + * created by this `MockTimers` instance and disassociates the mocks + * from the `MockTracker` instance. + * + * **Note:** After each test completes, this function is called on + * the test context's `MockTracker`. + * + * ```js + * import { mock } from 'node:test'; + * mock.timers.reset(); + * ``` + * @since v20.4.0 + */ + reset(): void; + /** + * Advances time for all mocked timers. + * + * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts + * only positive numbers. In Node.js, `setTimeout` with negative numbers is + * only supported for web compatibility reasons. + * + * The following example mocks a `setTimeout` function and + * by using `.tick` advances in + * time triggering all pending timers. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Alternativelly, the `.tick` function can be called many times + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * context.mock.timers.enable({ apis: ['setTimeout'] }); + * const nineSecs = 9000; + * setTimeout(fn, nineSecs); + * + * const twoSeconds = 3000; + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * context.mock.timers.tick(twoSeconds); + * + * assert.strictEqual(fn.mock.callCount(), 1); + * }); + * ``` + * + * Advancing time using `.tick` will also advance the time for any `Date` object + * created after the mock was enabled (if `Date` was also set to be mocked). + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { + * const fn = context.mock.fn(); + * + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * setTimeout(fn, 9999); + * + * assert.strictEqual(fn.mock.callCount(), 0); + * assert.strictEqual(Date.now(), 0); + * + * // Advance in time + * context.mock.timers.tick(9999); + * assert.strictEqual(fn.mock.callCount(), 1); + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * @since v20.4.0 + */ + tick(milliseconds: number): void; + /** + * Triggers all pending mocked timers immediately. If the `Date` object is also + * mocked, it will also advance the `Date` object to the furthest timer's time. + * + * The example below triggers all pending timers immediately, + * causing them to execute without any delay. + * + * ```js + * import assert from 'node:assert'; + * import { test } from 'node:test'; + * + * test('runAll functions following the given order', (context) => { + * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); + * const results = []; + * setTimeout(() => results.push(1), 9999); + * + * // Notice that if both timers have the same timeout, + * // the order of execution is guaranteed + * setTimeout(() => results.push(3), 8888); + * setTimeout(() => results.push(2), 8888); + * + * assert.deepStrictEqual(results, []); + * + * context.mock.timers.runAll(); + * assert.deepStrictEqual(results, [3, 2, 1]); + * // The Date object is also advanced to the furthest timer's time + * assert.strictEqual(Date.now(), 9999); + * }); + * ``` + * + * **Note:** The `runAll()` function is specifically designed for + * triggering timers in the context of timer mocking. + * It does not have any effect on real-time system + * clocks or actual timers outside of the mocking environment. + * @since v20.4.0 + */ + runAll(): void; + /** + * Calls {@link MockTimers.reset()}. + */ + [Symbol.dispose](): void; + } + export { + after, + afterEach, + before, + beforeEach, + describe, + it, + Mock, + mock, + only, + run, + skip, + SuiteContext, + test, + test as default, + TestContext, + todo, + }; +} + +interface TestLocationInfo { + /** + * The column number where the test is defined, or + * `undefined` if the test was run through the REPL. + */ + column?: number; + /** + * The path of the test file, `undefined` if test is not ran through a file. + */ + file?: string; + /** + * The line number where the test is defined, or + * `undefined` if the test was run through the REPL. + */ + line?: number; +} +interface DiagnosticData extends TestLocationInfo { + /** + * The diagnostic message. + */ + message: string; + /** + * The nesting level of the test. + */ + nesting: number; +} +interface TestFail extends TestLocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * The error thrown by the test. + */ + error: Error; + /** + * The type of the test, used to denote whether this is a suite. + * @since 20.0.0, 19.9.0, 18.17.0 + */ + type?: "suite"; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; +} +interface TestPass extends TestLocationInfo { + /** + * Additional execution metadata. + */ + details: { + /** + * The duration of the test in milliseconds. + */ + duration_ms: number; + /** + * The type of the test, used to denote whether this is a suite. + * @since 20.0.0, 19.9.0, 18.17.0 + */ + type?: "suite"; + }; + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The ordinal number of the test. + */ + testNumber: number; + /** + * Present if `context.todo` is called. + */ + todo?: string | boolean; + /** + * Present if `context.skip` is called. + */ + skip?: string | boolean; +} +interface TestPlan extends TestLocationInfo { + /** + * The nesting level of the test. + */ + nesting: number; + /** + * The number of subtests that have ran. + */ + count: number; +} +interface TestStart extends TestLocationInfo { + /** + * The test name. + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; +} +interface TestStderr extends TestLocationInfo { + /** + * The message written to `stderr` + */ + message: string; +} +interface TestStdout extends TestLocationInfo { + /** + * The message written to `stdout` + */ + message: string; +} +interface TestEnqueue extends TestLocationInfo { + /** + * The test name + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; +} +interface TestDequeue extends TestLocationInfo { + /** + * The test name + */ + name: string; + /** + * The nesting level of the test. + */ + nesting: number; +} + +/** + * The `node:test/reporters` module exposes the builtin-reporters for `node:test`. + * To access it: + * + * ```js + * import test from 'node:test/reporters'; + * ``` + * + * This module is only available under the `node:` scheme. The following will not + * work: + * + * ```js + * import test from 'test/reporters'; + * ``` + * @since v19.9.0 + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/test/reporters.js) + */ +declare module "node:test/reporters" { + import { Transform, TransformOptions } from "node:stream"; + + type TestEvent = + | { type: "test:diagnostic"; data: DiagnosticData } + | { type: "test:fail"; data: TestFail } + | { type: "test:pass"; data: TestPass } + | { type: "test:plan"; data: TestPlan } + | { type: "test:start"; data: TestStart } + | { type: "test:stderr"; data: TestStderr } + | { type: "test:stdout"; data: TestStdout } + | { type: "test:enqueue"; data: TestEnqueue } + | { type: "test:dequeue"; data: TestDequeue } + | { type: "test:watch:drained" }; + type TestEventGenerator = AsyncGenerator; + + /** + * The `dot` reporter outputs the test results in a compact format, + * where each passing test is represented by a `.`, + * and each failing test is represented by a `X`. + */ + function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>; + /** + * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. + */ + function tap(source: TestEventGenerator): AsyncGenerator; + /** + * The `spec` reporter outputs the test results in a human-readable format. + */ + class Spec extends Transform { + constructor(); + } + /** + * The `junit` reporter outputs test results in a jUnit XML format + */ + function junit(source: TestEventGenerator): AsyncGenerator; + class Lcov extends Transform { + constructor(opts?: TransformOptions); + } + export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent }; +} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts new file mode 100644 index 0000000..4e37b8e --- /dev/null +++ b/node_modules/@types/node/timers.d.ts @@ -0,0 +1,240 @@ +/** + * The `timer` module exposes a global API for scheduling functions to + * be called at some future period of time. Because the timer functions are + * globals, there is no need to call `require('node:timers')` to use the API. + * + * The timer functions within Node.js implement a similar API as the timers API + * provided by Web Browsers but use a different internal implementation that is + * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/timers.js) + */ +declare module "timers" { + import { Abortable } from "node:events"; + import { + setImmediate as setImmediatePromise, + setInterval as setIntervalPromise, + setTimeout as setTimeoutPromise, + } from "node:timers/promises"; + interface TimerOptions extends Abortable { + /** + * Set to `false` to indicate that the scheduled `Timeout` + * should not require the Node.js event loop to remain active. + * @default true + */ + ref?: boolean | undefined; + } + let setTimeout: typeof global.setTimeout; + let clearTimeout: typeof global.clearTimeout; + let setInterval: typeof global.setInterval; + let clearInterval: typeof global.clearInterval; + let setImmediate: typeof global.setImmediate; + let clearImmediate: typeof global.clearImmediate; + global { + namespace NodeJS { + // compatibility with older typings + interface Timer extends RefCounted { + hasRef(): boolean; + refresh(): this; + [Symbol.toPrimitive](): number; + } + /** + * This object is created internally and is returned from `setImmediate()`. It + * can be passed to `clearImmediate()` in order to cancel the scheduled + * actions. + * + * By default, when an immediate is scheduled, the Node.js event loop will continue + * running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` functions that can be used to + * control this default behavior. + */ + class Immediate implements RefCounted { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the `Immediate` is active. Calling `immediate.ref()` multiple times will have no + * effect. + * + * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary + * to call `immediate.ref()` unless `immediate.unref()` had been called previously. + * @since v9.7.0 + * @return a reference to `immediate` + */ + ref(): this; + /** + * When called, the active `Immediate` object will not require the Node.js event + * loop to remain active. If there is no other activity keeping the event loop + * running, the process may exit before the `Immediate` object's callback is + * invoked. Calling `immediate.unref()` multiple times will have no effect. + * @since v9.7.0 + * @return a reference to `immediate` + */ + unref(): this; + /** + * If true, the `Immediate` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + _onImmediate: Function; // to distinguish it from the Timeout class + /** + * Cancels the immediate. This is similar to calling `clearImmediate()`. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + } + /** + * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the + * scheduled actions. + * + * By default, when a timer is scheduled using either `setTimeout()` or `setInterval()`, the Node.js event loop will continue running as long as the + * timer is active. Each of the `Timeout` objects returned by these functions + * export both `timeout.ref()` and `timeout.unref()` functions that can be used to + * control this default behavior. + */ + class Timeout implements Timer { + /** + * When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. + * + * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary + * to call `timeout.ref()` unless `timeout.unref()` had been called previously. + * @since v0.9.1 + * @return a reference to `timeout` + */ + ref(): this; + /** + * When called, the active `Timeout` object will not require the Node.js event loop + * to remain active. If there is no other activity keeping the event loop running, + * the process may exit before the `Timeout` object's callback is invoked. Calling `timeout.unref()` multiple times will have no effect. + * @since v0.9.1 + * @return a reference to `timeout` + */ + unref(): this; + /** + * If true, the `Timeout` object will keep the Node.js event loop active. + * @since v11.0.0 + */ + hasRef(): boolean; + /** + * Sets the timer's start time to the current time, and reschedules the timer to + * call its callback at the previously specified duration adjusted to the current + * time. This is useful for refreshing a timer without allocating a new + * JavaScript object. + * + * Using this on a timer that has already called its callback will reactivate the + * timer. + * @since v10.2.0 + * @return a reference to `timeout` + */ + refresh(): this; + [Symbol.toPrimitive](): number; + /** + * Cancels the timeout. + * @since v20.5.0 + */ + [Symbol.dispose](): void; + } + } + /** + * Schedules execution of a one-time `callback` after `delay` milliseconds. + * + * The `callback` will likely not be invoked in precisely `delay` milliseconds. + * Node.js makes no guarantees about the exact timing of when callbacks will fire, + * nor of their ordering. The callback will be called as close as possible to the + * time specified. + * + * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be set to `1`. Non-integer delays are truncated to an integer. + * + * If `callback` is not a function, a `TypeError` will be thrown. + * + * This method has a custom variant for promises that is available using `timersPromises.setTimeout()`. + * @since v0.0.1 + * @param callback The function to call when the timer elapses. + * @param [delay=1] The number of milliseconds to wait before calling the `callback`. + * @param args Optional arguments to pass when the `callback` is called. + * @return for use with {@link clearTimeout} + */ + function setTimeout( + callback: (...args: TArgs) => void, + ms?: number, + ...args: TArgs + ): NodeJS.Timeout; + // util.promisify no rest args compability + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout; + namespace setTimeout { + const __promisify__: typeof setTimeoutPromise; + } + /** + * Cancels a `Timeout` object created by `setTimeout()`. + * @since v0.0.1 + * @param timeout A `Timeout` object as returned by {@link setTimeout} or the `primitive` of the `Timeout` object as a string or a number. + */ + function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void; + /** + * Schedules repeated execution of `callback` every `delay` milliseconds. + * + * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be + * set to `1`. Non-integer delays are truncated to an integer. + * + * If `callback` is not a function, a `TypeError` will be thrown. + * + * This method has a custom variant for promises that is available using `timersPromises.setInterval()`. + * @since v0.0.1 + * @param callback The function to call when the timer elapses. + * @param [delay=1] The number of milliseconds to wait before calling the `callback`. + * @param args Optional arguments to pass when the `callback` is called. + * @return for use with {@link clearInterval} + */ + function setInterval( + callback: (...args: TArgs) => void, + ms?: number, + ...args: TArgs + ): NodeJS.Timeout; + // util.promisify no rest args compability + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout; + namespace setInterval { + const __promisify__: typeof setIntervalPromise; + } + /** + * Cancels a `Timeout` object created by `setInterval()`. + * @since v0.0.1 + * @param timeout A `Timeout` object as returned by {@link setInterval} or the `primitive` of the `Timeout` object as a string or a number. + */ + function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void; + /** + * Schedules the "immediate" execution of the `callback` after I/O events' + * callbacks. + * + * When multiple calls to `setImmediate()` are made, the `callback` functions are + * queued for execution in the order in which they are created. The entire callback + * queue is processed every event loop iteration. If an immediate timer is queued + * from inside an executing callback, that timer will not be triggered until the + * next event loop iteration. + * + * If `callback` is not a function, a `TypeError` will be thrown. + * + * This method has a custom variant for promises that is available using `timersPromises.setImmediate()`. + * @since v0.9.1 + * @param callback The function to call at the end of this turn of the Node.js `Event Loop` + * @param args Optional arguments to pass when the `callback` is called. + * @return for use with {@link clearImmediate} + */ + function setImmediate( + callback: (...args: TArgs) => void, + ...args: TArgs + ): NodeJS.Immediate; + // util.promisify no rest args compability + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + function setImmediate(callback: (args: void) => void): NodeJS.Immediate; + namespace setImmediate { + const __promisify__: typeof setImmediatePromise; + } + /** + * Cancels an `Immediate` object created by `setImmediate()`. + * @since v0.9.1 + * @param immediate An `Immediate` object as returned by {@link setImmediate}. + */ + function clearImmediate(immediateId: NodeJS.Immediate | undefined): void; + function queueMicrotask(callback: () => void): void; + } +} +declare module "node:timers" { + export * from "timers"; +} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts new file mode 100644 index 0000000..50cee98 --- /dev/null +++ b/node_modules/@types/node/timers/promises.d.ts @@ -0,0 +1,97 @@ +/** + * The `timers/promises` API provides an alternative set of timer functions + * that return `Promise` objects. The API is accessible via `require('node:timers/promises')`. + * + * ```js + * import { + * setTimeout, + * setImmediate, + * setInterval, + * } from 'timers/promises'; + * ``` + * @since v15.0.0 + */ +declare module "timers/promises" { + import { TimerOptions } from "node:timers"; + /** + * ```js + * import { + * setTimeout, + * } from 'timers/promises'; + * + * const res = await setTimeout(100, 'result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + * @param value A value with which the promise is fulfilled. + */ + function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; + /** + * ```js + * import { + * setImmediate, + * } from 'timers/promises'; + * + * const res = await setImmediate('result'); + * + * console.log(res); // Prints 'result' + * ``` + * @since v15.0.0 + * @param value A value with which the promise is fulfilled. + */ + function setImmediate(value?: T, options?: TimerOptions): Promise; + /** + * Returns an async iterator that generates values in an interval of `delay` ms. + * If `ref` is `true`, you need to call `next()` of async iterator explicitly + * or implicitly to keep the event loop alive. + * + * ```js + * import { + * setInterval, + * } from 'timers/promises'; + * + * const interval = 100; + * for await (const startTime of setInterval(interval, Date.now())) { + * const now = Date.now(); + * console.log(now); + * if ((now - startTime) > 1000) + * break; + * } + * console.log(Date.now()); + * ``` + * @since v15.9.0 + */ + function setInterval(delay?: number, value?: T, options?: TimerOptions): AsyncIterable; + interface Scheduler { + /** + * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification being developed as a standard Web Platform API. + * + * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent to calling `timersPromises.setTimeout(delay, undefined, options)` except that the `ref` + * option is not supported. + * + * ```js + * import { scheduler } from 'node:timers/promises'; + * + * await scheduler.wait(1000); // Wait one second before continuing + * ``` + * @since v16.14.0 + * @experimental + * @param [delay=1] The number of milliseconds to wait before fulfilling the promise. + */ + wait: (delay?: number, options?: Pick) => Promise; + /** + * An experimental API defined by the [Scheduling APIs](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking) draft specification + * being developed as a standard Web Platform API. + * Calling `timersPromises.scheduler.yield()` is equivalent to calling `timersPromises.setImmediate()` with no arguments. + * @since v16.14.0 + * @experimental + */ + yield: () => Promise; + } + const scheduler: Scheduler; +} +declare module "node:timers/promises" { + export * from "timers/promises"; +} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts new file mode 100644 index 0000000..0b2d6b6 --- /dev/null +++ b/node_modules/@types/node/tls.d.ts @@ -0,0 +1,1217 @@ +/** + * The `node:tls` module provides an implementation of the Transport Layer Security + * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. + * The module can be accessed using: + * + * ```js + * const tls = require('node:tls'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tls.js) + */ +declare module "tls" { + import { X509Certificate } from "node:crypto"; + import * as net from "node:net"; + import * as stream from "stream"; + const CLIENT_RENEG_LIMIT: number; + const CLIENT_RENEG_WINDOW: number; + interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + interface PeerCertificate { + /** + * `true` if a Certificate Authority (CA), `false` otherwise. + * @since v18.13.0 + */ + ca: boolean; + /** + * The DER encoded X.509 certificate data. + */ + raw: Buffer; + /** + * The certificate subject. + */ + subject: Certificate; + /** + * The certificate issuer, described in the same terms as the `subject`. + */ + issuer: Certificate; + /** + * The date-time the certificate is valid from. + */ + valid_from: string; + /** + * The date-time the certificate is valid to. + */ + valid_to: string; + /** + * The certificate serial number, as a hex string. + */ + serialNumber: string; + /** + * The SHA-1 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint: string; + /** + * The SHA-256 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint256: string; + /** + * The SHA-512 digest of the DER encoded certificate. + * It is returned as a `:` separated hexadecimal string. + */ + fingerprint512: string; + /** + * The extended key usage, a set of OIDs. + */ + ext_key_usage?: string[]; + /** + * A string containing concatenated names for the subject, + * an alternative to the `subject` names. + */ + subjectaltname?: string; + /** + * An array describing the AuthorityInfoAccess, used with OCSP. + */ + infoAccess?: NodeJS.Dict; + /** + * For RSA keys: The RSA bit size. + * + * For EC keys: The key size in bits. + */ + bits?: number; + /** + * The RSA exponent, as a string in hexadecimal number notation. + */ + exponent?: string; + /** + * The RSA modulus, as a hexadecimal string. + */ + modulus?: string; + /** + * The public key. + */ + pubkey?: Buffer; + /** + * The ASN.1 name of the OID of the elliptic curve. + * Well-known curves are identified by an OID. + * While it is unusual, it is possible that the curve + * is identified by its mathematical properties, + * in which case it will not have an OID. + */ + asn1Curve?: string; + /** + * The NIST name for the elliptic curve, if it has one + * (not all well-known curves have been assigned names by NIST). + */ + nistCurve?: string; + } + interface DetailedPeerCertificate extends PeerCertificate { + /** + * The issuer certificate object. + * For self-signed certificates, this may be a circular reference. + */ + issuerCertificate: DetailedPeerCertificate; + } + interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + /** + * IETF name for the cipher suite. + */ + standardName: string; + } + interface EphemeralKeyInfo { + /** + * The supported types are 'DH' and 'ECDH'. + */ + type: string; + /** + * The name property is available only when type is 'ECDH'. + */ + name?: string | undefined; + /** + * The size of parameter of an ephemeral key exchange. + */ + size: number; + } + interface KeyObject { + /** + * Private keys in PEM format. + */ + pem: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface PxfObject { + /** + * PFX or PKCS12 encoded private key and certificate chain. + */ + buf: string | Buffer; + /** + * Optional passphrase. + */ + passphrase?: string | undefined; + } + interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { + /** + * If true the TLS socket will be instantiated in server-mode. + * Defaults to false. + */ + isServer?: boolean | undefined; + /** + * An optional net.Server instance. + */ + server?: net.Server | undefined; + /** + * An optional Buffer instance containing a TLS session. + */ + session?: Buffer | undefined; + /** + * If true, specifies that the OCSP status request extension will be + * added to the client hello and an 'OCSPResponse' event will be + * emitted on the socket before establishing a secure communication + */ + requestOCSP?: boolean | undefined; + } + /** + * Performs transparent encryption of written data and all required TLS + * negotiation. + * + * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. + * + * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the + * connection is open. + * @since v0.11.4 + */ + class TLSSocket extends net.Socket { + /** + * Construct a new tls.TLSSocket object from an existing TCP socket. + */ + constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); + /** + * This property is `true` if the peer certificate was signed by one of the CAs + * specified when creating the `tls.TLSSocket` instance, otherwise `false`. + * @since v0.11.4 + */ + authorized: boolean; + /** + * Returns the reason why the peer's certificate was not been verified. This + * property is set only when `tlsSocket.authorized === false`. + * @since v0.11.4 + */ + authorizationError: Error; + /** + * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. + * @since v0.11.4 + */ + encrypted: true; + /** + * String containing the selected ALPN protocol. + * Before a handshake has completed, this value is always null. + * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. + */ + alpnProtocol: string | false | null; + /** + * Returns an object representing the local certificate. The returned object has + * some properties corresponding to the fields of the certificate. + * + * See {@link TLSSocket.getPeerCertificate} for an example of the certificate + * structure. + * + * If there is no local certificate, an empty object will be returned. If the + * socket has been destroyed, `null` will be returned. + * @since v11.2.0 + */ + getCertificate(): PeerCertificate | object | null; + /** + * Returns an object containing information on the negotiated cipher suite. + * + * For example, a TLSv1.2 protocol with AES256-SHA cipher: + * + * ```json + * { + * "name": "AES256-SHA", + * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", + * "version": "SSLv3" + * } + * ``` + * + * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. + * @since v0.11.4 + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the type, name, and size of parameter of + * an ephemeral key exchange in `perfect forward secrecy` on a client + * connection. It returns an empty object when the key exchange is not + * ephemeral. As this is only supported on a client socket; `null` is returned + * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`. + * + * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. + * @since v5.0.0 + */ + getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. + */ + getFinished(): Buffer | undefined; + /** + * Returns an object representing the peer's certificate. If the peer does not + * provide a certificate, an empty object will be returned. If the socket has been + * destroyed, `null` will be returned. + * + * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's + * certificate. + * @since v0.11.4 + * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. + * @return A certificate object. + */ + getPeerCertificate(detailed: true): DetailedPeerCertificate; + getPeerCertificate(detailed?: false): PeerCertificate; + getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; + /** + * As the `Finished` messages are message digests of the complete handshake + * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can + * be used for external authentication procedures when the authentication + * provided by SSL/TLS is not desired or is not enough. + * + * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used + * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). + * @since v9.9.0 + * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so + * far. + */ + getPeerFinished(): Buffer | undefined; + /** + * Returns a string containing the negotiated SSL/TLS protocol version of the + * current connection. The value `'unknown'` will be returned for connected + * sockets that have not completed the handshaking process. The value `null` will + * be returned for server sockets or disconnected client sockets. + * + * Protocol versions are: + * + * * `'SSLv3'` + * * `'TLSv1'` + * * `'TLSv1.1'` + * * `'TLSv1.2'` + * * `'TLSv1.3'` + * + * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. + * @since v5.7.0 + */ + getProtocol(): string | null; + /** + * Returns the TLS session data or `undefined` if no session was + * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful + * for debugging. + * + * See `Session Resumption` for more information. + * + * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications + * must use the `'session'` event (it also works for TLSv1.2 and below). + * @since v0.11.4 + */ + getSession(): Buffer | undefined; + /** + * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. + * @since v12.11.0 + * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. + */ + getSharedSigalgs(): string[]; + /** + * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. + * + * It may be useful for debugging. + * + * See `Session Resumption` for more information. + * @since v0.11.4 + */ + getTLSTicket(): Buffer | undefined; + /** + * See `Session Resumption` for more information. + * @since v0.5.6 + * @return `true` if the session was reused, `false` otherwise. + */ + isSessionReused(): boolean; + /** + * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. + * Upon completion, the `callback` function will be passed a single argument + * that is either an `Error` (if the request failed) or `null`. + * + * This method can be used to request a peer's certificate after the secure + * connection has been established. + * + * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. + * + * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the + * protocol. + * @since v0.11.8 + * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with + * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. + * @return `true` if renegotiation was initiated, `false` otherwise. + */ + renegotiate( + options: { + rejectUnauthorized?: boolean | undefined; + requestCert?: boolean | undefined; + }, + callback: (err: Error | null) => void, + ): undefined | boolean; + /** + * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. + * Returns `true` if setting the limit succeeded; `false` otherwise. + * + * Smaller fragment sizes decrease the buffering latency on the client: larger + * fragments are buffered by the TLS layer until the entire fragment is received + * and its integrity is verified; large fragments can span multiple roundtrips + * and their processing can be delayed due to packet loss or reordering. However, + * smaller fragments add extra TLS framing bytes and CPU overhead, which may + * decrease overall server throughput. + * @since v0.11.11 + * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. + */ + setMaxSendFragment(size: number): boolean; + /** + * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts + * to renegotiate will trigger an `'error'` event on the `TLSSocket`. + * @since v8.4.0 + */ + disableRenegotiation(): void; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * + * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by + * OpenSSL's `SSL_trace()` function, the format is undocumented, can change + * without notice, and should not be relied on. + * @since v12.2.0 + */ + enableTrace(): void; + /** + * Returns the peer certificate as an `X509Certificate` object. + * + * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getPeerX509Certificate(): X509Certificate | undefined; + /** + * Returns the local certificate as an `X509Certificate` object. + * + * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. + * @since v15.9.0 + */ + getX509Certificate(): X509Certificate | undefined; + /** + * Keying material is used for validations to prevent different kind of attacks in + * network protocols, for example in the specifications of IEEE 802.1X. + * + * Example + * + * ```js + * const keyingMaterial = tlsSocket.exportKeyingMaterial( + * 128, + * 'client finished'); + * + * /* + * Example return value of keyingMaterial: + * + * + * ``` + * + * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more + * information. + * @since v13.10.0, v12.17.0 + * @param length number of bytes to retrieve from keying material + * @param label an application specific label, typically this will be a value from the [IANA Exporter Label + * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). + * @param context Optionally provide a context. + * @return requested bytes of the keying material + */ + exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer; + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + addListener(event: "session", listener: (session: Buffer) => void): this; + addListener(event: "keylog", listener: (line: Buffer) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + emit(event: "session", session: Buffer): boolean; + emit(event: "keylog", line: Buffer): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + on(event: "session", listener: (session: Buffer) => void): this; + on(event: "keylog", listener: (line: Buffer) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + once(event: "session", listener: (session: Buffer) => void): this; + once(event: "keylog", listener: (line: Buffer) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + prependListener(event: "session", listener: (session: Buffer) => void): this; + prependListener(event: "keylog", listener: (line: Buffer) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + prependOnceListener(event: "session", listener: (session: Buffer) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; + } + interface CommonConnectionOptions { + /** + * An optional TLS context object from tls.createSecureContext() + */ + secureContext?: SecureContext | undefined; + /** + * When enabled, TLS packet trace information is written to `stderr`. This can be + * used to debug TLS connection problems. + * @default false + */ + enableTrace?: boolean | undefined; + /** + * If true the server will request a certificate from clients that + * connect and attempt to verify that certificate. Defaults to + * false. + */ + requestCert?: boolean | undefined; + /** + * An array of strings or a Buffer naming possible ALPN protocols. + * (Protocols should be ordered by their priority.) + */ + ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined; + /** + * SNICallback(servername, cb) A function that will be + * called if the client supports SNI TLS extension. Two arguments + * will be passed when called: servername and cb. SNICallback should + * invoke cb(null, ctx), where ctx is a SecureContext instance. + * (tls.createSecureContext(...) can be used to get a proper + * SecureContext.) If SNICallback wasn't provided the default callback + * with high-level API will be used (see below). + */ + SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; + /** + * If true the server will reject any connection which is not + * authorized with the list of supplied CAs. This option only has an + * effect if requestCert is true. + * @default true + */ + rejectUnauthorized?: boolean | undefined; + } + interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { + /** + * Abort the connection if the SSL/TLS handshake does not finish in the + * specified number of milliseconds. A 'tlsClientError' is emitted on + * the tls.Server object whenever a handshake times out. Default: + * 120000 (120 seconds). + */ + handshakeTimeout?: number | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer | undefined; + /** + * @param socket + * @param identity identity parameter sent from the client. + * @return pre-shared key that must either be + * a buffer or `null` to stop the negotiation process. Returned PSK must be + * compatible with the selected cipher's digest. + * + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with the identity provided by the client. + * If the return value is `null` the negotiation process will stop and an + * "unknown_psk_identity" alert message will be sent to the other party. + * If the server wishes to hide the fact that the PSK identity was not known, + * the callback must provide some random data as `psk` to make the connection + * fail with "decrypt_error" before negotiation is finished. + * PSK ciphers are disabled by default, and using TLS-PSK thus + * requires explicitly specifying a cipher suite with the `ciphers` option. + * More information can be found in the RFC 4279. + */ + pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null; + /** + * hint to send to a client to help + * with selecting the identity during TLS-PSK negotiation. Will be ignored + * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be + * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. + */ + pskIdentityHint?: string | undefined; + } + interface PSKCallbackNegotation { + psk: DataView | NodeJS.TypedArray; + identity: string; + } + interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { + host?: string | undefined; + port?: number | undefined; + path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. + socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket + checkServerIdentity?: typeof checkServerIdentity | undefined; + servername?: string | undefined; // SNI TLS Extension + session?: Buffer | undefined; + minDHSize?: number | undefined; + lookup?: net.LookupFunction | undefined; + timeout?: number | undefined; + /** + * When negotiating TLS-PSK (pre-shared keys), this function is called + * with optional identity `hint` provided by the server or `null` + * in case of TLS 1.3 where `hint` was removed. + * It will be necessary to provide a custom `tls.checkServerIdentity()` + * for the connection as the default one will try to check hostname/IP + * of the server against the certificate but that's not applicable for PSK + * because there won't be a certificate present. + * More information can be found in the RFC 4279. + * + * @param hint message sent from the server to help client + * decide which identity to use during negotiation. + * Always `null` if TLS 1.3 is used. + * @returns Return `null` to stop the negotiation process. `psk` must be + * compatible with the selected cipher's digest. + * `identity` must use UTF-8 encoding. + */ + pskCallback?(hint: string | null): PSKCallbackNegotation | null; + } + /** + * Accepts encrypted connections using TLS or SSL. + * @since v0.3.2 + */ + class Server extends net.Server { + constructor(secureConnectionListener?: (socket: TLSSocket) => void); + constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); + /** + * The `server.addContext()` method adds a secure context that will be used if + * the client request's SNI name matches the supplied `hostname` (or wildcard). + * + * When there are multiple matching contexts, the most recently added one is + * used. + * @since v0.5.3 + * @param hostname A SNI host name or wildcard (e.g. `'*'`) + * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created + * with {@link createSecureContext} itself. + */ + addContext(hostname: string, context: SecureContextOptions): void; + /** + * Returns the session ticket keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @return A 48-byte buffer containing the session ticket keys. + */ + getTicketKeys(): Buffer; + /** + * The `server.setSecureContext()` method replaces the secure context of an + * existing server. Existing connections to the server are not interrupted. + * @since v11.0.0 + * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). + */ + setSecureContext(options: SecureContextOptions): void; + /** + * Sets the session ticket keys. + * + * Changes to the ticket keys are effective only for future server connections. + * Existing or currently pending server connections will use the previous keys. + * + * See `Session Resumption` for more information. + * @since v3.0.0 + * @param keys A 48-byte buffer containing the session ticket keys. + */ + setTicketKeys(keys: Buffer): void; + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + * 6. keylog + */ + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, + ): this; + addListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + addListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, + ): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean; + emit( + event: "OCSPRequest", + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ): boolean; + emit( + event: "resumeSession", + sessionId: Buffer, + callback: (err: Error | null, sessionData: Buffer | null) => void, + ): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this; + on( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + on( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, + ): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, + ): this; + once( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + once( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, + ): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, + ): this; + prependListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, + ): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener( + event: "newSession", + listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void, + ): this; + prependOnceListener( + event: "OCSPRequest", + listener: ( + certificate: Buffer, + issuer: Buffer, + callback: (err: Error | null, resp: Buffer) => void, + ) => void, + ): this; + prependOnceListener( + event: "resumeSession", + listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void, + ): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; + } + /** + * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. + */ + interface SecurePair { + encrypted: TLSSocket; + cleartext: TLSSocket; + } + type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; + interface SecureContextOptions { + /** + * If set, this will be called when a client opens a connection using the ALPN extension. + * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, + * respectively containing the server name from the SNI extension (if any) and an array of + * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, + * which will be returned to the client as the selected ALPN protocol, or `undefined`, + * to reject the connection with a fatal alert. If a string is returned that does not match one of + * the client's ALPN protocols, an error will be thrown. + * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. + */ + ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; + /** + * Optionally override the trusted CA certificates. Default is to trust + * the well-known CAs curated by Mozilla. Mozilla's CAs are completely + * replaced when CAs are explicitly specified using this option. + */ + ca?: string | Buffer | Array | undefined; + /** + * Cert chains in PEM format. One cert chain should be provided per + * private key. Each cert chain should consist of the PEM formatted + * certificate for a provided private key, followed by the PEM + * formatted intermediate certificates (if any), in order, and not + * including the root CA (the root CA must be pre-known to the peer, + * see ca). When providing multiple cert chains, they do not have to + * be in the same order as their private keys in key. If the + * intermediate certificates are not provided, the peer will not be + * able to validate the certificate, and the handshake will fail. + */ + cert?: string | Buffer | Array | undefined; + /** + * Colon-separated list of supported signature algorithms. The list + * can contain digest algorithms (SHA256, MD5 etc.), public key + * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g + * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). + */ + sigalgs?: string | undefined; + /** + * Cipher suite specification, replacing the default. For more + * information, see modifying the default cipher suite. Permitted + * ciphers can be obtained via tls.getCiphers(). Cipher names must be + * uppercased in order for OpenSSL to accept them. + */ + ciphers?: string | undefined; + /** + * Name of an OpenSSL engine which can provide the client certificate. + */ + clientCertEngine?: string | undefined; + /** + * PEM formatted CRLs (Certificate Revocation Lists). + */ + crl?: string | Buffer | Array | undefined; + /** + * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. + * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. + * ECDHE-based perfect forward secrecy will still be available. + */ + dhparam?: string | Buffer | undefined; + /** + * A string describing a named curve or a colon separated list of curve + * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key + * agreement. Set to auto to select the curve automatically. Use + * crypto.getCurves() to obtain a list of available curve names. On + * recent releases, openssl ecparam -list_curves will also display the + * name and description of each available elliptic curve. Default: + * tls.DEFAULT_ECDH_CURVE. + */ + ecdhCurve?: string | undefined; + /** + * Attempt to use the server's cipher suite preferences instead of the + * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be + * set in secureOptions + */ + honorCipherOrder?: boolean | undefined; + /** + * Private keys in PEM format. PEM allows the option of private keys + * being encrypted. Encrypted keys will be decrypted with + * options.passphrase. Multiple keys using different algorithms can be + * provided either as an array of unencrypted key strings or buffers, + * or an array of objects in the form {pem: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted keys will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + key?: string | Buffer | Array | undefined; + /** + * Name of an OpenSSL engine to get private key from. Should be used + * together with privateKeyIdentifier. + */ + privateKeyEngine?: string | undefined; + /** + * Identifier of a private key managed by an OpenSSL engine. Should be + * used together with privateKeyEngine. Should not be set together with + * key, because both options define a private key in different ways. + */ + privateKeyIdentifier?: string | undefined; + /** + * Optionally set the maximum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. + * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using + * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to + * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. + */ + maxVersion?: SecureVersion | undefined; + /** + * Optionally set the minimum TLS version to allow. One + * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the + * `secureProtocol` option, use one or the other. It is not recommended to use + * less than TLSv1.2, but it may be required for interoperability. + * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using + * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to + * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to + * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. + */ + minVersion?: SecureVersion | undefined; + /** + * Shared passphrase used for a single private key and/or a PFX. + */ + passphrase?: string | undefined; + /** + * PFX or PKCS12 encoded private key and certificate chain. pfx is an + * alternative to providing key and cert individually. PFX is usually + * encrypted, if it is, passphrase will be used to decrypt it. Multiple + * PFX can be provided either as an array of unencrypted PFX buffers, + * or an array of objects in the form {buf: [, + * passphrase: ]}. The object form can only occur in an array. + * object.passphrase is optional. Encrypted PFX will be decrypted with + * object.passphrase if provided, or options.passphrase if it is not. + */ + pfx?: string | Buffer | Array | undefined; + /** + * Optionally affect the OpenSSL protocol behavior, which is not + * usually necessary. This should be used carefully if at all! Value is + * a numeric bitmask of the SSL_OP_* options from OpenSSL Options + */ + secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options + /** + * Legacy mechanism to select the TLS protocol version to use, it does + * not support independent control of the minimum and maximum version, + * and does not support limiting the protocol to TLSv1.3. Use + * minVersion and maxVersion instead. The possible values are listed as + * SSL_METHODS, use the function names as strings. For example, use + * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow + * any TLS protocol version up to TLSv1.3. It is not recommended to use + * TLS versions less than 1.2, but it may be required for + * interoperability. Default: none, see minVersion. + */ + secureProtocol?: string | undefined; + /** + * Opaque identifier used by servers to ensure session state is not + * shared between applications. Unused by clients. + */ + sessionIdContext?: string | undefined; + /** + * 48-bytes of cryptographically strong pseudo-random data. + * See Session Resumption for more information. + */ + ticketKeys?: Buffer | undefined; + /** + * The number of seconds after which a TLS session created by the + * server will no longer be resumable. See Session Resumption for more + * information. Default: 300. + */ + sessionTimeout?: number | undefined; + } + interface SecureContext { + context: any; + } + /** + * Verifies the certificate `cert` is issued to `hostname`. + * + * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on + * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). + * + * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as + * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. + * + * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The + * overwriting function can call `tls.checkServerIdentity()` of course, to augment + * the checks done with additional verification. + * + * This function is only called if the certificate passed all other checks, such as + * being issued by trusted CA (`options.ca`). + * + * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name + * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use + * a custom `options.checkServerIdentity` function that implements the desired behavior. + * @since v0.8.4 + * @param hostname The host name or IP address to verify the certificate against. + * @param cert A `certificate object` representing the peer's certificate. + */ + function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; + /** + * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is + * automatically set as a listener for the `'secureConnection'` event. + * + * The `ticketKeys` options is automatically shared between `node:cluster` module + * workers. + * + * The following illustrates a simple echo server: + * + * ```js + * const tls = require('node:tls'); + * const fs = require('node:fs'); + * + * const options = { + * key: fs.readFileSync('server-key.pem'), + * cert: fs.readFileSync('server-cert.pem'), + * + * // This is necessary only if using client certificate authentication. + * requestCert: true, + * + * // This is necessary only if the client uses a self-signed certificate. + * ca: [ fs.readFileSync('client-cert.pem') ], + * }; + * + * const server = tls.createServer(options, (socket) => { + * console.log('server connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * socket.write('welcome!\n'); + * socket.setEncoding('utf8'); + * socket.pipe(socket); + * }); + * server.listen(8000, () => { + * console.log('server bound'); + * }); + * ``` + * + * The server can be tested by connecting to it using the example client from {@link connect}. + * @since v0.3.2 + */ + function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; + function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; + /** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * `tls.connect()` returns a {@link TLSSocket} object. + * + * Unlike the `https` API, `tls.connect()` does not enable the + * SNI (Server Name Indication) extension by default, which may cause some + * servers to return an incorrect certificate or reject the connection + * altogether. To enable SNI, set the `servername` option in addition + * to `host`. + * + * The following illustrates a client for the echo server example from {@link createServer}: + * + * ```js + * // Assumes an echo server that is listening on port 8000. + * const tls = require('node:tls'); + * const fs = require('node:fs'); + * + * const options = { + * // Necessary only if the server requires client certificate authentication. + * key: fs.readFileSync('client-key.pem'), + * cert: fs.readFileSync('client-cert.pem'), + * + * // Necessary only if the server uses a self-signed certificate. + * ca: [ fs.readFileSync('server-cert.pem') ], + * + * // Necessary only if the server's cert isn't for "localhost". + * checkServerIdentity: () => { return null; }, + * }; + * + * const socket = tls.connect(8000, options, () => { + * console.log('client connected', + * socket.authorized ? 'authorized' : 'unauthorized'); + * process.stdin.pipe(socket); + * process.stdin.resume(); + * }); + * socket.setEncoding('utf8'); + * socket.on('data', (data) => { + * console.log(data); + * }); + * socket.on('end', () => { + * console.log('server ends connection'); + * }); + * ``` + * @since v0.11.3 + */ + function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + function connect( + port: number, + host?: string, + options?: ConnectionOptions, + secureConnectListener?: () => void, + ): TLSSocket; + function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; + /** + * Creates a new secure pair object with two streams, one of which reads and writes + * the encrypted data and the other of which reads and writes the cleartext data. + * Generally, the encrypted stream is piped to/from an incoming encrypted data + * stream and the cleartext one is used as a replacement for the initial encrypted + * stream. + * + * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties. + * + * Using `cleartext` has the same API as {@link TLSSocket}. + * + * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: + * + * ```js + * pair = tls.createSecurePair(// ... ); + * pair.encrypted.pipe(socket); + * socket.pipe(pair.encrypted); + * ``` + * + * can be replaced by: + * + * ```js + * secureSocket = tls.TLSSocket(socket, options); + * ``` + * + * where `secureSocket` has the same API as `pair.cleartext`. + * @since v0.3.2 + * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. + * @param context A secure context object as returned by `tls.createSecureContext()` + * @param isServer `true` to specify that this TLS connection should be opened as a server. + * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. + * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. + */ + function createSecurePair( + context?: SecureContext, + isServer?: boolean, + requestCert?: boolean, + rejectUnauthorized?: boolean, + ): SecurePair; + /** + * `{@link createServer}` sets the default value of the `honorCipherOrder` option + * to `true`, other APIs that create secure contexts leave it unset. + * + * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated + * from `process.argv` as the default value of the `sessionIdContext` option, other + * APIs that create secure contexts have no default value. + * + * The `tls.createSecureContext()` method creates a `SecureContext` object. It is + * usable as an argument to several `tls` APIs, such as `server.addContext()`, + * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. + * + * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. + * + * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of + * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). + * + * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength + * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can + * be used to create custom parameters. The key length must be greater than or + * equal to 1024 bits or else an error will be thrown. Although 1024 bits is + * permissible, use 2048 bits or larger for stronger security. + * @since v0.11.13 + */ + function createSecureContext(options?: SecureContextOptions): SecureContext; + /** + * Returns an array with the names of the supported TLS ciphers. The names are + * lower-case for historical reasons, but must be uppercased to be used in + * the `ciphers` option of `{@link createSecureContext}`. + * + * Not all supported ciphers are enabled by default. See + * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v20.x/api/tls.html#modifying-the-default-tls-cipher-suite). + * + * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for + * TLSv1.2 and below. + * + * ```js + * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] + * ``` + * @since v0.10.2 + */ + function getCiphers(): string[]; + /** + * The default curve name to use for ECDH key agreement in a tls server. + * The default value is `'auto'`. See `{@link createSecureContext()}` for further + * information. + * @since v0.11.13 + */ + let DEFAULT_ECDH_CURVE: string; + /** + * The default value of the `maxVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless + * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using + * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the highest maximum is used. + * @since v11.4.0 + */ + let DEFAULT_MAX_VERSION: SecureVersion; + /** + * The default value of the `minVersion` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported TLS protocol versions, + * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless + * changed using CLI options. Using `--tls-min-v1.0` sets the default to + * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using + * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options + * are provided, the lowest minimum is used. + * @since v11.4.0 + */ + let DEFAULT_MIN_VERSION: SecureVersion; + /** + * The default value of the `ciphers` option of `{@link createSecureContext()}`. + * It can be assigned any of the supported OpenSSL ciphers. + * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless + * changed using CLI options using `--tls-default-ciphers`. + * @since v19.8.0 + */ + let DEFAULT_CIPHERS: string; + /** + * An immutable array of strings representing the root certificates (in PEM format) + * from the bundled Mozilla CA store as supplied by the current Node.js version. + * + * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store + * that is fixed at release time. It is identical on all supported platforms. + * @since v12.3.0 + */ + const rootCertificates: readonly string[]; +} +declare module "node:tls" { + export * from "tls"; +} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts new file mode 100644 index 0000000..1089c93 --- /dev/null +++ b/node_modules/@types/node/trace_events.d.ts @@ -0,0 +1,197 @@ +/** + * The `node:trace_events` module provides a mechanism to centralize tracing information + * generated by V8, Node.js core, and userspace code. + * + * Tracing can be enabled with the `--trace-event-categories` command-line flag + * or by using the `trace_events` module. The `--trace-event-categories` flag + * accepts a list of comma-separated category names. + * + * The available categories are: + * + * * `node`: An empty placeholder. + * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) trace data. + * The [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. + * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. + * * `node.console`: Enables capture of `console.time()` and `console.count()` output. + * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. + * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. + * * `node.dns.native`: Enables capture of trace data for DNS queries. + * * `node.net.native`: Enables capture of trace data for network. + * * `node.environment`: Enables capture of Node.js Environment milestones. + * * `node.fs.sync`: Enables capture of trace data for file system sync methods. + * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. + * * `node.fs.async`: Enables capture of trace data for file system async methods. + * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. + * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v20.x/api/perf_hooks.html) measurements. + * * `node.perf.usertiming`: Enables capture of only Performance API User Timing + * measures and marks. + * * `node.perf.timerify`: Enables capture of only Performance API timerify + * measurements. + * * `node.promises.rejections`: Enables capture of trace data tracking the number + * of unhandled Promise rejections and handled-after-rejections. + * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. + * * `v8`: The [V8](https://nodejs.org/docs/latest-v20.x/api/v8.html) events are GC, compiling, and execution related. + * * `node.http`: Enables capture of trace data for http request / response. + * + * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. + * + * ```bash + * node --trace-event-categories v8,node,node.async_hooks server.js + * ``` + * + * Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be + * used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. + * + * ```bash + * node --trace-events-enabled + * + * # is equivalent to + * + * node --trace-event-categories v8,node,node.async_hooks + * ``` + * + * Alternatively, trace events may be enabled using the `node:trace_events` module: + * + * ```js + * const trace_events = require('node:trace_events'); + * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); + * tracing.enable(); // Enable trace event capture for the 'node.perf' category + * + * // do work + * + * tracing.disable(); // Disable trace event capture for the 'node.perf' category + * ``` + * + * Running Node.js with tracing enabled will produce log files that can be opened + * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. + * + * The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can + * be specified with `--trace-event-file-pattern` that accepts a template + * string that supports `${rotation}` and `${pid}`: + * + * ```bash + * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js + * ``` + * + * To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers + * in your code, such as: + * + * ```js + * process.on('SIGINT', function onSigint() { + * console.info('Received SIGINT.'); + * process.exit(130); // Or applicable exit code depending on OS and signal + * }); + * ``` + * + * The tracing system uses the same time source + * as the one used by `process.hrtime()`. + * However the trace-event timestamps are expressed in microseconds, + * unlike `process.hrtime()` which returns nanoseconds. + * + * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#class-worker) threads. + * @experimental + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/trace_events.js) + */ +declare module "trace_events" { + /** + * The `Tracing` object is used to enable or disable tracing for sets of + * categories. Instances are created using the + * `trace_events.createTracing()` method. + * + * When created, the `Tracing` object is disabled. Calling the + * `tracing.enable()` method adds the categories to the set of enabled trace + * event categories. Calling `tracing.disable()` will remove the categories + * from the set of enabled trace event categories. + */ + interface Tracing { + /** + * A comma-separated list of the trace event categories covered by this + * `Tracing` object. + * @since v10.0.0 + */ + readonly categories: string; + /** + * Disables this `Tracing` object. + * + * Only trace event categories _not_ covered by other enabled `Tracing` + * objects and _not_ specified by the `--trace-event-categories` flag + * will be disabled. + * + * ```js + * const trace_events = require('node:trace_events'); + * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); + * t1.enable(); + * t2.enable(); + * + * // Prints 'node,node.perf,v8' + * console.log(trace_events.getEnabledCategories()); + * + * t2.disable(); // Will only disable emission of the 'node.perf' category + * + * // Prints 'node,v8' + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + disable(): void; + /** + * Enables this `Tracing` object for the set of categories covered by + * the `Tracing` object. + * @since v10.0.0 + */ + enable(): void; + /** + * `true` only if the `Tracing` object has been enabled. + * @since v10.0.0 + */ + readonly enabled: boolean; + } + interface CreateTracingOptions { + /** + * An array of trace category names. Values included in the array are + * coerced to a string when possible. An error will be thrown if the + * value cannot be coerced. + */ + categories: string[]; + } + /** + * Creates and returns a `Tracing` object for the given set of `categories`. + * + * ```js + * const trace_events = require('node:trace_events'); + * const categories = ['node.perf', 'node.async_hooks']; + * const tracing = trace_events.createTracing({ categories }); + * tracing.enable(); + * // do stuff + * tracing.disable(); + * ``` + * @since v10.0.0 + */ + function createTracing(options: CreateTracingOptions): Tracing; + /** + * Returns a comma-separated list of all currently-enabled trace event + * categories. The current set of enabled trace event categories is determined + * by the _union_ of all currently-enabled `Tracing` objects and any categories + * enabled using the `--trace-event-categories` flag. + * + * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. + * + * ```js + * const trace_events = require('node:trace_events'); + * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); + * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); + * const t3 = trace_events.createTracing({ categories: ['v8'] }); + * + * t1.enable(); + * t2.enable(); + * + * console.log(trace_events.getEnabledCategories()); + * ``` + * @since v10.0.0 + */ + function getEnabledCategories(): string | undefined; +} +declare module "node:trace_events" { + export * from "trace_events"; +} diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts new file mode 100644 index 0000000..08727a8 --- /dev/null +++ b/node_modules/@types/node/tty.d.ts @@ -0,0 +1,208 @@ +/** + * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module + * directly. However, it can be accessed using: + * + * ```js + * const tty = require('node:tty'); + * ``` + * + * When Node.js detects that it is being run with a text terminal ("TTY") + * attached, `process.stdin` will, by default, be initialized as an instance of `tty.ReadStream` and both `process.stdout` and `process.stderr` will, by + * default, be instances of `tty.WriteStream`. The preferred method of determining + * whether Node.js is being run within a TTY context is to check that the value of + * the `process.stdout.isTTY` property is `true`: + * + * ```console + * $ node -p -e "Boolean(process.stdout.isTTY)" + * true + * $ node -p -e "Boolean(process.stdout.isTTY)" | cat + * false + * ``` + * + * In most cases, there should be little to no reason for an application to + * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tty.js) + */ +declare module "tty" { + import * as net from "node:net"; + /** + * The `tty.isatty()` method returns `true` if the given `fd` is associated with + * a TTY and `false` if it is not, including whenever `fd` is not a non-negative + * integer. + * @since v0.5.8 + * @param fd A numeric file descriptor + */ + function isatty(fd: number): boolean; + /** + * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js + * process and there should be no reason to create additional instances. + * @since v0.5.8 + */ + class ReadStream extends net.Socket { + constructor(fd: number, options?: net.SocketConstructorOpts); + /** + * A `boolean` that is `true` if the TTY is currently configured to operate as a + * raw device. + * + * This flag is always `false` when a process starts, even if the terminal is + * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. + * @since v0.7.7 + */ + isRaw: boolean; + /** + * Allows configuration of `tty.ReadStream` so that it operates as a raw device. + * + * When in raw mode, input is always available character-by-character, not + * including modifiers. Additionally, all special processing of characters by the + * terminal is disabled, including echoing input + * characters. Ctrl+C will no longer cause a `SIGINT` when + * in this mode. + * @since v0.7.7 + * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` + * property will be set to the resulting mode. + * @return The read stream instance. + */ + setRawMode(mode: boolean): this; + /** + * A `boolean` that is always `true` for `tty.ReadStream` instances. + * @since v0.5.8 + */ + isTTY: boolean; + } + /** + * -1 - to the left from cursor + * 0 - the entire line + * 1 - to the right from cursor + */ + type Direction = -1 | 0 | 1; + /** + * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there + * should be no reason to create additional instances. + * @since v0.5.8 + */ + class WriteStream extends net.Socket { + constructor(fd: number); + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "resize", listener: () => void): this; + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "resize"): boolean; + on(event: string, listener: (...args: any[]) => void): this; + on(event: "resize", listener: () => void): this; + once(event: string, listener: (...args: any[]) => void): this; + once(event: "resize", listener: () => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "resize", listener: () => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "resize", listener: () => void): this; + /** + * `writeStream.clearLine()` clears the current line of this `WriteStream` in a + * direction identified by `dir`. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearLine(dir: Direction, callback?: () => void): boolean; + /** + * `writeStream.clearScreenDown()` clears this `WriteStream` from the current + * cursor down. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + clearScreenDown(callback?: () => void): boolean; + /** + * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified + * position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + cursorTo(x: number, y?: number, callback?: () => void): boolean; + cursorTo(x: number, callback: () => void): boolean; + /** + * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its + * current position. + * @since v0.7.7 + * @param callback Invoked once the operation completes. + * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. + */ + moveCursor(dx: number, dy: number, callback?: () => void): boolean; + /** + * Returns: + * + * * `1` for 2, + * * `4` for 16, + * * `8` for 256, + * * `24` for 16,777,216 colors supported. + * + * Use this to determine what colors the terminal supports. Due to the nature of + * colors in terminals it is possible to either have false positives or false + * negatives. It depends on process information and the environment variables that + * may lie about what terminal is used. + * It is possible to pass in an `env` object to simulate the usage of a specific + * terminal. This can be useful to check how specific environment settings behave. + * + * To enforce a specific color support, use one of the below environment settings. + * + * * 2 colors: `FORCE_COLOR = 0` (Disables colors) + * * 16 colors: `FORCE_COLOR = 1` + * * 256 colors: `FORCE_COLOR = 2` + * * 16,777,216 colors: `FORCE_COLOR = 3` + * + * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. + * @since v9.9.0 + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + getColorDepth(env?: object): number; + /** + * Returns `true` if the `writeStream` supports at least as many colors as provided + * in `count`. Minimum support is 2 (black and white). + * + * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. + * + * ```js + * process.stdout.hasColors(); + * // Returns true or false depending on if `stdout` supports at least 16 colors. + * process.stdout.hasColors(256); + * // Returns true or false depending on if `stdout` supports at least 256 colors. + * process.stdout.hasColors({ TMUX: '1' }); + * // Returns true. + * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); + * // Returns false (the environment setting pretends to support 2 ** 8 colors). + * ``` + * @since v11.13.0, v10.16.0 + * @param [count=16] The number of colors that are requested (minimum 2). + * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. + */ + hasColors(count?: number): boolean; + hasColors(env?: object): boolean; + hasColors(count: number, env?: object): boolean; + /** + * `writeStream.getWindowSize()` returns the size of the TTY + * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number + * of columns and rows in the corresponding TTY. + * @since v0.7.7 + */ + getWindowSize(): [number, number]; + /** + * A `number` specifying the number of columns the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + columns: number; + /** + * A `number` specifying the number of rows the TTY currently has. This property + * is updated whenever the `'resize'` event is emitted. + * @since v0.7.7 + */ + rows: number; + /** + * A `boolean` that is always `true`. + * @since v0.5.8 + */ + isTTY: boolean; + } +} +declare module "node:tty" { + export * from "tty"; +} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts new file mode 100644 index 0000000..b00d418 --- /dev/null +++ b/node_modules/@types/node/url.d.ts @@ -0,0 +1,944 @@ +/** + * The `node:url` module provides utilities for URL resolution and parsing. It can + * be accessed using: + * + * ```js + * import url from 'node:url'; + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/url.js) + */ +declare module "url" { + import { Blob as NodeBlob } from "node:buffer"; + import { ClientRequestArgs } from "node:http"; + import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; + // Input to `url.format` + interface UrlObject { + auth?: string | null | undefined; + hash?: string | null | undefined; + host?: string | null | undefined; + hostname?: string | null | undefined; + href?: string | null | undefined; + pathname?: string | null | undefined; + protocol?: string | null | undefined; + search?: string | null | undefined; + slashes?: boolean | null | undefined; + port?: string | number | null | undefined; + query?: string | null | ParsedUrlQueryInput | undefined; + } + // Output of `url.parse` + interface Url { + auth: string | null; + hash: string | null; + host: string | null; + hostname: string | null; + href: string; + path: string | null; + pathname: string | null; + protocol: string | null; + search: string | null; + slashes: boolean | null; + port: string | null; + query: string | null | ParsedUrlQuery; + } + interface UrlWithParsedQuery extends Url { + query: ParsedUrlQuery; + } + interface UrlWithStringQuery extends Url { + query: string | null; + } + /** + * The `url.parse()` method takes a URL string, parses it, and returns a URL + * object. + * + * A `TypeError` is thrown if `urlString` is not a string. + * + * A `URIError` is thrown if the `auth` property is present but cannot be decoded. + * + * `url.parse()` uses a lenient, non-standard algorithm for parsing URL + * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted + * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead. + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString The URL string to parse. + * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property + * on the returned URL object will be an unparsed, undecoded string. + * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the + * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. + */ + function parse(urlString: string): UrlWithStringQuery; + function parse( + urlString: string, + parseQueryString: false | undefined, + slashesDenoteHost?: boolean, + ): UrlWithStringQuery; + function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; + function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * const url = require('node:url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: URL, options?: URLFormatOptions): string; + /** + * The `url.format()` method returns a formatted URL string derived from `urlObject`. + * + * ```js + * const url = require('node:url'); + * url.format({ + * protocol: 'https', + * hostname: 'example.com', + * pathname: '/some/path', + * query: { + * page: 1, + * format: 'json', + * }, + * }); + * + * // => 'https://example.com/some/path?page=1&format=json' + * ``` + * + * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. + * + * The formatting process operates as follows: + * + * * A new empty string `result` is created. + * * If `urlObject.protocol` is a string, it is appended as-is to `result`. + * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. + * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII + * colon (`:`) character, the literal string `:` will be appended to `result`. + * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: + * * `urlObject.slashes` property is true; + * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; + * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string + * and appended to `result` followed by the literal string `@`. + * * If the `urlObject.host` property is `undefined` then: + * * If the `urlObject.hostname` is a string, it is appended to `result`. + * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, + * an `Error` is thrown. + * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: + * * The literal string `:` is appended to `result`, and + * * The value of `urlObject.port` is coerced to a string and appended to `result`. + * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. + * * If the `urlObject.pathname` property is a string that is not an empty string: + * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash + * (`/`), then the literal string `'/'` is appended to `result`. + * * The value of `urlObject.pathname` is appended to `result`. + * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the + * `querystring` module's `stringify()` method passing the value of `urlObject.query`. + * * Otherwise, if `urlObject.search` is a string: + * * If the value of `urlObject.search` _does not start_ with the ASCII question + * mark (`?`) character, the literal string `?` is appended to `result`. + * * The value of `urlObject.search` is appended to `result`. + * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. + * * If the `urlObject.hash` property is a string: + * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) + * character, the literal string `#` is appended to `result`. + * * The value of `urlObject.hash` is appended to `result`. + * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a + * string, an `Error` is thrown. + * * `result` is returned. + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + */ + function format(urlObject: UrlObject | string): string; + /** + * The `url.resolve()` method resolves a target URL relative to a base URL in a + * manner similar to that of a web browser resolving an anchor tag. + * + * ```js + * const url = require('node:url'); + * url.resolve('/one/two/three', 'four'); // '/one/two/four' + * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' + * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * + * To achieve the same result using the WHATWG URL API: + * + * ```js + * function resolve(from, to) { + * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); + * if (resolvedUrl.protocol === 'resolve:') { + * // `from` is a relative URL. + * const { pathname, search, hash } = resolvedUrl; + * return pathname + search + hash; + * } + * return resolvedUrl.toString(); + * } + * + * resolve('/one/two/three', 'four'); // '/one/two/four' + * resolve('http://example.com/', '/one'); // 'http://example.com/one' + * resolve('http://example.com/one', '/two'); // 'http://example.com/two' + * ``` + * @since v0.1.25 + * @legacy Use the WHATWG URL API instead. + * @param from The base URL to use if `to` is a relative URL. + * @param to The target URL to resolve. + */ + function resolve(from: string, to: string): string; + /** + * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an + * invalid domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToUnicode}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToASCII('español.com')); + * // Prints xn--espaol-zwa.com + * console.log(url.domainToASCII('中文.com')); + * // Prints xn--fiq228c.com + * console.log(url.domainToASCII('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToASCII(domain: string): string; + /** + * Returns the Unicode serialization of the `domain`. If `domain` is an invalid + * domain, the empty string is returned. + * + * It performs the inverse operation to {@link domainToASCII}. + * + * ```js + * import url from 'node:url'; + * + * console.log(url.domainToUnicode('xn--espaol-zwa.com')); + * // Prints español.com + * console.log(url.domainToUnicode('xn--fiq228c.com')); + * // Prints 中文.com + * console.log(url.domainToUnicode('xn--iñvalid.com')); + * // Prints an empty string + * ``` + * @since v7.4.0, v6.13.0 + */ + function domainToUnicode(domain: string): string; + /** + * This function ensures the correct decodings of percent-encoded characters as + * well as ensuring a cross-platform valid absolute path string. + * + * ```js + * import { fileURLToPath } from 'node:url'; + * + * const __filename = fileURLToPath(import.meta.url); + * + * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ + * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) + * + * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt + * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) + * + * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt + * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) + * + * new URL('file:///hello world').pathname; // Incorrect: /hello%20world + * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) + * ``` + * @since v10.12.0 + * @param url The file URL string or URL object to convert to a path. + * @return The fully-resolved platform-specific Node.js file path. + */ + function fileURLToPath(url: string | URL): string; + /** + * This function ensures that `path` is resolved absolutely, and that the URL + * control characters are correctly encoded when converting into a File URL. + * + * ```js + * import { pathToFileURL } from 'node:url'; + * + * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 + * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) + * + * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c + * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) + * ``` + * @since v10.12.0 + * @param path The path to convert to a File URL. + * @return The file URL object. + */ + function pathToFileURL(path: string): URL; + /** + * This utility function converts a URL object into an ordinary options object as + * expected by the `http.request()` and `https.request()` APIs. + * + * ```js + * import { urlToHttpOptions } from 'node:url'; + * const myURL = new URL('https://a:b@測試?abc#foo'); + * + * console.log(urlToHttpOptions(myURL)); + * /* + * { + * protocol: 'https:', + * hostname: 'xn--g6w251d', + * hash: '#foo', + * search: '?abc', + * pathname: '/', + * path: '/?abc', + * href: 'https://a:b@xn--g6w251d/?abc#foo', + * auth: 'a:b' + * } + * + * ``` + * @since v15.7.0, v14.18.0 + * @param url The `WHATWG URL` object to convert to an options object. + * @return Options object + */ + function urlToHttpOptions(url: URL): ClientRequestArgs; + interface URLFormatOptions { + /** + * `true` if the serialized URL string should include the username and password, `false` otherwise. + * @default true + */ + auth?: boolean | undefined; + /** + * `true` if the serialized URL string should include the fragment, `false` otherwise. + * @default true + */ + fragment?: boolean | undefined; + /** + * `true` if the serialized URL string should include the search query, `false` otherwise. + * @default true + */ + search?: boolean | undefined; + /** + * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to + * being Punycode encoded. + * @default false + */ + unicode?: boolean | undefined; + } + /** + * Browser-compatible `URL` class, implemented by following the WHATWG URL + * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself. + * The `URL` class is also available on the global object. + * + * In accordance with browser conventions, all properties of `URL` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. Thus, unlike `legacy urlObject`s, + * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still + * return `true`. + * @since v7.0.0, v6.13.0 + */ + class URL { + /** + * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later. + * + * ```js + * const { + * Blob, + * resolveObjectURL, + * } = require('node:buffer'); + * + * const blob = new Blob(['hello']); + * const id = URL.createObjectURL(blob); + * + * // later... + * + * const otherBlob = resolveObjectURL(id); + * console.log(otherBlob.size); + * ``` + * + * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it. + * + * `Blob` objects are registered within the current thread. If using Worker + * Threads, `Blob` objects registered within one Worker will not be available + * to other workers or the main thread. + * @since v16.7.0 + * @experimental + */ + static createObjectURL(blob: NodeBlob): string; + /** + * Removes the stored `Blob` identified by the given ID. Attempting to revoke a + * ID that isn't registered will silently fail. + * @since v16.7.0 + * @experimental + * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. + */ + static revokeObjectURL(id: string): void; + /** + * Checks if an `input` relative to the `base` can be parsed to a `URL`. + * + * ```js + * const isValid = URL.canParse('/foo', 'https://example.org/'); // true + * + * const isNotValid = URL.canParse('/foo'); // false + * ``` + * @since v19.9.0 + * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is + * `converted to a string` first. + * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. + */ + static canParse(input: string, base?: string): boolean; + constructor(input: string | { toString: () => string }, base?: string | URL); + /** + * Gets and sets the fragment portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/foo#bar'); + * console.log(myURL.hash); + * // Prints #bar + * + * myURL.hash = 'baz'; + * console.log(myURL.href); + * // Prints https://example.org/foo#baz + * ``` + * + * Invalid URL characters included in the value assigned to the `hash` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + hash: string; + /** + * Gets and sets the host portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.host); + * // Prints example.org:81 + * + * myURL.host = 'example.com:82'; + * console.log(myURL.href); + * // Prints https://example.com:82/foo + * ``` + * + * Invalid host values assigned to the `host` property are ignored. + */ + host: string; + /** + * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the + * port. + * + * ```js + * const myURL = new URL('https://example.org:81/foo'); + * console.log(myURL.hostname); + * // Prints example.org + * + * // Setting the hostname does not change the port + * myURL.hostname = 'example.com'; + * console.log(myURL.href); + * // Prints https://example.com:81/foo + * + * // Use myURL.host to change the hostname and port + * myURL.host = 'example.org:82'; + * console.log(myURL.href); + * // Prints https://example.org:82/foo + * ``` + * + * Invalid host name values assigned to the `hostname` property are ignored. + */ + hostname: string; + /** + * Gets and sets the serialized URL. + * + * ```js + * const myURL = new URL('https://example.org/foo'); + * console.log(myURL.href); + * // Prints https://example.org/foo + * + * myURL.href = 'https://example.com/bar'; + * console.log(myURL.href); + * // Prints https://example.com/bar + * ``` + * + * Getting the value of the `href` property is equivalent to calling {@link toString}. + * + * Setting the value of this property to a new value is equivalent to creating a + * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified. + * + * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown. + */ + href: string; + /** + * Gets the read-only serialization of the URL's origin. + * + * ```js + * const myURL = new URL('https://example.org/foo/bar?baz'); + * console.log(myURL.origin); + * // Prints https://example.org + * ``` + * + * ```js + * const idnURL = new URL('https://測試'); + * console.log(idnURL.origin); + * // Prints https://xn--g6w251d + * + * console.log(idnURL.hostname); + * // Prints xn--g6w251d + * ``` + */ + readonly origin: string; + /** + * Gets and sets the password portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.password); + * // Prints xyz + * + * myURL.password = '123'; + * console.log(myURL.href); + * // Prints https://abc:123@example.com/ + * ``` + * + * Invalid URL characters included in the value assigned to the `password` property + * are `percent-encoded`. The selection of which characters to + * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + password: string; + /** + * Gets and sets the path portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc/xyz?123'); + * console.log(myURL.pathname); + * // Prints /abc/xyz + * + * myURL.pathname = '/abcdef'; + * console.log(myURL.href); + * // Prints https://example.org/abcdef?123 + * ``` + * + * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters + * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + pathname: string; + /** + * Gets and sets the port portion of the URL. + * + * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will + * result in the `port` value becoming + * the empty string (`''`). + * + * The port value can be an empty string in which case the port depends on + * the protocol/scheme: + * + * + * + * Upon assigning a value to the port, the value will first be converted to a + * string using `.toString()`. + * + * If that string is invalid but it begins with a number, the leading number is + * assigned to `port`. + * If the number lies outside the range denoted above, it is ignored. + * + * ```js + * const myURL = new URL('https://example.org:8888'); + * console.log(myURL.port); + * // Prints 8888 + * + * // Default ports are automatically transformed to the empty string + * // (HTTPS protocol's default port is 443) + * myURL.port = '443'; + * console.log(myURL.port); + * // Prints the empty string + * console.log(myURL.href); + * // Prints https://example.org/ + * + * myURL.port = 1234; + * console.log(myURL.port); + * // Prints 1234 + * console.log(myURL.href); + * // Prints https://example.org:1234/ + * + * // Completely invalid port strings are ignored + * myURL.port = 'abcd'; + * console.log(myURL.port); + * // Prints 1234 + * + * // Leading numbers are treated as a port number + * myURL.port = '5678abcd'; + * console.log(myURL.port); + * // Prints 5678 + * + * // Non-integers are truncated + * myURL.port = 1234.5678; + * console.log(myURL.port); + * // Prints 1234 + * + * // Out-of-range numbers which are not represented in scientific notation + * // will be ignored. + * myURL.port = 1e10; // 10000000000, will be range-checked as described below + * console.log(myURL.port); + * // Prints 1234 + * ``` + * + * Numbers which contain a decimal point, + * such as floating-point numbers or numbers in scientific notation, + * are not an exception to this rule. + * Leading numbers up to the decimal point will be set as the URL's port, + * assuming they are valid: + * + * ```js + * myURL.port = 4.567e21; + * console.log(myURL.port); + * // Prints 4 (because it is the leading number in the string '4.567e21') + * ``` + */ + port: string; + /** + * Gets and sets the protocol portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org'); + * console.log(myURL.protocol); + * // Prints https: + * + * myURL.protocol = 'ftp'; + * console.log(myURL.href); + * // Prints ftp://example.org/ + * ``` + * + * Invalid URL protocol values assigned to the `protocol` property are ignored. + */ + protocol: string; + /** + * Gets and sets the serialized query portion of the URL. + * + * ```js + * const myURL = new URL('https://example.org/abc?123'); + * console.log(myURL.search); + * // Prints ?123 + * + * myURL.search = 'abc=xyz'; + * console.log(myURL.href); + * // Prints https://example.org/abc?abc=xyz + * ``` + * + * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + search: string; + /** + * Gets the `URLSearchParams` object representing the query parameters of the + * URL. This property is read-only but the `URLSearchParams` object it provides + * can be used to mutate the URL instance; to replace the entirety of query + * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details. + * + * Use care when using `.searchParams` to modify the `URL` because, + * per the WHATWG specification, the `URLSearchParams` object uses + * different rules to determine which characters to percent-encode. For + * instance, the `URL` object will not percent encode the ASCII tilde (`~`) + * character, while `URLSearchParams` will always encode it: + * + * ```js + * const myURL = new URL('https://example.org/abc?foo=~bar'); + * + * console.log(myURL.search); // prints ?foo=~bar + * + * // Modify the URL via searchParams... + * myURL.searchParams.sort(); + * + * console.log(myURL.search); // prints ?foo=%7Ebar + * ``` + */ + readonly searchParams: URLSearchParams; + /** + * Gets and sets the username portion of the URL. + * + * ```js + * const myURL = new URL('https://abc:xyz@example.com'); + * console.log(myURL.username); + * // Prints abc + * + * myURL.username = '123'; + * console.log(myURL.href); + * // Prints https://123:xyz@example.com/ + * ``` + * + * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which + * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. + */ + username: string; + /** + * The `toString()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toJSON}. + */ + toString(): string; + /** + * The `toJSON()` method on the `URL` object returns the serialized URL. The + * value returned is equivalent to that of {@link href} and {@link toString}. + * + * This method is automatically called when an `URL` object is serialized + * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). + * + * ```js + * const myURLs = [ + * new URL('https://www.example.com'), + * new URL('https://test.example.org'), + * ]; + * console.log(JSON.stringify(myURLs)); + * // Prints ["https://www.example.com/","https://test.example.org/"] + * ``` + */ + toJSON(): string; + } + /** + * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the + * four following constructors. + * The `URLSearchParams` class is also available on the global object. + * + * The WHATWG `URLSearchParams` interface and the `querystring` module have + * similar purpose, but the purpose of the `querystring` module is more + * general, as it allows the customization of delimiter characters (`&` and `=`). + * On the other hand, this API is designed purely for URL query strings. + * + * ```js + * const myURL = new URL('https://example.org/?abc=123'); + * console.log(myURL.searchParams.get('abc')); + * // Prints 123 + * + * myURL.searchParams.append('abc', 'xyz'); + * console.log(myURL.href); + * // Prints https://example.org/?abc=123&abc=xyz + * + * myURL.searchParams.delete('abc'); + * myURL.searchParams.set('a', 'b'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * + * const newSearchParams = new URLSearchParams(myURL.searchParams); + * // The above is equivalent to + * // const newSearchParams = new URLSearchParams(myURL.search); + * + * newSearchParams.append('a', 'c'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b + * console.log(newSearchParams.toString()); + * // Prints a=b&a=c + * + * // newSearchParams.toString() is implicitly called + * myURL.search = newSearchParams; + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * newSearchParams.delete('a'); + * console.log(myURL.href); + * // Prints https://example.org/?a=b&a=c + * ``` + * @since v7.5.0, v6.13.0 + */ + class URLSearchParams implements Iterable<[string, string]> { + constructor( + init?: + | URLSearchParams + | string + | Record + | Iterable<[string, string]> + | ReadonlyArray<[string, string]>, + ); + /** + * Append a new name-value pair to the query string. + */ + append(name: string, value: string): void; + /** + * If `value` is provided, removes all name-value pairs + * where name is `name` and value is `value`. + * + * If `value` is not provided, removes all name-value pairs whose name is `name`. + */ + delete(name: string, value?: string): void; + /** + * Returns an ES6 `Iterator` over each of the name-value pairs in the query. + * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`. + * + * Alias for `urlSearchParams[@@iterator]()`. + */ + entries(): IterableIterator<[string, string]>; + /** + * Iterates over each name-value pair in the query and invokes the given function. + * + * ```js + * const myURL = new URL('https://example.org/?a=b&c=d'); + * myURL.searchParams.forEach((value, name, searchParams) => { + * console.log(name, value, myURL.searchParams === searchParams); + * }); + * // Prints: + * // a b true + * // c d true + * ``` + * @param fn Invoked for each name-value pair in the query + * @param thisArg To be used as `this` value for when `fn` is called + */ + forEach( + fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, + thisArg?: TThis, + ): void; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns the values of all name-value pairs whose name is `name`. If there are + * no such pairs, an empty array is returned. + */ + getAll(name: string): string[]; + /** + * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument. + * + * If `value` is provided, returns `true` when name-value pair with + * same `name` and `value` exists. + * + * If `value` is not provided, returns `true` if there is at least one name-value + * pair whose name is `name`. + */ + has(name: string, value?: string): boolean; + /** + * Returns an ES6 `Iterator` over the names of each name-value pair. + * + * ```js + * const params = new URLSearchParams('foo=bar&foo=baz'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // foo + * ``` + */ + keys(): IterableIterator; + /** + * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value` and remove all others. If not, + * append the name-value pair to the query string. + * + * ```js + * const params = new URLSearchParams(); + * params.append('foo', 'bar'); + * params.append('foo', 'baz'); + * params.append('abc', 'def'); + * console.log(params.toString()); + * // Prints foo=bar&foo=baz&abc=def + * + * params.set('foo', 'def'); + * params.set('xyz', 'opq'); + * console.log(params.toString()); + * // Prints foo=def&abc=def&xyz=opq + * ``` + */ + set(name: string, value: string): void; + /** + * The total number of parameter entries. + * @since v19.8.0 + */ + readonly size: number; + /** + * Sort all existing name-value pairs in-place by their names. Sorting is done + * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs + * with the same name is preserved. + * + * This method can be used, in particular, to increase cache hits. + * + * ```js + * const params = new URLSearchParams('query[]=abc&type=search&query[]=123'); + * params.sort(); + * console.log(params.toString()); + * // Prints query%5B%5D=abc&query%5B%5D=123&type=search + * ``` + * @since v7.7.0, v6.13.0 + */ + sort(): void; + /** + * Returns the search parameters serialized as a string, with characters + * percent-encoded where necessary. + */ + toString(): string; + /** + * Returns an ES6 `Iterator` over the values of each name-value pair. + */ + values(): IterableIterator; + [Symbol.iterator](): IterableIterator<[string, string]>; + } + import { URL as _URL, URLSearchParams as _URLSearchParams } from "url"; + global { + interface URLSearchParams extends _URLSearchParams {} + interface URL extends _URL {} + interface Global { + URL: typeof _URL; + URLSearchParams: typeof _URLSearchParams; + } + /** + * `URL` class is a global reference for `require('url').URL` + * https://nodejs.org/api/url.html#the-whatwg-url-api + * @since v10.0.0 + */ + var URL: typeof globalThis extends { + onmessage: any; + URL: infer T; + } ? T + : typeof _URL; + /** + * `URLSearchParams` class is a global reference for `require('url').URLSearchParams` + * https://nodejs.org/api/url.html#class-urlsearchparams + * @since v10.0.0 + */ + var URLSearchParams: typeof globalThis extends { + onmessage: any; + URLSearchParams: infer T; + } ? T + : typeof _URLSearchParams; + } +} +declare module "node:url" { + export * from "url"; +} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts new file mode 100644 index 0000000..deed654 --- /dev/null +++ b/node_modules/@types/node/util.d.ts @@ -0,0 +1,2276 @@ +/** + * The `node:util` module supports the needs of Node.js internal APIs. Many of the + * utilities are useful for application and module developers as well. To access + * it: + * + * ```js + * const util = require('node:util'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/util.js) + */ +declare module "util" { + import * as types from "node:util/types"; + export interface InspectOptions { + /** + * If `true`, object's non-enumerable symbols and properties are included in the formatted result. + * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). + * @default false + */ + showHidden?: boolean | undefined; + /** + * Specifies the number of times to recurse while formatting object. + * This is useful for inspecting large objects. + * To recurse up to the maximum call stack size pass `Infinity` or `null`. + * @default 2 + */ + depth?: number | null | undefined; + /** + * If `true`, the output is styled with ANSI color codes. Colors are customizable. + */ + colors?: boolean | undefined; + /** + * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. + * @default true + */ + customInspect?: boolean | undefined; + /** + * If `true`, `Proxy` inspection includes the target and handler objects. + * @default false + */ + showProxy?: boolean | undefined; + /** + * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements + * to include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no elements. + * @default 100 + */ + maxArrayLength?: number | null | undefined; + /** + * Specifies the maximum number of characters to + * include when formatting. Set to `null` or `Infinity` to show all elements. + * Set to `0` or negative to show no characters. + * @default 10000 + */ + maxStringLength?: number | null | undefined; + /** + * The length at which input values are split across multiple lines. + * Set to `Infinity` to format the input as a single line + * (in combination with `compact` set to `true` or any number >= `1`). + * @default 80 + */ + breakLength?: number | undefined; + /** + * Setting this to `false` causes each object key + * to be displayed on a new line. It will also add new lines to text that is + * longer than `breakLength`. If set to a number, the most `n` inner elements + * are united on a single line as long as all properties fit into + * `breakLength`. Short array elements are also grouped together. Note that no + * text will be reduced below 16 characters, no matter the `breakLength` size. + * For more information, see the example below. + * @default true + */ + compact?: boolean | number | undefined; + /** + * If set to `true` or a function, all properties of an object, and `Set` and `Map` + * entries are sorted in the resulting string. + * If set to `true` the default sort is used. + * If set to a function, it is used as a compare function. + */ + sorted?: boolean | ((a: string, b: string) => number) | undefined; + /** + * If set to `true`, getters are going to be + * inspected as well. If set to `'get'` only getters without setter are going + * to be inspected. If set to `'set'` only getters having a corresponding + * setter are going to be inspected. This might cause side effects depending on + * the getter function. + * @default false + */ + getters?: "get" | "set" | boolean | undefined; + /** + * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. + * @default false + */ + numericSeparator?: boolean | undefined; + } + export type Style = + | "special" + | "number" + | "bigint" + | "boolean" + | "undefined" + | "null" + | "string" + | "symbol" + | "date" + | "regexp" + | "module"; + export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect + export interface InspectOptionsStylized extends InspectOptions { + stylize(text: string, styleType: Style): string; + } + /** + * The `util.format()` method returns a formatted string using the first argument + * as a `printf`-like format string which can contain zero or more format + * specifiers. Each specifier is replaced with the converted value from the + * corresponding argument. Supported specifiers are: + * + * If a specifier does not have a corresponding argument, it is not replaced: + * + * ```js + * util.format('%s:%s', 'foo'); + * // Returns: 'foo:%s' + * ``` + * + * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. + * + * If there are more arguments passed to the `util.format()` method than the + * number of specifiers, the extra arguments are concatenated to the returned + * string, separated by spaces: + * + * ```js + * util.format('%s:%s', 'foo', 'bar', 'baz'); + * // Returns: 'foo:bar baz' + * ``` + * + * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: + * + * ```js + * util.format(1, 2, 3); + * // Returns: '1 2 3' + * ``` + * + * If only one argument is passed to `util.format()`, it is returned as it is + * without any formatting: + * + * ```js + * util.format('%% %s'); + * // Returns: '%% %s' + * ``` + * + * `util.format()` is a synchronous method that is intended as a debugging tool. + * Some input values can have a significant performance overhead that can block the + * event loop. Use this function with care and never in a hot code path. + * @since v0.5.3 + * @param format A `printf`-like format string. + */ + export function format(format?: any, ...param: any[]): string; + /** + * This function is identical to {@link format}, except in that it takes + * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. + * + * ```js + * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); + * // Returns 'See object { foo: 42 }', where `42` is colored as a number + * // when printed to a terminal. + * ``` + * @since v10.0.0 + */ + export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; + /** + * Returns the string name for a numeric error code that comes from a Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const name = util.getSystemErrorName(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v9.7.0 + */ + export function getSystemErrorName(err: number): string; + /** + * Returns a Map of all system error codes available from the Node.js API. + * The mapping between error codes and error names is platform-dependent. + * See `Common System Errors` for the names of common errors. + * + * ```js + * fs.access('file/that/does/not/exist', (err) => { + * const errorMap = util.getSystemErrorMap(); + * const name = errorMap.get(err.errno); + * console.error(name); // ENOENT + * }); + * ``` + * @since v16.0.0, v14.17.0 + */ + export function getSystemErrorMap(): Map; + /** + * The `util.log()` method prints the given `string` to `stdout` with an included + * timestamp. + * + * ```js + * const util = require('node:util'); + * + * util.log('Timestamped message.'); + * ``` + * @since v0.3.0 + * @deprecated Since v6.0.0 - Use a third party module instead. + */ + export function log(string: string): void; + /** + * Returns the `string` after replacing any surrogate code points + * (or equivalently, any unpaired surrogate code units) with the + * Unicode "replacement character" U+FFFD. + * @since v16.8.0, v14.18.0 + */ + export function toUSVString(string: string): string; + /** + * Creates and returns an `AbortController` instance whose `AbortSignal` is marked + * as transferable and can be used with `structuredClone()` or `postMessage()`. + * @since v18.11.0 + * @experimental + * @returns A transferable AbortController + */ + export function transferableAbortController(): AbortController; + /** + * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. + * + * ```js + * const signal = transferableAbortSignal(AbortSignal.timeout(100)); + * const channel = new MessageChannel(); + * channel.port2.postMessage(signal, [signal]); + * ``` + * @since v18.11.0 + * @experimental + * @param signal The AbortSignal + * @returns The same AbortSignal + */ + export function transferableAbortSignal(signal: AbortSignal): AbortSignal; + /** + * Listens to abort event on the provided `signal` and + * returns a promise that is fulfilled when the `signal` is + * aborted. If the passed `resource` is garbage collected before the `signal` is + * aborted, the returned promise shall remain pending indefinitely. + * + * ```js + * import { aborted } from 'node:util'; + * + * const dependent = obtainSomethingAbortable(); + * + * aborted(dependent.signal, dependent).then(() => { + * // Do something when dependent is aborted. + * }); + * + * dependent.on('event', () => { + * dependent.abort(); + * }); + * ``` + * @since v19.7.0 + * @experimental + * @param resource Any non-null entity, reference to which is held weakly. + */ + export function aborted(signal: AbortSignal, resource: any): Promise; + /** + * The `util.inspect()` method returns a string representation of `object` that is + * intended for debugging. The output of `util.inspect` may change at any time + * and should not be depended upon programmatically. Additional `options` may be + * passed that alter the result. `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make + * an identifiable tag for an inspected value. + * + * ```js + * class Foo { + * get [Symbol.toStringTag]() { + * return 'bar'; + * } + * } + * + * class Bar {} + * + * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); + * + * util.inspect(new Foo()); // 'Foo [bar] {}' + * util.inspect(new Bar()); // 'Bar {}' + * util.inspect(baz); // '[foo] {}' + * ``` + * + * Circular references point to their anchor by using a reference index: + * + * ```js + * const { inspect } = require('node:util'); + * + * const obj = {}; + * obj.a = [obj]; + * obj.b = {}; + * obj.b.inner = obj.b; + * obj.b.obj = obj; + * + * console.log(inspect(obj)); + * // { + * // a: [ [Circular *1] ], + * // b: { inner: [Circular *2], obj: [Circular *1] } + * // } + * ``` + * + * The following example inspects all properties of the `util` object: + * + * ```js + * const util = require('node:util'); + * + * console.log(util.inspect(util, { showHidden: true, depth: null })); + * ``` + * + * The following example highlights the effect of the `compact` option: + * + * ```js + * const util = require('node:util'); + * + * const o = { + * a: [1, 2, [[ + * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + + * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', + * 'test', + * 'foo']], 4], + * b: new Map([['za', 1], ['zb', 'test']]), + * }; + * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); + * + * // { a: + * // [ 1, + * // 2, + * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line + * // 'test', + * // 'foo' ] ], + * // 4 ], + * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } + * + * // Setting `compact` to false or an integer creates more reader friendly output. + * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); + * + * // { + * // a: [ + * // 1, + * // 2, + * // [ + * // [ + * // 'Lorem ipsum dolor sit amet,\n' + + * // 'consectetur adipiscing elit, sed do eiusmod \n' + + * // 'tempor incididunt ut labore et dolore magna aliqua.', + * // 'test', + * // 'foo' + * // ] + * // ], + * // 4 + * // ], + * // b: Map(2) { + * // 'za' => 1, + * // 'zb' => 'test' + * // } + * // } + * + * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a + * // single line. + * ``` + * + * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and + * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be + * inspected. If there are more entries than `maxArrayLength`, there is no + * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may + * result in different output. Furthermore, entries + * with no remaining strong references may be garbage collected at any time. + * + * ```js + * const { inspect } = require('node:util'); + * + * const obj = { a: 1 }; + * const obj2 = { b: 2 }; + * const weakSet = new WeakSet([obj, obj2]); + * + * console.log(inspect(weakSet, { showHidden: true })); + * // WeakSet { { a: 1 }, { b: 2 } } + * ``` + * + * The `sorted` option ensures that an object's property insertion order does not + * impact the result of `util.inspect()`. + * + * ```js + * const { inspect } = require('node:util'); + * const assert = require('node:assert'); + * + * const o1 = { + * b: [2, 3, 1], + * a: '`a` comes before `b`', + * c: new Set([2, 3, 1]), + * }; + * console.log(inspect(o1, { sorted: true })); + * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } + * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); + * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } + * + * const o2 = { + * c: new Set([2, 1, 3]), + * a: '`a` comes before `b`', + * b: [2, 3, 1], + * }; + * assert.strict.equal( + * inspect(o1, { sorted: true }), + * inspect(o2, { sorted: true }), + * ); + * ``` + * + * The `numericSeparator` option adds an underscore every three digits to all + * numbers. + * + * ```js + * const { inspect } = require('node:util'); + * + * const thousand = 1_000; + * const million = 1_000_000; + * const bigNumber = 123_456_789n; + * const bigDecimal = 1_234.123_45; + * + * console.log(inspect(thousand, { numericSeparator: true })); + * // 1_000 + * console.log(inspect(million, { numericSeparator: true })); + * // 1_000_000 + * console.log(inspect(bigNumber, { numericSeparator: true })); + * // 123_456_789n + * console.log(inspect(bigDecimal, { numericSeparator: true })); + * // 1_234.123_45 + * ``` + * + * `util.inspect()` is a synchronous method intended for debugging. Its maximum + * output length is approximately 128 MiB. Inputs that result in longer output will + * be truncated. + * @since v0.3.0 + * @param object Any JavaScript primitive or `Object`. + * @return The representation of `object`. + */ + export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; + export function inspect(object: any, options?: InspectOptions): string; + export namespace inspect { + let colors: NodeJS.Dict<[number, number]>; + let styles: { + [K in Style]: string; + }; + let defaultOptions: InspectOptions; + /** + * Allows changing inspect settings from the repl. + */ + let replDefaults: InspectOptions; + /** + * That can be used to declare custom inspect functions. + */ + const custom: unique symbol; + } + /** + * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). + * + * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isArray([]); + * // Returns: true + * util.isArray(new Array()); + * // Returns: true + * util.isArray({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use `isArray` instead. + */ + export function isArray(object: unknown): object is unknown[]; + /** + * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isRegExp(/some regexp/); + * // Returns: true + * util.isRegExp(new RegExp('another regexp')); + * // Returns: true + * util.isRegExp({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Deprecated + */ + export function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isDate(new Date()); + * // Returns: true + * util.isDate(Date()); + * // false (without 'new' returns a String) + * util.isDate({}); + * // Returns: false + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. + */ + export function isDate(object: unknown): object is Date; + /** + * Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isError(new Error()); + * // Returns: true + * util.isError(new TypeError()); + * // Returns: true + * util.isError({ name: 'Error', message: 'an error occurred' }); + * // Returns: false + * ``` + * + * This method relies on `Object.prototype.toString()` behavior. It is + * possible to obtain an incorrect result when the `object` argument manipulates `@@toStringTag`. + * + * ```js + * const util = require('node:util'); + * const obj = { name: 'Error', message: 'an error occurred' }; + * + * util.isError(obj); + * // Returns: false + * obj[Symbol.toStringTag] = 'Error'; + * util.isError(obj); + * // Returns: true + * ``` + * @since v0.6.0 + * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. + */ + export function isError(object: unknown): object is Error; + /** + * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and `extends` keywords to get language level inheritance support. Also note + * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). + * + * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The + * prototype of `constructor` will be set to a new object created from `superConstructor`. + * + * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. + * As an additional convenience, `superConstructor` will be accessible + * through the `constructor.super_` property. + * + * ```js + * const util = require('node:util'); + * const EventEmitter = require('node:events'); + * + * function MyStream() { + * EventEmitter.call(this); + * } + * + * util.inherits(MyStream, EventEmitter); + * + * MyStream.prototype.write = function(data) { + * this.emit('data', data); + * }; + * + * const stream = new MyStream(); + * + * console.log(stream instanceof EventEmitter); // true + * console.log(MyStream.super_ === EventEmitter); // true + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('It works!'); // Received data: "It works!" + * ``` + * + * ES6 example using `class` and `extends`: + * + * ```js + * const EventEmitter = require('node:events'); + * + * class MyStream extends EventEmitter { + * write(data) { + * this.emit('data', data); + * } + * } + * + * const stream = new MyStream(); + * + * stream.on('data', (data) => { + * console.log(`Received data: "${data}"`); + * }); + * stream.write('With ES6'); + * ``` + * @since v0.3.0 + * @legacy Use ES2015 class syntax and `extends` keyword instead. + */ + export function inherits(constructor: unknown, superConstructor: unknown): void; + export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; + export interface DebugLogger extends DebugLoggerFunction { + enabled: boolean; + } + /** + * The `util.debuglog()` method is used to create a function that conditionally + * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that + * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. + * + * ```js + * const util = require('node:util'); + * const debuglog = util.debuglog('foo'); + * + * debuglog('hello from foo [%d]', 123); + * ``` + * + * If this program is run with `NODE_DEBUG=foo` in the environment, then + * it will output something like: + * + * ```console + * FOO 3245: hello from foo [123] + * ``` + * + * where `3245` is the process id. If it is not run with that + * environment variable set, then it will not print anything. + * + * The `section` supports wildcard also: + * + * ```js + * const util = require('node:util'); + * const debuglog = util.debuglog('foo-bar'); + * + * debuglog('hi there, it\'s foo-bar [%d]', 2333); + * ``` + * + * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output + * something like: + * + * ```console + * FOO-BAR 3257: hi there, it's foo-bar [2333] + * ``` + * + * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. + * + * The optional `callback` argument can be used to replace the logging function + * with a different function that doesn't have any initialization or + * unnecessary wrapping. + * + * ```js + * const util = require('node:util'); + * let debuglog = util.debuglog('internals', (debug) => { + * // Replace with a logging function that optimizes out + * // testing if the section is enabled + * debuglog = debug; + * }); + * ``` + * @since v0.11.3 + * @param section A string identifying the portion of the application for which the `debuglog` function is being created. + * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. + * @return The logging function + */ + export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; + export const debug: typeof debuglog; + /** + * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isBoolean(1); + * // Returns: false + * util.isBoolean(0); + * // Returns: false + * util.isBoolean(false); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. + */ + export function isBoolean(object: unknown): object is boolean; + /** + * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isBuffer({ length: 0 }); + * // Returns: false + * util.isBuffer([]); + * // Returns: false + * util.isBuffer(Buffer.from('hello world')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `isBuffer` instead. + */ + export function isBuffer(object: unknown): object is Buffer; + /** + * Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * function Foo() {} + * const Bar = () => {}; + * + * util.isFunction({}); + * // Returns: false + * util.isFunction(Foo); + * // Returns: true + * util.isFunction(Bar); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. + */ + export function isFunction(object: unknown): boolean; + /** + * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. + * + * ```js + * const util = require('node:util'); + * + * util.isNull(0); + * // Returns: false + * util.isNull(undefined); + * // Returns: false + * util.isNull(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === null` instead. + */ + export function isNull(object: unknown): object is null; + /** + * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, + * returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isNullOrUndefined(0); + * // Returns: false + * util.isNullOrUndefined(undefined); + * // Returns: true + * util.isNullOrUndefined(null); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. + */ + export function isNullOrUndefined(object: unknown): object is null | undefined; + /** + * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isNumber(false); + * // Returns: false + * util.isNumber(Infinity); + * // Returns: true + * util.isNumber(0); + * // Returns: true + * util.isNumber(NaN); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. + */ + export function isNumber(object: unknown): object is number; + /** + * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). + * Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isObject(5); + * // Returns: false + * util.isObject(null); + * // Returns: false + * util.isObject({}); + * // Returns: true + * util.isObject(() => {}); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead. + */ + export function isObject(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. + * + * ```js + * const util = require('node:util'); + * + * util.isPrimitive(5); + * // Returns: true + * util.isPrimitive('foo'); + * // Returns: true + * util.isPrimitive(false); + * // Returns: true + * util.isPrimitive(null); + * // Returns: true + * util.isPrimitive(undefined); + * // Returns: true + * util.isPrimitive({}); + * // Returns: false + * util.isPrimitive(() => {}); + * // Returns: false + * util.isPrimitive(/^$/); + * // Returns: false + * util.isPrimitive(new Date()); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. + */ + export function isPrimitive(object: unknown): boolean; + /** + * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isString(''); + * // Returns: true + * util.isString('foo'); + * // Returns: true + * util.isString(String('foo')); + * // Returns: true + * util.isString(5); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. + */ + export function isString(object: unknown): object is string; + /** + * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * util.isSymbol(5); + * // Returns: false + * util.isSymbol('foo'); + * // Returns: false + * util.isSymbol(Symbol('foo')); + * // Returns: true + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. + */ + export function isSymbol(object: unknown): object is symbol; + /** + * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. + * + * ```js + * const util = require('node:util'); + * + * const foo = undefined; + * util.isUndefined(5); + * // Returns: false + * util.isUndefined(foo); + * // Returns: true + * util.isUndefined(null); + * // Returns: false + * ``` + * @since v0.11.5 + * @deprecated Since v4.0.0 - Use `value === undefined` instead. + */ + export function isUndefined(object: unknown): object is undefined; + /** + * The `util.deprecate()` method wraps `fn` (which may be a function or class) in + * such a way that it is marked as deprecated. + * + * ```js + * const util = require('node:util'); + * + * exports.obsoleteFunction = util.deprecate(() => { + * // Do something here. + * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); + * ``` + * + * When called, `util.deprecate()` will return a function that will emit a `DeprecationWarning` using the `'warning'` event. The warning will + * be emitted and printed to `stderr` the first time the returned function is + * called. After the warning is emitted, the wrapped function is called without + * emitting a warning. + * + * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, + * the warning will be emitted only once for that `code`. + * + * ```js + * const util = require('node:util'); + * + * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); + * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); + * fn1(); // Emits a deprecation warning with code DEP0001 + * fn2(); // Does not emit a deprecation warning because it has the same code + * ``` + * + * If either the `--no-deprecation` or `--no-warnings` command-line flags are + * used, or if the `process.noDeprecation` property is set to `true`_prior_ to + * the first deprecation warning, the `util.deprecate()` method does nothing. + * + * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, + * or the `process.traceDeprecation` property is set to `true`, a warning and a + * stack trace are printed to `stderr` the first time the deprecated function is + * called. + * + * If the `--throw-deprecation` command-line flag is set, or the `process.throwDeprecation` property is set to `true`, then an exception will be + * thrown when the deprecated function is called. + * + * The `--throw-deprecation` command-line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation` and `process.traceDeprecation`. + * @since v0.8.0 + * @param fn The function that is being deprecated. + * @param msg A warning message to display when the deprecated function is invoked. + * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. + * @return The deprecated function wrapped to emit a warning. + */ + export function deprecate(fn: T, msg: string, code?: string): T; + /** + * Returns `true` if there is deep strict equality between `val1` and `val2`. + * Otherwise, returns `false`. + * + * See `assert.deepStrictEqual()` for more information about deep strict + * equality. + * @since v9.0.0 + */ + export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean; + /** + * Returns `str` with any ANSI escape codes removed. + * + * ```js + * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); + * // Prints "value" + * ``` + * @since v16.11.0 + */ + export function stripVTControlCharacters(str: string): string; + /** + * Takes an `async` function (or a function that returns a `Promise`) and returns a + * function following the error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument. In the callback, the + * first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value. + * + * ```js + * const util = require('node:util'); + * + * async function fn() { + * return 'hello world'; + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * if (err) throw err; + * console.log(ret); + * }); + * ``` + * + * Will print: + * + * ```text + * hello world + * ``` + * + * The callback is executed asynchronously, and will have a limited stack trace. + * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. + * + * Since `null` has a special meaning as the first argument to a callback, if a + * wrapped function rejects a `Promise` with a falsy value as a reason, the value + * is wrapped in an `Error` with the original value stored in a field named `reason`. + * + * ```js + * function fn() { + * return Promise.reject(null); + * } + * const callbackFunction = util.callbackify(fn); + * + * callbackFunction((err, ret) => { + * // When the Promise was rejected with `null` it is wrapped with an Error and + * // the original value is stored in `reason`. + * err && Object.hasOwn(err, 'reason') && err.reason === null; // true + * }); + * ``` + * @since v8.2.0 + * @param fn An `async` function + * @return a callback style function + */ + export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: () => Promise, + ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1) => Promise, + ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2) => Promise, + ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException) => void, + ) => void; + export function callbackify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, + ): ( + arg1: T1, + arg2: T2, + arg3: T3, + arg4: T4, + arg5: T5, + arg6: T6, + callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, + ) => void; + export interface CustomPromisifyLegacy extends Function { + __promisify__: TCustom; + } + export interface CustomPromisifySymbol extends Function { + [promisify.custom]: TCustom; + } + export type CustomPromisify = + | CustomPromisifySymbol + | CustomPromisifyLegacy; + /** + * Takes a function following the common error-first callback style, i.e. taking + * an `(err, value) => ...` callback as the last argument, and returns a version + * that returns promises. + * + * ```js + * const util = require('node:util'); + * const fs = require('node:fs'); + * + * const stat = util.promisify(fs.stat); + * stat('.').then((stats) => { + * // Do something with `stats` + * }).catch((error) => { + * // Handle the error. + * }); + * ``` + * + * Or, equivalently using `async function`s: + * + * ```js + * const util = require('node:util'); + * const fs = require('node:fs'); + * + * const stat = util.promisify(fs.stat); + * + * async function callStat() { + * const stats = await stat('.'); + * console.log(`This directory is owned by ${stats.uid}`); + * } + * + * callStat(); + * ``` + * + * If there is an `original[util.promisify.custom]` property present, `promisify` will return its value, see `Custom promisified functions`. + * + * `promisify()` assumes that `original` is a function taking a callback as its + * final argument in all cases. If `original` is not a function, `promisify()` will throw an error. If `original` is a function but its last argument is not + * an error-first callback, it will still be passed an error-first + * callback as its last argument. + * + * Using `promisify()` on class methods or other methods that use `this` may not + * work as expected unless handled specially: + * + * ```js + * const util = require('node:util'); + * + * class Foo { + * constructor() { + * this.a = 42; + * } + * + * bar(callback) { + * callback(null, this.a); + * } + * } + * + * const foo = new Foo(); + * + * const naiveBar = util.promisify(foo.bar); + * // TypeError: Cannot read property 'a' of undefined + * // naiveBar().then(a => console.log(a)); + * + * naiveBar.call(foo).then((a) => console.log(a)); // '42' + * + * const bindBar = naiveBar.bind(foo); + * bindBar().then((a) => console.log(a)); // '42' + * ``` + * @since v8.0.0 + */ + export function promisify(fn: CustomPromisify): TCustom; + export function promisify( + fn: (callback: (err: any, result: TResult) => void) => void, + ): () => Promise; + export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; + export function promisify( + fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1) => Promise; + export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify( + fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, + ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; + export function promisify(fn: Function): Function; + export namespace promisify { + /** + * That can be used to declare custom promisified variants of functions. + */ + const custom: unique symbol; + } + /** + * Stability: 1.1 - Active development + * Given an example `.env` file: + * + * ```js + * const { parseEnv } = require('node:util'); + * + * parseEnv('HELLO=world\nHELLO=oh my\n'); + * // Returns: { HELLO: 'oh my' } + * ``` + * @param content The raw contents of a `.env` file. + * @since v20.12.0 + */ + export function parseEnv(content: string): object; + // https://nodejs.org/docs/latest/api/util.html#foreground-colors + type ForegroundColors = + | "black" + | "blackBright" + | "blue" + | "blueBright" + | "cyan" + | "cyanBright" + | "gray" + | "green" + | "greenBright" + | "grey" + | "magenta" + | "magentaBright" + | "red" + | "redBright" + | "white" + | "whiteBright" + | "yellow" + | "yellowBright"; + // https://nodejs.org/docs/latest/api/util.html#background-colors + type BackgroundColors = + | "bgBlack" + | "bgBlackBright" + | "bgBlue" + | "bgBlueBright" + | "bgCyan" + | "bgCyanBright" + | "bgGray" + | "bgGreen" + | "bgGreenBright" + | "bgGrey" + | "bgMagenta" + | "bgMagentaBright" + | "bgRed" + | "bgRedBright" + | "bgWhite" + | "bgWhiteBright" + | "bgYellow" + | "bgYellowBright"; + // https://nodejs.org/docs/latest/api/util.html#modifiers + type Modifiers = + | "blink" + | "bold" + | "dim" + | "doubleunderline" + | "framed" + | "hidden" + | "inverse" + | "italic" + | "overlined" + | "reset" + | "strikethrough" + | "underline"; + /** + * Stability: 1.1 - Active development + * + * This function returns a formatted text considering the `format` passed. + * + * ```js + * const { styleText } = require('node:util'); + * const errorMessage = styleText('red', 'Error! Error!'); + * console.log(errorMessage); + * ``` + * + * `util.inspect.colors` also provides text formats such as `italic`, and `underline` and you can combine both: + * + * ```js + * console.log( + * util.styleText('underline', util.styleText('italic', 'My italic underlined message')), + * ); + * ``` + * + * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v20.x/api/util.html#modifiers). + * @param format A text format defined in `util.inspect.colors`. + * @param text The text to to be formatted. + * @since v20.12.0 + */ + export function styleText(format: ForegroundColors | BackgroundColors | Modifiers, text: string): string; + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API. + * + * ```js + * const decoder = new TextDecoder(); + * const u8arr = new Uint8Array([72, 101, 108, 108, 111]); + * console.log(decoder.decode(u8arr)); // Hello + * ``` + * @since v8.3.0 + */ + export class TextDecoder { + /** + * The encoding supported by the `TextDecoder` instance. + */ + readonly encoding: string; + /** + * The value will be `true` if decoding errors result in a `TypeError` being + * thrown. + */ + readonly fatal: boolean; + /** + * The value will be `true` if the decoding result will include the byte order + * mark. + */ + readonly ignoreBOM: boolean; + constructor( + encoding?: string, + options?: { + fatal?: boolean | undefined; + ignoreBOM?: boolean | undefined; + }, + ); + /** + * Decodes the `input` and returns a string. If `options.stream` is `true`, any + * incomplete byte sequences occurring at the end of the `input` are buffered + * internally and emitted after the next call to `textDecoder.decode()`. + * + * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a `TypeError` being thrown. + * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data. + */ + decode( + input?: NodeJS.ArrayBufferView | ArrayBuffer | null, + options?: { + stream?: boolean | undefined; + }, + ): string; + } + export interface EncodeIntoResult { + /** + * The read Unicode code units of input. + */ + read: number; + /** + * The written UTF-8 bytes of output. + */ + written: number; + } + export { types }; + + //// TextEncoder/Decoder + /** + * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All + * instances of `TextEncoder` only support UTF-8 encoding. + * + * ```js + * const encoder = new TextEncoder(); + * const uint8array = encoder.encode('this is some data'); + * ``` + * + * The `TextEncoder` class is also available on the global object. + * @since v8.3.0 + */ + export class TextEncoder { + /** + * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. + */ + readonly encoding: string; + /** + * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the + * encoded bytes. + * @param [input='an empty string'] The text to encode. + */ + encode(input?: string): Uint8Array; + /** + * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object + * containing the read Unicode code units and written UTF-8 bytes. + * + * ```js + * const encoder = new TextEncoder(); + * const src = 'this is some data'; + * const dest = new Uint8Array(10); + * const { read, written } = encoder.encodeInto(src, dest); + * ``` + * @param src The text to encode. + * @param dest The array to hold the encode result. + */ + encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; + } + import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util"; + global { + /** + * `TextDecoder` class is a global reference for `require('util').TextDecoder` + * https://nodejs.org/api/globals.html#textdecoder + * @since v11.0.0 + */ + var TextDecoder: typeof globalThis extends { + onmessage: any; + TextDecoder: infer TextDecoder; + } ? TextDecoder + : typeof _TextDecoder; + /** + * `TextEncoder` class is a global reference for `require('util').TextEncoder` + * https://nodejs.org/api/globals.html#textencoder + * @since v11.0.0 + */ + var TextEncoder: typeof globalThis extends { + onmessage: any; + TextEncoder: infer TextEncoder; + } ? TextEncoder + : typeof _TextEncoder; + } + + //// parseArgs + /** + * Provides a higher level API for command-line argument parsing than interacting + * with `process.argv` directly. Takes a specification for the expected arguments + * and returns a structured object with the parsed options and positionals. + * + * ```js + * import { parseArgs } from 'node:util'; + * const args = ['-f', '--bar', 'b']; + * const options = { + * foo: { + * type: 'boolean', + * short: 'f', + * }, + * bar: { + * type: 'string', + * }, + * }; + * const { + * values, + * positionals, + * } = parseArgs({ args, options }); + * console.log(values, positionals); + * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] + * ``` + * @since v18.3.0, v16.17.0 + * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: + * @return The parsed command line arguments: + */ + export function parseArgs(config?: T): ParsedResults; + interface ParseArgsOptionConfig { + /** + * Type of argument. + */ + type: "string" | "boolean"; + /** + * Whether this option can be provided multiple times. + * If `true`, all values will be collected in an array. + * If `false`, values for the option are last-wins. + * @default false. + */ + multiple?: boolean | undefined; + /** + * A single character alias for the option. + */ + short?: string | undefined; + /** + * The default option value when it is not set by args. + * It must be of the same type as the the `type` property. + * When `multiple` is `true`, it must be an array. + * @since v18.11.0 + */ + default?: string | boolean | string[] | boolean[] | undefined; + } + interface ParseArgsOptionsConfig { + [longOption: string]: ParseArgsOptionConfig; + } + export interface ParseArgsConfig { + /** + * Array of argument strings. + */ + args?: string[] | undefined; + /** + * Used to describe arguments known to the parser. + */ + options?: ParseArgsOptionsConfig | undefined; + /** + * Should an error be thrown when unknown arguments are encountered, + * or when arguments are passed that do not match the `type` configured in `options`. + * @default true + */ + strict?: boolean | undefined; + /** + * Whether this command accepts positional arguments. + */ + allowPositionals?: boolean | undefined; + /** + * Return the parsed tokens. This is useful for extending the built-in behavior, + * from adding additional checks through to reprocessing the tokens in different ways. + * @default false + */ + tokens?: boolean | undefined; + } + /* + IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. + TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 + This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". + But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. + So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. + This is technically incorrect but is a much nicer UX for the common case. + The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. + */ + type IfDefaultsTrue = T extends true ? IfTrue + : T extends false ? IfFalse + : IfTrue; + + // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` + type IfDefaultsFalse = T extends false ? IfFalse + : T extends true ? IfTrue + : IfFalse; + + type ExtractOptionValue = IfDefaultsTrue< + T["strict"], + O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, + string | boolean + >; + + type ParsedValues = + & IfDefaultsTrue + & (T["options"] extends ParseArgsOptionsConfig ? { + -readonly [LongOption in keyof T["options"]]: IfDefaultsFalse< + T["options"][LongOption]["multiple"], + undefined | Array>, + undefined | ExtractOptionValue + >; + } + : {}); + + type ParsedPositionals = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + + type PreciseTokenForOptions< + K extends string, + O extends ParseArgsOptionConfig, + > = O["type"] extends "string" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: string; + inlineValue: boolean; + } + : O["type"] extends "boolean" ? { + kind: "option"; + index: number; + name: K; + rawName: string; + value: undefined; + inlineValue: undefined; + } + : OptionToken & { name: K }; + + type TokenForOptions< + T extends ParseArgsConfig, + K extends keyof T["options"] = keyof T["options"], + > = K extends unknown + ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions + : OptionToken + : never; + + type ParsedOptionToken = IfDefaultsTrue, OptionToken>; + + type ParsedPositionalToken = IfDefaultsTrue< + T["strict"], + IfDefaultsFalse, + IfDefaultsTrue + >; + + type ParsedTokens = Array< + ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } + >; + + type PreciseParsedResults = IfDefaultsFalse< + T["tokens"], + { + values: ParsedValues; + positionals: ParsedPositionals; + tokens: ParsedTokens; + }, + { + values: ParsedValues; + positionals: ParsedPositionals; + } + >; + + type OptionToken = + | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } + | { + kind: "option"; + index: number; + name: string; + rawName: string; + value: undefined; + inlineValue: undefined; + }; + + type Token = + | OptionToken + | { kind: "positional"; index: number; value: string } + | { kind: "option-terminator"; index: number }; + + // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. + // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. + type ParsedResults = ParseArgsConfig extends T ? { + values: { + [longOption: string]: undefined | string | boolean | Array; + }; + positionals: string[]; + tokens?: Token[]; + } + : PreciseParsedResults; + + /** + * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). + * + * In accordance with browser conventions, all properties of `MIMEType` objects + * are implemented as getters and setters on the class prototype, rather than as + * data properties on the object itself. + * + * A MIME string is a structured string containing multiple meaningful + * components. When parsed, a `MIMEType` object is returned containing + * properties for each of these components. + * @since v19.1.0, v18.13.0 + * @experimental + */ + export class MIMEType { + /** + * Creates a new MIMEType object by parsing the input. + * + * A `TypeError` will be thrown if the `input` is not a valid MIME. + * Note that an effort will be made to coerce the given values into strings. + * @param input The input MIME to parse. + */ + constructor(input: string | { toString: () => string }); + + /** + * Gets and sets the type portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript'); + * console.log(myMIME.type); + * // Prints: text + * myMIME.type = 'application'; + * console.log(myMIME.type); + * // Prints: application + * console.log(String(myMIME)); + * // Prints: application/javascript + * ``` + */ + type: string; + /** + * Gets and sets the subtype portion of the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/ecmascript'); + * console.log(myMIME.subtype); + * // Prints: ecmascript + * myMIME.subtype = 'javascript'; + * console.log(myMIME.subtype); + * // Prints: javascript + * console.log(String(myMIME)); + * // Prints: text/javascript + * ``` + */ + subtype: string; + /** + * Gets the essence of the MIME. This property is read only. + * Use `mime.type` or `mime.subtype` to alter the MIME. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const myMIME = new MIMEType('text/javascript;key=value'); + * console.log(myMIME.essence); + * // Prints: text/javascript + * myMIME.type = 'application'; + * console.log(myMIME.essence); + * // Prints: application/javascript + * console.log(String(myMIME)); + * // Prints: application/javascript;key=value + * ``` + */ + readonly essence: string; + /** + * Gets the `MIMEParams` object representing the + * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. + */ + readonly params: MIMEParams; + /** + * The `toString()` method on the `MIMEType` object returns the serialized MIME. + * + * Because of the need for standard compliance, this method does not allow users + * to customize the serialization process of the MIME. + */ + toString(): string; + } + /** + * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. + * @since v19.1.0, v18.13.0 + */ + export class MIMEParams { + /** + * Remove all name-value pairs whose name is `name`. + */ + delete(name: string): void; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + * Each item of the iterator is a JavaScript `Array`. The first item of the array + * is the `name`, the second item of the array is the `value`. + */ + entries(): IterableIterator<[name: string, value: string]>; + /** + * Returns the value of the first name-value pair whose name is `name`. If there + * are no such pairs, `null` is returned. + * @return or `null` if there is no name-value pair with the given `name`. + */ + get(name: string): string | null; + /** + * Returns `true` if there is at least one name-value pair whose name is `name`. + */ + has(name: string): boolean; + /** + * Returns an iterator over the names of each name-value pair. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * for (const name of params.keys()) { + * console.log(name); + * } + * // Prints: + * // foo + * // bar + * ``` + */ + keys(): IterableIterator; + /** + * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, + * set the first such pair's value to `value`. + * + * ```js + * import { MIMEType } from 'node:util'; + * + * const { params } = new MIMEType('text/plain;foo=0;bar=1'); + * params.set('foo', 'def'); + * params.set('baz', 'xyz'); + * console.log(params.toString()); + * // Prints: foo=def;bar=1;baz=xyz + * ``` + */ + set(name: string, value: string): void; + /** + * Returns an iterator over the values of each name-value pair. + */ + values(): IterableIterator; + /** + * Returns an iterator over each of the name-value pairs in the parameters. + */ + [Symbol.iterator]: typeof MIMEParams.prototype.entries; + } +} +declare module "util/types" { + import { KeyObject, webcrypto } from "node:crypto"; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or + * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * + * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. + * + * ```js + * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; + /** + * Returns `true` if the value is an `arguments` object. + * + * ```js + * function foo() { + * util.types.isArgumentsObject(arguments); // Returns true + * } + * ``` + * @since v10.0.0 + */ + function isArgumentsObject(object: unknown): object is IArguments; + /** + * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. + * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true + * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false + * ``` + * @since v10.0.0 + */ + function isArrayBuffer(object: unknown): object is ArrayBuffer; + /** + * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed + * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to + * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * + * ```js + * util.types.isArrayBufferView(new Int8Array()); // true + * util.types.isArrayBufferView(Buffer.from('hello world')); // true + * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true + * util.types.isArrayBufferView(new ArrayBuffer()); // false + * ``` + * @since v10.0.0 + */ + function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; + /** + * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isAsyncFunction(function foo() {}); // Returns false + * util.types.isAsyncFunction(async function foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isAsyncFunction(object: unknown): boolean; + /** + * Returns `true` if the value is a `BigInt64Array` instance. + * + * ```js + * util.types.isBigInt64Array(new BigInt64Array()); // Returns true + * util.types.isBigInt64Array(new BigUint64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isBigInt64Array(value: unknown): value is BigInt64Array; + /** + * Returns `true` if the value is a `BigUint64Array` instance. + * + * ```js + * util.types.isBigUint64Array(new BigInt64Array()); // Returns false + * util.types.isBigUint64Array(new BigUint64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isBigUint64Array(value: unknown): value is BigUint64Array; + /** + * Returns `true` if the value is a boolean object, e.g. created + * by `new Boolean()`. + * + * ```js + * util.types.isBooleanObject(false); // Returns false + * util.types.isBooleanObject(true); // Returns false + * util.types.isBooleanObject(new Boolean(false)); // Returns true + * util.types.isBooleanObject(new Boolean(true)); // Returns true + * util.types.isBooleanObject(Boolean(false)); // Returns false + * util.types.isBooleanObject(Boolean(true)); // Returns false + * ``` + * @since v10.0.0 + */ + function isBooleanObject(object: unknown): object is Boolean; + /** + * Returns `true` if the value is any boxed primitive object, e.g. created + * by `new Boolean()`, `new String()` or `Object(Symbol())`. + * + * For example: + * + * ```js + * util.types.isBoxedPrimitive(false); // Returns false + * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true + * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false + * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true + * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true + * ``` + * @since v10.11.0 + */ + function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; + /** + * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. + * + * ```js + * const ab = new ArrayBuffer(20); + * util.types.isDataView(new DataView(ab)); // Returns true + * util.types.isDataView(new Float64Array()); // Returns false + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isDataView(object: unknown): object is DataView; + /** + * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. + * + * ```js + * util.types.isDate(new Date()); // Returns true + * ``` + * @since v10.0.0 + */ + function isDate(object: unknown): object is Date; + /** + * Returns `true` if the value is a native `External` value. + * + * A native `External` value is a special type of object that contains a + * raw C++ pointer (`void*`) for access from native code, and has no other + * properties. Such objects are created either by Node.js internals or native + * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. + * + * ```c + * #include + * #include + * napi_value result; + * static napi_value MyNapi(napi_env env, napi_callback_info info) { + * int* raw = (int*) malloc(1024); + * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); + * if (status != napi_ok) { + * napi_throw_error(env, NULL, "napi_create_external failed"); + * return NULL; + * } + * return result; + * } + * ... + * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) + * ... + * ``` + * + * ```js + * const native = require('napi_addon.node'); + * const data = native.myNapi(); + * util.types.isExternal(data); // returns true + * util.types.isExternal(0); // returns false + * util.types.isExternal(new String('foo')); // returns false + * ``` + * + * For further information on `napi_create_external`, refer to `napi_create_external()`. + * @since v10.0.0 + */ + function isExternal(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. + * + * ```js + * util.types.isFloat32Array(new ArrayBuffer()); // Returns false + * util.types.isFloat32Array(new Float32Array()); // Returns true + * util.types.isFloat32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isFloat32Array(object: unknown): object is Float32Array; + /** + * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. + * + * ```js + * util.types.isFloat64Array(new ArrayBuffer()); // Returns false + * util.types.isFloat64Array(new Uint8Array()); // Returns false + * util.types.isFloat64Array(new Float64Array()); // Returns true + * ``` + * @since v10.0.0 + */ + function isFloat64Array(object: unknown): object is Float64Array; + /** + * Returns `true` if the value is a generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * util.types.isGeneratorFunction(function foo() {}); // Returns false + * util.types.isGeneratorFunction(function* foo() {}); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorFunction(object: unknown): object is GeneratorFunction; + /** + * Returns `true` if the value is a generator object as returned from a + * built-in generator function. + * This only reports back what the JavaScript engine is seeing; + * in particular, the return value may not match the original source code if + * a transpilation tool was used. + * + * ```js + * function* foo() {} + * const generator = foo(); + * util.types.isGeneratorObject(generator); // Returns true + * ``` + * @since v10.0.0 + */ + function isGeneratorObject(object: unknown): object is Generator; + /** + * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. + * + * ```js + * util.types.isInt8Array(new ArrayBuffer()); // Returns false + * util.types.isInt8Array(new Int8Array()); // Returns true + * util.types.isInt8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt8Array(object: unknown): object is Int8Array; + /** + * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. + * + * ```js + * util.types.isInt16Array(new ArrayBuffer()); // Returns false + * util.types.isInt16Array(new Int16Array()); // Returns true + * util.types.isInt16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt16Array(object: unknown): object is Int16Array; + /** + * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. + * + * ```js + * util.types.isInt32Array(new ArrayBuffer()); // Returns false + * util.types.isInt32Array(new Int32Array()); // Returns true + * util.types.isInt32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isInt32Array(object: unknown): object is Int32Array; + /** + * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * util.types.isMap(new Map()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMap( + object: T | {}, + ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) + : Map; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. + * + * ```js + * const map = new Map(); + * util.types.isMapIterator(map.keys()); // Returns true + * util.types.isMapIterator(map.values()); // Returns true + * util.types.isMapIterator(map.entries()); // Returns true + * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isMapIterator(object: unknown): boolean; + /** + * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). + * + * ```js + * import * as ns from './a.js'; + * + * util.types.isModuleNamespaceObject(ns); // Returns true + * ``` + * @since v10.0.0 + */ + function isModuleNamespaceObject(value: unknown): boolean; + /** + * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). + * + * ```js + * console.log(util.types.isNativeError(new Error())); // true + * console.log(util.types.isNativeError(new TypeError())); // true + * console.log(util.types.isNativeError(new RangeError())); // true + * ``` + * + * Subclasses of the native error types are also native errors: + * + * ```js + * class MyError extends Error {} + * console.log(util.types.isNativeError(new MyError())); // true + * ``` + * + * A value being `instanceof` a native error class is not equivalent to `isNativeError()` returning `true` for that value. `isNativeError()` returns `true` for errors + * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` for these errors: + * + * ```js + * const vm = require('node:vm'); + * const context = vm.createContext({}); + * const myError = vm.runInContext('new Error()', context); + * console.log(util.types.isNativeError(myError)); // true + * console.log(myError instanceof Error); // false + * ``` + * + * Conversely, `isNativeError()` returns `false` for all objects which were not + * returned by the constructor of a native error. That includes values + * which are `instanceof` native errors: + * + * ```js + * const myError = { __proto__: Error.prototype }; + * console.log(util.types.isNativeError(myError)); // false + * console.log(myError instanceof Error); // true + * ``` + * @since v10.0.0 + */ + function isNativeError(object: unknown): object is Error; + /** + * Returns `true` if the value is a number object, e.g. created + * by `new Number()`. + * + * ```js + * util.types.isNumberObject(0); // Returns false + * util.types.isNumberObject(new Number(0)); // Returns true + * ``` + * @since v10.0.0 + */ + function isNumberObject(object: unknown): object is Number; + /** + * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * + * ```js + * util.types.isPromise(Promise.resolve(42)); // Returns true + * ``` + * @since v10.0.0 + */ + function isPromise(object: unknown): object is Promise; + /** + * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. + * + * ```js + * const target = {}; + * const proxy = new Proxy(target, {}); + * util.types.isProxy(target); // Returns false + * util.types.isProxy(proxy); // Returns true + * ``` + * @since v10.0.0 + */ + function isProxy(object: unknown): boolean; + /** + * Returns `true` if the value is a regular expression object. + * + * ```js + * util.types.isRegExp(/abc/); // Returns true + * util.types.isRegExp(new RegExp('abc')); // Returns true + * ``` + * @since v10.0.0 + */ + function isRegExp(object: unknown): object is RegExp; + /** + * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * util.types.isSet(new Set()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSet( + object: T | {}, + ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; + /** + * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. + * + * ```js + * const set = new Set(); + * util.types.isSetIterator(set.keys()); // Returns true + * util.types.isSetIterator(set.values()); // Returns true + * util.types.isSetIterator(set.entries()); // Returns true + * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSetIterator(object: unknown): boolean; + /** + * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. + * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is + * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. + * + * ```js + * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false + * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true + * ``` + * @since v10.0.0 + */ + function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; + /** + * Returns `true` if the value is a string object, e.g. created + * by `new String()`. + * + * ```js + * util.types.isStringObject('foo'); // Returns false + * util.types.isStringObject(new String('foo')); // Returns true + * ``` + * @since v10.0.0 + */ + function isStringObject(object: unknown): object is String; + /** + * Returns `true` if the value is a symbol object, created + * by calling `Object()` on a `Symbol` primitive. + * + * ```js + * const symbol = Symbol('foo'); + * util.types.isSymbolObject(symbol); // Returns false + * util.types.isSymbolObject(Object(symbol)); // Returns true + * ``` + * @since v10.0.0 + */ + function isSymbolObject(object: unknown): object is Symbol; + /** + * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. + * + * ```js + * util.types.isTypedArray(new ArrayBuffer()); // Returns false + * util.types.isTypedArray(new Uint8Array()); // Returns true + * util.types.isTypedArray(new Float64Array()); // Returns true + * ``` + * + * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). + * @since v10.0.0 + */ + function isTypedArray(object: unknown): object is NodeJS.TypedArray; + /** + * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. + * + * ```js + * util.types.isUint8Array(new ArrayBuffer()); // Returns false + * util.types.isUint8Array(new Uint8Array()); // Returns true + * util.types.isUint8Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8Array(object: unknown): object is Uint8Array; + /** + * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. + * + * ```js + * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false + * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true + * util.types.isUint8ClampedArray(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; + /** + * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. + * + * ```js + * util.types.isUint16Array(new ArrayBuffer()); // Returns false + * util.types.isUint16Array(new Uint16Array()); // Returns true + * util.types.isUint16Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint16Array(object: unknown): object is Uint16Array; + /** + * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. + * + * ```js + * util.types.isUint32Array(new ArrayBuffer()); // Returns false + * util.types.isUint32Array(new Uint32Array()); // Returns true + * util.types.isUint32Array(new Float64Array()); // Returns false + * ``` + * @since v10.0.0 + */ + function isUint32Array(object: unknown): object is Uint32Array; + /** + * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. + * + * ```js + * util.types.isWeakMap(new WeakMap()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakMap(object: unknown): object is WeakMap; + /** + * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. + * + * ```js + * util.types.isWeakSet(new WeakSet()); // Returns true + * ``` + * @since v10.0.0 + */ + function isWeakSet(object: unknown): object is WeakSet; + /** + * Returns `true` if `value` is a `KeyObject`, `false` otherwise. + * @since v16.2.0 + */ + function isKeyObject(object: unknown): object is KeyObject; + /** + * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. + * @since v16.2.0 + */ + function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; +} +declare module "node:util" { + export * from "util"; +} +declare module "node:util/types" { + export * from "util/types"; +} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts new file mode 100644 index 0000000..0bd038c --- /dev/null +++ b/node_modules/@types/node/v8.d.ts @@ -0,0 +1,764 @@ +/** + * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: + * + * ```js + * const v8 = require('node:v8'); + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/v8.js) + */ +declare module "v8" { + import { Readable } from "node:stream"; + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ + type DoesZapCodeSpaceFlag = 0 | 1; + interface HeapInfo { + total_heap_size: number; + total_heap_size_executable: number; + total_physical_size: number; + total_available_size: number; + used_heap_size: number; + heap_size_limit: number; + malloced_memory: number; + peak_malloced_memory: number; + does_zap_garbage: DoesZapCodeSpaceFlag; + number_of_native_contexts: number; + number_of_detached_contexts: number; + total_global_handles_size: number; + used_global_handles_size: number; + external_memory: number; + } + interface HeapCodeStatistics { + code_and_metadata_size: number; + bytecode_and_metadata_size: number; + external_script_source_size: number; + } + interface HeapSnapshotOptions { + /** + * If true, expose internals in the heap snapshot. + * @default false + */ + exposeInternals?: boolean; + /** + * If true, expose numeric values in artificial fields. + * @default false + */ + exposeNumericValues?: boolean; + } + /** + * Returns an integer representing a version tag derived from the V8 version, + * command-line flags, and detected CPU features. This is useful for determining + * whether a `vm.Script` `cachedData` buffer is compatible with this instance + * of V8. + * + * ```js + * console.log(v8.cachedDataVersionTag()); // 3947234607 + * // The value returned by v8.cachedDataVersionTag() is derived from the V8 + * // version, command-line flags, and detected CPU features. Test that the value + * // does indeed update when flags are toggled. + * v8.setFlagsFromString('--allow_natives_syntax'); + * console.log(v8.cachedDataVersionTag()); // 183726201 + * ``` + * @since v8.0.0 + */ + function cachedDataVersionTag(): number; + /** + * Returns an object with the following properties: + * + * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap + * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger + * because it continuously touches all heap pages and that makes them less likely + * to get swapped out by the operating system. + * + * `number_of_native_contexts` The value of native\_context is the number of the + * top-level contexts currently active. Increase of this number over time indicates + * a memory leak. + * + * `number_of_detached_contexts` The value of detached\_context is the number + * of contexts that were detached and not yet garbage collected. This number + * being non-zero indicates a potential memory leak. + * + * `total_global_handles_size` The value of total\_global\_handles\_size is the + * total memory size of V8 global handles. + * + * `used_global_handles_size` The value of used\_global\_handles\_size is the + * used memory size of V8 global handles. + * + * `external_memory` The value of external\_memory is the memory size of array + * buffers and external strings. + * + * ```js + * { + * total_heap_size: 7326976, + * total_heap_size_executable: 4194304, + * total_physical_size: 7326976, + * total_available_size: 1152656, + * used_heap_size: 3476208, + * heap_size_limit: 1535115264, + * malloced_memory: 16384, + * peak_malloced_memory: 1127496, + * does_zap_garbage: 0, + * number_of_native_contexts: 1, + * number_of_detached_contexts: 0, + * total_global_handles_size: 8192, + * used_global_handles_size: 3296, + * external_memory: 318824 + * } + * ``` + * @since v1.0.0 + */ + function getHeapStatistics(): HeapInfo; + /** + * Returns statistics about the V8 heap spaces, i.e. the segments which make up + * the V8 heap. Neither the ordering of heap spaces, nor the availability of a + * heap space can be guaranteed as the statistics are provided via the + * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the + * next. + * + * The value returned is an array of objects containing the following properties: + * + * ```json + * [ + * { + * "space_name": "new_space", + * "space_size": 2063872, + * "space_used_size": 951112, + * "space_available_size": 80824, + * "physical_space_size": 2063872 + * }, + * { + * "space_name": "old_space", + * "space_size": 3090560, + * "space_used_size": 2493792, + * "space_available_size": 0, + * "physical_space_size": 3090560 + * }, + * { + * "space_name": "code_space", + * "space_size": 1260160, + * "space_used_size": 644256, + * "space_available_size": 960, + * "physical_space_size": 1260160 + * }, + * { + * "space_name": "map_space", + * "space_size": 1094160, + * "space_used_size": 201608, + * "space_available_size": 0, + * "physical_space_size": 1094160 + * }, + * { + * "space_name": "large_object_space", + * "space_size": 0, + * "space_used_size": 0, + * "space_available_size": 1490980608, + * "physical_space_size": 0 + * } + * ] + * ``` + * @since v6.0.0 + */ + function getHeapSpaceStatistics(): HeapSpaceInfo[]; + /** + * The `v8.setFlagsFromString()` method can be used to programmatically set + * V8 command-line flags. This method should be used with care. Changing settings + * after the VM has started may result in unpredictable behavior, including + * crashes and data loss; or it may simply do nothing. + * + * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. + * + * Usage: + * + * ```js + * // Print GC events to stdout for one minute. + * const v8 = require('node:v8'); + * v8.setFlagsFromString('--trace_gc'); + * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); + * ``` + * @since v1.0.0 + */ + function setFlagsFromString(flags: string): void; + /** + * Generates a snapshot of the current V8 heap and returns a Readable + * Stream that may be used to read the JSON serialized representation. + * This JSON stream format is intended to be used with tools such as + * Chrome DevTools. The JSON schema is undocumented and specific to the + * V8 engine. Therefore, the schema may change from one version of V8 to the next. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * // Print heap snapshot to the console + * const v8 = require('node:v8'); + * const stream = v8.getHeapSnapshot(); + * stream.pipe(process.stdout); + * ``` + * @since v11.13.0 + * @return A Readable containing the V8 heap snapshot. + */ + function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; + /** + * Generates a snapshot of the current V8 heap and writes it to a JSON + * file. This file is intended to be used with tools such as Chrome + * DevTools. The JSON schema is undocumented and specific to the V8 + * engine, and may change from one version of V8 to the next. + * + * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will + * not contain any information about the workers, and vice versa. + * + * Creating a heap snapshot requires memory about twice the size of the heap at + * the time the snapshot is created. This results in the risk of OOM killers + * terminating the process. + * + * Generating a snapshot is a synchronous operation which blocks the event loop + * for a duration depending on the heap size. + * + * ```js + * const { writeHeapSnapshot } = require('node:v8'); + * const { + * Worker, + * isMainThread, + * parentPort, + * } = require('node:worker_threads'); + * + * if (isMainThread) { + * const worker = new Worker(__filename); + * + * worker.once('message', (filename) => { + * console.log(`worker heapdump: ${filename}`); + * // Now get a heapdump for the main thread. + * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); + * }); + * + * // Tell the worker to create a heapdump. + * worker.postMessage('heapdump'); + * } else { + * parentPort.once('message', (message) => { + * if (message === 'heapdump') { + * // Generate a heapdump for the worker + * // and return the filename to the parent. + * parentPort.postMessage(writeHeapSnapshot()); + * } + * }); + * } + * ``` + * @since v11.13.0 + * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be + * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a + * worker thread. + * @return The filename where the snapshot was saved. + */ + function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; + /** + * Get statistics about code and its metadata in the heap, see + * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the + * following properties: + * + * ```js + * { + * code_and_metadata_size: 212208, + * bytecode_and_metadata_size: 161368, + * external_script_source_size: 1410794, + * cpu_profiler_metadata_size: 0, + * } + * ``` + * @since v12.8.0 + */ + function getHeapCodeStatistics(): HeapCodeStatistics; + /** + * @since v8.0.0 + */ + class Serializer { + /** + * Writes out a header, which includes the serialization format version. + */ + writeHeader(): void; + /** + * Serializes a JavaScript value and adds the serialized representation to the + * internal buffer. + * + * This throws an error if `value` cannot be serialized. + */ + writeValue(val: any): boolean; + /** + * Returns the stored internal buffer. This serializer should not be used once + * the buffer is released. Calling this method results in undefined behavior + * if a previous write has failed. + */ + releaseBuffer(): Buffer; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Write a raw 32-bit unsigned integer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint32(value: number): void; + /** + * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeUint64(hi: number, lo: number): void; + /** + * Write a JS `number` value. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeDouble(value: number): void; + /** + * Write raw bytes into the serializer's internal buffer. The deserializer + * will require a way to compute the length of the buffer. + * For use inside of a custom `serializer._writeHostObject()`. + */ + writeRawBytes(buffer: NodeJS.TypedArray): void; + } + /** + * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only + * stores the part of their underlying `ArrayBuffer`s that they are referring to. + * @since v8.0.0 + */ + class DefaultSerializer extends Serializer {} + /** + * @since v8.0.0 + */ + class Deserializer { + constructor(data: NodeJS.TypedArray); + /** + * Reads and validates a header (including the format version). + * May, for example, reject an invalid or unsupported wire format. In that case, + * an `Error` is thrown. + */ + readHeader(): boolean; + /** + * Deserializes a JavaScript value from the buffer and returns it. + */ + readValue(): any; + /** + * Marks an `ArrayBuffer` as having its contents transferred out of band. + * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of + * `SharedArrayBuffer`s). + * @param id A 32-bit unsigned integer. + * @param arrayBuffer An `ArrayBuffer` instance. + */ + transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; + /** + * Reads the underlying wire format version. Likely mostly to be useful to + * legacy code reading old wire format versions. May not be called before `.readHeader()`. + */ + getWireFormatVersion(): number; + /** + * Read a raw 32-bit unsigned integer and return it. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint32(): number; + /** + * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readUint64(): [number, number]; + /** + * Read a JS `number` value. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readDouble(): number; + /** + * Read raw bytes from the deserializer's internal buffer. The `length` parameter + * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. + * For use inside of a custom `deserializer._readHostObject()`. + */ + readRawBytes(length: number): Buffer; + } + /** + * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. + * @since v8.0.0 + */ + class DefaultDeserializer extends Deserializer {} + /** + * Uses a `DefaultSerializer` to serialize `value` into a buffer. + * + * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to + * serialize a huge object which requires buffer + * larger than `buffer.constants.MAX_LENGTH`. + * @since v8.0.0 + */ + function serialize(value: any): Buffer; + /** + * Uses a `DefaultDeserializer` with default options to read a JS value + * from a buffer. + * @since v8.0.0 + * @param buffer A buffer returned by {@link serialize}. + */ + function deserialize(buffer: NodeJS.TypedArray): any; + /** + * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple + * times during the lifetime of the process. Each time the execution counter will + * be reset and a new coverage report will be written to the directory specified + * by `NODE_V8_COVERAGE`. + * + * When the process is about to exit, one last coverage will still be written to + * disk unless {@link stopCoverage} is invoked before the process exits. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function takeCoverage(): void; + /** + * The `v8.stopCoverage()` method allows the user to stop the coverage collection + * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count + * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. + * @since v15.1.0, v14.18.0, v12.22.0 + */ + function stopCoverage(): void; + /** + * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. + * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. + * @experimental + * @since v18.10.0, v16.18.0 + */ + function setHeapSnapshotNearHeapLimit(limit: number): void; + /** + * This API collects GC data in current thread. + * @since v19.6.0, v18.15.0 + */ + class GCProfiler { + /** + * Start collecting GC data. + * @since v19.6.0, v18.15.0 + */ + start(): void; + /** + * Stop collecting GC data and return an object. The content of object + * is as follows. + * + * ```json + * { + * "version": 1, + * "startTime": 1674059033862, + * "statistics": [ + * { + * "gcType": "Scavenge", + * "beforeGC": { + * "heapStatistics": { + * "totalHeapSize": 5005312, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5226496, + * "totalAvailableSize": 4341325216, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4883840, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * }, + * "cost": 1574.14, + * "afterGC": { + * "heapStatistics": { + * "totalHeapSize": 6053888, + * "totalHeapSizeExecutable": 524288, + * "totalPhysicalSize": 5500928, + * "totalAvailableSize": 4341101384, + * "totalGlobalHandlesSize": 8192, + * "usedGlobalHandlesSize": 2112, + * "usedHeapSize": 4059096, + * "heapSizeLimit": 4345298944, + * "mallocedMemory": 254128, + * "externalMemory": 225138, + * "peakMallocedMemory": 181760 + * }, + * "heapSpaceStatistics": [ + * { + * "spaceName": "read_only_space", + * "spaceSize": 0, + * "spaceUsedSize": 0, + * "spaceAvailableSize": 0, + * "physicalSpaceSize": 0 + * } + * ] + * } + * } + * ], + * "endTime": 1674059036865 + * } + * ``` + * + * Here's an example. + * + * ```js + * const { GCProfiler } = require('v8'); + * const profiler = new GCProfiler(); + * profiler.start(); + * setTimeout(() => { + * console.log(profiler.stop()); + * }, 1000); + * ``` + * @since v19.6.0, v18.15.0 + */ + stop(): GCProfilerResult; + } + interface GCProfilerResult { + version: number; + startTime: number; + endTime: number; + statistics: Array<{ + gcType: string; + cost: number; + beforeGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + afterGC: { + heapStatistics: HeapStatistics; + heapSpaceStatistics: HeapSpaceStatistics[]; + }; + }>; + } + interface HeapStatistics { + totalHeapSize: number; + totalHeapSizeExecutable: number; + totalPhysicalSize: number; + totalAvailableSize: number; + totalGlobalHandlesSize: number; + usedGlobalHandlesSize: number; + usedHeapSize: number; + heapSizeLimit: number; + mallocedMemory: number; + externalMemory: number; + peakMallocedMemory: number; + } + interface HeapSpaceStatistics { + spaceName: string; + spaceSize: number; + spaceUsedSize: number; + spaceAvailableSize: number; + physicalSpaceSize: number; + } + /** + * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will + * happen if a promise is created without ever getting a continuation. + * @since v17.1.0, v16.14.0 + * @param promise The promise being created. + * @param parent The promise continued from, if applicable. + */ + interface Init { + (promise: Promise, parent: Promise): void; + } + /** + * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. + * + * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. + * The before callback may be called many times in the case where many continuations have been made from the same promise. + * @since v17.1.0, v16.14.0 + */ + interface Before { + (promise: Promise): void; + } + /** + * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. + * @since v17.1.0, v16.14.0 + */ + interface After { + (promise: Promise): void; + } + /** + * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or + * {@link Promise.reject()}. + * @since v17.1.0, v16.14.0 + */ + interface Settled { + (promise: Promise): void; + } + /** + * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or + * around an await, and when the promise resolves or rejects. + * + * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and + * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. + * @since v17.1.0, v16.14.0 + */ + interface HookCallbacks { + init?: Init; + before?: Before; + after?: After; + settled?: Settled; + } + interface PromiseHooks { + /** + * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param init The {@link Init | `init` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onInit: (init: Init) => Function; + /** + * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param settled The {@link Settled | `settled` callback} to call when a promise is created. + * @return Call to stop the hook. + */ + onSettled: (settled: Settled) => Function; + /** + * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param before The {@link Before | `before` callback} to call before a promise continuation executes. + * @return Call to stop the hook. + */ + onBefore: (before: Before) => Function; + /** + * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param after The {@link After | `after` callback} to call after a promise continuation executes. + * @return Call to stop the hook. + */ + onAfter: (after: After) => Function; + /** + * Registers functions to be called for different lifetime events of each promise. + * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. + * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. + * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. + * @since v17.1.0, v16.14.0 + * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register + * @return Used for disabling hooks + */ + createHook: (callbacks: HookCallbacks) => Function; + } + /** + * The `promiseHooks` interface can be used to track promise lifecycle events. + * @since v17.1.0, v16.14.0 + */ + const promiseHooks: PromiseHooks; + type StartupSnapshotCallbackFn = (args: any) => any; + interface StartupSnapshot { + /** + * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. + * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. + * @since v18.6.0, v16.17.0 + */ + addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. + * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or + * to re-acquire resources that the application needs when the application is restarted from the snapshot. + * @since v18.6.0, v16.17.0 + */ + addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. + * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized + * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. + * @since v18.6.0, v16.17.0 + */ + setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; + /** + * Returns true if the Node.js instance is run to build a snapshot. + * @since v18.6.0, v16.17.0 + */ + isBuildingSnapshot(): boolean; + } + /** + * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. + * + * ```bash + * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js + * # This launches a process with the snapshot + * $ node --snapshot-blob snapshot.blob + * ``` + * + * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects + * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. + * For example, if the `entry.js` contains the following script: + * + * ```js + * 'use strict'; + * + * const fs = require('node:fs'); + * const zlib = require('node:zlib'); + * const path = require('node:path'); + * const assert = require('node:assert'); + * + * const v8 = require('node:v8'); + * + * class BookShelf { + * storage = new Map(); + * + * // Reading a series of files from directory and store them into storage. + * constructor(directory, books) { + * for (const book of books) { + * this.storage.set(book, fs.readFileSync(path.join(directory, book))); + * } + * } + * + * static compressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gzipSync(content)); + * } + * } + * + * static decompressAll(shelf) { + * for (const [ book, content ] of shelf.storage) { + * shelf.storage.set(book, zlib.gunzipSync(content)); + * } + * } + * } + * + * // __dirname here is where the snapshot script is placed + * // during snapshot building time. + * const shelf = new BookShelf(__dirname, [ + * 'book1.en_US.txt', + * 'book1.es_ES.txt', + * 'book2.zh_CN.txt', + * ]); + * + * assert(v8.startupSnapshot.isBuildingSnapshot()); + * // On snapshot serialization, compress the books to reduce size. + * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); + * // On snapshot deserialization, decompress the books. + * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); + * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { + * // process.env and process.argv are refreshed during snapshot + * // deserialization. + * const lang = process.env.BOOK_LANG || 'en_US'; + * const book = process.argv[1]; + * const name = `${book}.${lang}.txt`; + * console.log(shelf.storage.get(name)); + * }, shelf); + * ``` + * + * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: + * + * ```bash + * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 + * # Prints content of book1.es_ES.txt deserialized from the snapshot. + * ``` + * + * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. + * + * @experimental + * @since v18.6.0, v16.17.0 + */ + const startupSnapshot: StartupSnapshot; +} +declare module "node:v8" { + export * from "v8"; +} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts new file mode 100644 index 0000000..8a4baed --- /dev/null +++ b/node_modules/@types/node/vm.d.ts @@ -0,0 +1,921 @@ +/** + * The `node:vm` module enables compiling and running code within V8 Virtual + * Machine contexts. + * + * **The `node:vm` module is not a security** + * **mechanism. Do not use it to run untrusted code.** + * + * JavaScript code can be compiled and run immediately or + * compiled, saved, and run later. + * + * A common use case is to run the code in a different V8 Context. This means + * invoked code has a different global object than the invoking code. + * + * One can provide the context by `contextifying` an + * object. The invoked code treats any property in the context like a + * global variable. Any changes to global variables caused by the invoked + * code are reflected in the context object. + * + * ```js + * const vm = require('node:vm'); + * + * const x = 1; + * + * const context = { x: 2 }; + * vm.createContext(context); // Contextify the object. + * + * const code = 'x += 40; var y = 17;'; + * // `x` and `y` are global variables in the context. + * // Initially, x has the value 2 because that is the value of context.x. + * vm.runInContext(code, context); + * + * console.log(context.x); // 42 + * console.log(context.y); // 17 + * + * console.log(x); // 1; y is not defined. + * ``` + * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/vm.js) + */ +declare module "vm" { + import { ImportAttributes } from "node:module"; + interface Context extends NodeJS.Dict {} + interface BaseOptions { + /** + * Specifies the filename used in stack traces produced by this script. + * @default '' + */ + filename?: string | undefined; + /** + * Specifies the line number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + lineOffset?: number | undefined; + /** + * Specifies the column number offset that is displayed in stack traces produced by this script. + * @default 0 + */ + columnOffset?: number | undefined; + } + interface ScriptOptions extends BaseOptions { + /** + * V8's code cache data for the supplied source. + */ + cachedData?: Buffer | NodeJS.ArrayBufferView | undefined; + /** @deprecated in favor of `script.createCachedData()` */ + produceCachedData?: boolean | undefined; + /** + * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is + * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see + * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). + */ + importModuleDynamically?: + | ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module) + | typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER + | undefined; + } + interface RunningScriptOptions extends BaseOptions { + /** + * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace. + * @default true + */ + displayErrors?: boolean | undefined; + /** + * Specifies the number of milliseconds to execute code before terminating execution. + * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer. + */ + timeout?: number | undefined; + /** + * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received. + * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that. + * If execution is terminated, an `Error` will be thrown. + * @default false + */ + breakOnSigint?: boolean | undefined; + } + interface RunningScriptInNewContextOptions extends RunningScriptOptions { + /** + * Human-readable name of the newly created context. + */ + contextName?: CreateContextOptions["name"]; + /** + * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL, + * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + */ + contextOrigin?: CreateContextOptions["origin"]; + contextCodeGeneration?: CreateContextOptions["codeGeneration"]; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: CreateContextOptions["microtaskMode"]; + } + interface RunningCodeOptions extends RunningScriptOptions { + cachedData?: ScriptOptions["cachedData"]; + importModuleDynamically?: ScriptOptions["importModuleDynamically"]; + } + interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions { + cachedData?: ScriptOptions["cachedData"]; + importModuleDynamically?: ScriptOptions["importModuleDynamically"]; + } + interface CompileFunctionOptions extends BaseOptions { + /** + * Provides an optional data with V8's code cache data for the supplied source. + */ + cachedData?: Buffer | undefined; + /** + * Specifies whether to produce new cache data. + * @default false + */ + produceCachedData?: boolean | undefined; + /** + * The sandbox/context in which the said function should be compiled in. + */ + parsingContext?: Context | undefined; + /** + * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling + */ + contextExtensions?: Object[] | undefined; + } + interface CreateContextOptions { + /** + * Human-readable name of the newly created context. + * @default 'VM Context i' Where i is an ascending numerical index of the created context. + */ + name?: string | undefined; + /** + * Corresponds to the newly created context for display purposes. + * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), + * like the value of the `url.origin` property of a URL object. + * Most notably, this string should omit the trailing slash, as that denotes a path. + * @default '' + */ + origin?: string | undefined; + codeGeneration?: + | { + /** + * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) + * will throw an EvalError. + * @default true + */ + strings?: boolean | undefined; + /** + * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. + * @default true + */ + wasm?: boolean | undefined; + } + | undefined; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: "afterEvaluate" | undefined; + } + type MeasureMemoryMode = "summary" | "detailed"; + interface MeasureMemoryOptions { + /** + * @default 'summary' + */ + mode?: MeasureMemoryMode | undefined; + /** + * @default 'default' + */ + execution?: "default" | "eager" | undefined; + } + interface MemoryMeasurement { + total: { + jsMemoryEstimate: number; + jsMemoryRange: [number, number]; + }; + } + /** + * Instances of the `vm.Script` class contain precompiled scripts that can be + * executed in specific contexts. + * @since v0.3.1 + */ + class Script { + constructor(code: string, options?: ScriptOptions | string); + /** + * Runs the compiled code contained by the `vm.Script` object within the given `contextifiedObject` and returns the result. Running code does not have access + * to local scope. + * + * The following example compiles code that increments a global variable, sets + * the value of another global variable, then execute the code multiple times. + * The globals are contained in the `context` object. + * + * ```js + * const vm = require('node:vm'); + * + * const context = { + * animal: 'cat', + * count: 2, + * }; + * + * const script = new vm.Script('count += 1; name = "kitty";'); + * + * vm.createContext(context); + * for (let i = 0; i < 10; ++i) { + * script.runInContext(context); + * } + * + * console.log(context); + * // Prints: { animal: 'cat', count: 12, name: 'kitty' } + * ``` + * + * Using the `timeout` or `breakOnSigint` options will result in new event loops + * and corresponding threads being started, which have a non-zero performance + * overhead. + * @since v0.3.1 + * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method. + * @return the result of the very last statement executed in the script. + */ + runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any; + /** + * First contextifies the given `contextObject`, runs the compiled code contained + * by the `vm.Script` object within the created context, and returns the result. + * Running code does not have access to local scope. + * + * The following example compiles code that sets a global variable, then executes + * the code multiple times in different contexts. The globals are set on and + * contained within each individual `context`. + * + * ```js + * const vm = require('node:vm'); + * + * const script = new vm.Script('globalVar = "set"'); + * + * const contexts = [{}, {}, {}]; + * contexts.forEach((context) => { + * script.runInNewContext(context); + * }); + * + * console.log(contexts); + * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] + * ``` + * @since v0.3.1 + * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created. + * @return the result of the very last statement executed in the script. + */ + runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any; + /** + * Runs the compiled code contained by the `vm.Script` within the context of the + * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object. + * + * The following example compiles code that increments a `global` variable then + * executes that code multiple times: + * + * ```js + * const vm = require('node:vm'); + * + * global.globalVar = 0; + * + * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); + * + * for (let i = 0; i < 1000; ++i) { + * script.runInThisContext(); + * } + * + * console.log(globalVar); + * + * // 1000 + * ``` + * @since v0.3.1 + * @return the result of the very last statement executed in the script. + */ + runInThisContext(options?: RunningScriptOptions): any; + /** + * Creates a code cache that can be used with the `Script` constructor's `cachedData` option. Returns a `Buffer`. This method may be called at any + * time and any number of times. + * + * The code cache of the `Script` doesn't contain any JavaScript observable + * states. The code cache is safe to be saved along side the script source and + * used to construct new `Script` instances multiple times. + * + * Functions in the `Script` source can be marked as lazily compiled and they are + * not compiled at construction of the `Script`. These functions are going to be + * compiled when they are invoked the first time. The code cache serializes the + * metadata that V8 currently knows about the `Script` that it can use to speed up + * future compilations. + * + * ```js + * const script = new vm.Script(` + * function add(a, b) { + * return a + b; + * } + * + * const x = add(1, 2); + * `); + * + * const cacheWithoutAdd = script.createCachedData(); + * // In `cacheWithoutAdd` the function `add()` is marked for full compilation + * // upon invocation. + * + * script.runInThisContext(); + * + * const cacheWithAdd = script.createCachedData(); + * // `cacheWithAdd` contains fully compiled function `add()`. + * ``` + * @since v10.6.0 + */ + createCachedData(): Buffer; + /** @deprecated in favor of `script.createCachedData()` */ + cachedDataProduced?: boolean | undefined; + /** + * When `cachedData` is supplied to create the `vm.Script`, this value will be set + * to either `true` or `false` depending on acceptance of the data by V8. + * Otherwise the value is `undefined`. + * @since v5.7.0 + */ + cachedDataRejected?: boolean | undefined; + cachedData?: Buffer | undefined; + /** + * When the script is compiled from a source that contains a source map magic + * comment, this property will be set to the URL of the source map. + * + * ```js + * import vm from 'node:vm'; + * + * const script = new vm.Script(` + * function myFunc() {} + * //# sourceMappingURL=sourcemap.json + * `); + * + * console.log(script.sourceMapURL); + * // Prints: sourcemap.json + * ``` + * @since v19.1.0, v18.13.0 + */ + sourceMapURL?: string | undefined; + } + /** + * If given a `contextObject`, the `vm.createContext()` method will `prepare + * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts, + * the `contextObject` will be the global object, retaining all of its existing + * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables + * will remain unchanged. + * + * ```js + * const vm = require('node:vm'); + * + * global.globalVar = 3; + * + * const context = { globalVar: 1 }; + * vm.createContext(context); + * + * vm.runInContext('globalVar *= 2;', context); + * + * console.log(context); + * // Prints: { globalVar: 2 } + * + * console.log(global.globalVar); + * // Prints: 3 + * ``` + * + * If `contextObject` is omitted (or passed explicitly as `undefined`), a new, + * empty `contextified` object will be returned. + * + * The `vm.createContext()` method is primarily useful for creating a single + * context that can be used to run multiple scripts. For instance, if emulating a + * web browser, the method can be used to create a single context representing a + * window's global object, then run all ` +``` + +Production: + +``` + +``` + +**Remember** to replace the version tag with the exact [release](https://github.com/protobufjs/protobuf.js/tags) your project depends upon. + +The library supports CommonJS and AMD loaders and also exports globally as `protobuf`. + +### Distributions + +Where bundle size is a factor, there are additional stripped-down versions of the [full library][dist-full] (~19kb gzipped) available that exclude certain functionality: + +* When working with JSON descriptors (i.e. generated by [pbjs](cli/README.md#pbjs-for-javascript)) and/or reflection only, see the [light library][dist-light] (~16kb gzipped) that excludes the parser. CommonJS entry point is: + + ```js + var protobuf = require("protobufjs/light"); + ``` + +* When working with statically generated code only, see the [minimal library][dist-minimal] (~6.5kb gzipped) that also excludes reflection. CommonJS entry point is: + + ```js + var protobuf = require("protobufjs/minimal"); + ``` + +| Distribution | Location +|------------|----------------------------------- +| Full | +| Light | +| Minimal | + +Usage +----- + +Because JavaScript is a dynamically typed language, protobuf.js introduces the concept of a **valid message** in order to provide the best possible [performance](#performance) (and, as a side product, proper typings): + +### Valid message + +> A valid message is an object (1) not missing any required fields and (2) exclusively composed of JS types understood by the wire format writer. + +There are two possible types of valid messages and the encoder is able to work with both of these for convenience: + +* **Message instances** (explicit instances of message classes with default values on their prototype) always (have to) satisfy the requirements of a valid message by design and +* **Plain JavaScript objects** that just so happen to be composed in a way satisfying the requirements of a valid message as well. + +In a nutshell, the wire format writer understands the following types: + +| Field type | Expected JS type (create, encode) | Conversion (fromObject) +|------------|-----------------------------------|------------------------ +| s-/u-/int32
s-/fixed32 | `number` (32 bit integer) | value | 0 if signed
`value >>> 0` if unsigned +| s-/u-/int64
s-/fixed64 | `Long`-like (optimal)
`number` (53 bit integer) | `Long.fromValue(value)` with long.js
`parseInt(value, 10)` otherwise +| float
double | `number` | `Number(value)` +| bool | `boolean` | `Boolean(value)` +| string | `string` | `String(value)` +| bytes | `Uint8Array` (optimal)
`Buffer` (optimal under node)
`Array.` (8 bit integers) | `base64.decode(value)` if a `string`
`Object` with non-zero `.length` is assumed to be buffer-like +| enum | `number` (32 bit integer) | Looks up the numeric id if a `string` +| message | Valid message | `Message.fromObject(value)` + +* Explicit `undefined` and `null` are considered as not set if the field is optional. +* Repeated fields are `Array.`. +* Map fields are `Object.` with the key being the string representation of the respective value or an 8 characters long binary hash string for `Long`-likes. +* Types marked as *optimal* provide the best performance because no conversion step (i.e. number to low and high bits or base64 string to buffer) is required. + +### Toolset + +With that in mind and again for performance reasons, each message class provides a distinct set of methods with each method doing just one thing. This avoids unnecessary assertions / redundant operations where performance is a concern but also forces a user to perform verification (of plain JavaScript objects that *might* just so happen to be a valid message) explicitly where necessary - for example when dealing with user input. + +**Note** that `Message` below refers to any message class. + +* **Message.verify**(message: `Object`): `null|string`
+ verifies that a **plain JavaScript object** satisfies the requirements of a valid message and thus can be encoded without issues. Instead of throwing, it returns the error message as a string, if any. + + ```js + var payload = "invalid (not an object)"; + var err = AwesomeMessage.verify(payload); + if (err) + throw Error(err); + ``` + +* **Message.encode**(message: `Message|Object` [, writer: `Writer`]): `Writer`
+ encodes a **message instance** or valid **plain JavaScript object**. This method does not implicitly verify the message and it's up to the user to make sure that the payload is a valid message. + + ```js + var buffer = AwesomeMessage.encode(message).finish(); + ``` + +* **Message.encodeDelimited**(message: `Message|Object` [, writer: `Writer`]): `Writer`
+ works like `Message.encode` but additionally prepends the length of the message as a varint. + +* **Message.decode**(reader: `Reader|Uint8Array`): `Message`
+ decodes a buffer to a **message instance**. If required fields are missing, it throws a `util.ProtocolError` with an `instance` property set to the so far decoded message. If the wire format is invalid, it throws an `Error`. + + ```js + try { + var decodedMessage = AwesomeMessage.decode(buffer); + } catch (e) { + if (e instanceof protobuf.util.ProtocolError) { + // e.instance holds the so far decoded message with missing required fields + } else { + // wire format is invalid + } + } + ``` + +* **Message.decodeDelimited**(reader: `Reader|Uint8Array`): `Message`
+ works like `Message.decode` but additionally reads the length of the message prepended as a varint. + +* **Message.create**(properties: `Object`): `Message`
+ creates a new **message instance** from a set of properties that satisfy the requirements of a valid message. Where applicable, it is recommended to prefer `Message.create` over `Message.fromObject` because it doesn't perform possibly redundant conversion. + + ```js + var message = AwesomeMessage.create({ awesomeField: "AwesomeString" }); + ``` + +* **Message.fromObject**(object: `Object`): `Message`
+ converts any non-valid **plain JavaScript object** to a **message instance** using the conversion steps outlined within the table above. + + ```js + var message = AwesomeMessage.fromObject({ awesomeField: 42 }); + // converts awesomeField to a string + ``` + +* **Message.toObject**(message: `Message` [, options: `ConversionOptions`]): `Object`
+ converts a **message instance** to an arbitrary **plain JavaScript object** for interoperability with other libraries or storage. The resulting plain JavaScript object *might* still satisfy the requirements of a valid message depending on the actual conversion options specified, but most of the time it does not. + + ```js + var object = AwesomeMessage.toObject(message, { + enums: String, // enums as string names + longs: String, // longs as strings (requires long.js) + bytes: String, // bytes as base64 encoded strings + defaults: true, // includes default values + arrays: true, // populates empty arrays (repeated fields) even if defaults=false + objects: true, // populates empty objects (map fields) even if defaults=false + oneofs: true // includes virtual oneof fields set to the present field's name + }); + ``` + +For reference, the following diagram aims to display relationships between the different methods and the concept of a valid message: + +

Toolset Diagram

+ +> In other words: `verify` indicates that calling `create` or `encode` directly on the plain object will [result in a valid message respectively] succeed. `fromObject`, on the other hand, does conversion from a broader range of plain objects to create valid messages. ([ref](https://github.com/dcodeIO/protobuf.js/issues/748#issuecomment-291925749)) + +Examples +-------- + +### Using .proto files + +It is possible to load existing .proto files using the full library, which parses and compiles the definitions to ready to use (reflection-based) message classes: + +```protobuf +// awesome.proto +package awesomepackage; +syntax = "proto3"; + +message AwesomeMessage { + string awesome_field = 1; // becomes awesomeField +} +``` + +```js +protobuf.load("awesome.proto", function(err, root) { + if (err) + throw err; + + // Obtain a message type + var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage"); + + // Exemplary payload + var payload = { awesomeField: "AwesomeString" }; + + // Verify the payload if necessary (i.e. when possibly incomplete or invalid) + var errMsg = AwesomeMessage.verify(payload); + if (errMsg) + throw Error(errMsg); + + // Create a new message + var message = AwesomeMessage.create(payload); // or use .fromObject if conversion is necessary + + // Encode a message to an Uint8Array (browser) or Buffer (node) + var buffer = AwesomeMessage.encode(message).finish(); + // ... do something with buffer + + // Decode an Uint8Array (browser) or Buffer (node) to a message + var message = AwesomeMessage.decode(buffer); + // ... do something with message + + // If the application uses length-delimited buffers, there is also encodeDelimited and decodeDelimited. + + // Maybe convert the message back to a plain object + var object = AwesomeMessage.toObject(message, { + longs: String, + enums: String, + bytes: String, + // see ConversionOptions + }); +}); +``` + +Additionally, promise syntax can be used by omitting the callback, if preferred: + +```js +protobuf.load("awesome.proto") + .then(function(root) { + ... + }); +``` + +### Using JSON descriptors + +The library utilizes JSON descriptors that are equivalent to a .proto definition. For example, the following is identical to the .proto definition seen above: + +```json +// awesome.json +{ + "nested": { + "awesomepackage": { + "nested": { + "AwesomeMessage": { + "fields": { + "awesomeField": { + "type": "string", + "id": 1 + } + } + } + } + } + } +} +``` + +JSON descriptors closely resemble the internal reflection structure: + +| Type (T) | Extends | Type-specific properties +|--------------------|--------------------|------------------------- +| *ReflectionObject* | | options +| *Namespace* | *ReflectionObject* | nested +| Root | *Namespace* | **nested** +| Type | *Namespace* | **fields** +| Enum | *ReflectionObject* | **values** +| Field | *ReflectionObject* | rule, **type**, **id** +| MapField | Field | **keyType** +| OneOf | *ReflectionObject* | **oneof** (array of field names) +| Service | *Namespace* | **methods** +| Method | *ReflectionObject* | type, **requestType**, **responseType**, requestStream, responseStream + +* **Bold properties** are required. *Italic types* are abstract. +* `T.fromJSON(name, json)` creates the respective reflection object from a JSON descriptor +* `T#toJSON()` creates a JSON descriptor from the respective reflection object (its name is used as the key within the parent) + +Exclusively using JSON descriptors instead of .proto files enables the use of just the light library (the parser isn't required in this case). + +A JSON descriptor can either be loaded the usual way: + +```js +protobuf.load("awesome.json", function(err, root) { + if (err) throw err; + + // Continue at "Obtain a message type" above +}); +``` + +Or it can be loaded inline: + +```js +var jsonDescriptor = require("./awesome.json"); // exemplary for node + +var root = protobuf.Root.fromJSON(jsonDescriptor); + +// Continue at "Obtain a message type" above +``` + +### Using reflection only + +Both the full and the light library include full reflection support. One could, for example, define the .proto definitions seen in the examples above using just reflection: + +```js +... +var Root = protobuf.Root, + Type = protobuf.Type, + Field = protobuf.Field; + +var AwesomeMessage = new Type("AwesomeMessage").add(new Field("awesomeField", 1, "string")); + +var root = new Root().define("awesomepackage").add(AwesomeMessage); + +// Continue at "Create a new message" above +... +``` + +Detailed information on the reflection structure is available within the [API documentation](#additional-documentation). + +### Using custom classes + +Message classes can also be extended with custom functionality and it is also possible to register a custom constructor with a reflected message type: + +```js +... + +// Define a custom constructor +function AwesomeMessage(properties) { + // custom initialization code + ... +} + +// Register the custom constructor with its reflected type (*) +root.lookupType("awesomepackage.AwesomeMessage").ctor = AwesomeMessage; + +// Define custom functionality +AwesomeMessage.customStaticMethod = function() { ... }; +AwesomeMessage.prototype.customInstanceMethod = function() { ... }; + +// Continue at "Create a new message" above +``` + +(*) Besides referencing its reflected type through `AwesomeMessage.$type` and `AwesomeMesage#$type`, the respective custom class is automatically populated with: + +* `AwesomeMessage.create` +* `AwesomeMessage.encode` and `AwesomeMessage.encodeDelimited` +* `AwesomeMessage.decode` and `AwesomeMessage.decodeDelimited` +* `AwesomeMessage.verify` +* `AwesomeMessage.fromObject`, `AwesomeMessage.toObject` and `AwesomeMessage#toJSON` + +Afterwards, decoded messages of this type are `instanceof AwesomeMessage`. + +Alternatively, it is also possible to reuse and extend the internal constructor if custom initialization code is not required: + +```js +... + +// Reuse the internal constructor +var AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage").ctor; + +// Define custom functionality +AwesomeMessage.customStaticMethod = function() { ... }; +AwesomeMessage.prototype.customInstanceMethod = function() { ... }; + +// Continue at "Create a new message" above +``` + +### Using services + +The library also supports consuming services but it doesn't make any assumptions about the actual transport channel. Instead, a user must provide a suitable RPC implementation, which is an asynchronous function that takes the reflected service method, the binary request and a node-style callback as its parameters: + +```js +function rpcImpl(method, requestData, callback) { + // perform the request using an HTTP request or a WebSocket for example + var responseData = ...; + // and call the callback with the binary response afterwards: + callback(null, responseData); +} +``` + +Below is a working example with a typescript implementation using grpc npm package. +```ts +const grpc = require('grpc') + +const Client = grpc.makeGenericClientConstructor({}) +const client = new Client( + grpcServerUrl, + grpc.credentials.createInsecure() +) + +const rpcImpl = function(method, requestData, callback) { + client.makeUnaryRequest( + method.name, + arg => arg, + arg => arg, + requestData, + callback + ) +} +``` + +Example: + +```protobuf +// greeter.proto +syntax = "proto3"; + +service Greeter { + rpc SayHello (HelloRequest) returns (HelloReply) {} +} + +message HelloRequest { + string name = 1; +} + +message HelloReply { + string message = 1; +} +``` + +```js +... +var Greeter = root.lookup("Greeter"); +var greeter = Greeter.create(/* see above */ rpcImpl, /* request delimited? */ false, /* response delimited? */ false); + +greeter.sayHello({ name: 'you' }, function(err, response) { + console.log('Greeting:', response.message); +}); +``` + +Services also support promises: + +```js +greeter.sayHello({ name: 'you' }) + .then(function(response) { + console.log('Greeting:', response.message); + }); +``` + +There is also an [example for streaming RPC](https://github.com/dcodeIO/protobuf.js/blob/master/examples/streaming-rpc.js). + +Note that the service API is meant for clients. Implementing a server-side endpoint pretty much always requires transport channel (i.e. http, websocket, etc.) specific code with the only common denominator being that it decodes and encodes messages. + +### Usage with TypeScript + +The library ships with its own [type definitions](https://github.com/dcodeIO/protobuf.js/blob/master/index.d.ts) and modern editors like [Visual Studio Code](https://code.visualstudio.com/) will automatically detect and use them for code completion. + +The npm package depends on [@types/node](https://www.npmjs.com/package/@types/node) because of `Buffer` and [@types/long](https://www.npmjs.com/package/@types/long) because of `Long`. If you are not building for node and/or not using long.js, it should be safe to exclude them manually. + +#### Using the JS API + +The API shown above works pretty much the same with TypeScript. However, because everything is typed, accessing fields on instances of dynamically generated message classes requires either using bracket-notation (i.e. `message["awesomeField"]`) or explicit casts. Alternatively, it is possible to use a [typings file generated for its static counterpart](#pbts-for-typescript). + +```ts +import { load } from "protobufjs"; // respectively "./node_modules/protobufjs" + +load("awesome.proto", function(err, root) { + if (err) + throw err; + + // example code + const AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage"); + + let message = AwesomeMessage.create({ awesomeField: "hello" }); + console.log(`message = ${JSON.stringify(message)}`); + + let buffer = AwesomeMessage.encode(message).finish(); + console.log(`buffer = ${Array.prototype.toString.call(buffer)}`); + + let decoded = AwesomeMessage.decode(buffer); + console.log(`decoded = ${JSON.stringify(decoded)}`); +}); +``` + +#### Using generated static code + +If you generated static code to `bundle.js` using the CLI and its type definitions to `bundle.d.ts`, then you can just do: + +```ts +import { AwesomeMessage } from "./bundle.js"; + +// example code +let message = AwesomeMessage.create({ awesomeField: "hello" }); +let buffer = AwesomeMessage.encode(message).finish(); +let decoded = AwesomeMessage.decode(buffer); +``` + +#### Using decorators + +The library also includes an early implementation of [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html). + +**Note** that decorators are an experimental feature in TypeScript and that declaration order is important depending on the JS target. For example, `@Field.d(2, AwesomeArrayMessage)` requires that `AwesomeArrayMessage` has been defined earlier when targeting `ES5`. + +```ts +import { Message, Type, Field, OneOf } from "protobufjs/light"; // respectively "./node_modules/protobufjs/light.js" + +export class AwesomeSubMessage extends Message { + + @Field.d(1, "string") + public awesomeString: string; + +} + +export enum AwesomeEnum { + ONE = 1, + TWO = 2 +} + +@Type.d("SuperAwesomeMessage") +export class AwesomeMessage extends Message { + + @Field.d(1, "string", "optional", "awesome default string") + public awesomeField: string; + + @Field.d(2, AwesomeSubMessage) + public awesomeSubMessage: AwesomeSubMessage; + + @Field.d(3, AwesomeEnum, "optional", AwesomeEnum.ONE) + public awesomeEnum: AwesomeEnum; + + @OneOf.d("awesomeSubMessage", "awesomeEnum") + public which: string; + +} + +// example code +let message = new AwesomeMessage({ awesomeField: "hello" }); +let buffer = AwesomeMessage.encode(message).finish(); +let decoded = AwesomeMessage.decode(buffer); +``` + +Supported decorators are: + +* **Type.d(typeName?: `string`)**   *(optional)*
+ annotates a class as a protobuf message type. If `typeName` is not specified, the constructor's runtime function name is used for the reflected type. + +* **Field.d<T>(fieldId: `number`, fieldType: `string | Constructor`, fieldRule?: `"optional" | "required" | "repeated"`, defaultValue?: `T`)**
+ annotates a property as a protobuf field with the specified id and protobuf type. + +* **MapField.d<T extends { [key: string]: any }>(fieldId: `number`, fieldKeyType: `string`, fieldValueType. `string | Constructor<{}>`)**
+ annotates a property as a protobuf map field with the specified id, protobuf key and value type. + +* **OneOf.d<T extends string>(...fieldNames: `string[]`)**
+ annotates a property as a protobuf oneof covering the specified fields. + +Other notes: + +* Decorated types reside in `protobuf.roots["decorated"]` using a flat structure, so no duplicate names. +* Enums are copied to a reflected enum with a generic name on decorator evaluation because referenced enum objects have no runtime name the decorator could use. +* Default values must be specified as arguments to the decorator instead of using a property initializer for proper prototype behavior. +* Property names on decorated classes must not be renamed on compile time (i.e. by a minifier) because decorators just receive the original field name as a string. + +**ProTip!** Not as pretty, but you can [use decorators in plain JavaScript](https://github.com/dcodeIO/protobuf.js/blob/master/examples/js-decorators.js) as well. + +Additional documentation +------------------------ + +#### Protocol Buffers +* [Google's Developer Guide](https://developers.google.com/protocol-buffers/docs/overview) + +#### protobuf.js +* [API Documentation](https://protobufjs.github.io/protobuf.js) +* [CHANGELOG](https://github.com/dcodeIO/protobuf.js/blob/master/CHANGELOG.md) +* [Frequently asked questions](https://github.com/dcodeIO/protobuf.js/wiki) on our wiki + +#### Community +* [Questions and answers](http://stackoverflow.com/search?tab=newest&q=protobuf.js) on StackOverflow + +Performance +----------- +The package includes a benchmark that compares protobuf.js performance to native JSON (as far as this is possible) and [Google's JS implementation](https://github.com/google/protobuf/tree/master/js). On an i7-2600K running node 6.9.1 it yields: + +``` +benchmarking encoding performance ... + +protobuf.js (reflect) x 541,707 ops/sec ±1.13% (87 runs sampled) +protobuf.js (static) x 548,134 ops/sec ±1.38% (89 runs sampled) +JSON (string) x 318,076 ops/sec ±0.63% (93 runs sampled) +JSON (buffer) x 179,165 ops/sec ±2.26% (91 runs sampled) +google-protobuf x 74,406 ops/sec ±0.85% (86 runs sampled) + + protobuf.js (static) was fastest + protobuf.js (reflect) was 0.9% ops/sec slower (factor 1.0) + JSON (string) was 41.5% ops/sec slower (factor 1.7) + JSON (buffer) was 67.6% ops/sec slower (factor 3.1) + google-protobuf was 86.4% ops/sec slower (factor 7.3) + +benchmarking decoding performance ... + +protobuf.js (reflect) x 1,383,981 ops/sec ±0.88% (93 runs sampled) +protobuf.js (static) x 1,378,925 ops/sec ±0.81% (93 runs sampled) +JSON (string) x 302,444 ops/sec ±0.81% (93 runs sampled) +JSON (buffer) x 264,882 ops/sec ±0.81% (93 runs sampled) +google-protobuf x 179,180 ops/sec ±0.64% (94 runs sampled) + + protobuf.js (reflect) was fastest + protobuf.js (static) was 0.3% ops/sec slower (factor 1.0) + JSON (string) was 78.1% ops/sec slower (factor 4.6) + JSON (buffer) was 80.8% ops/sec slower (factor 5.2) + google-protobuf was 87.0% ops/sec slower (factor 7.7) + +benchmarking combined performance ... + +protobuf.js (reflect) x 275,900 ops/sec ±0.78% (90 runs sampled) +protobuf.js (static) x 290,096 ops/sec ±0.96% (90 runs sampled) +JSON (string) x 129,381 ops/sec ±0.77% (90 runs sampled) +JSON (buffer) x 91,051 ops/sec ±0.94% (90 runs sampled) +google-protobuf x 42,050 ops/sec ±0.85% (91 runs sampled) + + protobuf.js (static) was fastest + protobuf.js (reflect) was 4.7% ops/sec slower (factor 1.0) + JSON (string) was 55.3% ops/sec slower (factor 2.2) + JSON (buffer) was 68.6% ops/sec slower (factor 3.2) + google-protobuf was 85.5% ops/sec slower (factor 6.9) +``` + +These results are achieved by + +* generating type-specific encoders, decoders, verifiers and converters at runtime +* configuring the reader/writer interface according to the environment +* using node-specific functionality where beneficial and, of course +* avoiding unnecessary operations through splitting up [the toolset](#toolset). + +You can also run [the benchmark](https://github.com/dcodeIO/protobuf.js/blob/master/bench/index.js) ... + +``` +$> npm run bench +``` + +and [the profiler](https://github.com/dcodeIO/protobuf.js/blob/master/bench/prof.js) yourself (the latter requires a recent version of node): + +``` +$> npm run prof [iterations=10000000] +``` + +Note that as of this writing, the benchmark suite performs significantly slower on node 7.2.0 compared to 6.9.1 because moths. + +Compatibility +------------- + +* Works in all modern and not-so-modern browsers except IE8. +* Because the internals of this package do not rely on `google/protobuf/descriptor.proto`, options are parsed and presented literally. +* If typed arrays are not supported by the environment, plain arrays will be used instead. +* Support for pre-ES5 environments (except IE8) can be achieved by [using a polyfill](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/polyfill.js). +* Support for [Content Security Policy](https://w3c.github.io/webappsec-csp/)-restricted environments (like Chrome extensions without [unsafe-eval](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval)) can be achieved by generating and using static code instead. +* If a proper way to work with 64 bit values (uint64, int64 etc.) is required, just install [long.js](https://github.com/dcodeIO/long.js) alongside this library. All 64 bit numbers will then be returned as a `Long` instance instead of a possibly unsafe JavaScript number ([see](https://github.com/dcodeIO/long.js)). +* For descriptor.proto interoperability, see [ext/descriptor](https://github.com/dcodeIO/protobuf.js/tree/master/ext/descriptor) + +Building +-------- + +To build the library or its components yourself, clone it from GitHub and install the development dependencies: + +``` +$> git clone https://github.com/dcodeIO/protobuf.js.git +$> cd protobuf.js +$> npm install +``` + +Building the respective development and production versions with their respective source maps to `dist/`: + +``` +$> npm run build +``` + +Building the documentation to `docs/`: + +``` +$> npm run docs +``` + +Building the TypeScript definition to `index.d.ts`: + +``` +$> npm run types +``` + +### Browserify integration + +By default, protobuf.js integrates into any browserify build-process without requiring any optional modules. Hence: + +* If int64 support is required, explicitly require the `long` module somewhere in your project as it will be excluded otherwise. This assumes that a global `require` function is present that protobuf.js can call to obtain the long module. + + If there is no global `require` function present after bundling, it's also possible to assign the long module programmatically: + + ```js + var Long = ...; + + protobuf.util.Long = Long; + protobuf.configure(); + ``` + +* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) for reference. + +**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause) diff --git a/node_modules/protobufjs/dist/light/protobuf.js b/node_modules/protobufjs/dist/light/protobuf.js new file mode 100644 index 0000000..0626dcd --- /dev/null +++ b/node_modules/protobufjs/dist/light/protobuf.js @@ -0,0 +1,7381 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:34 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +(function(undefined){"use strict";(function prelude(modules, cache, entries) { + + // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS + // sources through a conflict-free require shim and is again wrapped within an iife that + // provides a minification-friendly `undefined` var plus a global "use strict" directive + // so that minification can remove the directives of each module. + + function $require(name) { + var $module = cache[name]; + if (!$module) + modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); + return $module.exports; + } + + var protobuf = $require(entries[0]); + + // Expose globally + protobuf.util.global.protobuf = protobuf; + + // Be nice to AMD + if (typeof define === "function" && define.amd) + define(["long"], function(Long) { + if (Long && Long.isLong) { + protobuf.util.Long = Long; + protobuf.configure(); + } + return protobuf; + }); + + // Be nice to CommonJS + if (typeof module === "object" && module && module.exports) + module.exports = protobuf; + +})/* end of prelude */({1:[function(require,module,exports){ +"use strict"; +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} + +},{}],2:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],3:[function(require,module,exports){ +"use strict"; +module.exports = codegen; + +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + */ +function codegen(functionParams, functionName) { + + /* istanbul ignore if */ + if (typeof functionParams === "string") { + functionName = functionParams; + functionParams = undefined; + } + + var body = []; + + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ + + function Codegen(formatStringOrScope) { + // note that explicit array handling below makes this ~50% faster + + // finish the function + if (typeof formatStringOrScope !== "string") { + var source = toString(); + if (codegen.verbose) + console.log("codegen: " + source); // eslint-disable-line no-console + source = "return " + source; + if (formatStringOrScope) { + var scopeKeys = Object.keys(formatStringOrScope), + scopeParams = new Array(scopeKeys.length + 1), + scopeValues = new Array(scopeKeys.length), + scopeOffset = 0; + while (scopeOffset < scopeKeys.length) { + scopeParams[scopeOffset] = scopeKeys[scopeOffset]; + scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; + } + scopeParams[scopeOffset] = source; + return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func + } + return Function(source)(); // eslint-disable-line no-new-func + } + + // otherwise append to body + var formatParams = new Array(arguments.length - 1), + formatOffset = 0; + while (formatOffset < formatParams.length) + formatParams[formatOffset] = arguments[++formatOffset]; + formatOffset = 0; + formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { + var value = formatParams[formatOffset++]; + switch ($1) { + case "d": case "f": return String(Number(value)); + case "i": return String(Math.floor(value)); + case "j": return JSON.stringify(value); + case "s": return String(value); + } + return "%"; + }); + if (formatOffset !== formatParams.length) + throw Error("parameter count mismatch"); + body.push(formatStringOrScope); + return Codegen; + } + + function toString(functionNameOverride) { + return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; + } + + Codegen.toString = toString; + return Codegen; +} + +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ + +/** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} + */ +codegen.verbose = false; + +},{}],4:[function(require,module,exports){ +"use strict"; +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; + +},{}],5:[function(require,module,exports){ +"use strict"; +module.exports = fetch; + +var asPromise = require(1), + inquire = require(7); + +var fs = inquire("fs"); + +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ + +/** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +function fetch(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else if (!options) + options = {}; + + if (!callback) + return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this + + // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. + if (!options.xhr && fs && fs.readFile) + return fs.readFile(filename, function fetchReadFileCallback(err, contents) { + return err && typeof XMLHttpRequest !== "undefined" + ? fetch.xhr(filename, options, callback) + : err + ? callback(err) + : callback(null, options.binary ? contents : contents.toString("utf8")); + }); + + // use the XHR version otherwise. + return fetch.xhr(filename, options, callback); +} + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 + */ + +/**/ +fetch.xhr = function fetch_xhr(filename, options, callback) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { + + if (xhr.readyState !== 4) + return undefined; + + // local cors security errors return status 0 / empty string, too. afaik this cannot be + // reliably distinguished from an actually empty file for security reasons. feel free + // to send a pull request if you are aware of a solution. + if (xhr.status !== 0 && xhr.status !== 200) + return callback(Error("status " + xhr.status)); + + // if binary data is expected, make sure that some sort of array is returned, even if + // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. + if (options.binary) { + var buffer = xhr.response; + if (!buffer) { + buffer = []; + for (var i = 0; i < xhr.responseText.length; ++i) + buffer.push(xhr.responseText.charCodeAt(i) & 255); + } + return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); + } + return callback(null, xhr.responseText); + }; + + if (options.binary) { + // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers + if ("overrideMimeType" in xhr) + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + xhr.responseType = "arraybuffer"; + } + + xhr.open("GET", filename); + xhr.send(); +}; + +},{"1":1,"7":7}],6:[function(require,module,exports){ +"use strict"; + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} + +},{}],7:[function(require,module,exports){ +"use strict"; +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} + +},{}],8:[function(require,module,exports){ +"use strict"; + +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace + */ +var path = exports; + +var isAbsolute = +/** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute + */ +path.isAbsolute = function isAbsolute(path) { + return /^(?:\/|\w+:)/.test(path); +}; + +var normalize = +/** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path + */ +path.normalize = function normalize(path) { + path = path.replace(/\\/g, "/") + .replace(/\/{2,}/g, "/"); + var parts = path.split("/"), + absolute = isAbsolute(path), + prefix = ""; + if (absolute) + prefix = parts.shift() + "/"; + for (var i = 0; i < parts.length;) { + if (parts[i] === "..") { + if (i > 0 && parts[i - 1] !== "..") + parts.splice(--i, 2); + else if (absolute) + parts.splice(i, 1); + else + ++i; + } else if (parts[i] === ".") + parts.splice(i, 1); + else + ++i; + } + return prefix + parts.join("/"); +}; + +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file + */ +path.resolve = function resolve(originPath, includePath, alreadyNormalized) { + if (!alreadyNormalized) + includePath = normalize(includePath); + if (isAbsolute(includePath)) + return includePath; + if (!alreadyNormalized) + originPath = normalize(originPath); + return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; +}; + +},{}],9:[function(require,module,exports){ +"use strict"; +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} + +},{}],10:[function(require,module,exports){ +"use strict"; + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; + +},{}],11:[function(require,module,exports){ +"use strict"; +/** + * Runtime message from/to plain object converters. + * @namespace + */ +var converter = exports; + +var Enum = require(14), + util = require(33); + +/** + * Generates a partial value fromObject conveter. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} prop Property reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genValuePartial_fromObject(gen, field, fieldIndex, prop) { + var defaultAlreadyEmitted = false; + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(d%s){", prop); + for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { + // enum unknown values passthrough + if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen + ("default:") + ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); + if (!field.repeated) gen // fallback to default value only for + // arrays, to avoid leaving holes. + ("break"); // for non-repeated fields, just ignore + defaultAlreadyEmitted = true; + } + gen + ("case%j:", keys[i]) + ("case %i:", values[keys[i]]) + ("m%s=%j", prop, values[keys[i]]) + ("break"); + } gen + ("}"); + } else gen + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop); + } else { + var isUnsigned = false; + switch (field.type) { + case "double": + case "float": gen + ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" + break; + case "uint32": + case "fixed32": gen + ("m%s=d%s>>>0", prop, prop); + break; + case "int32": + case "sint32": + case "sfixed32": gen + ("m%s=d%s|0", prop, prop); + break; + case "uint64": + isUnsigned = true; + // eslint-disable-next-line no-fallthrough + case "int64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(util.Long)") + ("(m%s=util.Long.fromValue(d%s)).unsigned=%j", prop, prop, isUnsigned) + ("else if(typeof d%s===\"string\")", prop) + ("m%s=parseInt(d%s,10)", prop, prop) + ("else if(typeof d%s===\"number\")", prop) + ("m%s=d%s", prop, prop) + ("else if(typeof d%s===\"object\")", prop) + ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); + break; + case "bytes": gen + ("if(typeof d%s===\"string\")", prop) + ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) + ("else if(d%s.length >= 0)", prop) + ("m%s=d%s", prop, prop); + break; + case "string": gen + ("m%s=String(d%s)", prop, prop); + break; + case "bool": gen + ("m%s=Boolean(d%s)", prop, prop); + break; + /* default: gen + ("m%s=d%s", prop, prop); + break; */ + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a plain object to runtime message converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.fromObject = function fromObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray; + var gen = util.codegen(["d"], mtype.name + "$fromObject") + ("if(d instanceof this.ctor)") + ("return d"); + if (!fields.length) return gen + ("return new this.ctor"); + gen + ("var m=new this.ctor"); + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + prop = util.safeProp(field.name); + + // Map fields + if (field.map) { gen + ("if(d%s){", prop) + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s={}", prop) + ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); + break; + case "bytes": gen + ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); + break; + default: gen + ("d%s=m%s", prop, prop); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a runtime message to plain object converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.toObject = function toObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); + if (!fields.length) + return util.codegen()("return {}"); + var gen = util.codegen(["m", "o"], mtype.name + "$toObject") + ("if(!o)") + ("o={}") + ("var d={}"); + + var repeatedFields = [], + mapFields = [], + normalFields = [], + i = 0; + for (; i < fields.length; ++i) + if (!fields[i].partOf) + ( fields[i].resolve().repeated ? repeatedFields + : fields[i].map ? mapFields + : normalFields).push(fields[i]); + + if (repeatedFields.length) { gen + ("if(o.arrays||o.defaults){"); + for (i = 0; i < repeatedFields.length; ++i) gen + ("d%s=[]", util.safeProp(repeatedFields[i].name)); + gen + ("}"); + } + + if (mapFields.length) { gen + ("if(o.objects||o.defaults){"); + for (i = 0; i < mapFields.length; ++i) gen + ("d%s={}", util.safeProp(mapFields[i].name)); + gen + ("}"); + } + + if (normalFields.length) { gen + ("if(o.defaults){"); + for (i = 0; i < normalFields.length; ++i) { + var field = normalFields[i], + prop = util.safeProp(field.name); + if (field.resolvedType instanceof Enum) gen + ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); + else if (field.long) gen + ("if(util.Long){") + ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) + ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop) + ("}else") + ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber()); + else if (field.bytes) { + var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]"; + gen + ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) + ("else{") + ("d%s=%s", prop, arrayDefault) + ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) + ("}"); + } else gen + ("d%s=%j", prop, field.typeDefault); // also messages (=null) + } gen + ("}"); + } + var hasKs2 = false; + for (i = 0; i < fields.length; ++i) { + var field = fields[i], + index = mtype._fieldsArray.indexOf(field), + prop = util.safeProp(field.name); + if (field.map) { + if (!hasKs2) { hasKs2 = true; gen + ("var ks2"); + } gen + ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) + ("d%s={}", prop) + ("for(var j=0;j>>3){"); + + var i = 0; + for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + ref = "m" + util.safeProp(field.name); gen + ("case %i: {", field.id); + + // Map fields + if (field.map) { gen + ("if(%s===util.emptyObject)", ref) + ("%s={}", ref) + ("var c2 = r.uint32()+r.pos"); + + if (types.defaults[field.keyType] !== undefined) gen + ("k=%j", types.defaults[field.keyType]); + else gen + ("k=null"); + + if (types.defaults[type] !== undefined) gen + ("value=%j", types.defaults[type]); + else gen + ("value=null"); + + gen + ("while(r.pos>>3){") + ("case 1: k=r.%s(); break", field.keyType) + ("case 2:"); + + if (types.basic[type] === undefined) gen + ("value=types[%i].decode(r,r.uint32())", i); // can't be groups + else gen + ("value=r.%s()", type); + + gen + ("break") + ("default:") + ("r.skipType(tag2&7)") + ("break") + ("}") + ("}"); + + if (types.long[field.keyType] !== undefined) gen + ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); + else gen + ("%s[k]=value", ref); + + // Repeated fields + } else if (field.repeated) { gen + + ("if(!(%s&&%s.length))", ref, ref) + ("%s=[]", ref); + + // Packable (always check for forward and backward compatiblity) + if (types.packed[type] !== undefined) gen + ("if((t&7)===2){") + ("var c2=r.uint32()+r.pos") + ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) + : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); +} + +/** + * Generates an encoder specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function encoder(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var gen = util.codegen(["m", "w"], mtype.name + "$encode") + ("if(!w)") + ("w=Writer.create()"); + + var i, ref; + + // "when a message is serialized its known fields should be written sequentially by field number" + var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); + + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + index = mtype._fieldsArray.indexOf(field), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + wireType = types.basic[type]; + ref = "m" + util.safeProp(field.name); + + // Map fields + if (field.map) { + gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null + ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); + if (wireType === undefined) gen + ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups + else gen + (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); + gen + ("}") + ("}"); + + // Repeated fields + } else if (field.repeated) { gen + ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null + + // Packed repeated + if (field.packed && types.packed[type] !== undefined) { gen + + ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) + ("for(var i=0;i<%s.length;++i)", ref) + ("w.%s(%s[i])", type, ref) + ("w.ldelim()"); + + // Non-packed + } else { gen + + ("for(var i=0;i<%s.length;++i)", ref); + if (wireType === undefined) + genTypePartial(gen, field, index, ref + "[i]"); + else gen + ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); + + } gen + ("}"); + + // Non-repeated + } else { + if (field.optional) gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null + + if (wireType === undefined) + genTypePartial(gen, field, index, ref); + else gen + ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); + + } + } + + return gen + ("return w"); + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +},{"14":14,"32":32,"33":33}],14:[function(require,module,exports){ +"use strict"; +module.exports = Enum; + +// extends ReflectionObject +var ReflectionObject = require(22); +((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; + +var Namespace = require(21), + util = require(33); + +/** + * Constructs a new enum instance. + * @classdesc Reflected enum. + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {Object.} [values] Enum values as an object, by name + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this enum + * @param {Object.} [comments] The value comments for this enum + * @param {Object.>|undefined} [valuesOptions] The value options for this enum + */ +function Enum(name, values, options, comment, comments, valuesOptions) { + ReflectionObject.call(this, name, options); + + if (values && typeof values !== "object") + throw TypeError("values must be an object"); + + /** + * Enum values by id. + * @type {Object.} + */ + this.valuesById = {}; + + /** + * Enum values by name. + * @type {Object.} + */ + this.values = Object.create(this.valuesById); // toJSON, marker + + /** + * Enum comment text. + * @type {string|null} + */ + this.comment = comment; + + /** + * Value comment texts, if any. + * @type {Object.} + */ + this.comments = comments || {}; + + /** + * Values options, if any + * @type {Object>|undefined} + */ + this.valuesOptions = valuesOptions; + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + // Note that values inherit valuesById on their prototype which makes them a TypeScript- + // compatible enum. This is used by pbts to write actual enum definitions that work for + // static and reflection code alike instead of emitting generic object definitions. + + if (values) + for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) + if (typeof values[keys[i]] === "number") // use forward entries only + this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; +} + +/** + * Enum descriptor. + * @interface IEnum + * @property {Object.} values Enum values + * @property {Object.} [options] Enum options + */ + +/** + * Constructs an enum from an enum descriptor. + * @param {string} name Enum name + * @param {IEnum} json Enum descriptor + * @returns {Enum} Created enum + * @throws {TypeError} If arguments are invalid + */ +Enum.fromJSON = function fromJSON(name, json) { + var enm = new Enum(name, json.values, json.options, json.comment, json.comments); + enm.reserved = json.reserved; + return enm; +}; + +/** + * Converts this enum to an enum descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IEnum} Enum descriptor + */ +Enum.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "valuesOptions" , this.valuesOptions, + "values" , this.values, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "comment" , keepComments ? this.comment : undefined, + "comments" , keepComments ? this.comments : undefined + ]); +}; + +/** + * Adds a value to this enum. + * @param {string} name Value name + * @param {number} id Value id + * @param {string} [comment] Comment, if any + * @param {Object.|undefined} [options] Options, if any + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a value with this name or id + */ +Enum.prototype.add = function add(name, id, comment, options) { + // utilized by the parser but not by .fromJSON + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (!util.isInteger(id)) + throw TypeError("id must be an integer"); + + if (this.values[name] !== undefined) + throw Error("duplicate name '" + name + "' in " + this); + + if (this.isReservedId(id)) + throw Error("id " + id + " is reserved in " + this); + + if (this.isReservedName(name)) + throw Error("name '" + name + "' is reserved in " + this); + + if (this.valuesById[id] !== undefined) { + if (!(this.options && this.options.allow_alias)) + throw Error("duplicate id " + id + " in " + this); + this.values[name] = id; + } else + this.valuesById[this.values[name] = id] = name; + + if (options) { + if (this.valuesOptions === undefined) + this.valuesOptions = {}; + this.valuesOptions[name] = options || null; + } + + this.comments[name] = comment || null; + return this; +}; + +/** + * Removes a value from this enum + * @param {string} name Value name + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `name` is not a name of this enum + */ +Enum.prototype.remove = function remove(name) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + var val = this.values[name]; + if (val == null) + throw Error("name '" + name + "' does not exist in " + this); + + delete this.valuesById[val]; + delete this.values[name]; + delete this.comments[name]; + if (this.valuesOptions) + delete this.valuesOptions[name]; + + return this; +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +},{"21":21,"22":22,"33":33}],15:[function(require,module,exports){ +"use strict"; +module.exports = Field; + +// extends ReflectionObject +var ReflectionObject = require(22); +((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; + +var Enum = require(14), + types = require(32), + util = require(33); + +var Type; // cyclic + +var ruleRe = /^required|optional|repeated$/; + +/** + * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. + * @name Field + * @classdesc Reflected message field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a field from a field descriptor. + * @param {string} name Field name + * @param {IField} json Field descriptor + * @returns {Field} Created field + * @throws {TypeError} If arguments are invalid + */ +Field.fromJSON = function fromJSON(name, json) { + return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); +}; + +/** + * Not an actual constructor. Use {@link Field} instead. + * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. + * @exports FieldBase + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function Field(name, id, type, rule, extend, options, comment) { + + if (util.isObject(rule)) { + comment = extend; + options = rule; + rule = extend = undefined; + } else if (util.isObject(extend)) { + comment = options; + options = extend; + extend = undefined; + } + + ReflectionObject.call(this, name, options); + + if (!util.isInteger(id) || id < 0) + throw TypeError("id must be a non-negative integer"); + + if (!util.isString(type)) + throw TypeError("type must be a string"); + + if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) + throw TypeError("rule must be a string rule"); + + if (extend !== undefined && !util.isString(extend)) + throw TypeError("extend must be a string"); + + /** + * Field rule, if any. + * @type {string|undefined} + */ + if (rule === "proto3_optional") { + rule = "optional"; + } + this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON + + /** + * Field type. + * @type {string} + */ + this.type = type; // toJSON + + /** + * Unique field id. + * @type {number} + */ + this.id = id; // toJSON, marker + + /** + * Extended type if different from parent. + * @type {string|undefined} + */ + this.extend = extend || undefined; // toJSON + + /** + * Whether this field is required. + * @type {boolean} + */ + this.required = rule === "required"; + + /** + * Whether this field is optional. + * @type {boolean} + */ + this.optional = !this.required; + + /** + * Whether this field is repeated. + * @type {boolean} + */ + this.repeated = rule === "repeated"; + + /** + * Whether this field is a map or not. + * @type {boolean} + */ + this.map = false; + + /** + * Message this field belongs to. + * @type {Type|null} + */ + this.message = null; + + /** + * OneOf this field belongs to, if any, + * @type {OneOf|null} + */ + this.partOf = null; + + /** + * The field type's default value. + * @type {*} + */ + this.typeDefault = null; + + /** + * The field's default value on prototypes. + * @type {*} + */ + this.defaultValue = null; + + /** + * Whether this field's value should be treated as a long. + * @type {boolean} + */ + this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; + + /** + * Whether this field's value is a buffer. + * @type {boolean} + */ + this.bytes = type === "bytes"; + + /** + * Resolved type if not a basic type. + * @type {Type|Enum|null} + */ + this.resolvedType = null; + + /** + * Sister-field within the extended type if a declaring extension field. + * @type {Field|null} + */ + this.extensionField = null; + + /** + * Sister-field within the declaring namespace if an extended field. + * @type {Field|null} + */ + this.declaringField = null; + + /** + * Internally remembers whether this field is packed. + * @type {boolean|null} + * @private + */ + this._packed = null; + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Determines whether this field is packed. Only relevant when repeated and working with proto2. + * @name Field#packed + * @type {boolean} + * @readonly + */ +Object.defineProperty(Field.prototype, "packed", { + get: function() { + // defaults to packed=true if not explicity set to false + if (this._packed === null) + this._packed = this.getOption("packed") !== false; + return this._packed; + } +}); + +/** + * @override + */ +Field.prototype.setOption = function setOption(name, value, ifNotSet) { + if (name === "packed") // clear cached before setting + this._packed = null; + return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); +}; + +/** + * Field descriptor. + * @interface IField + * @property {string} [rule="optional"] Field rule + * @property {string} type Field type + * @property {number} id Field id + * @property {Object.} [options] Field options + */ + +/** + * Extension field descriptor. + * @interface IExtensionField + * @extends IField + * @property {string} extend Extended type + */ + +/** + * Converts this field to a field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IField} Field descriptor + */ +Field.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "rule" , this.rule !== "optional" && this.rule || undefined, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Resolves this field's type references. + * @returns {Field} `this` + * @throws {Error} If any reference cannot be resolved + */ +Field.prototype.resolve = function resolve() { + + if (this.resolved) + return this; + + if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it + this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); + if (this.resolvedType instanceof Type) + this.typeDefault = null; + else // instanceof Enum + this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined + } else if (this.options && this.options.proto3_optional) { + // proto3 scalar value marked optional; should default to null + this.typeDefault = null; + } + + // use explicitly set default value if present + if (this.options && this.options["default"] != null) { + this.typeDefault = this.options["default"]; + if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") + this.typeDefault = this.resolvedType.values[this.typeDefault]; + } + + // remove unnecessary options + if (this.options) { + if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) + delete this.options.packed; + if (!Object.keys(this.options).length) + this.options = undefined; + } + + // convert to internal data type if necesssary + if (this.long) { + this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"); + + /* istanbul ignore else */ + if (Object.freeze) + Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + + } else if (this.bytes && typeof this.typeDefault === "string") { + var buf; + if (util.base64.test(this.typeDefault)) + util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); + else + util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); + this.typeDefault = buf; + } + + // take special care of maps and repeated fields + if (this.map) + this.defaultValue = util.emptyObject; + else if (this.repeated) + this.defaultValue = util.emptyArray; + else + this.defaultValue = this.typeDefault; + + // ensure proper value on prototype + if (this.parent instanceof Type) + this.parent.ctor.prototype[this.name] = this.defaultValue; + + return ReflectionObject.prototype.resolve.call(this); +}; + +/** + * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). + * @typedef FieldDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} fieldName Field name + * @returns {undefined} + */ + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @param {T} [defaultValue] Default value + * @returns {FieldDecorator} Decorator function + * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] + */ +Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { + + // submessage: decorate the submessage and use its name as the type + if (typeof fieldType === "function") + fieldType = util.decorateType(fieldType).name; + + // enum reference: create a reflected copy of the enum and keep reuseing it + else if (fieldType && typeof fieldType === "object") + fieldType = util.decorateEnum(fieldType).name; + + return function fieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); + }; +}; + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {Constructor|string} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @returns {FieldDecorator} Decorator function + * @template T extends Message + * @variation 2 + */ +// like Field.d but without a default value + +// Sets up cyclic dependencies (called in index-light) +Field._configure = function configure(Type_) { + Type = Type_; +}; + +},{"14":14,"22":22,"32":32,"33":33}],16:[function(require,module,exports){ +"use strict"; +var protobuf = module.exports = require(17); + +protobuf.build = "light"; + +/** + * A node-style callback as used by {@link load} and {@link Root#load}. + * @typedef LoadCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Root} [root] Root, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param {string|string[]} filename One or multiple files to load + * @param {Root} root Root namespace, defaults to create a new one if omitted. + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + */ +function load(filename, root, callback) { + if (typeof root === "function") { + callback = root; + root = new protobuf.Root(); + } else if (!root) + root = new protobuf.Root(); + return root.load(filename, callback); +} + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Promise} Promise + * @see {@link Root#load} + * @variation 3 + */ +// function load(filename:string, [root:Root]):Promise + +protobuf.load = load; + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + * @see {@link Root#loadSync} + */ +function loadSync(filename, root) { + if (!root) + root = new protobuf.Root(); + return root.loadSync(filename); +} + +protobuf.loadSync = loadSync; + +// Serialization +protobuf.encoder = require(13); +protobuf.decoder = require(12); +protobuf.verifier = require(36); +protobuf.converter = require(11); + +// Reflection +protobuf.ReflectionObject = require(22); +protobuf.Namespace = require(21); +protobuf.Root = require(26); +protobuf.Enum = require(14); +protobuf.Type = require(31); +protobuf.Field = require(15); +protobuf.OneOf = require(23); +protobuf.MapField = require(18); +protobuf.Service = require(30); +protobuf.Method = require(20); + +// Runtime +protobuf.Message = require(19); +protobuf.wrappers = require(37); + +// Utility +protobuf.types = require(32); +protobuf.util = require(33); + +// Set up possibly cyclic reflection dependencies +protobuf.ReflectionObject._configure(protobuf.Root); +protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); +protobuf.Root._configure(protobuf.Type); +protobuf.Field._configure(protobuf.Type); + +},{"11":11,"12":12,"13":13,"14":14,"15":15,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"26":26,"30":30,"31":31,"32":32,"33":33,"36":36,"37":37}],17:[function(require,module,exports){ +"use strict"; +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = require(38); +protobuf.BufferWriter = require(39); +protobuf.Reader = require(24); +protobuf.BufferReader = require(25); + +// Utility +protobuf.util = require(35); +protobuf.rpc = require(28); +protobuf.roots = require(27); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + +},{"24":24,"25":25,"27":27,"28":28,"35":35,"38":38,"39":39}],18:[function(require,module,exports){ +"use strict"; +module.exports = MapField; + +// extends Field +var Field = require(15); +((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; + +var types = require(32), + util = require(33); + +/** + * Constructs a new map field instance. + * @classdesc Reflected map field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} keyType Key type + * @param {string} type Value type + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function MapField(name, id, keyType, type, options, comment) { + Field.call(this, name, id, type, undefined, undefined, options, comment); + + /* istanbul ignore if */ + if (!util.isString(keyType)) + throw TypeError("keyType must be a string"); + + /** + * Key type. + * @type {string} + */ + this.keyType = keyType; // toJSON, marker + + /** + * Resolved key type if not a basic type. + * @type {ReflectionObject|null} + */ + this.resolvedKeyType = null; + + // Overrides Field#map + this.map = true; +} + +/** + * Map field descriptor. + * @interface IMapField + * @extends {IField} + * @property {string} keyType Key type + */ + +/** + * Extension map field descriptor. + * @interface IExtensionMapField + * @extends IMapField + * @property {string} extend Extended type + */ + +/** + * Constructs a map field from a map field descriptor. + * @param {string} name Field name + * @param {IMapField} json Map field descriptor + * @returns {MapField} Created map field + * @throws {TypeError} If arguments are invalid + */ +MapField.fromJSON = function fromJSON(name, json) { + return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); +}; + +/** + * Converts this map field to a map field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMapField} Map field descriptor + */ +MapField.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "keyType" , this.keyType, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +MapField.prototype.resolve = function resolve() { + if (this.resolved) + return this; + + // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" + if (types.mapKey[this.keyType] === undefined) + throw Error("invalid key type: " + this.keyType); + + return Field.prototype.resolve.call(this); +}; + +/** + * Map field decorator (TypeScript). + * @name MapField.d + * @function + * @param {number} fieldId Field id + * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type + * @returns {FieldDecorator} Decorator function + * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } + */ +MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { + + // submessage value: decorate the submessage and use its name as the type + if (typeof fieldValueType === "function") + fieldValueType = util.decorateType(fieldValueType).name; + + // enum reference value: create a reflected copy of the enum and keep reuseing it + else if (fieldValueType && typeof fieldValueType === "object") + fieldValueType = util.decorateEnum(fieldValueType).name; + + return function mapFieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); + }; +}; + +},{"15":15,"32":32,"33":33}],19:[function(require,module,exports){ +"use strict"; +module.exports = Message; + +var util = require(35); + +/** + * Constructs a new message instance. + * @classdesc Abstract runtime message. + * @constructor + * @param {Properties} [properties] Properties to set + * @template T extends object = object + */ +function Message(properties) { + // not used internally + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + this[keys[i]] = properties[keys[i]]; +} + +/** + * Reference to the reflected type. + * @name Message.$type + * @type {Type} + * @readonly + */ + +/** + * Reference to the reflected type. + * @name Message#$type + * @type {Type} + * @readonly + */ + +/*eslint-disable valid-jsdoc*/ + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message} Message instance + * @template T extends Message + * @this Constructor + */ +Message.create = function create(properties) { + return this.$type.create(properties); +}; + +/** + * Encodes a message of this type. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encode = function encode(message, writer) { + return this.$type.encode(message, writer); +}; + +/** + * Encodes a message of this type preceeded by its length as a varint. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.$type.encodeDelimited(message, writer); +}; + +/** + * Decodes a message of this type. + * @name Message.decode + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decode = function decode(reader) { + return this.$type.decode(reader); +}; + +/** + * Decodes a message of this type preceeded by its length as a varint. + * @name Message.decodeDelimited + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decodeDelimited = function decodeDelimited(reader) { + return this.$type.decodeDelimited(reader); +}; + +/** + * Verifies a message of this type. + * @name Message.verify + * @function + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ +Message.verify = function verify(message) { + return this.$type.verify(message); +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object + * @returns {T} Message instance + * @template T extends Message + * @this Constructor + */ +Message.fromObject = function fromObject(object) { + return this.$type.fromObject(object); +}; + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {T} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @template T extends Message + * @this Constructor + */ +Message.toObject = function toObject(message, options) { + return this.$type.toObject(message, options); +}; + +/** + * Converts this message to JSON. + * @returns {Object.} JSON object + */ +Message.prototype.toJSON = function toJSON() { + return this.$type.toObject(this, util.toJSONOptions); +}; + +/*eslint-enable valid-jsdoc*/ +},{"35":35}],20:[function(require,module,exports){ +"use strict"; +module.exports = Method; + +// extends ReflectionObject +var ReflectionObject = require(22); +((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; + +var util = require(33); + +/** + * Constructs a new service method instance. + * @classdesc Reflected service method. + * @extends ReflectionObject + * @constructor + * @param {string} name Method name + * @param {string|undefined} type Method type, usually `"rpc"` + * @param {string} requestType Request message type + * @param {string} responseType Response message type + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this method + * @param {Object.} [parsedOptions] Declared options, properly parsed into an object + */ +function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { + + /* istanbul ignore next */ + if (util.isObject(requestStream)) { + options = requestStream; + requestStream = responseStream = undefined; + } else if (util.isObject(responseStream)) { + options = responseStream; + responseStream = undefined; + } + + /* istanbul ignore if */ + if (!(type === undefined || util.isString(type))) + throw TypeError("type must be a string"); + + /* istanbul ignore if */ + if (!util.isString(requestType)) + throw TypeError("requestType must be a string"); + + /* istanbul ignore if */ + if (!util.isString(responseType)) + throw TypeError("responseType must be a string"); + + ReflectionObject.call(this, name, options); + + /** + * Method type. + * @type {string} + */ + this.type = type || "rpc"; // toJSON + + /** + * Request type. + * @type {string} + */ + this.requestType = requestType; // toJSON, marker + + /** + * Whether requests are streamed or not. + * @type {boolean|undefined} + */ + this.requestStream = requestStream ? true : undefined; // toJSON + + /** + * Response type. + * @type {string} + */ + this.responseType = responseType; // toJSON + + /** + * Whether responses are streamed or not. + * @type {boolean|undefined} + */ + this.responseStream = responseStream ? true : undefined; // toJSON + + /** + * Resolved request type. + * @type {Type|null} + */ + this.resolvedRequestType = null; + + /** + * Resolved response type. + * @type {Type|null} + */ + this.resolvedResponseType = null; + + /** + * Comment for this method + * @type {string|null} + */ + this.comment = comment; + + /** + * Options properly parsed into an object + */ + this.parsedOptions = parsedOptions; +} + +/** + * Method descriptor. + * @interface IMethod + * @property {string} [type="rpc"] Method type + * @property {string} requestType Request type + * @property {string} responseType Response type + * @property {boolean} [requestStream=false] Whether requests are streamed + * @property {boolean} [responseStream=false] Whether responses are streamed + * @property {Object.} [options] Method options + * @property {string} comment Method comments + * @property {Object.} [parsedOptions] Method options properly parsed into an object + */ + +/** + * Constructs a method from a method descriptor. + * @param {string} name Method name + * @param {IMethod} json Method descriptor + * @returns {Method} Created method + * @throws {TypeError} If arguments are invalid + */ +Method.fromJSON = function fromJSON(name, json) { + return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); +}; + +/** + * Converts this method to a method descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMethod} Method descriptor + */ +Method.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, + "requestType" , this.requestType, + "requestStream" , this.requestStream, + "responseType" , this.responseType, + "responseStream" , this.responseStream, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined, + "parsedOptions" , this.parsedOptions, + ]); +}; + +/** + * @override + */ +Method.prototype.resolve = function resolve() { + + /* istanbul ignore if */ + if (this.resolved) + return this; + + this.resolvedRequestType = this.parent.lookupType(this.requestType); + this.resolvedResponseType = this.parent.lookupType(this.responseType); + + return ReflectionObject.prototype.resolve.call(this); +}; + +},{"22":22,"33":33}],21:[function(require,module,exports){ +"use strict"; +module.exports = Namespace; + +// extends ReflectionObject +var ReflectionObject = require(22); +((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; + +var Field = require(15), + util = require(33), + OneOf = require(23); + +var Type, // cyclic + Service, + Enum; + +/** + * Constructs a new namespace instance. + * @name Namespace + * @classdesc Reflected namespace. + * @extends NamespaceBase + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a namespace from JSON. + * @memberof Namespace + * @function + * @param {string} name Namespace name + * @param {Object.} json JSON object + * @returns {Namespace} Created namespace + * @throws {TypeError} If arguments are invalid + */ +Namespace.fromJSON = function fromJSON(name, json) { + return new Namespace(name, json.options).addJSON(json.nested); +}; + +/** + * Converts an array of reflection objects to JSON. + * @memberof Namespace + * @param {ReflectionObject[]} array Object array + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {Object.|undefined} JSON object or `undefined` when array is empty + */ +function arrayToJSON(array, toJSONOptions) { + if (!(array && array.length)) + return undefined; + var obj = {}; + for (var i = 0; i < array.length; ++i) + obj[array[i].name] = array[i].toJSON(toJSONOptions); + return obj; +} + +Namespace.arrayToJSON = arrayToJSON; + +/** + * Tests if the specified id is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedId = function isReservedId(reserved, id) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) + return true; + return false; +}; + +/** + * Tests if the specified name is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedName = function isReservedName(reserved, name) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (reserved[i] === name) + return true; + return false; +}; + +/** + * Not an actual constructor. Use {@link Namespace} instead. + * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. + * @exports NamespaceBase + * @extends ReflectionObject + * @abstract + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + * @see {@link Namespace} + */ +function Namespace(name, options) { + ReflectionObject.call(this, name, options); + + /** + * Nested objects by name. + * @type {Object.|undefined} + */ + this.nested = undefined; // toJSON + + /** + * Cached nested objects as an array. + * @type {ReflectionObject[]|null} + * @private + */ + this._nestedArray = null; +} + +function clearCache(namespace) { + namespace._nestedArray = null; + return namespace; +} + +/** + * Nested objects of this namespace as an array for iteration. + * @name NamespaceBase#nestedArray + * @type {ReflectionObject[]} + * @readonly + */ +Object.defineProperty(Namespace.prototype, "nestedArray", { + get: function() { + return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); + } +}); + +/** + * Namespace descriptor. + * @interface INamespace + * @property {Object.} [options] Namespace options + * @property {Object.} [nested] Nested object descriptors + */ + +/** + * Any extension field descriptor. + * @typedef AnyExtensionField + * @type {IExtensionField|IExtensionMapField} + */ + +/** + * Any nested object descriptor. + * @typedef AnyNestedObject + * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} + */ + +/** + * Converts this namespace to a namespace descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {INamespace} Namespace descriptor + */ +Namespace.prototype.toJSON = function toJSON(toJSONOptions) { + return util.toObject([ + "options" , this.options, + "nested" , arrayToJSON(this.nestedArray, toJSONOptions) + ]); +}; + +/** + * Adds nested objects to this namespace from nested object descriptors. + * @param {Object.} nestedJson Any nested object descriptors + * @returns {Namespace} `this` + */ +Namespace.prototype.addJSON = function addJSON(nestedJson) { + var ns = this; + /* istanbul ignore else */ + if (nestedJson) { + for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { + nested = nestedJson[names[i]]; + ns.add( // most to least likely + ( nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : nested.id !== undefined + ? Field.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + } + return this; +}; + +/** + * Gets the nested object of the specified name. + * @param {string} name Nested object name + * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist + */ +Namespace.prototype.get = function get(name) { + return this.nested && this.nested[name] + || null; +}; + +/** + * Gets the values of the nested {@link Enum|enum} of the specified name. + * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. + * @param {string} name Nested enum name + * @returns {Object.} Enum values + * @throws {Error} If there is no such enum + */ +Namespace.prototype.getEnum = function getEnum(name) { + if (this.nested && this.nested[name] instanceof Enum) + return this.nested[name].values; + throw Error("no such enum: " + name); +}; + +/** + * Adds a nested object to this namespace. + * @param {ReflectionObject} object Nested object to add + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name + */ +Namespace.prototype.add = function add(object) { + + if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) + throw TypeError("object must be a valid nested object"); + + if (!this.nested) + this.nested = {}; + else { + var prev = this.get(object.name); + if (prev) { + if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { + // replace plain namespace but keep existing nested elements and options + var nested = prev.nestedArray; + for (var i = 0; i < nested.length; ++i) + object.add(nested[i]); + this.remove(prev); + if (!this.nested) + this.nested = {}; + object.setOptions(prev.options, true); + + } else + throw Error("duplicate name '" + object.name + "' in " + this); + } + } + this.nested[object.name] = object; + object.onAdd(this); + return clearCache(this); +}; + +/** + * Removes a nested object from this namespace. + * @param {ReflectionObject} object Nested object to remove + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this namespace + */ +Namespace.prototype.remove = function remove(object) { + + if (!(object instanceof ReflectionObject)) + throw TypeError("object must be a ReflectionObject"); + if (object.parent !== this) + throw Error(object + " is not a member of " + this); + + delete this.nested[object.name]; + if (!Object.keys(this.nested).length) + this.nested = undefined; + + object.onRemove(this); + return clearCache(this); +}; + +/** + * Defines additial namespaces within this one if not yet existing. + * @param {string|string[]} path Path to create + * @param {*} [json] Nested types to create from JSON + * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty + */ +Namespace.prototype.define = function define(path, json) { + + if (util.isString(path)) + path = path.split("."); + else if (!Array.isArray(path)) + throw TypeError("illegal path"); + if (path && path.length && path[0] === "") + throw Error("path must be relative"); + + var ptr = this; + while (path.length > 0) { + var part = path.shift(); + if (ptr.nested && ptr.nested[part]) { + ptr = ptr.nested[part]; + if (!(ptr instanceof Namespace)) + throw Error("path conflicts with non-namespace objects"); + } else + ptr.add(ptr = new Namespace(part)); + } + if (json) + ptr.addJSON(json); + return ptr; +}; + +/** + * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. + * @returns {Namespace} `this` + */ +Namespace.prototype.resolveAll = function resolveAll() { + var nested = this.nestedArray, i = 0; + while (i < nested.length) + if (nested[i] instanceof Namespace) + nested[i++].resolveAll(); + else + nested[i++].resolve(); + return this.resolve(); +}; + +/** + * Recursively looks up the reflection object matching the specified path in the scope of this namespace. + * @param {string|string[]} path Path to look up + * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. + * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + */ +Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { + + /* istanbul ignore next */ + if (typeof filterTypes === "boolean") { + parentAlreadyChecked = filterTypes; + filterTypes = undefined; + } else if (filterTypes && !Array.isArray(filterTypes)) + filterTypes = [ filterTypes ]; + + if (util.isString(path) && path.length) { + if (path === ".") + return this.root; + path = path.split("."); + } else if (!path.length) + return this; + + // Start at root if path is absolute + if (path[0] === "") + return this.root.lookup(path.slice(1), filterTypes); + + // Test if the first part matches any nested object, and if so, traverse if path contains more + var found = this.get(path[0]); + if (found) { + if (path.length === 1) { + if (!filterTypes || filterTypes.indexOf(found.constructor) > -1) + return found; + } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true))) + return found; + + // Otherwise try each nested namespace + } else + for (var i = 0; i < this.nestedArray.length; ++i) + if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true))) + return found; + + // If there hasn't been a match, try again at the parent + if (this.parent === null || parentAlreadyChecked) + return null; + return this.parent.lookup(path, filterTypes); +}; + +/** + * Looks up the reflection object at the specified path, relative to this namespace. + * @name NamespaceBase#lookup + * @function + * @param {string|string[]} path Path to look up + * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + * @variation 2 + */ +// lookup(path: string, [parentAlreadyChecked: boolean]) + +/** + * Looks up the {@link Type|type} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type + * @throws {Error} If `path` does not point to a type + */ +Namespace.prototype.lookupType = function lookupType(path) { + var found = this.lookup(path, [ Type ]); + if (!found) + throw Error("no such type: " + path); + return found; +}; + +/** + * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Enum} Looked up enum + * @throws {Error} If `path` does not point to an enum + */ +Namespace.prototype.lookupEnum = function lookupEnum(path) { + var found = this.lookup(path, [ Enum ]); + if (!found) + throw Error("no such Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type or enum + * @throws {Error} If `path` does not point to a type or enum + */ +Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { + var found = this.lookup(path, [ Type, Enum ]); + if (!found) + throw Error("no such Type or Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Service|service} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Service} Looked up service + * @throws {Error} If `path` does not point to a service + */ +Namespace.prototype.lookupService = function lookupService(path) { + var found = this.lookup(path, [ Service ]); + if (!found) + throw Error("no such Service '" + path + "' in " + this); + return found; +}; + +// Sets up cyclic dependencies (called in index-light) +Namespace._configure = function(Type_, Service_, Enum_) { + Type = Type_; + Service = Service_; + Enum = Enum_; +}; + +},{"15":15,"22":22,"23":23,"33":33}],22:[function(require,module,exports){ +"use strict"; +module.exports = ReflectionObject; + +ReflectionObject.className = "ReflectionObject"; + +var util = require(33); + +var Root; // cyclic + +/** + * Constructs a new reflection object instance. + * @classdesc Base class of all reflection objects. + * @constructor + * @param {string} name Object name + * @param {Object.} [options] Declared options + * @abstract + */ +function ReflectionObject(name, options) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (options && !util.isObject(options)) + throw TypeError("options must be an object"); + + /** + * Options. + * @type {Object.|undefined} + */ + this.options = options; // toJSON + + /** + * Parsed Options. + * @type {Array.>|undefined} + */ + this.parsedOptions = null; + + /** + * Unique name within its namespace. + * @type {string} + */ + this.name = name; + + /** + * Parent namespace. + * @type {Namespace|null} + */ + this.parent = null; + + /** + * Whether already resolved or not. + * @type {boolean} + */ + this.resolved = false; + + /** + * Comment text, if any. + * @type {string|null} + */ + this.comment = null; + + /** + * Defining file name. + * @type {string|null} + */ + this.filename = null; +} + +Object.defineProperties(ReflectionObject.prototype, { + + /** + * Reference to the root namespace. + * @name ReflectionObject#root + * @type {Root} + * @readonly + */ + root: { + get: function() { + var ptr = this; + while (ptr.parent !== null) + ptr = ptr.parent; + return ptr; + } + }, + + /** + * Full name including leading dot. + * @name ReflectionObject#fullName + * @type {string} + * @readonly + */ + fullName: { + get: function() { + var path = [ this.name ], + ptr = this.parent; + while (ptr) { + path.unshift(ptr.name); + ptr = ptr.parent; + } + return path.join("."); + } + } +}); + +/** + * Converts this reflection object to its descriptor representation. + * @returns {Object.} Descriptor + * @abstract + */ +ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { + throw Error(); // not implemented, shouldn't happen +}; + +/** + * Called when this object is added to a parent. + * @param {ReflectionObject} parent Parent added to + * @returns {undefined} + */ +ReflectionObject.prototype.onAdd = function onAdd(parent) { + if (this.parent && this.parent !== parent) + this.parent.remove(this); + this.parent = parent; + this.resolved = false; + var root = parent.root; + if (root instanceof Root) + root._handleAdd(this); +}; + +/** + * Called when this object is removed from a parent. + * @param {ReflectionObject} parent Parent removed from + * @returns {undefined} + */ +ReflectionObject.prototype.onRemove = function onRemove(parent) { + var root = parent.root; + if (root instanceof Root) + root._handleRemove(this); + this.parent = null; + this.resolved = false; +}; + +/** + * Resolves this objects type references. + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.resolve = function resolve() { + if (this.resolved) + return this; + if (this.root instanceof Root) + this.resolved = true; // only if part of a root + return this; +}; + +/** + * Gets an option value. + * @param {string} name Option name + * @returns {*} Option value or `undefined` if not set + */ +ReflectionObject.prototype.getOption = function getOption(name) { + if (this.options) + return this.options[name]; + return undefined; +}; + +/** + * Sets an option. + * @param {string} name Option name + * @param {*} value Option value + * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { + if (!ifNotSet || !this.options || this.options[name] === undefined) + (this.options || (this.options = {}))[name] = value; + return this; +}; + +/** + * Sets a parsed option. + * @param {string} name parsed Option name + * @param {*} value Option value + * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { + if (!this.parsedOptions) { + this.parsedOptions = []; + } + var parsedOptions = this.parsedOptions; + if (propName) { + // If setting a sub property of an option then try to merge it + // with an existing option + var opt = parsedOptions.find(function (opt) { + return Object.prototype.hasOwnProperty.call(opt, name); + }); + if (opt) { + // If we found an existing option - just merge the property value + var newValue = opt[name]; + util.setProperty(newValue, propName, value); + } else { + // otherwise, create a new option, set it's property and add it to the list + opt = {}; + opt[name] = util.setProperty({}, propName, value); + parsedOptions.push(opt); + } + } else { + // Always create a new option when setting the value of the option itself + var newOpt = {}; + newOpt[name] = value; + parsedOptions.push(newOpt); + } + return this; +}; + +/** + * Sets multiple options. + * @param {Object.} options Options to set + * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { + if (options) + for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) + this.setOption(keys[i], options[keys[i]], ifNotSet); + return this; +}; + +/** + * Converts this instance to its string representation. + * @returns {string} Class name[, space, full name] + */ +ReflectionObject.prototype.toString = function toString() { + var className = this.constructor.className, + fullName = this.fullName; + if (fullName.length) + return className + " " + fullName; + return className; +}; + +// Sets up cyclic dependencies (called in index-light) +ReflectionObject._configure = function(Root_) { + Root = Root_; +}; + +},{"33":33}],23:[function(require,module,exports){ +"use strict"; +module.exports = OneOf; + +// extends ReflectionObject +var ReflectionObject = require(22); +((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; + +var Field = require(15), + util = require(33); + +/** + * Constructs a new oneof instance. + * @classdesc Reflected oneof. + * @extends ReflectionObject + * @constructor + * @param {string} name Oneof name + * @param {string[]|Object.} [fieldNames] Field names + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function OneOf(name, fieldNames, options, comment) { + if (!Array.isArray(fieldNames)) { + options = fieldNames; + fieldNames = undefined; + } + ReflectionObject.call(this, name, options); + + /* istanbul ignore if */ + if (!(fieldNames === undefined || Array.isArray(fieldNames))) + throw TypeError("fieldNames must be an Array"); + + /** + * Field names that belong to this oneof. + * @type {string[]} + */ + this.oneof = fieldNames || []; // toJSON, marker + + /** + * Fields that belong to this oneof as an array for iteration. + * @type {Field[]} + * @readonly + */ + this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Oneof descriptor. + * @interface IOneOf + * @property {Array.} oneof Oneof field names + * @property {Object.} [options] Oneof options + */ + +/** + * Constructs a oneof from a oneof descriptor. + * @param {string} name Oneof name + * @param {IOneOf} json Oneof descriptor + * @returns {OneOf} Created oneof + * @throws {TypeError} If arguments are invalid + */ +OneOf.fromJSON = function fromJSON(name, json) { + return new OneOf(name, json.oneof, json.options, json.comment); +}; + +/** + * Converts this oneof to a oneof descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IOneOf} Oneof descriptor + */ +OneOf.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "oneof" , this.oneof, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Adds the fields of the specified oneof to the parent if not already done so. + * @param {OneOf} oneof The oneof + * @returns {undefined} + * @inner + * @ignore + */ +function addFieldsToParent(oneof) { + if (oneof.parent) + for (var i = 0; i < oneof.fieldsArray.length; ++i) + if (!oneof.fieldsArray[i].parent) + oneof.parent.add(oneof.fieldsArray[i]); +} + +/** + * Adds a field to this oneof and removes it from its current parent, if any. + * @param {Field} field Field to add + * @returns {OneOf} `this` + */ +OneOf.prototype.add = function add(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + if (field.parent && field.parent !== this.parent) + field.parent.remove(field); + this.oneof.push(field.name); + this.fieldsArray.push(field); + field.partOf = this; // field.parent remains null + addFieldsToParent(this); + return this; +}; + +/** + * Removes a field from this oneof and puts it back to the oneof's parent. + * @param {Field} field Field to remove + * @returns {OneOf} `this` + */ +OneOf.prototype.remove = function remove(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + var index = this.fieldsArray.indexOf(field); + + /* istanbul ignore if */ + if (index < 0) + throw Error(field + " is not a member of " + this); + + this.fieldsArray.splice(index, 1); + index = this.oneof.indexOf(field.name); + + /* istanbul ignore else */ + if (index > -1) // theoretical + this.oneof.splice(index, 1); + + field.partOf = null; + return this; +}; + +/** + * @override + */ +OneOf.prototype.onAdd = function onAdd(parent) { + ReflectionObject.prototype.onAdd.call(this, parent); + var self = this; + // Collect present fields + for (var i = 0; i < this.oneof.length; ++i) { + var field = parent.get(this.oneof[i]); + if (field && !field.partOf) { + field.partOf = self; + self.fieldsArray.push(field); + } + } + // Add not yet present fields + addFieldsToParent(this); +}; + +/** + * @override + */ +OneOf.prototype.onRemove = function onRemove(parent) { + for (var i = 0, field; i < this.fieldsArray.length; ++i) + if ((field = this.fieldsArray[i]).parent) + field.parent.remove(field); + ReflectionObject.prototype.onRemove.call(this, parent); +}; + +/** + * Decorator function as returned by {@link OneOf.d} (TypeScript). + * @typedef OneOfDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} oneofName OneOf name + * @returns {undefined} + */ + +/** + * OneOf decorator (TypeScript). + * @function + * @param {...string} fieldNames Field names + * @returns {OneOfDecorator} Decorator function + * @template T extends string + */ +OneOf.d = function decorateOneOf() { + var fieldNames = new Array(arguments.length), + index = 0; + while (index < arguments.length) + fieldNames[index] = arguments[index++]; + return function oneOfDecorator(prototype, oneofName) { + util.decorateType(prototype.constructor) + .add(new OneOf(oneofName, fieldNames)); + Object.defineProperty(prototype, oneofName, { + get: util.oneOfGetter(fieldNames), + set: util.oneOfSetter(fieldNames) + }); + }; +}; + +},{"15":15,"22":22,"33":33}],24:[function(require,module,exports){ +"use strict"; +module.exports = Reader; + +var util = require(35); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + +},{"35":35}],25:[function(require,module,exports){ +"use strict"; +module.exports = BufferReader; + +// extends Reader +var Reader = require(24); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = require(35); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + +},{"24":24,"35":35}],26:[function(require,module,exports){ +"use strict"; +module.exports = Root; + +// extends Namespace +var Namespace = require(21); +((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; + +var Field = require(15), + Enum = require(14), + OneOf = require(23), + util = require(33); + +var Type, // cyclic + parse, // might be excluded + common; // " + +/** + * Constructs a new root namespace instance. + * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. + * @extends NamespaceBase + * @constructor + * @param {Object.} [options] Top level options + */ +function Root(options) { + Namespace.call(this, "", options); + + /** + * Deferred extension fields. + * @type {Field[]} + */ + this.deferred = []; + + /** + * Resolved file names of loaded files. + * @type {string[]} + */ + this.files = []; +} + +/** + * Loads a namespace descriptor into a root namespace. + * @param {INamespace} json Nameespace descriptor + * @param {Root} [root] Root namespace, defaults to create a new one if omitted + * @returns {Root} Root namespace + */ +Root.fromJSON = function fromJSON(json, root) { + if (!root) + root = new Root(); + if (json.options) + root.setOptions(json.options); + return root.addJSON(json.nested); +}; + +/** + * Resolves the path of an imported file, relative to the importing origin. + * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. + * @function + * @param {string} origin The file name of the importing file + * @param {string} target The file name being imported + * @returns {string|null} Resolved path to `target` or `null` to skip the file + */ +Root.prototype.resolvePath = util.path.resolve; + +/** + * Fetch content from file path or url + * This method exists so you can override it with your own logic. + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.fetch = util.fetch; + +// A symbol-like function to safely signal synchronous loading +/* istanbul ignore next */ +function SYNC() {} // eslint-disable-line no-empty-function + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} options Parse options + * @param {LoadCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.load = function load(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + var self = this; + if (!callback) + return util.asPromise(load, self, filename, options); + + var sync = callback === SYNC; // undocumented + + // Finishes loading by calling the callback (exactly once) + function finish(err, root) { + /* istanbul ignore if */ + if (!callback) + return; + if (sync) + throw err; + var cb = callback; + callback = null; + cb(err, root); + } + + // Bundled definition existence checking + function getBundledFileName(filename) { + var idx = filename.lastIndexOf("google/protobuf/"); + if (idx > -1) { + var altname = filename.substring(idx); + if (altname in common) return altname; + } + return null; + } + + // Processes a single file + function process(filename, source) { + try { + if (util.isString(source) && source.charAt(0) === "{") + source = JSON.parse(source); + if (!util.isString(source)) + self.setOptions(source.options).addJSON(source.nested); + else { + parse.filename = filename; + var parsed = parse(source, self, options), + resolved, + i = 0; + if (parsed.imports) + for (; i < parsed.imports.length; ++i) + if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) + fetch(resolved); + if (parsed.weakImports) + for (i = 0; i < parsed.weakImports.length; ++i) + if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) + fetch(resolved, true); + } + } catch (err) { + finish(err); + } + if (!sync && !queued) + finish(null, self); // only once anyway + } + + // Fetches a single file + function fetch(filename, weak) { + filename = getBundledFileName(filename) || filename; + + // Skip if already loaded / attempted + if (self.files.indexOf(filename) > -1) + return; + self.files.push(filename); + + // Shortcut bundled definitions + if (filename in common) { + if (sync) + process(filename, common[filename]); + else { + ++queued; + setTimeout(function() { + --queued; + process(filename, common[filename]); + }); + } + return; + } + + // Otherwise fetch from disk or network + if (sync) { + var source; + try { + source = util.fs.readFileSync(filename).toString("utf8"); + } catch (err) { + if (!weak) + finish(err); + return; + } + process(filename, source); + } else { + ++queued; + self.fetch(filename, function(err, source) { + --queued; + /* istanbul ignore if */ + if (!callback) + return; // terminated meanwhile + if (err) { + /* istanbul ignore else */ + if (!weak) + finish(err); + else if (!queued) // can't be covered reliably + finish(null, self); + return; + } + process(filename, source); + }); + } + } + var queued = 0; + + // Assembling the root namespace doesn't require working type + // references anymore, so we can load everything in parallel + if (util.isString(filename)) + filename = [ filename ]; + for (var i = 0, resolved; i < filename.length; ++i) + if (resolved = self.resolvePath("", filename[i])) + fetch(resolved); + + if (sync) + return self; + if (!queued) + finish(null, self); + return undefined; +}; +// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Promise} Promise + * @variation 3 + */ +// function load(filename:string, [options:IParseOptions]):Promise + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). + * @function Root#loadSync + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + */ +Root.prototype.loadSync = function loadSync(filename, options) { + if (!util.isNode) + throw Error("not supported"); + return this.load(filename, options, SYNC); +}; + +/** + * @override + */ +Root.prototype.resolveAll = function resolveAll() { + if (this.deferred.length) + throw Error("unresolvable extensions: " + this.deferred.map(function(field) { + return "'extend " + field.extend + "' in " + field.parent.fullName; + }).join(", ")); + return Namespace.prototype.resolveAll.call(this); +}; + +// only uppercased (and thus conflict-free) children are exposed, see below +var exposeRe = /^[A-Z]/; + +/** + * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. + * @param {Root} root Root instance + * @param {Field} field Declaring extension field witin the declaring type + * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise + * @inner + * @ignore + */ +function tryHandleExtension(root, field) { + var extendedType = field.parent.lookup(field.extend); + if (extendedType) { + var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); + //do not allow to extend same field twice to prevent the error + if (extendedType.get(sisterField.name)) { + return true; + } + sisterField.declaringField = field; + field.extensionField = sisterField; + extendedType.add(sisterField); + return true; + } + return false; +} + +/** + * Called when any object is added to this root or its sub-namespaces. + * @param {ReflectionObject} object Object added + * @returns {undefined} + * @private + */ +Root.prototype._handleAdd = function _handleAdd(object) { + if (object instanceof Field) { + + if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) + if (!tryHandleExtension(this, object)) + this.deferred.push(object); + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + object.parent[object.name] = object.values; // expose enum values as property of its parent + + } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { + + if (object instanceof Type) // Try to handle any deferred extensions + for (var i = 0; i < this.deferred.length;) + if (tryHandleExtension(this, this.deferred[i])) + this.deferred.splice(i, 1); + else + ++i; + for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace + this._handleAdd(object._nestedArray[j]); + if (exposeRe.test(object.name)) + object.parent[object.name] = object; // expose namespace as property of its parent + } + + // The above also adds uppercased (and thus conflict-free) nested types, services and enums as + // properties of namespaces just like static code does. This allows using a .d.ts generated for + // a static module with reflection-based solutions where the condition is met. +}; + +/** + * Called when any object is removed from this root or its sub-namespaces. + * @param {ReflectionObject} object Object removed + * @returns {undefined} + * @private + */ +Root.prototype._handleRemove = function _handleRemove(object) { + if (object instanceof Field) { + + if (/* an extension field */ object.extend !== undefined) { + if (/* already handled */ object.extensionField) { // remove its sister field + object.extensionField.parent.remove(object.extensionField); + object.extensionField = null; + } else { // cancel the extension + var index = this.deferred.indexOf(object); + /* istanbul ignore else */ + if (index > -1) + this.deferred.splice(index, 1); + } + } + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose enum values + + } else if (object instanceof Namespace) { + + for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace + this._handleRemove(object._nestedArray[i]); + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose namespaces + + } +}; + +// Sets up cyclic dependencies (called in index-light) +Root._configure = function(Type_, parse_, common_) { + Type = Type_; + parse = parse_; + common = common_; +}; + +},{"14":14,"15":15,"21":21,"23":23,"33":33}],27:[function(require,module,exports){ +"use strict"; +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + +},{}],28:[function(require,module,exports){ +"use strict"; + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = require(29); + +},{"29":29}],29:[function(require,module,exports){ +"use strict"; +module.exports = Service; + +var util = require(35); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + +},{"35":35}],30:[function(require,module,exports){ +"use strict"; +module.exports = Service; + +// extends Namespace +var Namespace = require(21); +((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; + +var Method = require(20), + util = require(33), + rpc = require(28); + +/** + * Constructs a new service instance. + * @classdesc Reflected service. + * @extends NamespaceBase + * @constructor + * @param {string} name Service name + * @param {Object.} [options] Service options + * @throws {TypeError} If arguments are invalid + */ +function Service(name, options) { + Namespace.call(this, name, options); + + /** + * Service methods. + * @type {Object.} + */ + this.methods = {}; // toJSON, marker + + /** + * Cached methods as an array. + * @type {Method[]|null} + * @private + */ + this._methodsArray = null; +} + +/** + * Service descriptor. + * @interface IService + * @extends INamespace + * @property {Object.} methods Method descriptors + */ + +/** + * Constructs a service from a service descriptor. + * @param {string} name Service name + * @param {IService} json Service descriptor + * @returns {Service} Created service + * @throws {TypeError} If arguments are invalid + */ +Service.fromJSON = function fromJSON(name, json) { + var service = new Service(name, json.options); + /* istanbul ignore else */ + if (json.methods) + for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) + service.add(Method.fromJSON(names[i], json.methods[names[i]])); + if (json.nested) + service.addJSON(json.nested); + service.comment = json.comment; + return service; +}; + +/** + * Converts this service to a service descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IService} Service descriptor + */ +Service.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Methods of this service as an array for iteration. + * @name Service#methodsArray + * @type {Method[]} + * @readonly + */ +Object.defineProperty(Service.prototype, "methodsArray", { + get: function() { + return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); + } +}); + +function clearCache(service) { + service._methodsArray = null; + return service; +} + +/** + * @override + */ +Service.prototype.get = function get(name) { + return this.methods[name] + || Namespace.prototype.get.call(this, name); +}; + +/** + * @override + */ +Service.prototype.resolveAll = function resolveAll() { + var methods = this.methodsArray; + for (var i = 0; i < methods.length; ++i) + methods[i].resolve(); + return Namespace.prototype.resolve.call(this); +}; + +/** + * @override + */ +Service.prototype.add = function add(object) { + + /* istanbul ignore if */ + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Method) { + this.methods[object.name] = object; + object.parent = this; + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * @override + */ +Service.prototype.remove = function remove(object) { + if (object instanceof Method) { + + /* istanbul ignore if */ + if (this.methods[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.methods[object.name]; + object.parent = null; + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Creates a runtime service using the specified rpc implementation. + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. + */ +Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { + var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); + for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { + var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); + rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ + m: method, + q: method.resolvedRequestType.ctor, + s: method.resolvedResponseType.ctor + }); + } + return rpcService; +}; + +},{"20":20,"21":21,"28":28,"33":33}],31:[function(require,module,exports){ +"use strict"; +module.exports = Type; + +// extends Namespace +var Namespace = require(21); +((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; + +var Enum = require(14), + OneOf = require(23), + Field = require(15), + MapField = require(18), + Service = require(30), + Message = require(19), + Reader = require(24), + Writer = require(38), + util = require(33), + encoder = require(13), + decoder = require(12), + verifier = require(36), + converter = require(11), + wrappers = require(37); + +/** + * Constructs a new reflected message type instance. + * @classdesc Reflected message type. + * @extends NamespaceBase + * @constructor + * @param {string} name Message name + * @param {Object.} [options] Declared options + */ +function Type(name, options) { + Namespace.call(this, name, options); + + /** + * Message fields. + * @type {Object.} + */ + this.fields = {}; // toJSON, marker + + /** + * Oneofs declared within this namespace, if any. + * @type {Object.} + */ + this.oneofs = undefined; // toJSON + + /** + * Extension ranges, if any. + * @type {number[][]} + */ + this.extensions = undefined; // toJSON + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + /*? + * Whether this type is a legacy group. + * @type {boolean|undefined} + */ + this.group = undefined; // toJSON + + /** + * Cached fields by id. + * @type {Object.|null} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields as an array. + * @type {Field[]|null} + * @private + */ + this._fieldsArray = null; + + /** + * Cached oneofs as an array. + * @type {OneOf[]|null} + * @private + */ + this._oneofsArray = null; + + /** + * Cached constructor. + * @type {Constructor<{}>} + * @private + */ + this._ctor = null; +} + +Object.defineProperties(Type.prototype, { + + /** + * Message fields by id. + * @name Type#fieldsById + * @type {Object.} + * @readonly + */ + fieldsById: { + get: function() { + + /* istanbul ignore if */ + if (this._fieldsById) + return this._fieldsById; + + this._fieldsById = {}; + for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { + var field = this.fields[names[i]], + id = field.id; + + /* istanbul ignore if */ + if (this._fieldsById[id]) + throw Error("duplicate id " + id + " in " + this); + + this._fieldsById[id] = field; + } + return this._fieldsById; + } + }, + + /** + * Fields of this message as an array for iteration. + * @name Type#fieldsArray + * @type {Field[]} + * @readonly + */ + fieldsArray: { + get: function() { + return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); + } + }, + + /** + * Oneofs of this message as an array for iteration. + * @name Type#oneofsArray + * @type {OneOf[]} + * @readonly + */ + oneofsArray: { + get: function() { + return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); + } + }, + + /** + * The registered constructor, if any registered, otherwise a generic constructor. + * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. + * @name Type#ctor + * @type {Constructor<{}>} + */ + ctor: { + get: function() { + return this._ctor || (this.ctor = Type.generateConstructor(this)()); + }, + set: function(ctor) { + + // Ensure proper prototype + var prototype = ctor.prototype; + if (!(prototype instanceof Message)) { + (ctor.prototype = new Message()).constructor = ctor; + util.merge(ctor.prototype, prototype); + } + + // Classes and messages reference their reflected type + ctor.$type = ctor.prototype.$type = this; + + // Mix in static methods + util.merge(ctor, Message, true); + + this._ctor = ctor; + + // Messages have non-enumerable default values on their prototype + var i = 0; + for (; i < /* initializes */ this.fieldsArray.length; ++i) + this._fieldsArray[i].resolve(); // ensures a proper value + + // Messages have non-enumerable getters and setters for each virtual oneof field + var ctorProperties = {}; + for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) + ctorProperties[this._oneofsArray[i].resolve().name] = { + get: util.oneOfGetter(this._oneofsArray[i].oneof), + set: util.oneOfSetter(this._oneofsArray[i].oneof) + }; + if (i) + Object.defineProperties(ctor.prototype, ctorProperties); + } + } +}); + +/** + * Generates a constructor function for the specified type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +Type.generateConstructor = function generateConstructor(mtype) { + /* eslint-disable no-unexpected-multiline */ + var gen = util.codegen(["p"], mtype.name); + // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype + for (var i = 0, field; i < mtype.fieldsArray.length; ++i) + if ((field = mtype._fieldsArray[i]).map) gen + ("this%s={}", util.safeProp(field.name)); + else if (field.repeated) gen + ("this%s=[]", util.safeProp(field.name)); + return gen + ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors + * @property {Object.} fields Field descriptors + * @property {number[][]} [extensions] Extension ranges + * @property {number[][]} [reserved] Reserved ranges + * @property {boolean} [group=false] Whether a legacy group or not + */ + +/** + * Creates a message type from a message type descriptor. + * @param {string} name Message name + * @param {IType} json Message type descriptor + * @returns {Type} Created message type + */ +Type.fromJSON = function fromJSON(name, json) { + var type = new Type(name, json.options); + type.extensions = json.extensions; + type.reserved = json.reserved; + var names = Object.keys(json.fields), + i = 0; + for (; i < names.length; ++i) + type.add( + ( typeof json.fields[names[i]].keyType !== "undefined" + ? MapField.fromJSON + : Field.fromJSON )(names[i], json.fields[names[i]]) + ); + if (json.oneofs) + for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) + type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); + if (json.nested) + for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { + var nested = json.nested[names[i]]; + type.add( // most to least likely + ( nested.id !== undefined + ? Field.fromJSON + : nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + if (json.extensions && json.extensions.length) + type.extensions = json.extensions; + if (json.reserved && json.reserved.length) + type.reserved = json.reserved; + if (json.group) + type.group = true; + if (json.comment) + type.comment = json.comment; + return type; +}; + +/** + * Converts this message type to a message type descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IType} Message type descriptor + */ +Type.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), + "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, + "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "group" , this.group || undefined, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +Type.prototype.resolveAll = function resolveAll() { + var fields = this.fieldsArray, i = 0; + while (i < fields.length) + fields[i++].resolve(); + var oneofs = this.oneofsArray; i = 0; + while (i < oneofs.length) + oneofs[i++].resolve(); + return Namespace.prototype.resolveAll.call(this); +}; + +/** + * @override + */ +Type.prototype.get = function get(name) { + return this.fields[name] + || this.oneofs && this.oneofs[name] + || this.nested && this.nested[name] + || null; +}; + +/** + * Adds a nested object to this type. + * @param {ReflectionObject} object Nested object to add + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id + */ +Type.prototype.add = function add(object) { + + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Field && object.extend === undefined) { + // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. + // The root object takes care of adding distinct sister-fields to the respective extended + // type instead. + + // avoids calling the getter if not absolutely necessary because it's called quite frequently + if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) + throw Error("duplicate id " + object.id + " in " + this); + if (this.isReservedId(object.id)) + throw Error("id " + object.id + " is reserved in " + this); + if (this.isReservedName(object.name)) + throw Error("name '" + object.name + "' is reserved in " + this); + + if (object.parent) + object.parent.remove(object); + this.fields[object.name] = object; + object.message = this; + object.onAdd(this); + return clearCache(this); + } + if (object instanceof OneOf) { + if (!this.oneofs) + this.oneofs = {}; + this.oneofs[object.name] = object; + object.onAdd(this); + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * Removes a nested object from this type. + * @param {ReflectionObject} object Nested object to remove + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this type + */ +Type.prototype.remove = function remove(object) { + if (object instanceof Field && object.extend === undefined) { + // See Type#add for the reason why extension fields are excluded here. + + /* istanbul ignore if */ + if (!this.fields || this.fields[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.fields[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + if (object instanceof OneOf) { + + /* istanbul ignore if */ + if (!this.oneofs || this.oneofs[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.oneofs[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message<{}>} Message instance + */ +Type.prototype.create = function create(properties) { + return new this.ctor(properties); +}; + +/** + * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. + * @returns {Type} `this` + */ +Type.prototype.setup = function setup() { + // Sets up everything at once so that the prototype chain does not have to be re-evaluated + // multiple times (V8, soft-deopt prototype-check). + + var fullName = this.fullName, + types = []; + for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) + types.push(this._fieldsArray[i].resolve().resolvedType); + + // Replace setup methods with type-specific generated functions + this.encode = encoder(this)({ + Writer : Writer, + types : types, + util : util + }); + this.decode = decoder(this)({ + Reader : Reader, + types : types, + util : util + }); + this.verify = verifier(this)({ + types : types, + util : util + }); + this.fromObject = converter.fromObject(this)({ + types : types, + util : util + }); + this.toObject = converter.toObject(this)({ + types : types, + util : util + }); + + // Inject custom wrappers for common types + var wrapper = wrappers[fullName]; + if (wrapper) { + var originalThis = Object.create(this); + // if (wrapper.fromObject) { + originalThis.fromObject = this.fromObject; + this.fromObject = wrapper.fromObject.bind(originalThis); + // } + // if (wrapper.toObject) { + originalThis.toObject = this.toObject; + this.toObject = wrapper.toObject.bind(originalThis); + // } + } + + return this; +}; + +/** + * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encode = function encode_setup(message, writer) { + return this.setup().encode(message, writer); // overrides this method +}; + +/** + * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); +}; + +/** + * Decodes a message of this type. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Length of the message, if known beforehand + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError<{}>} If required fields are missing + */ +Type.prototype.decode = function decode_setup(reader, length) { + return this.setup().decode(reader, length); // overrides this method +}; + +/** + * Decodes a message of this type preceeded by its byte length as a varint. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError} If required fields are missing + */ +Type.prototype.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof Reader)) + reader = Reader.create(reader); + return this.decode(reader, reader.uint32()); +}; + +/** + * Verifies that field values are valid and that required fields are present. + * @param {Object.} message Plain object to verify + * @returns {null|string} `null` if valid, otherwise the reason why it is not + */ +Type.prototype.verify = function verify_setup(message) { + return this.setup().verify(message); // overrides this method +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object to convert + * @returns {Message<{}>} Message instance + */ +Type.prototype.fromObject = function fromObject(object) { + return this.setup().fromObject(object); +}; + +/** + * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. + * @interface IConversionOptions + * @property {Function} [longs] Long conversion type. + * Valid values are `String` and `Number` (the global types). + * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. + * @property {Function} [enums] Enum value conversion type. + * Only valid value is `String` (the global type). + * Defaults to copy the present value, which is the numeric id. + * @property {Function} [bytes] Bytes value conversion type. + * Valid values are `Array` and (a base64 encoded) `String` (the global types). + * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. + * @property {boolean} [defaults=false] Also sets default values on the resulting object + * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` + * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` + * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any + * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings + */ + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ +Type.prototype.toObject = function toObject(message, options) { + return this.setup().toObject(message, options); +}; + +/** + * Decorator function as returned by {@link Type.d} (TypeScript). + * @typedef TypeDecorator + * @type {function} + * @param {Constructor} target Target constructor + * @returns {undefined} + * @template T extends Message + */ + +/** + * Type decorator (TypeScript). + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {TypeDecorator} Decorator function + * @template T extends Message + */ +Type.d = function decorateType(typeName) { + return function typeDecorator(target) { + util.decorateType(target, typeName); + }; +}; + +},{"11":11,"12":12,"13":13,"14":14,"15":15,"18":18,"19":19,"21":21,"23":23,"24":24,"30":30,"33":33,"36":36,"37":37,"38":38}],32:[function(require,module,exports){ +"use strict"; + +/** + * Common type constants. + * @namespace + */ +var types = exports; + +var util = require(33); + +var s = [ + "double", // 0 + "float", // 1 + "int32", // 2 + "uint32", // 3 + "sint32", // 4 + "fixed32", // 5 + "sfixed32", // 6 + "int64", // 7 + "uint64", // 8 + "sint64", // 9 + "fixed64", // 10 + "sfixed64", // 11 + "bool", // 12 + "string", // 13 + "bytes" // 14 +]; + +function bake(values, offset) { + var i = 0, o = {}; + offset |= 0; + while (i < values.length) o[s[i + offset]] = values[i++]; + return o; +} + +/** + * Basic type wire types. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + * @property {number} bytes=2 Ldelim wire type + */ +types.basic = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2, + /* bytes */ 2 +]); + +/** + * Basic type defaults. + * @type {Object.} + * @const + * @property {number} double=0 Double default + * @property {number} float=0 Float default + * @property {number} int32=0 Int32 default + * @property {number} uint32=0 Uint32 default + * @property {number} sint32=0 Sint32 default + * @property {number} fixed32=0 Fixed32 default + * @property {number} sfixed32=0 Sfixed32 default + * @property {number} int64=0 Int64 default + * @property {number} uint64=0 Uint64 default + * @property {number} sint64=0 Sint32 default + * @property {number} fixed64=0 Fixed64 default + * @property {number} sfixed64=0 Sfixed64 default + * @property {boolean} bool=false Bool default + * @property {string} string="" String default + * @property {Array.} bytes=Array(0) Bytes default + * @property {null} message=null Message default + */ +types.defaults = bake([ + /* double */ 0, + /* float */ 0, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 0, + /* sfixed32 */ 0, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 0, + /* sfixed64 */ 0, + /* bool */ false, + /* string */ "", + /* bytes */ util.emptyArray, + /* message */ null +]); + +/** + * Basic long type wire types. + * @type {Object.} + * @const + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + */ +types.long = bake([ + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1 +], 7); + +/** + * Allowed types for map keys with their associated wire type. + * @type {Object.} + * @const + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + */ +types.mapKey = bake([ + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2 +], 2); + +/** + * Allowed types for packed repeated fields with their associated wire type. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + */ +types.packed = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0 +]); + +},{"33":33}],33:[function(require,module,exports){ +"use strict"; + +/** + * Various utility functions. + * @namespace + */ +var util = module.exports = require(35); + +var roots = require(27); + +var Type, // cyclic + Enum; + +util.codegen = require(3); +util.fetch = require(5); +util.path = require(8); + +/** + * Node's fs module if available. + * @type {Object.} + */ +util.fs = util.inquire("fs"); + +/** + * Converts an object's values to an array. + * @param {Object.} object Object to convert + * @returns {Array.<*>} Converted array + */ +util.toArray = function toArray(object) { + if (object) { + var keys = Object.keys(object), + array = new Array(keys.length), + index = 0; + while (index < keys.length) + array[index] = object[keys[index++]]; + return array; + } + return []; +}; + +/** + * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. + * @param {Array.<*>} array Array to convert + * @returns {Object.} Converted object + */ +util.toObject = function toObject(array) { + var object = {}, + index = 0; + while (index < array.length) { + var key = array[index++], + val = array[index++]; + if (val !== undefined) + object[key] = val; + } + return object; +}; + +var safePropBackslashRe = /\\/g, + safePropQuoteRe = /"/g; + +/** + * Tests whether the specified name is a reserved word in JS. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +util.isReserved = function isReserved(name) { + return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name); +}; + +/** + * Returns a safe property accessor for the specified property name. + * @param {string} prop Property name + * @returns {string} Safe accessor + */ +util.safeProp = function safeProp(prop) { + if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop)) + return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]"; + return "." + prop; +}; + +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + +var camelCaseRe = /_([a-z])/g; + +/** + * Converts a string to camel case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.camelCase = function camelCase(str) { + return str.substring(0, 1) + + str.substring(1) + .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); +}; + +/** + * Compares reflected fields by id. + * @param {Field} a First field + * @param {Field} b Second field + * @returns {number} Comparison value + */ +util.compareFieldsById = function compareFieldsById(a, b) { + return a.id - b.id; +}; + +/** + * Decorator helper for types (TypeScript). + * @param {Constructor} ctor Constructor function + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {Type} Reflected type + * @template T extends Message + * @property {Root} root Decorators root + */ +util.decorateType = function decorateType(ctor, typeName) { + + /* istanbul ignore if */ + if (ctor.$type) { + if (typeName && ctor.$type.name !== typeName) { + util.decorateRoot.remove(ctor.$type); + ctor.$type.name = typeName; + util.decorateRoot.add(ctor.$type); + } + return ctor.$type; + } + + /* istanbul ignore next */ + if (!Type) + Type = require(31); + + var type = new Type(typeName || ctor.name); + util.decorateRoot.add(type); + type.ctor = ctor; // sets up .encode, .decode etc. + Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); + Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); + return type; +}; + +var decorateEnumIndex = 0; + +/** + * Decorator helper for enums (TypeScript). + * @param {Object} object Enum object + * @returns {Enum} Reflected enum + */ +util.decorateEnum = function decorateEnum(object) { + + /* istanbul ignore if */ + if (object.$type) + return object.$type; + + /* istanbul ignore next */ + if (!Enum) + Enum = require(14); + + var enm = new Enum("Enum" + decorateEnumIndex++, object); + util.decorateRoot.add(enm); + Object.defineProperty(object, "$type", { value: enm, enumerable: false }); + return enm; +}; + + +/** + * Sets the value of a property by property path. If a value already exists, it is turned to an array + * @param {Object.} dst Destination object + * @param {string} path dot '.' delimited path of the property to set + * @param {Object} value the value to set + * @returns {Object.} Destination object + */ +util.setProperty = function setProperty(dst, path, value) { + function setProp(dst, path, value) { + var part = path.shift(); + if (part === "__proto__" || part === "prototype") { + return dst; + } + if (path.length > 0) { + dst[part] = setProp(dst[part] || {}, path, value); + } else { + var prevValue = dst[part]; + if (prevValue) + value = [].concat(prevValue).concat(value); + dst[part] = value; + } + return dst; + } + + if (typeof dst !== "object") + throw TypeError("dst must be an object"); + if (!path) + throw TypeError("path must be specified"); + + path = path.split("."); + return setProp(dst, path, value); +}; + +/** + * Decorator root (TypeScript). + * @name util.decorateRoot + * @type {Root} + * @readonly + */ +Object.defineProperty(util, "decorateRoot", { + get: function() { + return roots["decorated"] || (roots["decorated"] = new (require(26))()); + } +}); + +},{"14":14,"26":26,"27":27,"3":3,"31":31,"35":35,"5":5,"8":8}],34:[function(require,module,exports){ +"use strict"; +module.exports = LongBits; + +var util = require(35); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + +},{"35":35}],35:[function(require,module,exports){ +"use strict"; +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = require(1); + +// converts to / from base64 encoded strings +util.base64 = require(2); + +// base class of rpc.Service +util.EventEmitter = require(4); + +// float handling accross browsers +util.float = require(6); + +// requires modules optionally and hides the call from bundlers +util.inquire = require(7); + +// converts to / from utf8 encoded strings +util.utf8 = require(10); + +// provides a node-like buffer pool in the browser +util.pool = require(9); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = require(34); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + +},{"1":1,"10":10,"2":2,"34":34,"4":4,"6":6,"7":7,"9":9}],36:[function(require,module,exports){ +"use strict"; +module.exports = verifier; + +var Enum = require(14), + util = require(33); + +function invalid(field, expected) { + return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; +} + +/** + * Generates a partial value verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyValue(gen, field, fieldIndex, ref) { + /* eslint-disable no-unexpected-multiline */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(%s){", ref) + ("default:") + ("return%j", invalid(field, "enum value")); + for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen + ("case %i:", field.resolvedType.values[keys[j]]); + gen + ("break") + ("}"); + } else { + gen + ("{") + ("var e=types[%i].verify(%s);", fieldIndex, ref) + ("if(e)") + ("return%j+e", field.name + ".") + ("}"); + } + } else { + switch (field.type) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.isInteger(%s))", ref) + ("return%j", invalid(field, "integer")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) + ("return%j", invalid(field, "integer|Long")); + break; + case "float": + case "double": gen + ("if(typeof %s!==\"number\")", ref) + ("return%j", invalid(field, "number")); + break; + case "bool": gen + ("if(typeof %s!==\"boolean\")", ref) + ("return%j", invalid(field, "boolean")); + break; + case "string": gen + ("if(!util.isString(%s))", ref) + ("return%j", invalid(field, "string")); + break; + case "bytes": gen + ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) + ("return%j", invalid(field, "buffer")); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a partial key verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyKey(gen, field, ref) { + /* eslint-disable no-unexpected-multiline */ + switch (field.keyType) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.key32Re.test(%s))", ref) + ("return%j", invalid(field, "integer key")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not + ("return%j", invalid(field, "integer|Long key")); + break; + case "bool": gen + ("if(!util.key2Re.test(%s))", ref) + ("return%j", invalid(field, "boolean key")); + break; + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a verifier specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function verifier(mtype) { + /* eslint-disable no-unexpected-multiline */ + + var gen = util.codegen(["m"], mtype.name + "$verify") + ("if(typeof m!==\"object\"||m===null)") + ("return%j", "object expected"); + var oneofs = mtype.oneofsArray, + seenFirstField = {}; + if (oneofs.length) gen + ("var p={}"); + + for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + ref = "m" + util.safeProp(field.name); + + if (field.optional) gen + ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null + + // map fields + if (field.map) { gen + ("if(!util.isObject(%s))", ref) + ("return%j", invalid(field, "object")) + ("var k=Object.keys(%s)", ref) + ("for(var i=0;i} + * @const + */ +var wrappers = exports; + +var Message = require(19); + +/** + * From object converter part of an {@link IWrapper}. + * @typedef WrapperFromObjectConverter + * @type {function} + * @param {Object.} object Plain object + * @returns {Message<{}>} Message instance + * @this Type + */ + +/** + * To object converter part of an {@link IWrapper}. + * @typedef WrapperToObjectConverter + * @type {function} + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @this Type + */ + +/** + * Common type wrapper part of {@link wrappers}. + * @interface IWrapper + * @property {WrapperFromObjectConverter} [fromObject] From object converter + * @property {WrapperToObjectConverter} [toObject] To object converter + */ + +// Custom wrapper for Any +wrappers[".google.protobuf.Any"] = { + + fromObject: function(object) { + + // unwrap value type if mapped + if (object && object["@type"]) { + // Only use fully qualified type name after the last '/' + var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) { + // type_url does not accept leading "." + var type_url = object["@type"].charAt(0) === "." ? + object["@type"].slice(1) : object["@type"]; + // type_url prefix is optional, but path seperator is required + if (type_url.indexOf("/") === -1) { + type_url = "/" + type_url; + } + return this.create({ + type_url: type_url, + value: type.encode(type.fromObject(object)).finish() + }); + } + } + + return this.fromObject(object); + }, + + toObject: function(message, options) { + + // Default prefix + var googleApi = "type.googleapis.com/"; + var prefix = ""; + var name = ""; + + // decode value if requested and unmapped + if (options && options.json && message.type_url && message.value) { + // Only use fully qualified type name after the last '/' + name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); + // Separate the prefix used + prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) + message = type.decode(message.value); + } + + // wrap value if unmapped + if (!(message instanceof this.ctor) && message instanceof Message) { + var object = message.$type.toObject(message, options); + var messageName = message.$type.fullName[0] === "." ? + message.$type.fullName.slice(1) : message.$type.fullName; + // Default to type.googleapis.com prefix if no prefix is used + if (prefix === "") { + prefix = googleApi; + } + name = prefix + messageName; + object["@type"] = name; + return object; + } + + return this.toObject(message, options); + } +}; + +},{"19":19}],38:[function(require,module,exports){ +"use strict"; +module.exports = Writer; + +var util = require(35); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + +},{"35":35}],39:[function(require,module,exports){ +"use strict"; +module.exports = BufferWriter; + +// extends Writer +var Writer = require(38); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = require(35); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + +},{"35":35,"38":38}]},{},[16]) + +})(); +//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/light/protobuf.js.map b/node_modules/protobufjs/dist/light/protobuf.js.map new file mode 100644 index 0000000..e323edc --- /dev/null +++ b/node_modules/protobufjs/dist/light/protobuf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light","../src/index-minimal.js","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/type.js","../src/types.js","../src/util.js","../src/util/longbits.js","../src/util/minimal.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(14),\n util = require(33);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32())\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else gen\n (\"%s[k]=value\", ref);\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(21),\n util = require(33);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(14),\n types = require(32),\n util = require(33);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(13);\nprotobuf.decoder = require(12);\nprotobuf.verifier = require(36);\nprotobuf.converter = require(11);\n\n// Reflection\nprotobuf.ReflectionObject = require(22);\nprotobuf.Namespace = require(21);\nprotobuf.Root = require(26);\nprotobuf.Enum = require(14);\nprotobuf.Type = require(31);\nprotobuf.Field = require(15);\nprotobuf.OneOf = require(23);\nprotobuf.MapField = require(18);\nprotobuf.Service = require(30);\nprotobuf.Method = require(20);\n\n// Runtime\nprotobuf.Message = require(19);\nprotobuf.wrappers = require(37);\n\n// Utility\nprotobuf.types = require(32);\nprotobuf.util = require(33);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(38);\nprotobuf.BufferWriter = require(39);\nprotobuf.Reader = require(24);\nprotobuf.BufferReader = require(25);\n\n// Utility\nprotobuf.util = require(35);\nprotobuf.rpc = require(28);\nprotobuf.roots = require(27);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(15);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(32),\n util = require(33);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(35);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(33);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(15),\n util = require(33),\n OneOf = require(23);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(33);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set it's property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(15),\n util = require(33);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(35);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(24);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(35);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(21);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(15),\n Enum = require(14),\n OneOf = require(23),\n util = require(33);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n if (sync)\n throw err;\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(29);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(35);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(21);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(20),\n util = require(33),\n rpc = require(28);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(21);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(14),\n OneOf = require(23),\n Field = require(15),\n MapField = require(18),\n Service = require(30),\n Message = require(19),\n Reader = require(24),\n Writer = require(38),\n util = require(33),\n encoder = require(13),\n decoder = require(12),\n verifier = require(36),\n converter = require(11),\n wrappers = require(37);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {number[][]} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n return Namespace.prototype.resolveAll.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n return this.fields[name]\n || this.oneofs && this.oneofs[name]\n || this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n return this.setup().fromObject(object);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n return this.setup().toObject(message, options);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(33);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = {};\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(35);\n\nvar roots = require(27);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(8);\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n safePropQuoteRe = /\"/g;\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || util.isReserved(prop))\n return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(31);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(14);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (part === \"__proto__\" || part === \"prototype\") {\n return dst;\n }\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(26))());\n }\n});\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(35);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(6);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(7);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(10);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(9);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(34);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(14),\n util = require(33);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(19);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object)).finish()\n });\n }\n }\n\n return this.fromObject(object);\n },\n\n toObject: function(message, options) {\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(35);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(38);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(35);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/light/protobuf.min.js b/node_modules/protobufjs/dist/light/protobuf.min.js new file mode 100644 index 0000000..2980e55 --- /dev/null +++ b/node_modules/protobufjs/dist/light/protobuf.min.js @@ -0,0 +1,8 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:35 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +!function(g){"use strict";!function(r,e,t){var i=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}(t[0]);i.util.global.protobuf=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(i.util.Long=t,i.configure()),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}({1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,u=!0;for(;r>2],r=(3&h)<<4,o=1;break;case 1:s[u++]=f[r|h>>4],r=(15&h)<<2,o=2;break;case 2:s[u++]=f[r|h>>6],s[u++]=f[63&h],o=0}8191>4,r=o,s=2;break;case 2:i[n++]=(15&r)<<4|(60&o)>>2,r=o,s=3;break;case 3:i[n++]=(3&r)<<6|o,s=0}}if(1===s)throw Error(c);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){function a(i,n){"string"==typeof i&&(n=i,i=g);var h=[];function f(t){if("string"!=typeof t){var i=c();if(a.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){o[0]=t,i[n]=h[0],i[n+1]=h[1],i[n+2]=h[2],i[n+3]=h[3]}function e(t,i,n){o[0]=t,i[n]=h[3],i[n+1]=h[2],i[n+2]=h[1],i[n+3]=h[0]}function s(t,i){return h[0]=t[i],h[1]=t[i+1],h[2]=t[i+2],h[3]=t[i+3],o[0]}function u(t,i){return h[3]=t[i],h[2]=t[i+1],h[1]=t[i+2],h[0]=t[i+3],o[0]}var o,h,f,c,a;function l(t,i,n,r,e,s){var u,o=r<0?1:0;0===(r=o?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292>>0,e,s+n)):r<22250738585072014e-324?(t((u=r/5e-324)>>>0,e,s+i),t((o<<31|u/4294967296)>>>0,e,s+n)):(t(4503599627370496*(u=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((o<<31|r+1023<<20|1048576*u&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function v(t,i,n){f[0]=t,i[n]=c[0],i[n+1]=c[1],i[n+2]=c[2],i[n+3]=c[3],i[n+4]=c[4],i[n+5]=c[5],i[n+6]=c[6],i[n+7]=c[7]}function b(t,i,n){f[0]=t,i[n]=c[7],i[n+1]=c[6],i[n+2]=c[5],i[n+3]=c[4],i[n+4]=c[3],i[n+5]=c[2],i[n+6]=c[1],i[n+7]=c[0]}function p(t,i){return c[0]=t[i],c[1]=t[i+1],c[2]=t[i+2],c[3]=t[i+3],c[4]=t[i+4],c[5]=t[i+5],c[6]=t[i+6],c[7]=t[i+7],f[0]}function y(t,i){return c[7]=t[i],c[6]=t[i+1],c[5]=t[i+2],c[4]=t[i+3],c[3]=t[i+4],c[2]=t[i+5],c[1]=t[i+6],c[0]=t[i+7],f[0]}return"undefined"!=typeof Float32Array?(o=new Float32Array([-0]),h=new Uint8Array(o.buffer),a=128===h[3],t.writeFloatLE=a?r:e,t.writeFloatBE=a?e:r,t.readFloatLE=a?s:u,t.readFloatBE=a?u:s):(t.writeFloatLE=i.bind(null,m),t.writeFloatBE=i.bind(null,w),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?v:b,t.writeDoubleBE=a?b:v,t.readDoubleLE=a?p:y,t.readDoubleBE=a?y:p):(t.writeDoubleLE=l.bind(null,m,0,4),t.writeDoubleBE=l.bind(null,w,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function m(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function w(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],7:[function(t,i,n){function r(t){try{var i=eval("require")(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}i.exports=r},{}],8:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r>>1,s=null,u=r;return function(t){if(t<1||e>10),s[u++]=56320+(1023&r)):s[u++]=(15&r)<<12|(63&t[i++])<<6|63&t[i++],8191>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(u+1)))?(++u,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],11:[function(t,i,n){var l=t(14),d=t(33);function u(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,u=Object.keys(s),o=0;o>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,h)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,h?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function v(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":e=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r>>3){");for(var n=0;n>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),h.basic[e]===g?i("value=types[%i].decode(r,r.uint32())",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),h.long[r.keyType]!==g?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):i("%s[k]=value",s)):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),h.packed[e]!==g&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos>>0,8|c.mapKey[s.keyType],s.keyType),h===g?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,o,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&c.packed[o]!==g?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",o,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),h===g?l(n,s,u,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|h)>>>0,o,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),h===g?l(n,s,u,i):n("w.uint32(%i).%s(%s)",(s.id<<3|h)>>>0,o,i))}return n("return w")};var f=t(14),c=t(32),a=t(33);function l(t,i,n,r){i.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{14:14,32:32,33:33}],14:[function(t,i,n){i.exports=s;var h=t(22),r=(((s.prototype=Object.create(h.prototype)).constructor=s).className="Enum",t(21)),e=t(33);function s(t,i,n,r,e,s){if(h.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.reserved=g,i)for(var u=Object.keys(i),o=0;oi)return!0;return!1},a.isReservedName=function(t,i){if(t)for(var n=0;n "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return e.Buffer?function(t){return(h.create=function(t){return e.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw o(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}h.create=f(),h.prototype.h=e.Array.prototype.subarray||e.Array.prototype.slice,h.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,o(this,10)}),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return d(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|d(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.h.call(this.buf,i,n)},h.prototype.string=function(){var t=this.bytes();return u.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},h.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.r=function(t){r=t,h.create=f(),r.r();var i=e.Long?"toLong":"toNumber";e.merge(h.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return v.call(this)[i](!0)},sfixed64:function(){return v.call(this)[i](!1)}})}},{35:35}],25:[function(t,i,n){i.exports=s;var r=t(24),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(t){r.call(this,t)}s.r=function(){e.Buffer&&(s.prototype.h=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.r()},{24:24,35:35}],26:[function(t,i,n){i.exports=h;var r,d,v,e=t(21),s=(((h.prototype=Object.create(e.prototype)).constructor=h).className="Root",t(15)),u=t(14),o=t(23),b=t(33);function h(t){e.call(this,"",t),this.deferred=[],this.files=[]}function p(){}h.fromJSON=function(t,i){return i=i||new h,t.options&&i.setOptions(t.options),i.addJSON(t.nested)},h.prototype.resolvePath=b.path.resolve,h.prototype.fetch=b.fetch,h.prototype.load=function t(i,s,e){"function"==typeof s&&(e=s,s=g);var u=this;if(!e)return b.asPromise(t,u,i,s);var o=e===p;function h(t,i){if(e){if(o)throw t;var n=e;e=null,n(t,i)}}function f(t){var i=t.lastIndexOf("google/protobuf/");if(-1>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),u=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{35:35}],35:[function(t,i,n){var r=n;function e(t,i,n){for(var r=Object.keys(i),e=0;e>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127>>7;i[n++]=t.lo}function p(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=l(),a.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(a.alloc=e.pool(a.alloc,e.Array.prototype.subarray)),a.prototype.p=function(t,i,n){return this.tail=this.tail.next=new h(t,i,n),this.len+=i,this},(v.prototype=Object.create(h.prototype)).fn=function(t,i,n){for(;127>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new v((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return t<0?this.p(b,10,s.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=s.from(t);return this.p(b,t.length(),t)},a.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.p(b,t.length(),t)},a.prototype.bool=function(t){return this.p(d,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.p(p,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=s.from(t);return this.p(p,4,t.lo).p(p,4,t.hi)},a.prototype.float=function(t){return this.p(e.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.p(e.float.writeDoubleLE,8,t)};var y=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;return n?(e.isString(t)&&(i=a.alloc(n=u.length(t)),u.decode(t,i,0),t=i),this.uint32(n).p(y,n,t)):this.p(d,1,0)},a.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i).p(o.write,i,t):this.p(d,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.r=function(t){r=t,a.create=l(),r.r()}},{35:35}],39:[function(t,i,n){i.exports=s;var r=t(38),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(){r.call(this)}function u(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.r=function(){s.alloc=e.b,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r>>0;return this.uint32(i),i&&this.p(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.p(u,i,t),this},s.r()},{35:35,38:38}]},{},[16])}(); +//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/light/protobuf.min.js.map b/node_modules/protobufjs/dist/light/protobuf.min.js.map new file mode 100644 index 0000000..939a1d9 --- /dev/null +++ b/node_modules/protobufjs/dist/light/protobuf.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light","../src/index-minimal.js","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/type.js","../src/types.js","../src/util.js","../src/util/longbits.js","../src/util/minimal.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","entries","protobuf","$require","name","$module","call","exports","util","global","define","amd","Long","isLong","configure","module","1","require","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","codegen","functionParams","functionName","body","Codegen","formatStringOrScope","source","toString","verbose","console","log","scopeKeys","Object","keys","scopeParams","scopeValues","scopeOffset","Function","formatParams","formatOffset","replace","$0","$1","value","Number","floor","JSON","stringify","functionNameOverride","EventEmitter","this","_listeners","prototype","on","evt","off","listeners","splice","emit","args","fetch","asPromise","fs","filename","options","callback","xhr","readFile","contents","XMLHttpRequest","binary","onreadystatechange","readyState","status","response","responseText","Uint8Array","overrideMimeType","responseType","open","send","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","inquire","moduleName","mod","eval","e","isAbsolute","path","normalize","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","alloc","size","SIZE","MAX","slab","utf8","len","read","write","c1","c2","Enum","genValuePartial_fromObject","gen","field","fieldIndex","prop","defaultAlreadyEmitted","resolvedType","values","typeDefault","repeated","fullName","isUnsigned","type","genValuePartial_toObject","converter","fromObject","mtype","fields","fieldsArray","safeProp","map","toObject","sort","compareFieldsById","repeatedFields","mapFields","normalFields","partOf","arrayDefault","valuesById","long","low","high","unsigned","toNumber","bytes","hasKs2","_fieldsArray","indexOf","filter","group","ref","id","types","defaults","keyType","basic","packed","rfield","required","wireType","mapKey","genTypePartial","optional","ReflectionObject","Namespace","create","constructor","className","comment","comments","valuesOptions","TypeError","reserved","fromJSON","json","enm","toJSON","toJSONOptions","keepComments","Boolean","add","isString","isInteger","isReservedId","isReservedName","allow_alias","remove","Field","Type","ruleRe","rule","extend","isObject","toLowerCase","message","defaultValue","extensionField","declaringField","_packed","defineProperty","get","getOption","setOption","ifNotSet","resolved","parent","lookupTypeOrEnum","proto3_optional","fromNumber","freeze","newBuffer","emptyObject","emptyArray","ctor","d","fieldId","fieldType","fieldRule","decorateType","decorateEnum","fieldName","default","_configure","Type_","build","load","root","Root","loadSync","encoder","decoder","verifier","OneOf","MapField","Service","Method","Message","wrappers","Writer","BufferWriter","Reader","BufferReader","rpc","roots","resolvedKeyType","fieldKeyType","fieldValueType","properties","$type","writer","encodeDelimited","reader","decodeDelimited","verify","object","requestType","requestStream","responseStream","parsedOptions","resolvedRequestType","resolvedResponseType","lookupType","arrayToJSON","array","obj","nested","_nestedArray","clearCache","namespace","addJSON","toArray","nestedArray","nestedJson","names","methods","getEnum","prev","setOptions","onAdd","onRemove","isArray","ptr","part","resolveAll","lookup","filterTypes","parentAlreadyChecked","found","lookupEnum","lookupService","Service_","Enum_","defineProperties","unshift","_handleAdd","_handleRemove","setParsedOption","propName","opt","newOpt","find","hasOwnProperty","newValue","setProperty","Root_","fieldNames","oneof","addFieldsToParent","oneofName","oneOfGetter","set","oneOfSetter","LongBits","indexOutOfRange","writeLength","RangeError","Buffer","isBuffer","create_array","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","nativeBuffer","skip","skipType","BufferReader_","merge","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","parse","common","deferred","files","SYNC","resolvePath","self","sync","finish","cb","getBundledFileName","idx","lastIndexOf","altname","substring","process","parsed","imports","weakImports","queued","weak","setTimeout","readFileSync","isNode","exposeRe","tryHandleExtension","sisterField","extendedType","parse_","common_","rpcImpl","requestDelimited","responseDelimited","rpcCall","method","requestCtor","responseCtor","request","endedByRPC","_methodsArray","service","inherited","methodsArray","rpcService","methodName","lcFirst","isReserved","m","q","s","oneofs","extensions","_fieldsById","_oneofsArray","_ctor","fieldsById","oneofsArray","generateConstructor","ctorProperties","setup","originalThis","wrapper","fork","ldelim","typeName","target","bake","o","safePropBackslashRe","key","safePropQuoteRe","camelCaseRe","ucFirst","str","toUpperCase","decorateEnumIndex","camelCase","a","decorateRoot","enumerable","dst","setProp","prevValue","concat","zero","zzEncode","zeroHash","from","parseInt","fromString","toLong","fromHash","hash","toHash","mask","part0","part1","part2","src","newError","CustomError","captureStackTrace","stack","writable","configurable","pool","versions","node","window","isFinite","isset","isSet","utf8Write","_Buffer_from","_Buffer_allocUnsafe","sizeOrArray","dcodeIO","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","ProtocolError","fieldMap","longs","enums","encoding","allocUnsafe","seenFirstField","oneofProp","invalid","genVerifyValue","expected","type_url","messageName","Op","next","noop","State","head","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","reset","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength"],"mappings":";;;;;;AAAA,CAAA,SAAAA,GAAA,aAAA,CAAA,SAAAC,EAAAC,EAAAC,GAcA,IAAAC,EAPA,SAAAC,EAAAC,GACA,IAAAC,EAAAL,EAAAI,GAGA,OAFAC,GACAN,EAAAK,GAAA,GAAAE,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A,CAEA,EAEA,SAAAF,EAAAC,EAAAC,GACA,GAAAF,EAAAid,KACAjd,EAAAid,KAAAhd,EAAAC,EAAA,EAAAF,EAAAtG,MAAA,OACA,IAAA,IAAAiB,EAAA,EAAAA,EAAAqF,EAAAtG,QACAuG,EAAAC,CAAA,IAAAF,EAAArF,CAAA,GACA,CACA,EAMAkS,EAAA7O,UAAA8I,MAAA,SAAAvJ,GAGA,IAAA8G,GADA9G,EADA5E,EAAAwQ,SAAA5L,CAAA,EACA5E,EAAA8hB,EAAAld,EAAA,QAAA,EACAA,GAAA7D,SAAA,EAIA,OAHAoE,KAAAqU,OAAA9N,CAAA,EACAA,GACAvG,KAAA6e,EAAA9P,EAAAmQ,iBAAA3Y,EAAA9G,CAAA,EACAO,IACA,EAcA+O,EAAA7O,UAAA5D,OAAA,SAAAmD,GACA,IAAA8G,EAAA1L,EAAA+Y,OAAAwL,WAAA3f,CAAA,EAIA,OAHAO,KAAAqU,OAAA9N,CAAA,EACAA,GACAvG,KAAA6e,EAAAI,EAAA1Y,EAAA9G,CAAA,EACAO,IACA,EAUA+O,EAAAjB,EAAA","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(14),\n util = require(33);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32())\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else gen\n (\"%s[k]=value\", ref);\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(21),\n util = require(33);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(14),\n types = require(32),\n util = require(33);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(13);\nprotobuf.decoder = require(12);\nprotobuf.verifier = require(36);\nprotobuf.converter = require(11);\n\n// Reflection\nprotobuf.ReflectionObject = require(22);\nprotobuf.Namespace = require(21);\nprotobuf.Root = require(26);\nprotobuf.Enum = require(14);\nprotobuf.Type = require(31);\nprotobuf.Field = require(15);\nprotobuf.OneOf = require(23);\nprotobuf.MapField = require(18);\nprotobuf.Service = require(30);\nprotobuf.Method = require(20);\n\n// Runtime\nprotobuf.Message = require(19);\nprotobuf.wrappers = require(37);\n\n// Utility\nprotobuf.types = require(32);\nprotobuf.util = require(33);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(38);\nprotobuf.BufferWriter = require(39);\nprotobuf.Reader = require(24);\nprotobuf.BufferReader = require(25);\n\n// Utility\nprotobuf.util = require(35);\nprotobuf.rpc = require(28);\nprotobuf.roots = require(27);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(15);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(32),\n util = require(33);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(35);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(33);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(15),\n util = require(33),\n OneOf = require(23);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(33);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set it's property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(22);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(15),\n util = require(33);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(35);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(24);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(35);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(21);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(15),\n Enum = require(14),\n OneOf = require(23),\n util = require(33);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n if (sync)\n throw err;\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(29);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(35);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(21);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(20),\n util = require(33),\n rpc = require(28);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(21);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(14),\n OneOf = require(23),\n Field = require(15),\n MapField = require(18),\n Service = require(30),\n Message = require(19),\n Reader = require(24),\n Writer = require(38),\n util = require(33),\n encoder = require(13),\n decoder = require(12),\n verifier = require(36),\n converter = require(11),\n wrappers = require(37);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {number[][]} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n return Namespace.prototype.resolveAll.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n return this.fields[name]\n || this.oneofs && this.oneofs[name]\n || this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n return this.setup().fromObject(object);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n return this.setup().toObject(message, options);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(33);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = {};\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(35);\n\nvar roots = require(27);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(8);\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n safePropQuoteRe = /\"/g;\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || util.isReserved(prop))\n return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(31);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(14);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (part === \"__proto__\" || part === \"prototype\") {\n return dst;\n }\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(26))());\n }\n});\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(35);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(6);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(7);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(10);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(9);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(34);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(14),\n util = require(33);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(19);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object)).finish()\n });\n }\n }\n\n return this.fromObject(object);\n },\n\n toObject: function(message, options) {\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(35);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(38);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(35);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/minimal/protobuf.js b/node_modules/protobufjs/dist/minimal/protobuf.js new file mode 100644 index 0000000..0ef931f --- /dev/null +++ b/node_modules/protobufjs/dist/minimal/protobuf.js @@ -0,0 +1,2736 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:34 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +(function(undefined){"use strict";(function prelude(modules, cache, entries) { + + // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS + // sources through a conflict-free require shim and is again wrapped within an iife that + // provides a minification-friendly `undefined` var plus a global "use strict" directive + // so that minification can remove the directives of each module. + + function $require(name) { + var $module = cache[name]; + if (!$module) + modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); + return $module.exports; + } + + var protobuf = $require(entries[0]); + + // Expose globally + protobuf.util.global.protobuf = protobuf; + + // Be nice to AMD + if (typeof define === "function" && define.amd) + define(["long"], function(Long) { + if (Long && Long.isLong) { + protobuf.util.Long = Long; + protobuf.configure(); + } + return protobuf; + }); + + // Be nice to CommonJS + if (typeof module === "object" && module && module.exports) + module.exports = protobuf; + +})/* end of prelude */({1:[function(require,module,exports){ +"use strict"; +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} + +},{}],2:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],3:[function(require,module,exports){ +"use strict"; +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; + +},{}],4:[function(require,module,exports){ +"use strict"; + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} + +},{}],5:[function(require,module,exports){ +"use strict"; +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} + +},{}],6:[function(require,module,exports){ +"use strict"; +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} + +},{}],7:[function(require,module,exports){ +"use strict"; + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; + +},{}],8:[function(require,module,exports){ +"use strict"; +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = require(16); +protobuf.BufferWriter = require(17); +protobuf.Reader = require(9); +protobuf.BufferReader = require(10); + +// Utility +protobuf.util = require(15); +protobuf.rpc = require(12); +protobuf.roots = require(11); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + +},{"10":10,"11":11,"12":12,"15":15,"16":16,"17":17,"9":9}],9:[function(require,module,exports){ +"use strict"; +module.exports = Reader; + +var util = require(15); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + +},{"15":15}],10:[function(require,module,exports){ +"use strict"; +module.exports = BufferReader; + +// extends Reader +var Reader = require(9); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = require(15); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + +},{"15":15,"9":9}],11:[function(require,module,exports){ +"use strict"; +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + +},{}],12:[function(require,module,exports){ +"use strict"; + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = require(13); + +},{"13":13}],13:[function(require,module,exports){ +"use strict"; +module.exports = Service; + +var util = require(15); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + +},{"15":15}],14:[function(require,module,exports){ +"use strict"; +module.exports = LongBits; + +var util = require(15); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + +},{"15":15}],15:[function(require,module,exports){ +"use strict"; +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = require(1); + +// converts to / from base64 encoded strings +util.base64 = require(2); + +// base class of rpc.Service +util.EventEmitter = require(3); + +// float handling accross browsers +util.float = require(4); + +// requires modules optionally and hides the call from bundlers +util.inquire = require(5); + +// converts to / from utf8 encoded strings +util.utf8 = require(7); + +// provides a node-like buffer pool in the browser +util.pool = require(6); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = require(14); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + +},{"1":1,"14":14,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7}],16:[function(require,module,exports){ +"use strict"; +module.exports = Writer; + +var util = require(15); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + +},{"15":15}],17:[function(require,module,exports){ +"use strict"; +module.exports = BufferWriter; + +// extends Writer +var Writer = require(16); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = require(15); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + +},{"15":15,"16":16}]},{},[8]) + +})(); +//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/minimal/protobuf.js.map b/node_modules/protobufjs/dist/minimal/protobuf.js.map new file mode 100644 index 0000000..e9dfbe7 --- /dev/null +++ b/node_modules/protobufjs/dist/minimal/protobuf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/index-minimal","../src/reader.js","../src/reader_buffer.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/util/longbits.js","../src/util/minimal.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(16);\nprotobuf.BufferWriter = require(17);\nprotobuf.Reader = require(9);\nprotobuf.BufferReader = require(10);\n\n// Utility\nprotobuf.util = require(15);\nprotobuf.rpc = require(12);\nprotobuf.roots = require(11);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(15);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(9);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(13);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(15);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(15);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(3);\n\n// float handling accross browsers\nutil.float = require(4);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(5);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(7);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(6);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(14);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(15);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(16);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/minimal/protobuf.min.js b/node_modules/protobufjs/dist/minimal/protobuf.min.js new file mode 100644 index 0000000..224b503 --- /dev/null +++ b/node_modules/protobufjs/dist/minimal/protobuf.min.js @@ -0,0 +1,8 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:35 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +!function(d){"use strict";!function(r,u,t){var n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}(t[0]);n.util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}({1:[function(t,n,i){n.exports=function(t,n){var i=Array(arguments.length-1),e=0,r=2,s=!0;for(;r>2],r=(3&o)<<4,h=1;break;case 1:e[s++]=f[r|o>>4],r=(15&o)<<2,h=2;break;case 2:e[s++]=f[r|o>>6],e[s++]=f[63&o],h=0}8191>4,r=h,e=2;break;case 2:n[i++]=(15&r)<<4|(60&h)>>2,r=h,e=3;break;case 3:n[i++]=(3&r)<<6|h,e=0}}if(1===e)throw Error(c);return i-u},i.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,n,i){function r(){this.t={}}(n.exports=r).prototype.on=function(t,n,i){return(this.t[t]||(this.t[t]=[])).push({fn:n,ctx:i||this}),this},r.prototype.off=function(t,n){if(t===d)this.t={};else if(n===d)this.t[t]=[];else for(var i=this.t[t],r=0;r>>0:n<11754943508222875e-54?(u<<31|Math.round(n/1401298464324817e-60))>>>0:(u<<31|127+(t=Math.floor(Math.log(n)/Math.LN2))<<23|8388607&Math.round(n*Math.pow(2,-t)*8388608))>>>0,i,r)}function i(t,n,i){t=t(n,i),n=2*(t>>31)+1,i=t>>>23&255,t&=8388607;return 255==i?t?NaN:1/0*n:0==i?1401298464324817e-60*n*t:n*Math.pow(2,i-150)*(8388608+t)}function r(t,n,i){h[0]=t,n[i]=o[0],n[i+1]=o[1],n[i+2]=o[2],n[i+3]=o[3]}function u(t,n,i){h[0]=t,n[i]=o[3],n[i+1]=o[2],n[i+2]=o[1],n[i+3]=o[0]}function e(t,n){return o[0]=t[n],o[1]=t[n+1],o[2]=t[n+2],o[3]=t[n+3],h[0]}function s(t,n){return o[3]=t[n],o[2]=t[n+1],o[1]=t[n+2],o[0]=t[n+3],h[0]}var h,o,f,c,a;function l(t,n,i,r,u,e){var s,h=r<0?1:0;0===(r=h?-r:r)?(t(0,u,e+n),t(0<1/r?0:2147483648,u,e+i)):isNaN(r)?(t(0,u,e+n),t(2146959360,u,e+i)):17976931348623157e292>>0,u,e+i)):r<22250738585072014e-324?(t((s=r/5e-324)>>>0,u,e+n),t((h<<31|s/4294967296)>>>0,u,e+i)):(t(4503599627370496*(s=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,u,e+n),t((h<<31|r+1023<<20|1048576*s&1048575)>>>0,u,e+i))}function v(t,n,i,r,u){n=t(r,u+n),t=t(r,u+i),r=2*(t>>31)+1,u=t>>>20&2047,i=4294967296*(1048575&t)+n;return 2047==u?i?NaN:1/0*r:0==u?5e-324*r*i:r*Math.pow(2,u-1075)*(i+4503599627370496)}function w(t,n,i){f[0]=t,n[i]=c[0],n[i+1]=c[1],n[i+2]=c[2],n[i+3]=c[3],n[i+4]=c[4],n[i+5]=c[5],n[i+6]=c[6],n[i+7]=c[7]}function b(t,n,i){f[0]=t,n[i]=c[7],n[i+1]=c[6],n[i+2]=c[5],n[i+3]=c[4],n[i+4]=c[3],n[i+5]=c[2],n[i+6]=c[1],n[i+7]=c[0]}function y(t,n){return c[0]=t[n],c[1]=t[n+1],c[2]=t[n+2],c[3]=t[n+3],c[4]=t[n+4],c[5]=t[n+5],c[6]=t[n+6],c[7]=t[n+7],f[0]}function g(t,n){return c[7]=t[n],c[6]=t[n+1],c[5]=t[n+2],c[4]=t[n+3],c[3]=t[n+4],c[2]=t[n+5],c[1]=t[n+6],c[0]=t[n+7],f[0]}return"undefined"!=typeof Float32Array?(h=new Float32Array([-0]),o=new Uint8Array(h.buffer),a=128===o[3],t.writeFloatLE=a?r:u,t.writeFloatBE=a?u:r,t.readFloatLE=a?e:s,t.readFloatBE=a?s:e):(t.writeFloatLE=n.bind(null,d),t.writeFloatBE=n.bind(null,A),t.readFloatLE=i.bind(null,p),t.readFloatBE=i.bind(null,m)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?w:b,t.writeDoubleBE=a?b:w,t.readDoubleLE=a?y:g,t.readDoubleBE=a?g:y):(t.writeDoubleLE=l.bind(null,d,0,4),t.writeDoubleBE=l.bind(null,A,4,0),t.readDoubleLE=v.bind(null,p,0,4),t.readDoubleBE=v.bind(null,m,4,0)),t}function d(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}function A(t,n,i){n[i]=t>>>24,n[i+1]=t>>>16&255,n[i+2]=t>>>8&255,n[i+3]=255&t}function p(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function m(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=r(r)},{}],5:[function(t,n,i){function r(t){try{var n=eval("require")(t);if(n&&(n.length||Object.keys(n).length))return n}catch(t){}return null}n.exports=r},{}],6:[function(t,n,i){n.exports=function(n,i,t){var r=t||8192,u=r>>>1,e=null,s=r;return function(t){if(t<1||u>10),e[s++]=56320+(1023&r)):e[s++]=(15&r)<<12|(63&t[n++])<<6|63&t[n++],8191>6|192:(55296==(64512&r)&&56320==(64512&(u=t.charCodeAt(s+1)))?(++s,n[i++]=(r=65536+((1023&r)<<10)+(1023&u))>>18|240,n[i++]=r>>12&63|128):n[i++]=r>>12|224,n[i++]=r>>6&63|128),n[i++]=63&r|128);return i-e}},{}],8:[function(t,n,i){var r=i;function u(){r.util.n(),r.Writer.n(r.BufferWriter),r.Reader.n(r.BufferReader)}r.build="minimal",r.Writer=t(16),r.BufferWriter=t(17),r.Reader=t(9),r.BufferReader=t(10),r.util=t(15),r.rpc=t(12),r.roots=t(11),r.configure=u,u()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(t,n,i){n.exports=o;var r,u=t(15),e=u.LongBits,s=u.utf8;function h(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return u.Buffer?function(t){return(o.create=function(t){return u.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function l(){var t=new e(0,0),n=0;if(!(4=this.len)throw h(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*n)>>>0,t}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw h(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function v(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function w(){if(this.pos+8>this.len)throw h(this,8);return new e(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}o.create=f(),o.prototype.i=u.Array.prototype.subarray||u.Array.prototype.slice,o.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,h(this,10)}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return v(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|v(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw h(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(n,i):n===i?(t=u.Buffer)?t.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,n,i)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw h(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw h(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o.n=function(t){r=t,o.create=f(),r.n();var n=u.Long?"toLong":"toNumber";u.merge(o.prototype,{int64:function(){return l.call(this)[n](!1)},uint64:function(){return l.call(this)[n](!0)},sint64:function(){return l.call(this).zzDecode()[n](!1)},fixed64:function(){return w.call(this)[n](!0)},sfixed64:function(){return w.call(this)[n](!1)}})}},{15:15}],10:[function(t,n,i){n.exports=e;var r=t(9),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(t){r.call(this,t)}e.n=function(){u.Buffer&&(e.prototype.i=u.Buffer.prototype.slice)},e.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},e.n()},{15:15,9:9}],11:[function(t,n,i){n.exports={}},{}],12:[function(t,n,i){i.Service=t(13)},{13:13}],13:[function(t,n,i){n.exports=r;var h=t(15);function r(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");h.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((r.prototype=Object.create(h.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(i,n,r,u,e){if(!u)throw TypeError("request must be specified");var s=this;if(!e)return h.asPromise(t,s,i,n,r,u);if(!s.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),d;try{return s.rpcImpl(i,n[s.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(t,n){if(t)return s.emit("error",t,i),e(t);if(null===n)return s.end(!0),d;if(!(n instanceof r))try{n=r[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return s.emit("error",t,i),e(t)}return s.emit("data",n,i),e(null,n)})}catch(t){return s.emit("error",t,i),setTimeout(function(){e(t)},0),d}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(t,n,i){n.exports=u;var r=t(15);function u(t,n){this.lo=t>>>0,this.hi=n>>>0}var e=u.zero=new u(0,0),s=(e.toNumber=function(){return 0},e.zzEncode=e.zzDecode=function(){return this},e.length=function(){return 1},u.zeroHash="\0\0\0\0\0\0\0\0",u.fromNumber=function(t){var n,i;return 0===t?e:(i=(t=(n=t<0)?-t:t)>>>0,t=(t-i)/4294967296>>>0,n&&(t=~t>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++t&&(t=0))),new u(i,t))},u.from=function(t){if("number"==typeof t)return u.fromNumber(t);if(r.isString(t)){if(!r.Long)return u.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new u(t.low>>>0,t.high>>>0):e},u.prototype.toNumber=function(t){var n;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,n=~this.hi>>>0,-(t+4294967296*(n=t?n:n+1>>>0))):this.lo+4294967296*this.hi},u.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);u.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?e:new u((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},u.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},u.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},u.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},u.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{15:15}],15:[function(t,n,i){var r=i;function u(t,n,i){for(var r=Object.keys(n),u=0;u>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127>>7;n[i++]=t.lo}function y(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}a.create=l(),a.alloc=function(t){return new u.Array(t)},u.Array!==Array&&(a.alloc=u.pool(a.alloc,u.Array.prototype.subarray)),a.prototype.e=function(t,n,i){return this.tail=this.tail.next=new o(t,n,i),this.len+=n,this},(w.prototype=Object.create(o.prototype)).fn=function(t,n,i){for(;127>>=7;n[i]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new w((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return t<0?this.e(b,10,e.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=e.from(t);return this.e(b,t.length(),t)},a.prototype.sint64=function(t){t=e.from(t).zzEncode();return this.e(b,t.length(),t)},a.prototype.bool=function(t){return this.e(v,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.e(y,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=e.from(t);return this.e(y,4,t.lo).e(y,4,t.hi)},a.prototype.float=function(t){return this.e(u.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.e(u.float.writeDoubleLE,8,t)};var g=u.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r>>0;return i?(u.isString(t)&&(n=a.alloc(i=s.length(t)),s.decode(t,n,0),t=n),this.uint32(i).e(g,i,t)):this.e(v,1,0)},a.prototype.string=function(t){var n=h.length(t);return n?this.uint32(n).e(h.write,n,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new o(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},a.prototype.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n},a.n=function(t){r=t,a.create=l(),r.n()}},{15:15}],17:[function(t,n,i){n.exports=e;var r=t(16),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(){r.call(this)}function s(t,n,i){t.length<40?u.utf8.write(t,n,i):n.utf8Write?n.utf8Write(t,i):n.write(t,i)}e.n=function(){e.alloc=u.u,e.writeBytesBuffer=u.Buffer&&u.Buffer.prototype instanceof Uint8Array&&"set"===u.Buffer.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r>>0;return this.uint32(n),n&&this.e(e.writeBytesBuffer,n,t),this},e.prototype.string=function(t){var n=u.Buffer.byteLength(t);return this.uint32(n),n&&this.e(s,n,t),this},e.n()},{15:15,16:16}]},{},[8])}(); +//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/minimal/protobuf.min.js.map b/node_modules/protobufjs/dist/minimal/protobuf.min.js.map new file mode 100644 index 0000000..9647827 --- /dev/null +++ b/node_modules/protobufjs/dist/minimal/protobuf.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/index-minimal","../src/reader.js","../src/reader_buffer.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/util/longbits.js","../src/util/minimal.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","entries","protobuf","$require","name","$module","call","exports","util","global","define","amd","Long","isLong","configure","module","1","require","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","EventEmitter","this","_listeners","prototype","on","evt","off","listeners","splice","emit","args","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","floor","log","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","Uint8Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","inquire","moduleName","mod","eval","Object","keys","e","alloc","size","SIZE","MAX","slab","utf8","len","read","write","c1","c2","_configure","Writer","BufferWriter","Reader","BufferReader","build","rpc","roots","LongBits","indexOutOfRange","reader","writeLength","RangeError","create","Buffer","isBuffer","create_array","value","isArray","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","bytes","nativeBuffer","constructor","skip","skipType","wireType","BufferReader_","merge","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","toString","Service","rpcImpl","requestDelimited","responseDelimited","TypeError","Boolean","rpcCall","method","requestCtor","responseCtor","request","callback","self","asPromise","setTimeout","finish","response","endedByRPC","zero","toNumber","zzEncode","zeroHash","fromNumber","from","isString","parseInt","fromString","low","high","unsigned","toLong","fromHash","hash","toHash","mask","part0","part1","part2","dst","src","ifNotSet","newError","CustomError","message","properties","defineProperty","get","captureStackTrace","stack","writable","enumerable","configurable","set","pool","isNode","process","versions","node","window","emptyArray","freeze","emptyObject","isInteger","Number","isFinite","isObject","isset","isSet","obj","prop","hasOwnProperty","utf8Write","_Buffer_from","_Buffer_allocUnsafe","newBuffer","sizeOrArray","dcodeIO","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","lcFirst","str","toLowerCase","substring","ProtocolError","oneOfGetter","fieldNames","fieldMap","oneOfSetter","toJSONOptions","longs","enums","json","encoding","allocUnsafe","Op","next","noop","State","writer","head","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","fork","reset","ldelim","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength"],"mappings":";;;;;;AAAA,CAAA,SAAAA,GAAA,aAAA,CAAA,SAAAC,EAAAC,EAAAC,GAcA,IAAAC,EAPA,SAAAC,EAAAC,GACA,IAAAC,EAAAL,EAAAI,GAGA,OAFAC,GACAN,EAAAK,GAAA,GAAAE,KAAAD,EAAAL,EAAAI,GAAA,CAAAG,QAAA,EAAA,EAAAJ,EAAAE,EAAAA,EAAAE,OAAA,EACAF,EAAAE,OACA,EAEAN,EAAA,EAAA,EAGAC,EAAAM,KAAAC,OAAAP,SAAAA,EAGA,YAAA,OAAAQ,QAAAA,OAAAC,KACAD,OAAA,CAAA,QAAA,SAAAE,GAKA,OAJAA,GAAAA,EAAAC,SACAX,EAAAM,KAAAI,KAAAA,EACAV,EAAAY,UAAA,GAEAZ,CACA,CAAA,EAGA,UAAA,OAAAa,QAAAA,QAAAA,OAAAR,UACAQ,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cAoF,EAAAlF,UAAA/B,OAAA,SAAAgI,GACA,IAAAtB,EAAAnI,EAAAsJ,OAAA2J,WAAAxJ,CAAA,EAIA,OAHAnG,KAAA2G,OAAA9B,CAAA,EACAA,GACA7E,KAAAkP,EAAAM,EAAA3K,EAAAsB,CAAA,EACAnG,IACA,EAUAoF,EAAAF,EAAA","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(16);\nprotobuf.BufferWriter = require(17);\nprotobuf.Reader = require(9);\nprotobuf.BufferReader = require(10);\n\n// Utility\nprotobuf.util = require(15);\nprotobuf.rpc = require(12);\nprotobuf.roots = require(11);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(15);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(9);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(13);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(15);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(15);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(3);\n\n// float handling accross browsers\nutil.float = require(4);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(5);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(7);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(6);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(14);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(15);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(16);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(15);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/protobuf.js b/node_modules/protobufjs/dist/protobuf.js new file mode 100644 index 0000000..5929370 --- /dev/null +++ b/node_modules/protobufjs/dist/protobuf.js @@ -0,0 +1,9105 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:34 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +(function(undefined){"use strict";(function prelude(modules, cache, entries) { + + // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS + // sources through a conflict-free require shim and is again wrapped within an iife that + // provides a minification-friendly `undefined` var plus a global "use strict" directive + // so that minification can remove the directives of each module. + + function $require(name) { + var $module = cache[name]; + if (!$module) + modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports); + return $module.exports; + } + + var protobuf = $require(entries[0]); + + // Expose globally + protobuf.util.global.protobuf = protobuf; + + // Be nice to AMD + if (typeof define === "function" && define.amd) + define(["long"], function(Long) { + if (Long && Long.isLong) { + protobuf.util.Long = Long; + protobuf.configure(); + } + return protobuf; + }); + + // Be nice to CommonJS + if (typeof module === "object" && module && module.exports) + module.exports = protobuf; + +})/* end of prelude */({1:[function(require,module,exports){ +"use strict"; +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} + +},{}],2:[function(require,module,exports){ +"use strict"; + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; + +},{}],3:[function(require,module,exports){ +"use strict"; +module.exports = codegen; + +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + */ +function codegen(functionParams, functionName) { + + /* istanbul ignore if */ + if (typeof functionParams === "string") { + functionName = functionParams; + functionParams = undefined; + } + + var body = []; + + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ + + function Codegen(formatStringOrScope) { + // note that explicit array handling below makes this ~50% faster + + // finish the function + if (typeof formatStringOrScope !== "string") { + var source = toString(); + if (codegen.verbose) + console.log("codegen: " + source); // eslint-disable-line no-console + source = "return " + source; + if (formatStringOrScope) { + var scopeKeys = Object.keys(formatStringOrScope), + scopeParams = new Array(scopeKeys.length + 1), + scopeValues = new Array(scopeKeys.length), + scopeOffset = 0; + while (scopeOffset < scopeKeys.length) { + scopeParams[scopeOffset] = scopeKeys[scopeOffset]; + scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]]; + } + scopeParams[scopeOffset] = source; + return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func + } + return Function(source)(); // eslint-disable-line no-new-func + } + + // otherwise append to body + var formatParams = new Array(arguments.length - 1), + formatOffset = 0; + while (formatOffset < formatParams.length) + formatParams[formatOffset] = arguments[++formatOffset]; + formatOffset = 0; + formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) { + var value = formatParams[formatOffset++]; + switch ($1) { + case "d": case "f": return String(Number(value)); + case "i": return String(Math.floor(value)); + case "j": return JSON.stringify(value); + case "s": return String(value); + } + return "%"; + }); + if (formatOffset !== formatParams.length) + throw Error("parameter count mismatch"); + body.push(formatStringOrScope); + return Codegen; + } + + function toString(functionNameOverride) { + return "function " + (functionNameOverride || functionName || "") + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}"; + } + + Codegen.toString = toString; + return Codegen; +} + +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ + +/** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} + */ +codegen.verbose = false; + +},{}],4:[function(require,module,exports){ +"use strict"; +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; + +},{}],5:[function(require,module,exports){ +"use strict"; +module.exports = fetch; + +var asPromise = require(1), + inquire = require(7); + +var fs = inquire("fs"); + +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ + +/** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +function fetch(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else if (!options) + options = {}; + + if (!callback) + return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this + + // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found. + if (!options.xhr && fs && fs.readFile) + return fs.readFile(filename, function fetchReadFileCallback(err, contents) { + return err && typeof XMLHttpRequest !== "undefined" + ? fetch.xhr(filename, options, callback) + : err + ? callback(err) + : callback(null, options.binary ? contents : contents.toString("utf8")); + }); + + // use the XHR version otherwise. + return fetch.xhr(filename, options, callback); +} + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ + +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 + */ + +/**/ +fetch.xhr = function fetch_xhr(filename, options, callback) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { + + if (xhr.readyState !== 4) + return undefined; + + // local cors security errors return status 0 / empty string, too. afaik this cannot be + // reliably distinguished from an actually empty file for security reasons. feel free + // to send a pull request if you are aware of a solution. + if (xhr.status !== 0 && xhr.status !== 200) + return callback(Error("status " + xhr.status)); + + // if binary data is expected, make sure that some sort of array is returned, even if + // ArrayBuffers are not supported. the binary string fallback, however, is unsafe. + if (options.binary) { + var buffer = xhr.response; + if (!buffer) { + buffer = []; + for (var i = 0; i < xhr.responseText.length; ++i) + buffer.push(xhr.responseText.charCodeAt(i) & 255); + } + return callback(null, typeof Uint8Array !== "undefined" ? new Uint8Array(buffer) : buffer); + } + return callback(null, xhr.responseText); + }; + + if (options.binary) { + // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers + if ("overrideMimeType" in xhr) + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + xhr.responseType = "arraybuffer"; + } + + xhr.open("GET", filename); + xhr.send(); +}; + +},{"1":1,"7":7}],6:[function(require,module,exports){ +"use strict"; + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} + +},{}],7:[function(require,module,exports){ +"use strict"; +module.exports = inquire; + +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { + try { + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; +} + +},{}],8:[function(require,module,exports){ +"use strict"; + +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace + */ +var path = exports; + +var isAbsolute = +/** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute + */ +path.isAbsolute = function isAbsolute(path) { + return /^(?:\/|\w+:)/.test(path); +}; + +var normalize = +/** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path + */ +path.normalize = function normalize(path) { + path = path.replace(/\\/g, "/") + .replace(/\/{2,}/g, "/"); + var parts = path.split("/"), + absolute = isAbsolute(path), + prefix = ""; + if (absolute) + prefix = parts.shift() + "/"; + for (var i = 0; i < parts.length;) { + if (parts[i] === "..") { + if (i > 0 && parts[i - 1] !== "..") + parts.splice(--i, 2); + else if (absolute) + parts.splice(i, 1); + else + ++i; + } else if (parts[i] === ".") + parts.splice(i, 1); + else + ++i; + } + return prefix + parts.join("/"); +}; + +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file + */ +path.resolve = function resolve(originPath, includePath, alreadyNormalized) { + if (!alreadyNormalized) + includePath = normalize(includePath); + if (isAbsolute(includePath)) + return includePath; + if (!alreadyNormalized) + originPath = normalize(originPath); + return (originPath = originPath.replace(/(?:\/|^)[^/]+$/, "")).length ? normalize(originPath + "/" + includePath) : includePath; +}; + +},{}],9:[function(require,module,exports){ +"use strict"; +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} + +},{}],10:[function(require,module,exports){ +"use strict"; + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; + +},{}],11:[function(require,module,exports){ +"use strict"; +module.exports = common; + +var commonRe = /\/|\./; + +/** + * Provides common type definitions. + * Can also be used to provide additional google types or your own custom types. + * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @returns {undefined} + * @property {INamespace} google/protobuf/any.proto Any + * @property {INamespace} google/protobuf/duration.proto Duration + * @property {INamespace} google/protobuf/empty.proto Empty + * @property {INamespace} google/protobuf/field_mask.proto FieldMask + * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {INamespace} google/protobuf/timestamp.proto Timestamp + * @property {INamespace} google/protobuf/wrappers.proto Wrappers + * @example + * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) + * protobuf.common("descriptor", descriptorJson); + * + * // manually provides a custom definition (uses my.foo namespace) + * protobuf.common("my/foo/bar.proto", myFooBarJson); + */ +function common(name, json) { + if (!commonRe.test(name)) { + name = "google/protobuf/" + name + ".proto"; + json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; + } + common[name] = json; +} + +// Not provided because of limited use (feel free to discuss or to provide yourself): +// +// google/protobuf/descriptor.proto +// google/protobuf/source_context.proto +// google/protobuf/type.proto +// +// Stripped and pre-parsed versions of these non-bundled files are instead available as part of +// the repository or package within the google/protobuf directory. + +common("any", { + + /** + * Properties of a google.protobuf.Any message. + * @interface IAny + * @type {Object} + * @property {string} [typeUrl] + * @property {Uint8Array} [bytes] + * @memberof common + */ + Any: { + fields: { + type_url: { + type: "string", + id: 1 + }, + value: { + type: "bytes", + id: 2 + } + } + } +}); + +var timeType; + +common("duration", { + + /** + * Properties of a google.protobuf.Duration message. + * @interface IDuration + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Duration: timeType = { + fields: { + seconds: { + type: "int64", + id: 1 + }, + nanos: { + type: "int32", + id: 2 + } + } + } +}); + +common("timestamp", { + + /** + * Properties of a google.protobuf.Timestamp message. + * @interface ITimestamp + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Timestamp: timeType +}); + +common("empty", { + + /** + * Properties of a google.protobuf.Empty message. + * @interface IEmpty + * @memberof common + */ + Empty: { + fields: {} + } +}); + +common("struct", { + + /** + * Properties of a google.protobuf.Struct message. + * @interface IStruct + * @type {Object} + * @property {Object.} [fields] + * @memberof common + */ + Struct: { + fields: { + fields: { + keyType: "string", + type: "Value", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Value message. + * @interface IValue + * @type {Object} + * @property {string} [kind] + * @property {0} [nullValue] + * @property {number} [numberValue] + * @property {string} [stringValue] + * @property {boolean} [boolValue] + * @property {IStruct} [structValue] + * @property {IListValue} [listValue] + * @memberof common + */ + Value: { + oneofs: { + kind: { + oneof: [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + fields: { + nullValue: { + type: "NullValue", + id: 1 + }, + numberValue: { + type: "double", + id: 2 + }, + stringValue: { + type: "string", + id: 3 + }, + boolValue: { + type: "bool", + id: 4 + }, + structValue: { + type: "Struct", + id: 5 + }, + listValue: { + type: "ListValue", + id: 6 + } + } + }, + + NullValue: { + values: { + NULL_VALUE: 0 + } + }, + + /** + * Properties of a google.protobuf.ListValue message. + * @interface IListValue + * @type {Object} + * @property {Array.} [values] + * @memberof common + */ + ListValue: { + fields: { + values: { + rule: "repeated", + type: "Value", + id: 1 + } + } + } +}); + +common("wrappers", { + + /** + * Properties of a google.protobuf.DoubleValue message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + DoubleValue: { + fields: { + value: { + type: "double", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.FloatValue message. + * @interface IFloatValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FloatValue: { + fields: { + value: { + type: "float", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int64Value message. + * @interface IInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + Int64Value: { + fields: { + value: { + type: "int64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt64Value message. + * @interface IUInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + UInt64Value: { + fields: { + value: { + type: "uint64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int32Value message. + * @interface IInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + Int32Value: { + fields: { + value: { + type: "int32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt32Value message. + * @interface IUInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + UInt32Value: { + fields: { + value: { + type: "uint32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BoolValue message. + * @interface IBoolValue + * @type {Object} + * @property {boolean} [value] + * @memberof common + */ + BoolValue: { + fields: { + value: { + type: "bool", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.StringValue message. + * @interface IStringValue + * @type {Object} + * @property {string} [value] + * @memberof common + */ + StringValue: { + fields: { + value: { + type: "string", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BytesValue message. + * @interface IBytesValue + * @type {Object} + * @property {Uint8Array} [value] + * @memberof common + */ + BytesValue: { + fields: { + value: { + type: "bytes", + id: 1 + } + } + } +}); + +common("field_mask", { + + /** + * Properties of a google.protobuf.FieldMask message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FieldMask: { + fields: { + paths: { + rule: "repeated", + type: "string", + id: 1 + } + } + } +}); + +/** + * Gets the root definition of the specified common proto file. + * + * Bundled definitions are: + * - google/protobuf/any.proto + * - google/protobuf/duration.proto + * - google/protobuf/empty.proto + * - google/protobuf/field_mask.proto + * - google/protobuf/struct.proto + * - google/protobuf/timestamp.proto + * - google/protobuf/wrappers.proto + * + * @param {string} file Proto file name + * @returns {INamespace|null} Root definition or `null` if not defined + */ +common.get = function get(file) { + return common[file] || null; +}; + +},{}],12:[function(require,module,exports){ +"use strict"; +/** + * Runtime message from/to plain object converters. + * @namespace + */ +var converter = exports; + +var Enum = require(15), + util = require(37); + +/** + * Generates a partial value fromObject conveter. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} prop Property reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genValuePartial_fromObject(gen, field, fieldIndex, prop) { + var defaultAlreadyEmitted = false; + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(d%s){", prop); + for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { + // enum unknown values passthrough + if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen + ("default:") + ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); + if (!field.repeated) gen // fallback to default value only for + // arrays, to avoid leaving holes. + ("break"); // for non-repeated fields, just ignore + defaultAlreadyEmitted = true; + } + gen + ("case%j:", keys[i]) + ("case %i:", values[keys[i]]) + ("m%s=%j", prop, values[keys[i]]) + ("break"); + } gen + ("}"); + } else gen + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop); + } else { + var isUnsigned = false; + switch (field.type) { + case "double": + case "float": gen + ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" + break; + case "uint32": + case "fixed32": gen + ("m%s=d%s>>>0", prop, prop); + break; + case "int32": + case "sint32": + case "sfixed32": gen + ("m%s=d%s|0", prop, prop); + break; + case "uint64": + isUnsigned = true; + // eslint-disable-next-line no-fallthrough + case "int64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(util.Long)") + ("(m%s=util.Long.fromValue(d%s)).unsigned=%j", prop, prop, isUnsigned) + ("else if(typeof d%s===\"string\")", prop) + ("m%s=parseInt(d%s,10)", prop, prop) + ("else if(typeof d%s===\"number\")", prop) + ("m%s=d%s", prop, prop) + ("else if(typeof d%s===\"object\")", prop) + ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); + break; + case "bytes": gen + ("if(typeof d%s===\"string\")", prop) + ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) + ("else if(d%s.length >= 0)", prop) + ("m%s=d%s", prop, prop); + break; + case "string": gen + ("m%s=String(d%s)", prop, prop); + break; + case "bool": gen + ("m%s=Boolean(d%s)", prop, prop); + break; + /* default: gen + ("m%s=d%s", prop, prop); + break; */ + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a plain object to runtime message converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.fromObject = function fromObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray; + var gen = util.codegen(["d"], mtype.name + "$fromObject") + ("if(d instanceof this.ctor)") + ("return d"); + if (!fields.length) return gen + ("return new this.ctor"); + gen + ("var m=new this.ctor"); + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + prop = util.safeProp(field.name); + + // Map fields + if (field.map) { gen + ("if(d%s){", prop) + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s={}", prop) + ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); + break; + case "bytes": gen + ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); + break; + default: gen + ("d%s=m%s", prop, prop); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a runtime message to plain object converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.toObject = function toObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); + if (!fields.length) + return util.codegen()("return {}"); + var gen = util.codegen(["m", "o"], mtype.name + "$toObject") + ("if(!o)") + ("o={}") + ("var d={}"); + + var repeatedFields = [], + mapFields = [], + normalFields = [], + i = 0; + for (; i < fields.length; ++i) + if (!fields[i].partOf) + ( fields[i].resolve().repeated ? repeatedFields + : fields[i].map ? mapFields + : normalFields).push(fields[i]); + + if (repeatedFields.length) { gen + ("if(o.arrays||o.defaults){"); + for (i = 0; i < repeatedFields.length; ++i) gen + ("d%s=[]", util.safeProp(repeatedFields[i].name)); + gen + ("}"); + } + + if (mapFields.length) { gen + ("if(o.objects||o.defaults){"); + for (i = 0; i < mapFields.length; ++i) gen + ("d%s={}", util.safeProp(mapFields[i].name)); + gen + ("}"); + } + + if (normalFields.length) { gen + ("if(o.defaults){"); + for (i = 0; i < normalFields.length; ++i) { + var field = normalFields[i], + prop = util.safeProp(field.name); + if (field.resolvedType instanceof Enum) gen + ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); + else if (field.long) gen + ("if(util.Long){") + ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) + ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop) + ("}else") + ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber()); + else if (field.bytes) { + var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]"; + gen + ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) + ("else{") + ("d%s=%s", prop, arrayDefault) + ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) + ("}"); + } else gen + ("d%s=%j", prop, field.typeDefault); // also messages (=null) + } gen + ("}"); + } + var hasKs2 = false; + for (i = 0; i < fields.length; ++i) { + var field = fields[i], + index = mtype._fieldsArray.indexOf(field), + prop = util.safeProp(field.name); + if (field.map) { + if (!hasKs2) { hasKs2 = true; gen + ("var ks2"); + } gen + ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) + ("d%s={}", prop) + ("for(var j=0;j>>3){"); + + var i = 0; + for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + ref = "m" + util.safeProp(field.name); gen + ("case %i: {", field.id); + + // Map fields + if (field.map) { gen + ("if(%s===util.emptyObject)", ref) + ("%s={}", ref) + ("var c2 = r.uint32()+r.pos"); + + if (types.defaults[field.keyType] !== undefined) gen + ("k=%j", types.defaults[field.keyType]); + else gen + ("k=null"); + + if (types.defaults[type] !== undefined) gen + ("value=%j", types.defaults[type]); + else gen + ("value=null"); + + gen + ("while(r.pos>>3){") + ("case 1: k=r.%s(); break", field.keyType) + ("case 2:"); + + if (types.basic[type] === undefined) gen + ("value=types[%i].decode(r,r.uint32())", i); // can't be groups + else gen + ("value=r.%s()", type); + + gen + ("break") + ("default:") + ("r.skipType(tag2&7)") + ("break") + ("}") + ("}"); + + if (types.long[field.keyType] !== undefined) gen + ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); + else gen + ("%s[k]=value", ref); + + // Repeated fields + } else if (field.repeated) { gen + + ("if(!(%s&&%s.length))", ref, ref) + ("%s=[]", ref); + + // Packable (always check for forward and backward compatiblity) + if (types.packed[type] !== undefined) gen + ("if((t&7)===2){") + ("var c2=r.uint32()+r.pos") + ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) + : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); +} + +/** + * Generates an encoder specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function encoder(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var gen = util.codegen(["m", "w"], mtype.name + "$encode") + ("if(!w)") + ("w=Writer.create()"); + + var i, ref; + + // "when a message is serialized its known fields should be written sequentially by field number" + var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); + + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + index = mtype._fieldsArray.indexOf(field), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + wireType = types.basic[type]; + ref = "m" + util.safeProp(field.name); + + // Map fields + if (field.map) { + gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null + ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); + if (wireType === undefined) gen + ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups + else gen + (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); + gen + ("}") + ("}"); + + // Repeated fields + } else if (field.repeated) { gen + ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null + + // Packed repeated + if (field.packed && types.packed[type] !== undefined) { gen + + ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) + ("for(var i=0;i<%s.length;++i)", ref) + ("w.%s(%s[i])", type, ref) + ("w.ldelim()"); + + // Non-packed + } else { gen + + ("for(var i=0;i<%s.length;++i)", ref); + if (wireType === undefined) + genTypePartial(gen, field, index, ref + "[i]"); + else gen + ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); + + } gen + ("}"); + + // Non-repeated + } else { + if (field.optional) gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null + + if (wireType === undefined) + genTypePartial(gen, field, index, ref); + else gen + ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); + + } + } + + return gen + ("return w"); + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +},{"15":15,"36":36,"37":37}],15:[function(require,module,exports){ +"use strict"; +module.exports = Enum; + +// extends ReflectionObject +var ReflectionObject = require(24); +((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; + +var Namespace = require(23), + util = require(37); + +/** + * Constructs a new enum instance. + * @classdesc Reflected enum. + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {Object.} [values] Enum values as an object, by name + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this enum + * @param {Object.} [comments] The value comments for this enum + * @param {Object.>|undefined} [valuesOptions] The value options for this enum + */ +function Enum(name, values, options, comment, comments, valuesOptions) { + ReflectionObject.call(this, name, options); + + if (values && typeof values !== "object") + throw TypeError("values must be an object"); + + /** + * Enum values by id. + * @type {Object.} + */ + this.valuesById = {}; + + /** + * Enum values by name. + * @type {Object.} + */ + this.values = Object.create(this.valuesById); // toJSON, marker + + /** + * Enum comment text. + * @type {string|null} + */ + this.comment = comment; + + /** + * Value comment texts, if any. + * @type {Object.} + */ + this.comments = comments || {}; + + /** + * Values options, if any + * @type {Object>|undefined} + */ + this.valuesOptions = valuesOptions; + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + // Note that values inherit valuesById on their prototype which makes them a TypeScript- + // compatible enum. This is used by pbts to write actual enum definitions that work for + // static and reflection code alike instead of emitting generic object definitions. + + if (values) + for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) + if (typeof values[keys[i]] === "number") // use forward entries only + this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; +} + +/** + * Enum descriptor. + * @interface IEnum + * @property {Object.} values Enum values + * @property {Object.} [options] Enum options + */ + +/** + * Constructs an enum from an enum descriptor. + * @param {string} name Enum name + * @param {IEnum} json Enum descriptor + * @returns {Enum} Created enum + * @throws {TypeError} If arguments are invalid + */ +Enum.fromJSON = function fromJSON(name, json) { + var enm = new Enum(name, json.values, json.options, json.comment, json.comments); + enm.reserved = json.reserved; + return enm; +}; + +/** + * Converts this enum to an enum descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IEnum} Enum descriptor + */ +Enum.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "valuesOptions" , this.valuesOptions, + "values" , this.values, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "comment" , keepComments ? this.comment : undefined, + "comments" , keepComments ? this.comments : undefined + ]); +}; + +/** + * Adds a value to this enum. + * @param {string} name Value name + * @param {number} id Value id + * @param {string} [comment] Comment, if any + * @param {Object.|undefined} [options] Options, if any + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a value with this name or id + */ +Enum.prototype.add = function add(name, id, comment, options) { + // utilized by the parser but not by .fromJSON + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (!util.isInteger(id)) + throw TypeError("id must be an integer"); + + if (this.values[name] !== undefined) + throw Error("duplicate name '" + name + "' in " + this); + + if (this.isReservedId(id)) + throw Error("id " + id + " is reserved in " + this); + + if (this.isReservedName(name)) + throw Error("name '" + name + "' is reserved in " + this); + + if (this.valuesById[id] !== undefined) { + if (!(this.options && this.options.allow_alias)) + throw Error("duplicate id " + id + " in " + this); + this.values[name] = id; + } else + this.valuesById[this.values[name] = id] = name; + + if (options) { + if (this.valuesOptions === undefined) + this.valuesOptions = {}; + this.valuesOptions[name] = options || null; + } + + this.comments[name] = comment || null; + return this; +}; + +/** + * Removes a value from this enum + * @param {string} name Value name + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `name` is not a name of this enum + */ +Enum.prototype.remove = function remove(name) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + var val = this.values[name]; + if (val == null) + throw Error("name '" + name + "' does not exist in " + this); + + delete this.valuesById[val]; + delete this.values[name]; + delete this.comments[name]; + if (this.valuesOptions) + delete this.valuesOptions[name]; + + return this; +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +},{"23":23,"24":24,"37":37}],16:[function(require,module,exports){ +"use strict"; +module.exports = Field; + +// extends ReflectionObject +var ReflectionObject = require(24); +((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; + +var Enum = require(15), + types = require(36), + util = require(37); + +var Type; // cyclic + +var ruleRe = /^required|optional|repeated$/; + +/** + * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. + * @name Field + * @classdesc Reflected message field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a field from a field descriptor. + * @param {string} name Field name + * @param {IField} json Field descriptor + * @returns {Field} Created field + * @throws {TypeError} If arguments are invalid + */ +Field.fromJSON = function fromJSON(name, json) { + return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); +}; + +/** + * Not an actual constructor. Use {@link Field} instead. + * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. + * @exports FieldBase + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function Field(name, id, type, rule, extend, options, comment) { + + if (util.isObject(rule)) { + comment = extend; + options = rule; + rule = extend = undefined; + } else if (util.isObject(extend)) { + comment = options; + options = extend; + extend = undefined; + } + + ReflectionObject.call(this, name, options); + + if (!util.isInteger(id) || id < 0) + throw TypeError("id must be a non-negative integer"); + + if (!util.isString(type)) + throw TypeError("type must be a string"); + + if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) + throw TypeError("rule must be a string rule"); + + if (extend !== undefined && !util.isString(extend)) + throw TypeError("extend must be a string"); + + /** + * Field rule, if any. + * @type {string|undefined} + */ + if (rule === "proto3_optional") { + rule = "optional"; + } + this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON + + /** + * Field type. + * @type {string} + */ + this.type = type; // toJSON + + /** + * Unique field id. + * @type {number} + */ + this.id = id; // toJSON, marker + + /** + * Extended type if different from parent. + * @type {string|undefined} + */ + this.extend = extend || undefined; // toJSON + + /** + * Whether this field is required. + * @type {boolean} + */ + this.required = rule === "required"; + + /** + * Whether this field is optional. + * @type {boolean} + */ + this.optional = !this.required; + + /** + * Whether this field is repeated. + * @type {boolean} + */ + this.repeated = rule === "repeated"; + + /** + * Whether this field is a map or not. + * @type {boolean} + */ + this.map = false; + + /** + * Message this field belongs to. + * @type {Type|null} + */ + this.message = null; + + /** + * OneOf this field belongs to, if any, + * @type {OneOf|null} + */ + this.partOf = null; + + /** + * The field type's default value. + * @type {*} + */ + this.typeDefault = null; + + /** + * The field's default value on prototypes. + * @type {*} + */ + this.defaultValue = null; + + /** + * Whether this field's value should be treated as a long. + * @type {boolean} + */ + this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; + + /** + * Whether this field's value is a buffer. + * @type {boolean} + */ + this.bytes = type === "bytes"; + + /** + * Resolved type if not a basic type. + * @type {Type|Enum|null} + */ + this.resolvedType = null; + + /** + * Sister-field within the extended type if a declaring extension field. + * @type {Field|null} + */ + this.extensionField = null; + + /** + * Sister-field within the declaring namespace if an extended field. + * @type {Field|null} + */ + this.declaringField = null; + + /** + * Internally remembers whether this field is packed. + * @type {boolean|null} + * @private + */ + this._packed = null; + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Determines whether this field is packed. Only relevant when repeated and working with proto2. + * @name Field#packed + * @type {boolean} + * @readonly + */ +Object.defineProperty(Field.prototype, "packed", { + get: function() { + // defaults to packed=true if not explicity set to false + if (this._packed === null) + this._packed = this.getOption("packed") !== false; + return this._packed; + } +}); + +/** + * @override + */ +Field.prototype.setOption = function setOption(name, value, ifNotSet) { + if (name === "packed") // clear cached before setting + this._packed = null; + return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); +}; + +/** + * Field descriptor. + * @interface IField + * @property {string} [rule="optional"] Field rule + * @property {string} type Field type + * @property {number} id Field id + * @property {Object.} [options] Field options + */ + +/** + * Extension field descriptor. + * @interface IExtensionField + * @extends IField + * @property {string} extend Extended type + */ + +/** + * Converts this field to a field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IField} Field descriptor + */ +Field.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "rule" , this.rule !== "optional" && this.rule || undefined, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Resolves this field's type references. + * @returns {Field} `this` + * @throws {Error} If any reference cannot be resolved + */ +Field.prototype.resolve = function resolve() { + + if (this.resolved) + return this; + + if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it + this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); + if (this.resolvedType instanceof Type) + this.typeDefault = null; + else // instanceof Enum + this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined + } else if (this.options && this.options.proto3_optional) { + // proto3 scalar value marked optional; should default to null + this.typeDefault = null; + } + + // use explicitly set default value if present + if (this.options && this.options["default"] != null) { + this.typeDefault = this.options["default"]; + if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") + this.typeDefault = this.resolvedType.values[this.typeDefault]; + } + + // remove unnecessary options + if (this.options) { + if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) + delete this.options.packed; + if (!Object.keys(this.options).length) + this.options = undefined; + } + + // convert to internal data type if necesssary + if (this.long) { + this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"); + + /* istanbul ignore else */ + if (Object.freeze) + Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + + } else if (this.bytes && typeof this.typeDefault === "string") { + var buf; + if (util.base64.test(this.typeDefault)) + util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); + else + util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); + this.typeDefault = buf; + } + + // take special care of maps and repeated fields + if (this.map) + this.defaultValue = util.emptyObject; + else if (this.repeated) + this.defaultValue = util.emptyArray; + else + this.defaultValue = this.typeDefault; + + // ensure proper value on prototype + if (this.parent instanceof Type) + this.parent.ctor.prototype[this.name] = this.defaultValue; + + return ReflectionObject.prototype.resolve.call(this); +}; + +/** + * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). + * @typedef FieldDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} fieldName Field name + * @returns {undefined} + */ + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @param {T} [defaultValue] Default value + * @returns {FieldDecorator} Decorator function + * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] + */ +Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { + + // submessage: decorate the submessage and use its name as the type + if (typeof fieldType === "function") + fieldType = util.decorateType(fieldType).name; + + // enum reference: create a reflected copy of the enum and keep reuseing it + else if (fieldType && typeof fieldType === "object") + fieldType = util.decorateEnum(fieldType).name; + + return function fieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); + }; +}; + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {Constructor|string} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @returns {FieldDecorator} Decorator function + * @template T extends Message + * @variation 2 + */ +// like Field.d but without a default value + +// Sets up cyclic dependencies (called in index-light) +Field._configure = function configure(Type_) { + Type = Type_; +}; + +},{"15":15,"24":24,"36":36,"37":37}],17:[function(require,module,exports){ +"use strict"; +var protobuf = module.exports = require(18); + +protobuf.build = "light"; + +/** + * A node-style callback as used by {@link load} and {@link Root#load}. + * @typedef LoadCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Root} [root] Root, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param {string|string[]} filename One or multiple files to load + * @param {Root} root Root namespace, defaults to create a new one if omitted. + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + */ +function load(filename, root, callback) { + if (typeof root === "function") { + callback = root; + root = new protobuf.Root(); + } else if (!root) + root = new protobuf.Root(); + return root.load(filename, callback); +} + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Promise} Promise + * @see {@link Root#load} + * @variation 3 + */ +// function load(filename:string, [root:Root]):Promise + +protobuf.load = load; + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + * @see {@link Root#loadSync} + */ +function loadSync(filename, root) { + if (!root) + root = new protobuf.Root(); + return root.loadSync(filename); +} + +protobuf.loadSync = loadSync; + +// Serialization +protobuf.encoder = require(14); +protobuf.decoder = require(13); +protobuf.verifier = require(40); +protobuf.converter = require(12); + +// Reflection +protobuf.ReflectionObject = require(24); +protobuf.Namespace = require(23); +protobuf.Root = require(29); +protobuf.Enum = require(15); +protobuf.Type = require(35); +protobuf.Field = require(16); +protobuf.OneOf = require(25); +protobuf.MapField = require(20); +protobuf.Service = require(33); +protobuf.Method = require(22); + +// Runtime +protobuf.Message = require(21); +protobuf.wrappers = require(41); + +// Utility +protobuf.types = require(36); +protobuf.util = require(37); + +// Set up possibly cyclic reflection dependencies +protobuf.ReflectionObject._configure(protobuf.Root); +protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); +protobuf.Root._configure(protobuf.Type); +protobuf.Field._configure(protobuf.Type); + +},{"12":12,"13":13,"14":14,"15":15,"16":16,"18":18,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"29":29,"33":33,"35":35,"36":36,"37":37,"40":40,"41":41}],18:[function(require,module,exports){ +"use strict"; +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = require(42); +protobuf.BufferWriter = require(43); +protobuf.Reader = require(27); +protobuf.BufferReader = require(28); + +// Utility +protobuf.util = require(39); +protobuf.rpc = require(31); +protobuf.roots = require(30); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + +},{"27":27,"28":28,"30":30,"31":31,"39":39,"42":42,"43":43}],19:[function(require,module,exports){ +"use strict"; +var protobuf = module.exports = require(17); + +protobuf.build = "full"; + +// Parser +protobuf.tokenize = require(34); +protobuf.parse = require(26); +protobuf.common = require(11); + +// Configure parser +protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); + +},{"11":11,"17":17,"26":26,"34":34}],20:[function(require,module,exports){ +"use strict"; +module.exports = MapField; + +// extends Field +var Field = require(16); +((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; + +var types = require(36), + util = require(37); + +/** + * Constructs a new map field instance. + * @classdesc Reflected map field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} keyType Key type + * @param {string} type Value type + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function MapField(name, id, keyType, type, options, comment) { + Field.call(this, name, id, type, undefined, undefined, options, comment); + + /* istanbul ignore if */ + if (!util.isString(keyType)) + throw TypeError("keyType must be a string"); + + /** + * Key type. + * @type {string} + */ + this.keyType = keyType; // toJSON, marker + + /** + * Resolved key type if not a basic type. + * @type {ReflectionObject|null} + */ + this.resolvedKeyType = null; + + // Overrides Field#map + this.map = true; +} + +/** + * Map field descriptor. + * @interface IMapField + * @extends {IField} + * @property {string} keyType Key type + */ + +/** + * Extension map field descriptor. + * @interface IExtensionMapField + * @extends IMapField + * @property {string} extend Extended type + */ + +/** + * Constructs a map field from a map field descriptor. + * @param {string} name Field name + * @param {IMapField} json Map field descriptor + * @returns {MapField} Created map field + * @throws {TypeError} If arguments are invalid + */ +MapField.fromJSON = function fromJSON(name, json) { + return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); +}; + +/** + * Converts this map field to a map field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMapField} Map field descriptor + */ +MapField.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "keyType" , this.keyType, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +MapField.prototype.resolve = function resolve() { + if (this.resolved) + return this; + + // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" + if (types.mapKey[this.keyType] === undefined) + throw Error("invalid key type: " + this.keyType); + + return Field.prototype.resolve.call(this); +}; + +/** + * Map field decorator (TypeScript). + * @name MapField.d + * @function + * @param {number} fieldId Field id + * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type + * @returns {FieldDecorator} Decorator function + * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } + */ +MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { + + // submessage value: decorate the submessage and use its name as the type + if (typeof fieldValueType === "function") + fieldValueType = util.decorateType(fieldValueType).name; + + // enum reference value: create a reflected copy of the enum and keep reuseing it + else if (fieldValueType && typeof fieldValueType === "object") + fieldValueType = util.decorateEnum(fieldValueType).name; + + return function mapFieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); + }; +}; + +},{"16":16,"36":36,"37":37}],21:[function(require,module,exports){ +"use strict"; +module.exports = Message; + +var util = require(39); + +/** + * Constructs a new message instance. + * @classdesc Abstract runtime message. + * @constructor + * @param {Properties} [properties] Properties to set + * @template T extends object = object + */ +function Message(properties) { + // not used internally + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + this[keys[i]] = properties[keys[i]]; +} + +/** + * Reference to the reflected type. + * @name Message.$type + * @type {Type} + * @readonly + */ + +/** + * Reference to the reflected type. + * @name Message#$type + * @type {Type} + * @readonly + */ + +/*eslint-disable valid-jsdoc*/ + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message} Message instance + * @template T extends Message + * @this Constructor + */ +Message.create = function create(properties) { + return this.$type.create(properties); +}; + +/** + * Encodes a message of this type. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encode = function encode(message, writer) { + return this.$type.encode(message, writer); +}; + +/** + * Encodes a message of this type preceeded by its length as a varint. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.$type.encodeDelimited(message, writer); +}; + +/** + * Decodes a message of this type. + * @name Message.decode + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decode = function decode(reader) { + return this.$type.decode(reader); +}; + +/** + * Decodes a message of this type preceeded by its length as a varint. + * @name Message.decodeDelimited + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decodeDelimited = function decodeDelimited(reader) { + return this.$type.decodeDelimited(reader); +}; + +/** + * Verifies a message of this type. + * @name Message.verify + * @function + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ +Message.verify = function verify(message) { + return this.$type.verify(message); +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object + * @returns {T} Message instance + * @template T extends Message + * @this Constructor + */ +Message.fromObject = function fromObject(object) { + return this.$type.fromObject(object); +}; + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {T} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @template T extends Message + * @this Constructor + */ +Message.toObject = function toObject(message, options) { + return this.$type.toObject(message, options); +}; + +/** + * Converts this message to JSON. + * @returns {Object.} JSON object + */ +Message.prototype.toJSON = function toJSON() { + return this.$type.toObject(this, util.toJSONOptions); +}; + +/*eslint-enable valid-jsdoc*/ +},{"39":39}],22:[function(require,module,exports){ +"use strict"; +module.exports = Method; + +// extends ReflectionObject +var ReflectionObject = require(24); +((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; + +var util = require(37); + +/** + * Constructs a new service method instance. + * @classdesc Reflected service method. + * @extends ReflectionObject + * @constructor + * @param {string} name Method name + * @param {string|undefined} type Method type, usually `"rpc"` + * @param {string} requestType Request message type + * @param {string} responseType Response message type + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this method + * @param {Object.} [parsedOptions] Declared options, properly parsed into an object + */ +function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { + + /* istanbul ignore next */ + if (util.isObject(requestStream)) { + options = requestStream; + requestStream = responseStream = undefined; + } else if (util.isObject(responseStream)) { + options = responseStream; + responseStream = undefined; + } + + /* istanbul ignore if */ + if (!(type === undefined || util.isString(type))) + throw TypeError("type must be a string"); + + /* istanbul ignore if */ + if (!util.isString(requestType)) + throw TypeError("requestType must be a string"); + + /* istanbul ignore if */ + if (!util.isString(responseType)) + throw TypeError("responseType must be a string"); + + ReflectionObject.call(this, name, options); + + /** + * Method type. + * @type {string} + */ + this.type = type || "rpc"; // toJSON + + /** + * Request type. + * @type {string} + */ + this.requestType = requestType; // toJSON, marker + + /** + * Whether requests are streamed or not. + * @type {boolean|undefined} + */ + this.requestStream = requestStream ? true : undefined; // toJSON + + /** + * Response type. + * @type {string} + */ + this.responseType = responseType; // toJSON + + /** + * Whether responses are streamed or not. + * @type {boolean|undefined} + */ + this.responseStream = responseStream ? true : undefined; // toJSON + + /** + * Resolved request type. + * @type {Type|null} + */ + this.resolvedRequestType = null; + + /** + * Resolved response type. + * @type {Type|null} + */ + this.resolvedResponseType = null; + + /** + * Comment for this method + * @type {string|null} + */ + this.comment = comment; + + /** + * Options properly parsed into an object + */ + this.parsedOptions = parsedOptions; +} + +/** + * Method descriptor. + * @interface IMethod + * @property {string} [type="rpc"] Method type + * @property {string} requestType Request type + * @property {string} responseType Response type + * @property {boolean} [requestStream=false] Whether requests are streamed + * @property {boolean} [responseStream=false] Whether responses are streamed + * @property {Object.} [options] Method options + * @property {string} comment Method comments + * @property {Object.} [parsedOptions] Method options properly parsed into an object + */ + +/** + * Constructs a method from a method descriptor. + * @param {string} name Method name + * @param {IMethod} json Method descriptor + * @returns {Method} Created method + * @throws {TypeError} If arguments are invalid + */ +Method.fromJSON = function fromJSON(name, json) { + return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); +}; + +/** + * Converts this method to a method descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMethod} Method descriptor + */ +Method.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, + "requestType" , this.requestType, + "requestStream" , this.requestStream, + "responseType" , this.responseType, + "responseStream" , this.responseStream, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined, + "parsedOptions" , this.parsedOptions, + ]); +}; + +/** + * @override + */ +Method.prototype.resolve = function resolve() { + + /* istanbul ignore if */ + if (this.resolved) + return this; + + this.resolvedRequestType = this.parent.lookupType(this.requestType); + this.resolvedResponseType = this.parent.lookupType(this.responseType); + + return ReflectionObject.prototype.resolve.call(this); +}; + +},{"24":24,"37":37}],23:[function(require,module,exports){ +"use strict"; +module.exports = Namespace; + +// extends ReflectionObject +var ReflectionObject = require(24); +((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; + +var Field = require(16), + util = require(37), + OneOf = require(25); + +var Type, // cyclic + Service, + Enum; + +/** + * Constructs a new namespace instance. + * @name Namespace + * @classdesc Reflected namespace. + * @extends NamespaceBase + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a namespace from JSON. + * @memberof Namespace + * @function + * @param {string} name Namespace name + * @param {Object.} json JSON object + * @returns {Namespace} Created namespace + * @throws {TypeError} If arguments are invalid + */ +Namespace.fromJSON = function fromJSON(name, json) { + return new Namespace(name, json.options).addJSON(json.nested); +}; + +/** + * Converts an array of reflection objects to JSON. + * @memberof Namespace + * @param {ReflectionObject[]} array Object array + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {Object.|undefined} JSON object or `undefined` when array is empty + */ +function arrayToJSON(array, toJSONOptions) { + if (!(array && array.length)) + return undefined; + var obj = {}; + for (var i = 0; i < array.length; ++i) + obj[array[i].name] = array[i].toJSON(toJSONOptions); + return obj; +} + +Namespace.arrayToJSON = arrayToJSON; + +/** + * Tests if the specified id is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedId = function isReservedId(reserved, id) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) + return true; + return false; +}; + +/** + * Tests if the specified name is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedName = function isReservedName(reserved, name) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (reserved[i] === name) + return true; + return false; +}; + +/** + * Not an actual constructor. Use {@link Namespace} instead. + * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. + * @exports NamespaceBase + * @extends ReflectionObject + * @abstract + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + * @see {@link Namespace} + */ +function Namespace(name, options) { + ReflectionObject.call(this, name, options); + + /** + * Nested objects by name. + * @type {Object.|undefined} + */ + this.nested = undefined; // toJSON + + /** + * Cached nested objects as an array. + * @type {ReflectionObject[]|null} + * @private + */ + this._nestedArray = null; +} + +function clearCache(namespace) { + namespace._nestedArray = null; + return namespace; +} + +/** + * Nested objects of this namespace as an array for iteration. + * @name NamespaceBase#nestedArray + * @type {ReflectionObject[]} + * @readonly + */ +Object.defineProperty(Namespace.prototype, "nestedArray", { + get: function() { + return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); + } +}); + +/** + * Namespace descriptor. + * @interface INamespace + * @property {Object.} [options] Namespace options + * @property {Object.} [nested] Nested object descriptors + */ + +/** + * Any extension field descriptor. + * @typedef AnyExtensionField + * @type {IExtensionField|IExtensionMapField} + */ + +/** + * Any nested object descriptor. + * @typedef AnyNestedObject + * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} + */ + +/** + * Converts this namespace to a namespace descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {INamespace} Namespace descriptor + */ +Namespace.prototype.toJSON = function toJSON(toJSONOptions) { + return util.toObject([ + "options" , this.options, + "nested" , arrayToJSON(this.nestedArray, toJSONOptions) + ]); +}; + +/** + * Adds nested objects to this namespace from nested object descriptors. + * @param {Object.} nestedJson Any nested object descriptors + * @returns {Namespace} `this` + */ +Namespace.prototype.addJSON = function addJSON(nestedJson) { + var ns = this; + /* istanbul ignore else */ + if (nestedJson) { + for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { + nested = nestedJson[names[i]]; + ns.add( // most to least likely + ( nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : nested.id !== undefined + ? Field.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + } + return this; +}; + +/** + * Gets the nested object of the specified name. + * @param {string} name Nested object name + * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist + */ +Namespace.prototype.get = function get(name) { + return this.nested && this.nested[name] + || null; +}; + +/** + * Gets the values of the nested {@link Enum|enum} of the specified name. + * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. + * @param {string} name Nested enum name + * @returns {Object.} Enum values + * @throws {Error} If there is no such enum + */ +Namespace.prototype.getEnum = function getEnum(name) { + if (this.nested && this.nested[name] instanceof Enum) + return this.nested[name].values; + throw Error("no such enum: " + name); +}; + +/** + * Adds a nested object to this namespace. + * @param {ReflectionObject} object Nested object to add + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name + */ +Namespace.prototype.add = function add(object) { + + if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) + throw TypeError("object must be a valid nested object"); + + if (!this.nested) + this.nested = {}; + else { + var prev = this.get(object.name); + if (prev) { + if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { + // replace plain namespace but keep existing nested elements and options + var nested = prev.nestedArray; + for (var i = 0; i < nested.length; ++i) + object.add(nested[i]); + this.remove(prev); + if (!this.nested) + this.nested = {}; + object.setOptions(prev.options, true); + + } else + throw Error("duplicate name '" + object.name + "' in " + this); + } + } + this.nested[object.name] = object; + object.onAdd(this); + return clearCache(this); +}; + +/** + * Removes a nested object from this namespace. + * @param {ReflectionObject} object Nested object to remove + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this namespace + */ +Namespace.prototype.remove = function remove(object) { + + if (!(object instanceof ReflectionObject)) + throw TypeError("object must be a ReflectionObject"); + if (object.parent !== this) + throw Error(object + " is not a member of " + this); + + delete this.nested[object.name]; + if (!Object.keys(this.nested).length) + this.nested = undefined; + + object.onRemove(this); + return clearCache(this); +}; + +/** + * Defines additial namespaces within this one if not yet existing. + * @param {string|string[]} path Path to create + * @param {*} [json] Nested types to create from JSON + * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty + */ +Namespace.prototype.define = function define(path, json) { + + if (util.isString(path)) + path = path.split("."); + else if (!Array.isArray(path)) + throw TypeError("illegal path"); + if (path && path.length && path[0] === "") + throw Error("path must be relative"); + + var ptr = this; + while (path.length > 0) { + var part = path.shift(); + if (ptr.nested && ptr.nested[part]) { + ptr = ptr.nested[part]; + if (!(ptr instanceof Namespace)) + throw Error("path conflicts with non-namespace objects"); + } else + ptr.add(ptr = new Namespace(part)); + } + if (json) + ptr.addJSON(json); + return ptr; +}; + +/** + * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. + * @returns {Namespace} `this` + */ +Namespace.prototype.resolveAll = function resolveAll() { + var nested = this.nestedArray, i = 0; + while (i < nested.length) + if (nested[i] instanceof Namespace) + nested[i++].resolveAll(); + else + nested[i++].resolve(); + return this.resolve(); +}; + +/** + * Recursively looks up the reflection object matching the specified path in the scope of this namespace. + * @param {string|string[]} path Path to look up + * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. + * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + */ +Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { + + /* istanbul ignore next */ + if (typeof filterTypes === "boolean") { + parentAlreadyChecked = filterTypes; + filterTypes = undefined; + } else if (filterTypes && !Array.isArray(filterTypes)) + filterTypes = [ filterTypes ]; + + if (util.isString(path) && path.length) { + if (path === ".") + return this.root; + path = path.split("."); + } else if (!path.length) + return this; + + // Start at root if path is absolute + if (path[0] === "") + return this.root.lookup(path.slice(1), filterTypes); + + // Test if the first part matches any nested object, and if so, traverse if path contains more + var found = this.get(path[0]); + if (found) { + if (path.length === 1) { + if (!filterTypes || filterTypes.indexOf(found.constructor) > -1) + return found; + } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true))) + return found; + + // Otherwise try each nested namespace + } else + for (var i = 0; i < this.nestedArray.length; ++i) + if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true))) + return found; + + // If there hasn't been a match, try again at the parent + if (this.parent === null || parentAlreadyChecked) + return null; + return this.parent.lookup(path, filterTypes); +}; + +/** + * Looks up the reflection object at the specified path, relative to this namespace. + * @name NamespaceBase#lookup + * @function + * @param {string|string[]} path Path to look up + * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + * @variation 2 + */ +// lookup(path: string, [parentAlreadyChecked: boolean]) + +/** + * Looks up the {@link Type|type} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type + * @throws {Error} If `path` does not point to a type + */ +Namespace.prototype.lookupType = function lookupType(path) { + var found = this.lookup(path, [ Type ]); + if (!found) + throw Error("no such type: " + path); + return found; +}; + +/** + * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Enum} Looked up enum + * @throws {Error} If `path` does not point to an enum + */ +Namespace.prototype.lookupEnum = function lookupEnum(path) { + var found = this.lookup(path, [ Enum ]); + if (!found) + throw Error("no such Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type or enum + * @throws {Error} If `path` does not point to a type or enum + */ +Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { + var found = this.lookup(path, [ Type, Enum ]); + if (!found) + throw Error("no such Type or Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Service|service} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Service} Looked up service + * @throws {Error} If `path` does not point to a service + */ +Namespace.prototype.lookupService = function lookupService(path) { + var found = this.lookup(path, [ Service ]); + if (!found) + throw Error("no such Service '" + path + "' in " + this); + return found; +}; + +// Sets up cyclic dependencies (called in index-light) +Namespace._configure = function(Type_, Service_, Enum_) { + Type = Type_; + Service = Service_; + Enum = Enum_; +}; + +},{"16":16,"24":24,"25":25,"37":37}],24:[function(require,module,exports){ +"use strict"; +module.exports = ReflectionObject; + +ReflectionObject.className = "ReflectionObject"; + +var util = require(37); + +var Root; // cyclic + +/** + * Constructs a new reflection object instance. + * @classdesc Base class of all reflection objects. + * @constructor + * @param {string} name Object name + * @param {Object.} [options] Declared options + * @abstract + */ +function ReflectionObject(name, options) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (options && !util.isObject(options)) + throw TypeError("options must be an object"); + + /** + * Options. + * @type {Object.|undefined} + */ + this.options = options; // toJSON + + /** + * Parsed Options. + * @type {Array.>|undefined} + */ + this.parsedOptions = null; + + /** + * Unique name within its namespace. + * @type {string} + */ + this.name = name; + + /** + * Parent namespace. + * @type {Namespace|null} + */ + this.parent = null; + + /** + * Whether already resolved or not. + * @type {boolean} + */ + this.resolved = false; + + /** + * Comment text, if any. + * @type {string|null} + */ + this.comment = null; + + /** + * Defining file name. + * @type {string|null} + */ + this.filename = null; +} + +Object.defineProperties(ReflectionObject.prototype, { + + /** + * Reference to the root namespace. + * @name ReflectionObject#root + * @type {Root} + * @readonly + */ + root: { + get: function() { + var ptr = this; + while (ptr.parent !== null) + ptr = ptr.parent; + return ptr; + } + }, + + /** + * Full name including leading dot. + * @name ReflectionObject#fullName + * @type {string} + * @readonly + */ + fullName: { + get: function() { + var path = [ this.name ], + ptr = this.parent; + while (ptr) { + path.unshift(ptr.name); + ptr = ptr.parent; + } + return path.join("."); + } + } +}); + +/** + * Converts this reflection object to its descriptor representation. + * @returns {Object.} Descriptor + * @abstract + */ +ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { + throw Error(); // not implemented, shouldn't happen +}; + +/** + * Called when this object is added to a parent. + * @param {ReflectionObject} parent Parent added to + * @returns {undefined} + */ +ReflectionObject.prototype.onAdd = function onAdd(parent) { + if (this.parent && this.parent !== parent) + this.parent.remove(this); + this.parent = parent; + this.resolved = false; + var root = parent.root; + if (root instanceof Root) + root._handleAdd(this); +}; + +/** + * Called when this object is removed from a parent. + * @param {ReflectionObject} parent Parent removed from + * @returns {undefined} + */ +ReflectionObject.prototype.onRemove = function onRemove(parent) { + var root = parent.root; + if (root instanceof Root) + root._handleRemove(this); + this.parent = null; + this.resolved = false; +}; + +/** + * Resolves this objects type references. + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.resolve = function resolve() { + if (this.resolved) + return this; + if (this.root instanceof Root) + this.resolved = true; // only if part of a root + return this; +}; + +/** + * Gets an option value. + * @param {string} name Option name + * @returns {*} Option value or `undefined` if not set + */ +ReflectionObject.prototype.getOption = function getOption(name) { + if (this.options) + return this.options[name]; + return undefined; +}; + +/** + * Sets an option. + * @param {string} name Option name + * @param {*} value Option value + * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { + if (!ifNotSet || !this.options || this.options[name] === undefined) + (this.options || (this.options = {}))[name] = value; + return this; +}; + +/** + * Sets a parsed option. + * @param {string} name parsed Option name + * @param {*} value Option value + * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { + if (!this.parsedOptions) { + this.parsedOptions = []; + } + var parsedOptions = this.parsedOptions; + if (propName) { + // If setting a sub property of an option then try to merge it + // with an existing option + var opt = parsedOptions.find(function (opt) { + return Object.prototype.hasOwnProperty.call(opt, name); + }); + if (opt) { + // If we found an existing option - just merge the property value + var newValue = opt[name]; + util.setProperty(newValue, propName, value); + } else { + // otherwise, create a new option, set it's property and add it to the list + opt = {}; + opt[name] = util.setProperty({}, propName, value); + parsedOptions.push(opt); + } + } else { + // Always create a new option when setting the value of the option itself + var newOpt = {}; + newOpt[name] = value; + parsedOptions.push(newOpt); + } + return this; +}; + +/** + * Sets multiple options. + * @param {Object.} options Options to set + * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { + if (options) + for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) + this.setOption(keys[i], options[keys[i]], ifNotSet); + return this; +}; + +/** + * Converts this instance to its string representation. + * @returns {string} Class name[, space, full name] + */ +ReflectionObject.prototype.toString = function toString() { + var className = this.constructor.className, + fullName = this.fullName; + if (fullName.length) + return className + " " + fullName; + return className; +}; + +// Sets up cyclic dependencies (called in index-light) +ReflectionObject._configure = function(Root_) { + Root = Root_; +}; + +},{"37":37}],25:[function(require,module,exports){ +"use strict"; +module.exports = OneOf; + +// extends ReflectionObject +var ReflectionObject = require(24); +((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; + +var Field = require(16), + util = require(37); + +/** + * Constructs a new oneof instance. + * @classdesc Reflected oneof. + * @extends ReflectionObject + * @constructor + * @param {string} name Oneof name + * @param {string[]|Object.} [fieldNames] Field names + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function OneOf(name, fieldNames, options, comment) { + if (!Array.isArray(fieldNames)) { + options = fieldNames; + fieldNames = undefined; + } + ReflectionObject.call(this, name, options); + + /* istanbul ignore if */ + if (!(fieldNames === undefined || Array.isArray(fieldNames))) + throw TypeError("fieldNames must be an Array"); + + /** + * Field names that belong to this oneof. + * @type {string[]} + */ + this.oneof = fieldNames || []; // toJSON, marker + + /** + * Fields that belong to this oneof as an array for iteration. + * @type {Field[]} + * @readonly + */ + this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Oneof descriptor. + * @interface IOneOf + * @property {Array.} oneof Oneof field names + * @property {Object.} [options] Oneof options + */ + +/** + * Constructs a oneof from a oneof descriptor. + * @param {string} name Oneof name + * @param {IOneOf} json Oneof descriptor + * @returns {OneOf} Created oneof + * @throws {TypeError} If arguments are invalid + */ +OneOf.fromJSON = function fromJSON(name, json) { + return new OneOf(name, json.oneof, json.options, json.comment); +}; + +/** + * Converts this oneof to a oneof descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IOneOf} Oneof descriptor + */ +OneOf.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "oneof" , this.oneof, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Adds the fields of the specified oneof to the parent if not already done so. + * @param {OneOf} oneof The oneof + * @returns {undefined} + * @inner + * @ignore + */ +function addFieldsToParent(oneof) { + if (oneof.parent) + for (var i = 0; i < oneof.fieldsArray.length; ++i) + if (!oneof.fieldsArray[i].parent) + oneof.parent.add(oneof.fieldsArray[i]); +} + +/** + * Adds a field to this oneof and removes it from its current parent, if any. + * @param {Field} field Field to add + * @returns {OneOf} `this` + */ +OneOf.prototype.add = function add(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + if (field.parent && field.parent !== this.parent) + field.parent.remove(field); + this.oneof.push(field.name); + this.fieldsArray.push(field); + field.partOf = this; // field.parent remains null + addFieldsToParent(this); + return this; +}; + +/** + * Removes a field from this oneof and puts it back to the oneof's parent. + * @param {Field} field Field to remove + * @returns {OneOf} `this` + */ +OneOf.prototype.remove = function remove(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + var index = this.fieldsArray.indexOf(field); + + /* istanbul ignore if */ + if (index < 0) + throw Error(field + " is not a member of " + this); + + this.fieldsArray.splice(index, 1); + index = this.oneof.indexOf(field.name); + + /* istanbul ignore else */ + if (index > -1) // theoretical + this.oneof.splice(index, 1); + + field.partOf = null; + return this; +}; + +/** + * @override + */ +OneOf.prototype.onAdd = function onAdd(parent) { + ReflectionObject.prototype.onAdd.call(this, parent); + var self = this; + // Collect present fields + for (var i = 0; i < this.oneof.length; ++i) { + var field = parent.get(this.oneof[i]); + if (field && !field.partOf) { + field.partOf = self; + self.fieldsArray.push(field); + } + } + // Add not yet present fields + addFieldsToParent(this); +}; + +/** + * @override + */ +OneOf.prototype.onRemove = function onRemove(parent) { + for (var i = 0, field; i < this.fieldsArray.length; ++i) + if ((field = this.fieldsArray[i]).parent) + field.parent.remove(field); + ReflectionObject.prototype.onRemove.call(this, parent); +}; + +/** + * Decorator function as returned by {@link OneOf.d} (TypeScript). + * @typedef OneOfDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} oneofName OneOf name + * @returns {undefined} + */ + +/** + * OneOf decorator (TypeScript). + * @function + * @param {...string} fieldNames Field names + * @returns {OneOfDecorator} Decorator function + * @template T extends string + */ +OneOf.d = function decorateOneOf() { + var fieldNames = new Array(arguments.length), + index = 0; + while (index < arguments.length) + fieldNames[index] = arguments[index++]; + return function oneOfDecorator(prototype, oneofName) { + util.decorateType(prototype.constructor) + .add(new OneOf(oneofName, fieldNames)); + Object.defineProperty(prototype, oneofName, { + get: util.oneOfGetter(fieldNames), + set: util.oneOfSetter(fieldNames) + }); + }; +}; + +},{"16":16,"24":24,"37":37}],26:[function(require,module,exports){ +"use strict"; +module.exports = parse; + +parse.filename = null; +parse.defaults = { keepCase: false }; + +var tokenize = require(34), + Root = require(29), + Type = require(35), + Field = require(16), + MapField = require(20), + OneOf = require(25), + Enum = require(15), + Service = require(33), + Method = require(22), + types = require(36), + util = require(37); + +var base10Re = /^[1-9][0-9]*$/, + base10NegRe = /^-?[1-9][0-9]*$/, + base16Re = /^0[x][0-9a-fA-F]+$/, + base16NegRe = /^-?0[x][0-9a-fA-F]+$/, + base8Re = /^0[0-7]+$/, + base8NegRe = /^-?0[0-7]+$/, + numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, + nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, + typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, + fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/; + +/** + * Result object returned from {@link parse}. + * @interface IParserResult + * @property {string|undefined} package Package name, if declared + * @property {string[]|undefined} imports Imports, if any + * @property {string[]|undefined} weakImports Weak imports, if any + * @property {string|undefined} syntax Syntax, if specified (either `"proto2"` or `"proto3"`) + * @property {Root} root Populated root instance + */ + +/** + * Options modifying the behavior of {@link parse}. + * @interface IParseOptions + * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case + * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. + * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. + */ + +/** + * Options modifying the behavior of JSON serialization. + * @interface IToJSONOptions + * @property {boolean} [keepComments=false] Serializes comments. + */ + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @param {string} source Source contents + * @param {Root} root Root to populate + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + */ +function parse(source, root, options) { + /* eslint-disable callback-return */ + if (!(root instanceof Root)) { + options = root; + root = new Root(); + } + if (!options) + options = parse.defaults; + + var preferTrailingComment = options.preferTrailingComment || false; + var tn = tokenize(source, options.alternateCommentMode || false), + next = tn.next, + push = tn.push, + peek = tn.peek, + skip = tn.skip, + cmnt = tn.cmnt; + + var head = true, + pkg, + imports, + weakImports, + syntax, + isProto3 = false; + + var ptr = root; + + var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; + + /* istanbul ignore next */ + function illegal(token, name, insideTryCatch) { + var filename = parse.filename; + if (!insideTryCatch) + parse.filename = null; + return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); + } + + function readString() { + var values = [], + token; + do { + /* istanbul ignore if */ + if ((token = next()) !== "\"" && token !== "'") + throw illegal(token); + + values.push(next()); + skip(token); + token = peek(); + } while (token === "\"" || token === "'"); + return values.join(""); + } + + function readValue(acceptTypeRef) { + var token = next(); + switch (token) { + case "'": + case "\"": + push(token); + return readString(); + case "true": case "TRUE": + return true; + case "false": case "FALSE": + return false; + } + try { + return parseNumber(token, /* insideTryCatch */ true); + } catch (e) { + + /* istanbul ignore else */ + if (acceptTypeRef && typeRefRe.test(token)) + return token; + + /* istanbul ignore next */ + throw illegal(token, "value"); + } + } + + function readRanges(target, acceptStrings) { + var token, start; + do { + if (acceptStrings && ((token = peek()) === "\"" || token === "'")) + target.push(readString()); + else + target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); + } while (skip(",", true)); + var dummy = {options: undefined}; + dummy.setOption = function(name, value) { + if (this.options === undefined) this.options = {}; + this.options[name] = value; + }; + ifBlock( + dummy, + function parseRange_block(token) { + /* istanbul ignore else */ + if (token === "option") { + parseOption(dummy, token); // skip + skip(";"); + } else + throw illegal(token); + }, + function parseRange_line() { + parseInlineOptions(dummy); // skip + }); + } + + function parseNumber(token, insideTryCatch) { + var sign = 1; + if (token.charAt(0) === "-") { + sign = -1; + token = token.substring(1); + } + switch (token) { + case "inf": case "INF": case "Inf": + return sign * Infinity; + case "nan": case "NAN": case "Nan": case "NaN": + return NaN; + case "0": + return 0; + } + if (base10Re.test(token)) + return sign * parseInt(token, 10); + if (base16Re.test(token)) + return sign * parseInt(token, 16); + if (base8Re.test(token)) + return sign * parseInt(token, 8); + + /* istanbul ignore else */ + if (numberRe.test(token)) + return sign * parseFloat(token); + + /* istanbul ignore next */ + throw illegal(token, "number", insideTryCatch); + } + + function parseId(token, acceptNegative) { + switch (token) { + case "max": case "MAX": case "Max": + return 536870911; + case "0": + return 0; + } + + /* istanbul ignore if */ + if (!acceptNegative && token.charAt(0) === "-") + throw illegal(token, "id"); + + if (base10NegRe.test(token)) + return parseInt(token, 10); + if (base16NegRe.test(token)) + return parseInt(token, 16); + + /* istanbul ignore else */ + if (base8NegRe.test(token)) + return parseInt(token, 8); + + /* istanbul ignore next */ + throw illegal(token, "id"); + } + + function parsePackage() { + + /* istanbul ignore if */ + if (pkg !== undefined) + throw illegal("package"); + + pkg = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(pkg)) + throw illegal(pkg, "name"); + + ptr = ptr.define(pkg); + skip(";"); + } + + function parseImport() { + var token = peek(); + var whichImports; + switch (token) { + case "weak": + whichImports = weakImports || (weakImports = []); + next(); + break; + case "public": + next(); + // eslint-disable-next-line no-fallthrough + default: + whichImports = imports || (imports = []); + break; + } + token = readString(); + skip(";"); + whichImports.push(token); + } + + function parseSyntax() { + skip("="); + syntax = readString(); + isProto3 = syntax === "proto3"; + + /* istanbul ignore if */ + if (!isProto3 && syntax !== "proto2") + throw illegal(syntax, "syntax"); + + skip(";"); + } + + function parseCommon(parent, token) { + switch (token) { + + case "option": + parseOption(parent, token); + skip(";"); + return true; + + case "message": + parseType(parent, token); + return true; + + case "enum": + parseEnum(parent, token); + return true; + + case "service": + parseService(parent, token); + return true; + + case "extend": + parseExtension(parent, token); + return true; + } + return false; + } + + function ifBlock(obj, fnIf, fnElse) { + var trailingLine = tn.line; + if (obj) { + if(typeof obj.comment !== "string") { + obj.comment = cmnt(); // try block-type comment + } + obj.filename = parse.filename; + } + if (skip("{", true)) { + var token; + while ((token = next()) !== "}") + fnIf(token); + skip(";", true); + } else { + if (fnElse) + fnElse(); + skip(";"); + if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) + obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment + } + } + + function parseType(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "type name"); + + var type = new Type(token); + ifBlock(type, function parseType_block(token) { + if (parseCommon(type, token)) + return; + + switch (token) { + + case "map": + parseMapField(type, token); + break; + + case "required": + case "repeated": + parseField(type, token); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(type, "proto3_optional"); + } else { + parseField(type, "optional"); + } + break; + + case "oneof": + parseOneOf(type, token); + break; + + case "extensions": + readRanges(type.extensions || (type.extensions = [])); + break; + + case "reserved": + readRanges(type.reserved || (type.reserved = []), true); + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + + push(token); + parseField(type, "optional"); + break; + } + }); + parent.add(type); + } + + function parseField(parent, rule, extend) { + var type = next(); + if (type === "group") { + parseGroup(parent, rule); + return; + } + // Type names can consume multiple tokens, in multiple variants: + // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" + // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" + // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" + // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" + // Keep reading tokens until we get a type name with no period at the end, + // and the next token does not start with a period. + while (type.endsWith(".") || peek().startsWith(".")) { + type += next(); + } + + /* istanbul ignore if */ + if (!typeRefRe.test(type)) + throw illegal(type, "type"); + + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + name = applyCase(name); + skip("="); + + var field = new Field(name, parseId(next()), type, rule, extend); + ifBlock(field, function parseField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseField_line() { + parseInlineOptions(field); + }); + + if (rule === "proto3_optional") { + // for proto3 optional fields, we create a single-member Oneof to mimic "optional" behavior + var oneof = new OneOf("_" + name); + field.setOption("proto3_optional", true); + oneof.add(field); + parent.add(oneof); + } else { + parent.add(field); + } + + // JSON defaults to packed=true if not set so we have to set packed=false explicity when + // parsing proto2 descriptors without the option, where applicable. This must be done for + // all known packable types and anything that could be an enum (= is not a basic type). + if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined)) + field.setOption("packed", false, /* ifNotSet */ true); + } + + function parseGroup(parent, rule) { + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + var fieldName = util.lcFirst(name); + if (name === fieldName) + name = util.ucFirst(name); + skip("="); + var id = parseId(next()); + var type = new Type(name); + type.group = true; + var field = new Field(fieldName, id, name, rule); + field.filename = parse.filename; + ifBlock(type, function parseGroup_block(token) { + switch (token) { + + case "option": + parseOption(type, token); + skip(";"); + break; + + case "required": + case "repeated": + parseField(type, token); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(type, "proto3_optional"); + } else { + parseField(type, "optional"); + } + break; + + case "message": + parseType(type, token); + break; + + case "enum": + parseEnum(type, token); + break; + + /* istanbul ignore next */ + default: + throw illegal(token); // there are no groups with proto3 semantics + } + }); + parent.add(type) + .add(field); + } + + function parseMapField(parent) { + skip("<"); + var keyType = next(); + + /* istanbul ignore if */ + if (types.mapKey[keyType] === undefined) + throw illegal(keyType, "type"); + + skip(","); + var valueType = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(valueType)) + throw illegal(valueType, "type"); + + skip(">"); + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + skip("="); + var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); + ifBlock(field, function parseMapField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseMapField_line() { + parseInlineOptions(field); + }); + parent.add(field); + } + + function parseOneOf(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var oneof = new OneOf(applyCase(token)); + ifBlock(oneof, function parseOneOf_block(token) { + if (token === "option") { + parseOption(oneof, token); + skip(";"); + } else { + push(token); + parseField(oneof, "optional"); + } + }); + parent.add(oneof); + } + + function parseEnum(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var enm = new Enum(token); + ifBlock(enm, function parseEnum_block(token) { + switch(token) { + case "option": + parseOption(enm, token); + skip(";"); + break; + + case "reserved": + readRanges(enm.reserved || (enm.reserved = []), true); + break; + + default: + parseEnumValue(enm, token); + } + }); + parent.add(enm); + } + + function parseEnumValue(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token)) + throw illegal(token, "name"); + + skip("="); + var value = parseId(next(), true), + dummy = { + options: undefined + }; + dummy.setOption = function(name, value) { + if (this.options === undefined) + this.options = {}; + this.options[name] = value; + }; + ifBlock(dummy, function parseEnumValue_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(dummy, token); // skip + skip(";"); + } else + throw illegal(token); + + }, function parseEnumValue_line() { + parseInlineOptions(dummy); // skip + }); + parent.add(token, value, dummy.comment, dummy.options); + } + + function parseOption(parent, token) { + var isCustom = skip("(", true); + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "name"); + + var name = token; + var option = name; + var propName; + + if (isCustom) { + skip(")"); + name = "(" + name + ")"; + option = name; + token = peek(); + if (fqTypeRefRe.test(token)) { + propName = token.slice(1); //remove '.' before property name + name += token; + next(); + } + } + skip("="); + var optionValue = parseOptionValue(parent, name); + setParsedOption(parent, option, optionValue, propName); + } + + function parseOptionValue(parent, name) { + // { a: "foo" b { c: "bar" } } + if (skip("{", true)) { + var objectResult = {}; + + while (!skip("}", true)) { + /* istanbul ignore if */ + if (!nameRe.test(token = next())) { + throw illegal(token, "name"); + } + if (token === null) { + throw illegal(token, "end of input"); + } + + var value; + var propName = token; + + skip(":", true); + + if (peek() === "{") + value = parseOptionValue(parent, name + "." + token); + else if (peek() === "[") { + // option (my_option) = { + // repeated_value: [ "foo", "bar" ] + // }; + value = []; + var lastValue; + if (skip("[", true)) { + do { + lastValue = readValue(true); + value.push(lastValue); + } while (skip(",", true)); + skip("]"); + if (typeof lastValue !== "undefined") { + setOption(parent, name + "." + token, lastValue); + } + } + } else { + value = readValue(true); + setOption(parent, name + "." + token, value); + } + + var prevValue = objectResult[propName]; + + if (prevValue) + value = [].concat(prevValue).concat(value); + + objectResult[propName] = value; + + // Semicolons and commas can be optional + skip(",", true); + skip(";", true); + } + + return objectResult; + } + + var simpleValue = readValue(true); + setOption(parent, name, simpleValue); + return simpleValue; + // Does not enforce a delimiter to be universal + } + + function setOption(parent, name, value) { + if (parent.setOption) + parent.setOption(name, value); + } + + function setParsedOption(parent, name, value, propName) { + if (parent.setParsedOption) + parent.setParsedOption(name, value, propName); + } + + function parseInlineOptions(parent) { + if (skip("[", true)) { + do { + parseOption(parent, "option"); + } while (skip(",", true)); + skip("]"); + } + return parent; + } + + function parseService(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "service name"); + + var service = new Service(token); + ifBlock(service, function parseService_block(token) { + if (parseCommon(service, token)) + return; + + /* istanbul ignore else */ + if (token === "rpc") + parseMethod(service, token); + else + throw illegal(token); + }); + parent.add(service); + } + + function parseMethod(parent, token) { + // Get the comment of the preceding line now (if one exists) in case the + // method is defined across multiple lines. + var commentText = cmnt(); + + var type = token; + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var name = token, + requestType, requestStream, + responseType, responseStream; + + skip("("); + if (skip("stream", true)) + requestStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + requestType = token; + skip(")"); skip("returns"); skip("("); + if (skip("stream", true)) + responseStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + responseType = token; + skip(")"); + + var method = new Method(name, type, requestType, responseType, requestStream, responseStream); + method.comment = commentText; + ifBlock(method, function parseMethod_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(method, token); + skip(";"); + } else + throw illegal(token); + + }); + parent.add(method); + } + + function parseExtension(parent, token) { + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "reference"); + + var reference = token; + ifBlock(null, function parseExtension_block(token) { + switch (token) { + + case "required": + case "repeated": + parseField(parent, token, reference); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(parent, "proto3_optional", reference); + } else { + parseField(parent, "optional", reference); + } + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + push(token); + parseField(parent, "optional", reference); + break; + } + }); + } + + var token; + while ((token = next()) !== null) { + switch (token) { + + case "package": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parsePackage(); + break; + + case "import": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseImport(); + break; + + case "syntax": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseSyntax(); + break; + + case "option": + + parseOption(ptr, token); + skip(";"); + break; + + default: + + /* istanbul ignore else */ + if (parseCommon(ptr, token)) { + head = false; + continue; + } + + /* istanbul ignore next */ + throw illegal(token); + } + } + + parse.filename = null; + return { + "package" : pkg, + "imports" : imports, + weakImports : weakImports, + syntax : syntax, + root : root + }; +} + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @name parse + * @function + * @param {string} source Source contents + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + * @variation 2 + */ + +},{"15":15,"16":16,"20":20,"22":22,"25":25,"29":29,"33":33,"34":34,"35":35,"36":36,"37":37}],27:[function(require,module,exports){ +"use strict"; +module.exports = Reader; + +var util = require(39); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + +},{"39":39}],28:[function(require,module,exports){ +"use strict"; +module.exports = BufferReader; + +// extends Reader +var Reader = require(27); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = require(39); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + +},{"27":27,"39":39}],29:[function(require,module,exports){ +"use strict"; +module.exports = Root; + +// extends Namespace +var Namespace = require(23); +((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; + +var Field = require(16), + Enum = require(15), + OneOf = require(25), + util = require(37); + +var Type, // cyclic + parse, // might be excluded + common; // " + +/** + * Constructs a new root namespace instance. + * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. + * @extends NamespaceBase + * @constructor + * @param {Object.} [options] Top level options + */ +function Root(options) { + Namespace.call(this, "", options); + + /** + * Deferred extension fields. + * @type {Field[]} + */ + this.deferred = []; + + /** + * Resolved file names of loaded files. + * @type {string[]} + */ + this.files = []; +} + +/** + * Loads a namespace descriptor into a root namespace. + * @param {INamespace} json Nameespace descriptor + * @param {Root} [root] Root namespace, defaults to create a new one if omitted + * @returns {Root} Root namespace + */ +Root.fromJSON = function fromJSON(json, root) { + if (!root) + root = new Root(); + if (json.options) + root.setOptions(json.options); + return root.addJSON(json.nested); +}; + +/** + * Resolves the path of an imported file, relative to the importing origin. + * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. + * @function + * @param {string} origin The file name of the importing file + * @param {string} target The file name being imported + * @returns {string|null} Resolved path to `target` or `null` to skip the file + */ +Root.prototype.resolvePath = util.path.resolve; + +/** + * Fetch content from file path or url + * This method exists so you can override it with your own logic. + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.fetch = util.fetch; + +// A symbol-like function to safely signal synchronous loading +/* istanbul ignore next */ +function SYNC() {} // eslint-disable-line no-empty-function + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} options Parse options + * @param {LoadCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.load = function load(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + var self = this; + if (!callback) + return util.asPromise(load, self, filename, options); + + var sync = callback === SYNC; // undocumented + + // Finishes loading by calling the callback (exactly once) + function finish(err, root) { + /* istanbul ignore if */ + if (!callback) + return; + if (sync) + throw err; + var cb = callback; + callback = null; + cb(err, root); + } + + // Bundled definition existence checking + function getBundledFileName(filename) { + var idx = filename.lastIndexOf("google/protobuf/"); + if (idx > -1) { + var altname = filename.substring(idx); + if (altname in common) return altname; + } + return null; + } + + // Processes a single file + function process(filename, source) { + try { + if (util.isString(source) && source.charAt(0) === "{") + source = JSON.parse(source); + if (!util.isString(source)) + self.setOptions(source.options).addJSON(source.nested); + else { + parse.filename = filename; + var parsed = parse(source, self, options), + resolved, + i = 0; + if (parsed.imports) + for (; i < parsed.imports.length; ++i) + if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) + fetch(resolved); + if (parsed.weakImports) + for (i = 0; i < parsed.weakImports.length; ++i) + if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) + fetch(resolved, true); + } + } catch (err) { + finish(err); + } + if (!sync && !queued) + finish(null, self); // only once anyway + } + + // Fetches a single file + function fetch(filename, weak) { + filename = getBundledFileName(filename) || filename; + + // Skip if already loaded / attempted + if (self.files.indexOf(filename) > -1) + return; + self.files.push(filename); + + // Shortcut bundled definitions + if (filename in common) { + if (sync) + process(filename, common[filename]); + else { + ++queued; + setTimeout(function() { + --queued; + process(filename, common[filename]); + }); + } + return; + } + + // Otherwise fetch from disk or network + if (sync) { + var source; + try { + source = util.fs.readFileSync(filename).toString("utf8"); + } catch (err) { + if (!weak) + finish(err); + return; + } + process(filename, source); + } else { + ++queued; + self.fetch(filename, function(err, source) { + --queued; + /* istanbul ignore if */ + if (!callback) + return; // terminated meanwhile + if (err) { + /* istanbul ignore else */ + if (!weak) + finish(err); + else if (!queued) // can't be covered reliably + finish(null, self); + return; + } + process(filename, source); + }); + } + } + var queued = 0; + + // Assembling the root namespace doesn't require working type + // references anymore, so we can load everything in parallel + if (util.isString(filename)) + filename = [ filename ]; + for (var i = 0, resolved; i < filename.length; ++i) + if (resolved = self.resolvePath("", filename[i])) + fetch(resolved); + + if (sync) + return self; + if (!queued) + finish(null, self); + return undefined; +}; +// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Promise} Promise + * @variation 3 + */ +// function load(filename:string, [options:IParseOptions]):Promise + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). + * @function Root#loadSync + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + */ +Root.prototype.loadSync = function loadSync(filename, options) { + if (!util.isNode) + throw Error("not supported"); + return this.load(filename, options, SYNC); +}; + +/** + * @override + */ +Root.prototype.resolveAll = function resolveAll() { + if (this.deferred.length) + throw Error("unresolvable extensions: " + this.deferred.map(function(field) { + return "'extend " + field.extend + "' in " + field.parent.fullName; + }).join(", ")); + return Namespace.prototype.resolveAll.call(this); +}; + +// only uppercased (and thus conflict-free) children are exposed, see below +var exposeRe = /^[A-Z]/; + +/** + * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. + * @param {Root} root Root instance + * @param {Field} field Declaring extension field witin the declaring type + * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise + * @inner + * @ignore + */ +function tryHandleExtension(root, field) { + var extendedType = field.parent.lookup(field.extend); + if (extendedType) { + var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); + //do not allow to extend same field twice to prevent the error + if (extendedType.get(sisterField.name)) { + return true; + } + sisterField.declaringField = field; + field.extensionField = sisterField; + extendedType.add(sisterField); + return true; + } + return false; +} + +/** + * Called when any object is added to this root or its sub-namespaces. + * @param {ReflectionObject} object Object added + * @returns {undefined} + * @private + */ +Root.prototype._handleAdd = function _handleAdd(object) { + if (object instanceof Field) { + + if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) + if (!tryHandleExtension(this, object)) + this.deferred.push(object); + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + object.parent[object.name] = object.values; // expose enum values as property of its parent + + } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { + + if (object instanceof Type) // Try to handle any deferred extensions + for (var i = 0; i < this.deferred.length;) + if (tryHandleExtension(this, this.deferred[i])) + this.deferred.splice(i, 1); + else + ++i; + for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace + this._handleAdd(object._nestedArray[j]); + if (exposeRe.test(object.name)) + object.parent[object.name] = object; // expose namespace as property of its parent + } + + // The above also adds uppercased (and thus conflict-free) nested types, services and enums as + // properties of namespaces just like static code does. This allows using a .d.ts generated for + // a static module with reflection-based solutions where the condition is met. +}; + +/** + * Called when any object is removed from this root or its sub-namespaces. + * @param {ReflectionObject} object Object removed + * @returns {undefined} + * @private + */ +Root.prototype._handleRemove = function _handleRemove(object) { + if (object instanceof Field) { + + if (/* an extension field */ object.extend !== undefined) { + if (/* already handled */ object.extensionField) { // remove its sister field + object.extensionField.parent.remove(object.extensionField); + object.extensionField = null; + } else { // cancel the extension + var index = this.deferred.indexOf(object); + /* istanbul ignore else */ + if (index > -1) + this.deferred.splice(index, 1); + } + } + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose enum values + + } else if (object instanceof Namespace) { + + for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace + this._handleRemove(object._nestedArray[i]); + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose namespaces + + } +}; + +// Sets up cyclic dependencies (called in index-light) +Root._configure = function(Type_, parse_, common_) { + Type = Type_; + parse = parse_; + common = common_; +}; + +},{"15":15,"16":16,"23":23,"25":25,"37":37}],30:[function(require,module,exports){ +"use strict"; +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + +},{}],31:[function(require,module,exports){ +"use strict"; + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = require(32); + +},{"32":32}],32:[function(require,module,exports){ +"use strict"; +module.exports = Service; + +var util = require(39); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + +},{"39":39}],33:[function(require,module,exports){ +"use strict"; +module.exports = Service; + +// extends Namespace +var Namespace = require(23); +((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; + +var Method = require(22), + util = require(37), + rpc = require(31); + +/** + * Constructs a new service instance. + * @classdesc Reflected service. + * @extends NamespaceBase + * @constructor + * @param {string} name Service name + * @param {Object.} [options] Service options + * @throws {TypeError} If arguments are invalid + */ +function Service(name, options) { + Namespace.call(this, name, options); + + /** + * Service methods. + * @type {Object.} + */ + this.methods = {}; // toJSON, marker + + /** + * Cached methods as an array. + * @type {Method[]|null} + * @private + */ + this._methodsArray = null; +} + +/** + * Service descriptor. + * @interface IService + * @extends INamespace + * @property {Object.} methods Method descriptors + */ + +/** + * Constructs a service from a service descriptor. + * @param {string} name Service name + * @param {IService} json Service descriptor + * @returns {Service} Created service + * @throws {TypeError} If arguments are invalid + */ +Service.fromJSON = function fromJSON(name, json) { + var service = new Service(name, json.options); + /* istanbul ignore else */ + if (json.methods) + for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) + service.add(Method.fromJSON(names[i], json.methods[names[i]])); + if (json.nested) + service.addJSON(json.nested); + service.comment = json.comment; + return service; +}; + +/** + * Converts this service to a service descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IService} Service descriptor + */ +Service.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Methods of this service as an array for iteration. + * @name Service#methodsArray + * @type {Method[]} + * @readonly + */ +Object.defineProperty(Service.prototype, "methodsArray", { + get: function() { + return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); + } +}); + +function clearCache(service) { + service._methodsArray = null; + return service; +} + +/** + * @override + */ +Service.prototype.get = function get(name) { + return this.methods[name] + || Namespace.prototype.get.call(this, name); +}; + +/** + * @override + */ +Service.prototype.resolveAll = function resolveAll() { + var methods = this.methodsArray; + for (var i = 0; i < methods.length; ++i) + methods[i].resolve(); + return Namespace.prototype.resolve.call(this); +}; + +/** + * @override + */ +Service.prototype.add = function add(object) { + + /* istanbul ignore if */ + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Method) { + this.methods[object.name] = object; + object.parent = this; + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * @override + */ +Service.prototype.remove = function remove(object) { + if (object instanceof Method) { + + /* istanbul ignore if */ + if (this.methods[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.methods[object.name]; + object.parent = null; + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Creates a runtime service using the specified rpc implementation. + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. + */ +Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { + var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); + for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { + var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); + rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ + m: method, + q: method.resolvedRequestType.ctor, + s: method.resolvedResponseType.ctor + }); + } + return rpcService; +}; + +},{"22":22,"23":23,"31":31,"37":37}],34:[function(require,module,exports){ +"use strict"; +module.exports = tokenize; + +var delimRe = /[\s{}=;:[\],'"()<>]/g, + stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; + +var setCommentRe = /^ *[*/]+ */, + setCommentAltRe = /^\s*\*?\/*/, + setCommentSplitRe = /\n/g, + whitespaceRe = /\s/, + unescapeRe = /\\(.?)/g; + +var unescapeMap = { + "0": "\0", + "r": "\r", + "n": "\n", + "t": "\t" +}; + +/** + * Unescapes a string. + * @param {string} str String to unescape + * @returns {string} Unescaped string + * @property {Object.} map Special characters map + * @memberof tokenize + */ +function unescape(str) { + return str.replace(unescapeRe, function($0, $1) { + switch ($1) { + case "\\": + case "": + return $1; + default: + return unescapeMap[$1] || ""; + } + }); +} + +tokenize.unescape = unescape; + +/** + * Gets the next token and advances. + * @typedef TokenizerHandleNext + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Peeks for the next token. + * @typedef TokenizerHandlePeek + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Pushes a token back to the stack. + * @typedef TokenizerHandlePush + * @type {function} + * @param {string} token Token + * @returns {undefined} + */ + +/** + * Skips the next token. + * @typedef TokenizerHandleSkip + * @type {function} + * @param {string} expected Expected token + * @param {boolean} [optional=false] If optional + * @returns {boolean} Whether the token matched + * @throws {Error} If the token didn't match and is not optional + */ + +/** + * Gets the comment on the previous line or, alternatively, the line comment on the specified line. + * @typedef TokenizerHandleCmnt + * @type {function} + * @param {number} [line] Line number + * @returns {string|null} Comment text or `null` if none + */ + +/** + * Handle object returned from {@link tokenize}. + * @interface ITokenizerHandle + * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) + * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) + * @property {TokenizerHandlePush} push Pushes a token back to the stack + * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws + * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any + * @property {number} line Current line number + */ + +/** + * Tokenizes the given .proto source and returns an object with useful utility functions. + * @param {string} source Source contents + * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. + * @returns {ITokenizerHandle} Tokenizer handle + */ +function tokenize(source, alternateCommentMode) { + /* eslint-disable callback-return */ + source = source.toString(); + + var offset = 0, + length = source.length, + line = 1, + lastCommentLine = 0, + comments = {}; + + var stack = []; + + var stringDelim = null; + + /* istanbul ignore next */ + /** + * Creates an error for illegal syntax. + * @param {string} subject Subject + * @returns {Error} Error created + * @inner + */ + function illegal(subject) { + return Error("illegal " + subject + " (line " + line + ")"); + } + + /** + * Reads a string till its end. + * @returns {string} String read + * @inner + */ + function readString() { + var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; + re.lastIndex = offset - 1; + var match = re.exec(source); + if (!match) + throw illegal("string"); + offset = re.lastIndex; + push(stringDelim); + stringDelim = null; + return unescape(match[1]); + } + + /** + * Gets the character at `pos` within the source. + * @param {number} pos Position + * @returns {string} Character + * @inner + */ + function charAt(pos) { + return source.charAt(pos); + } + + /** + * Sets the current comment text. + * @param {number} start Start offset + * @param {number} end End offset + * @param {boolean} isLeading set if a leading comment + * @returns {undefined} + * @inner + */ + function setComment(start, end, isLeading) { + var comment = { + type: source.charAt(start++), + lineEmpty: false, + leading: isLeading, + }; + var lookback; + if (alternateCommentMode) { + lookback = 2; // alternate comment parsing: "//" or "/*" + } else { + lookback = 3; // "///" or "/**" + } + var commentOffset = start - lookback, + c; + do { + if (--commentOffset < 0 || + (c = source.charAt(commentOffset)) === "\n") { + comment.lineEmpty = true; + break; + } + } while (c === " " || c === "\t"); + var lines = source + .substring(start, end) + .split(setCommentSplitRe); + for (var i = 0; i < lines.length; ++i) + lines[i] = lines[i] + .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") + .trim(); + comment.text = lines + .join("\n") + .trim(); + + comments[line] = comment; + lastCommentLine = line; + } + + function isDoubleSlashCommentLine(startOffset) { + var endOffset = findEndOfLine(startOffset); + + // see if remaining line matches comment pattern + var lineText = source.substring(startOffset, endOffset); + var isComment = /^\s*\/\//.test(lineText); + return isComment; + } + + function findEndOfLine(cursor) { + // find end of cursor's line + var endOffset = cursor; + while (endOffset < length && charAt(endOffset) !== "\n") { + endOffset++; + } + return endOffset; + } + + /** + * Obtains the next token. + * @returns {string|null} Next token or `null` on eof + * @inner + */ + function next() { + if (stack.length > 0) + return stack.shift(); + if (stringDelim) + return readString(); + var repeat, + prev, + curr, + start, + isDoc, + isLeadingComment = offset === 0; + do { + if (offset === length) + return null; + repeat = false; + while (whitespaceRe.test(curr = charAt(offset))) { + if (curr === "\n") { + isLeadingComment = true; + ++line; + } + if (++offset === length) + return null; + } + + if (charAt(offset) === "/") { + if (++offset === length) { + throw illegal("comment"); + } + if (charAt(offset) === "/") { // Line + if (!alternateCommentMode) { + // check for triple-slash comment + isDoc = charAt(start = offset + 1) === "/"; + + while (charAt(++offset) !== "\n") { + if (offset === length) { + return null; + } + } + ++offset; + if (isDoc) { + setComment(start, offset - 1, isLeadingComment); + // Trailing comment cannot not be multi-line, + // so leading comment state should be reset to handle potential next comments + isLeadingComment = true; + } + ++line; + repeat = true; + } else { + // check for double-slash comments, consolidating consecutive lines + start = offset; + isDoc = false; + if (isDoubleSlashCommentLine(offset - 1)) { + isDoc = true; + do { + offset = findEndOfLine(offset); + if (offset === length) { + break; + } + offset++; + if (!isLeadingComment) { + // Trailing comment cannot not be multi-line + break; + } + } while (isDoubleSlashCommentLine(offset)); + } else { + offset = Math.min(length, findEndOfLine(offset) + 1); + } + if (isDoc) { + setComment(start, offset, isLeadingComment); + isLeadingComment = true; + } + line++; + repeat = true; + } + } else if ((curr = charAt(offset)) === "*") { /* Block */ + // check for /** (regular comment mode) or /* (alternate comment mode) + start = offset + 1; + isDoc = alternateCommentMode || charAt(start) === "*"; + do { + if (curr === "\n") { + ++line; + } + if (++offset === length) { + throw illegal("comment"); + } + prev = curr; + curr = charAt(offset); + } while (prev !== "*" || curr !== "/"); + ++offset; + if (isDoc) { + setComment(start, offset - 2, isLeadingComment); + isLeadingComment = true; + } + repeat = true; + } else { + return "/"; + } + } + } while (repeat); + + // offset !== length if we got here + + var end = offset; + delimRe.lastIndex = 0; + var delim = delimRe.test(charAt(end++)); + if (!delim) + while (end < length && !delimRe.test(charAt(end))) + ++end; + var token = source.substring(offset, offset = end); + if (token === "\"" || token === "'") + stringDelim = token; + return token; + } + + /** + * Pushes a token back to the stack. + * @param {string} token Token + * @returns {undefined} + * @inner + */ + function push(token) { + stack.push(token); + } + + /** + * Peeks for the next token. + * @returns {string|null} Token or `null` on eof + * @inner + */ + function peek() { + if (!stack.length) { + var token = next(); + if (token === null) + return null; + push(token); + } + return stack[0]; + } + + /** + * Skips a token. + * @param {string} expected Expected token + * @param {boolean} [optional=false] Whether the token is optional + * @returns {boolean} `true` when skipped, `false` if not + * @throws {Error} When a required token is not present + * @inner + */ + function skip(expected, optional) { + var actual = peek(), + equals = actual === expected; + if (equals) { + next(); + return true; + } + if (!optional) + throw illegal("token '" + actual + "', '" + expected + "' expected"); + return false; + } + + /** + * Gets a comment. + * @param {number} [trailingLine] Line number if looking for a trailing comment + * @returns {string|null} Comment text + * @inner + */ + function cmnt(trailingLine) { + var ret = null; + var comment; + if (trailingLine === undefined) { + comment = comments[line - 1]; + delete comments[line - 1]; + if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { + ret = comment.leading ? comment.text : null; + } + } else { + /* istanbul ignore else */ + if (lastCommentLine < trailingLine) { + peek(); + } + comment = comments[trailingLine]; + delete comments[trailingLine]; + if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { + ret = comment.leading ? null : comment.text; + } + } + return ret; + } + + return Object.defineProperty({ + next: next, + peek: peek, + push: push, + skip: skip, + cmnt: cmnt + }, "line", { + get: function() { return line; } + }); + /* eslint-enable callback-return */ +} + +},{}],35:[function(require,module,exports){ +"use strict"; +module.exports = Type; + +// extends Namespace +var Namespace = require(23); +((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; + +var Enum = require(15), + OneOf = require(25), + Field = require(16), + MapField = require(20), + Service = require(33), + Message = require(21), + Reader = require(27), + Writer = require(42), + util = require(37), + encoder = require(14), + decoder = require(13), + verifier = require(40), + converter = require(12), + wrappers = require(41); + +/** + * Constructs a new reflected message type instance. + * @classdesc Reflected message type. + * @extends NamespaceBase + * @constructor + * @param {string} name Message name + * @param {Object.} [options] Declared options + */ +function Type(name, options) { + Namespace.call(this, name, options); + + /** + * Message fields. + * @type {Object.} + */ + this.fields = {}; // toJSON, marker + + /** + * Oneofs declared within this namespace, if any. + * @type {Object.} + */ + this.oneofs = undefined; // toJSON + + /** + * Extension ranges, if any. + * @type {number[][]} + */ + this.extensions = undefined; // toJSON + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + /*? + * Whether this type is a legacy group. + * @type {boolean|undefined} + */ + this.group = undefined; // toJSON + + /** + * Cached fields by id. + * @type {Object.|null} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields as an array. + * @type {Field[]|null} + * @private + */ + this._fieldsArray = null; + + /** + * Cached oneofs as an array. + * @type {OneOf[]|null} + * @private + */ + this._oneofsArray = null; + + /** + * Cached constructor. + * @type {Constructor<{}>} + * @private + */ + this._ctor = null; +} + +Object.defineProperties(Type.prototype, { + + /** + * Message fields by id. + * @name Type#fieldsById + * @type {Object.} + * @readonly + */ + fieldsById: { + get: function() { + + /* istanbul ignore if */ + if (this._fieldsById) + return this._fieldsById; + + this._fieldsById = {}; + for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { + var field = this.fields[names[i]], + id = field.id; + + /* istanbul ignore if */ + if (this._fieldsById[id]) + throw Error("duplicate id " + id + " in " + this); + + this._fieldsById[id] = field; + } + return this._fieldsById; + } + }, + + /** + * Fields of this message as an array for iteration. + * @name Type#fieldsArray + * @type {Field[]} + * @readonly + */ + fieldsArray: { + get: function() { + return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); + } + }, + + /** + * Oneofs of this message as an array for iteration. + * @name Type#oneofsArray + * @type {OneOf[]} + * @readonly + */ + oneofsArray: { + get: function() { + return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); + } + }, + + /** + * The registered constructor, if any registered, otherwise a generic constructor. + * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. + * @name Type#ctor + * @type {Constructor<{}>} + */ + ctor: { + get: function() { + return this._ctor || (this.ctor = Type.generateConstructor(this)()); + }, + set: function(ctor) { + + // Ensure proper prototype + var prototype = ctor.prototype; + if (!(prototype instanceof Message)) { + (ctor.prototype = new Message()).constructor = ctor; + util.merge(ctor.prototype, prototype); + } + + // Classes and messages reference their reflected type + ctor.$type = ctor.prototype.$type = this; + + // Mix in static methods + util.merge(ctor, Message, true); + + this._ctor = ctor; + + // Messages have non-enumerable default values on their prototype + var i = 0; + for (; i < /* initializes */ this.fieldsArray.length; ++i) + this._fieldsArray[i].resolve(); // ensures a proper value + + // Messages have non-enumerable getters and setters for each virtual oneof field + var ctorProperties = {}; + for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) + ctorProperties[this._oneofsArray[i].resolve().name] = { + get: util.oneOfGetter(this._oneofsArray[i].oneof), + set: util.oneOfSetter(this._oneofsArray[i].oneof) + }; + if (i) + Object.defineProperties(ctor.prototype, ctorProperties); + } + } +}); + +/** + * Generates a constructor function for the specified type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +Type.generateConstructor = function generateConstructor(mtype) { + /* eslint-disable no-unexpected-multiline */ + var gen = util.codegen(["p"], mtype.name); + // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype + for (var i = 0, field; i < mtype.fieldsArray.length; ++i) + if ((field = mtype._fieldsArray[i]).map) gen + ("this%s={}", util.safeProp(field.name)); + else if (field.repeated) gen + ("this%s=[]", util.safeProp(field.name)); + return gen + ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors + * @property {Object.} fields Field descriptors + * @property {number[][]} [extensions] Extension ranges + * @property {number[][]} [reserved] Reserved ranges + * @property {boolean} [group=false] Whether a legacy group or not + */ + +/** + * Creates a message type from a message type descriptor. + * @param {string} name Message name + * @param {IType} json Message type descriptor + * @returns {Type} Created message type + */ +Type.fromJSON = function fromJSON(name, json) { + var type = new Type(name, json.options); + type.extensions = json.extensions; + type.reserved = json.reserved; + var names = Object.keys(json.fields), + i = 0; + for (; i < names.length; ++i) + type.add( + ( typeof json.fields[names[i]].keyType !== "undefined" + ? MapField.fromJSON + : Field.fromJSON )(names[i], json.fields[names[i]]) + ); + if (json.oneofs) + for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) + type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); + if (json.nested) + for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { + var nested = json.nested[names[i]]; + type.add( // most to least likely + ( nested.id !== undefined + ? Field.fromJSON + : nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + if (json.extensions && json.extensions.length) + type.extensions = json.extensions; + if (json.reserved && json.reserved.length) + type.reserved = json.reserved; + if (json.group) + type.group = true; + if (json.comment) + type.comment = json.comment; + return type; +}; + +/** + * Converts this message type to a message type descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IType} Message type descriptor + */ +Type.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), + "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, + "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "group" , this.group || undefined, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +Type.prototype.resolveAll = function resolveAll() { + var fields = this.fieldsArray, i = 0; + while (i < fields.length) + fields[i++].resolve(); + var oneofs = this.oneofsArray; i = 0; + while (i < oneofs.length) + oneofs[i++].resolve(); + return Namespace.prototype.resolveAll.call(this); +}; + +/** + * @override + */ +Type.prototype.get = function get(name) { + return this.fields[name] + || this.oneofs && this.oneofs[name] + || this.nested && this.nested[name] + || null; +}; + +/** + * Adds a nested object to this type. + * @param {ReflectionObject} object Nested object to add + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id + */ +Type.prototype.add = function add(object) { + + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Field && object.extend === undefined) { + // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. + // The root object takes care of adding distinct sister-fields to the respective extended + // type instead. + + // avoids calling the getter if not absolutely necessary because it's called quite frequently + if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) + throw Error("duplicate id " + object.id + " in " + this); + if (this.isReservedId(object.id)) + throw Error("id " + object.id + " is reserved in " + this); + if (this.isReservedName(object.name)) + throw Error("name '" + object.name + "' is reserved in " + this); + + if (object.parent) + object.parent.remove(object); + this.fields[object.name] = object; + object.message = this; + object.onAdd(this); + return clearCache(this); + } + if (object instanceof OneOf) { + if (!this.oneofs) + this.oneofs = {}; + this.oneofs[object.name] = object; + object.onAdd(this); + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * Removes a nested object from this type. + * @param {ReflectionObject} object Nested object to remove + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this type + */ +Type.prototype.remove = function remove(object) { + if (object instanceof Field && object.extend === undefined) { + // See Type#add for the reason why extension fields are excluded here. + + /* istanbul ignore if */ + if (!this.fields || this.fields[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.fields[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + if (object instanceof OneOf) { + + /* istanbul ignore if */ + if (!this.oneofs || this.oneofs[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.oneofs[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message<{}>} Message instance + */ +Type.prototype.create = function create(properties) { + return new this.ctor(properties); +}; + +/** + * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. + * @returns {Type} `this` + */ +Type.prototype.setup = function setup() { + // Sets up everything at once so that the prototype chain does not have to be re-evaluated + // multiple times (V8, soft-deopt prototype-check). + + var fullName = this.fullName, + types = []; + for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) + types.push(this._fieldsArray[i].resolve().resolvedType); + + // Replace setup methods with type-specific generated functions + this.encode = encoder(this)({ + Writer : Writer, + types : types, + util : util + }); + this.decode = decoder(this)({ + Reader : Reader, + types : types, + util : util + }); + this.verify = verifier(this)({ + types : types, + util : util + }); + this.fromObject = converter.fromObject(this)({ + types : types, + util : util + }); + this.toObject = converter.toObject(this)({ + types : types, + util : util + }); + + // Inject custom wrappers for common types + var wrapper = wrappers[fullName]; + if (wrapper) { + var originalThis = Object.create(this); + // if (wrapper.fromObject) { + originalThis.fromObject = this.fromObject; + this.fromObject = wrapper.fromObject.bind(originalThis); + // } + // if (wrapper.toObject) { + originalThis.toObject = this.toObject; + this.toObject = wrapper.toObject.bind(originalThis); + // } + } + + return this; +}; + +/** + * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encode = function encode_setup(message, writer) { + return this.setup().encode(message, writer); // overrides this method +}; + +/** + * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); +}; + +/** + * Decodes a message of this type. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Length of the message, if known beforehand + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError<{}>} If required fields are missing + */ +Type.prototype.decode = function decode_setup(reader, length) { + return this.setup().decode(reader, length); // overrides this method +}; + +/** + * Decodes a message of this type preceeded by its byte length as a varint. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError} If required fields are missing + */ +Type.prototype.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof Reader)) + reader = Reader.create(reader); + return this.decode(reader, reader.uint32()); +}; + +/** + * Verifies that field values are valid and that required fields are present. + * @param {Object.} message Plain object to verify + * @returns {null|string} `null` if valid, otherwise the reason why it is not + */ +Type.prototype.verify = function verify_setup(message) { + return this.setup().verify(message); // overrides this method +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object to convert + * @returns {Message<{}>} Message instance + */ +Type.prototype.fromObject = function fromObject(object) { + return this.setup().fromObject(object); +}; + +/** + * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. + * @interface IConversionOptions + * @property {Function} [longs] Long conversion type. + * Valid values are `String` and `Number` (the global types). + * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. + * @property {Function} [enums] Enum value conversion type. + * Only valid value is `String` (the global type). + * Defaults to copy the present value, which is the numeric id. + * @property {Function} [bytes] Bytes value conversion type. + * Valid values are `Array` and (a base64 encoded) `String` (the global types). + * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. + * @property {boolean} [defaults=false] Also sets default values on the resulting object + * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` + * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` + * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any + * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings + */ + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ +Type.prototype.toObject = function toObject(message, options) { + return this.setup().toObject(message, options); +}; + +/** + * Decorator function as returned by {@link Type.d} (TypeScript). + * @typedef TypeDecorator + * @type {function} + * @param {Constructor} target Target constructor + * @returns {undefined} + * @template T extends Message + */ + +/** + * Type decorator (TypeScript). + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {TypeDecorator} Decorator function + * @template T extends Message + */ +Type.d = function decorateType(typeName) { + return function typeDecorator(target) { + util.decorateType(target, typeName); + }; +}; + +},{"12":12,"13":13,"14":14,"15":15,"16":16,"20":20,"21":21,"23":23,"25":25,"27":27,"33":33,"37":37,"40":40,"41":41,"42":42}],36:[function(require,module,exports){ +"use strict"; + +/** + * Common type constants. + * @namespace + */ +var types = exports; + +var util = require(37); + +var s = [ + "double", // 0 + "float", // 1 + "int32", // 2 + "uint32", // 3 + "sint32", // 4 + "fixed32", // 5 + "sfixed32", // 6 + "int64", // 7 + "uint64", // 8 + "sint64", // 9 + "fixed64", // 10 + "sfixed64", // 11 + "bool", // 12 + "string", // 13 + "bytes" // 14 +]; + +function bake(values, offset) { + var i = 0, o = {}; + offset |= 0; + while (i < values.length) o[s[i + offset]] = values[i++]; + return o; +} + +/** + * Basic type wire types. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + * @property {number} bytes=2 Ldelim wire type + */ +types.basic = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2, + /* bytes */ 2 +]); + +/** + * Basic type defaults. + * @type {Object.} + * @const + * @property {number} double=0 Double default + * @property {number} float=0 Float default + * @property {number} int32=0 Int32 default + * @property {number} uint32=0 Uint32 default + * @property {number} sint32=0 Sint32 default + * @property {number} fixed32=0 Fixed32 default + * @property {number} sfixed32=0 Sfixed32 default + * @property {number} int64=0 Int64 default + * @property {number} uint64=0 Uint64 default + * @property {number} sint64=0 Sint32 default + * @property {number} fixed64=0 Fixed64 default + * @property {number} sfixed64=0 Sfixed64 default + * @property {boolean} bool=false Bool default + * @property {string} string="" String default + * @property {Array.} bytes=Array(0) Bytes default + * @property {null} message=null Message default + */ +types.defaults = bake([ + /* double */ 0, + /* float */ 0, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 0, + /* sfixed32 */ 0, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 0, + /* sfixed64 */ 0, + /* bool */ false, + /* string */ "", + /* bytes */ util.emptyArray, + /* message */ null +]); + +/** + * Basic long type wire types. + * @type {Object.} + * @const + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + */ +types.long = bake([ + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1 +], 7); + +/** + * Allowed types for map keys with their associated wire type. + * @type {Object.} + * @const + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + */ +types.mapKey = bake([ + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2 +], 2); + +/** + * Allowed types for packed repeated fields with their associated wire type. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + */ +types.packed = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0 +]); + +},{"37":37}],37:[function(require,module,exports){ +"use strict"; + +/** + * Various utility functions. + * @namespace + */ +var util = module.exports = require(39); + +var roots = require(30); + +var Type, // cyclic + Enum; + +util.codegen = require(3); +util.fetch = require(5); +util.path = require(8); + +/** + * Node's fs module if available. + * @type {Object.} + */ +util.fs = util.inquire("fs"); + +/** + * Converts an object's values to an array. + * @param {Object.} object Object to convert + * @returns {Array.<*>} Converted array + */ +util.toArray = function toArray(object) { + if (object) { + var keys = Object.keys(object), + array = new Array(keys.length), + index = 0; + while (index < keys.length) + array[index] = object[keys[index++]]; + return array; + } + return []; +}; + +/** + * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. + * @param {Array.<*>} array Array to convert + * @returns {Object.} Converted object + */ +util.toObject = function toObject(array) { + var object = {}, + index = 0; + while (index < array.length) { + var key = array[index++], + val = array[index++]; + if (val !== undefined) + object[key] = val; + } + return object; +}; + +var safePropBackslashRe = /\\/g, + safePropQuoteRe = /"/g; + +/** + * Tests whether the specified name is a reserved word in JS. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +util.isReserved = function isReserved(name) { + return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name); +}; + +/** + * Returns a safe property accessor for the specified property name. + * @param {string} prop Property name + * @returns {string} Safe accessor + */ +util.safeProp = function safeProp(prop) { + if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop)) + return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]"; + return "." + prop; +}; + +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + +var camelCaseRe = /_([a-z])/g; + +/** + * Converts a string to camel case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.camelCase = function camelCase(str) { + return str.substring(0, 1) + + str.substring(1) + .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); +}; + +/** + * Compares reflected fields by id. + * @param {Field} a First field + * @param {Field} b Second field + * @returns {number} Comparison value + */ +util.compareFieldsById = function compareFieldsById(a, b) { + return a.id - b.id; +}; + +/** + * Decorator helper for types (TypeScript). + * @param {Constructor} ctor Constructor function + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {Type} Reflected type + * @template T extends Message + * @property {Root} root Decorators root + */ +util.decorateType = function decorateType(ctor, typeName) { + + /* istanbul ignore if */ + if (ctor.$type) { + if (typeName && ctor.$type.name !== typeName) { + util.decorateRoot.remove(ctor.$type); + ctor.$type.name = typeName; + util.decorateRoot.add(ctor.$type); + } + return ctor.$type; + } + + /* istanbul ignore next */ + if (!Type) + Type = require(35); + + var type = new Type(typeName || ctor.name); + util.decorateRoot.add(type); + type.ctor = ctor; // sets up .encode, .decode etc. + Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); + Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); + return type; +}; + +var decorateEnumIndex = 0; + +/** + * Decorator helper for enums (TypeScript). + * @param {Object} object Enum object + * @returns {Enum} Reflected enum + */ +util.decorateEnum = function decorateEnum(object) { + + /* istanbul ignore if */ + if (object.$type) + return object.$type; + + /* istanbul ignore next */ + if (!Enum) + Enum = require(15); + + var enm = new Enum("Enum" + decorateEnumIndex++, object); + util.decorateRoot.add(enm); + Object.defineProperty(object, "$type", { value: enm, enumerable: false }); + return enm; +}; + + +/** + * Sets the value of a property by property path. If a value already exists, it is turned to an array + * @param {Object.} dst Destination object + * @param {string} path dot '.' delimited path of the property to set + * @param {Object} value the value to set + * @returns {Object.} Destination object + */ +util.setProperty = function setProperty(dst, path, value) { + function setProp(dst, path, value) { + var part = path.shift(); + if (part === "__proto__" || part === "prototype") { + return dst; + } + if (path.length > 0) { + dst[part] = setProp(dst[part] || {}, path, value); + } else { + var prevValue = dst[part]; + if (prevValue) + value = [].concat(prevValue).concat(value); + dst[part] = value; + } + return dst; + } + + if (typeof dst !== "object") + throw TypeError("dst must be an object"); + if (!path) + throw TypeError("path must be specified"); + + path = path.split("."); + return setProp(dst, path, value); +}; + +/** + * Decorator root (TypeScript). + * @name util.decorateRoot + * @type {Root} + * @readonly + */ +Object.defineProperty(util, "decorateRoot", { + get: function() { + return roots["decorated"] || (roots["decorated"] = new (require(29))()); + } +}); + +},{"15":15,"29":29,"3":3,"30":30,"35":35,"39":39,"5":5,"8":8}],38:[function(require,module,exports){ +"use strict"; +module.exports = LongBits; + +var util = require(39); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + +},{"39":39}],39:[function(require,module,exports){ +"use strict"; +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = require(1); + +// converts to / from base64 encoded strings +util.base64 = require(2); + +// base class of rpc.Service +util.EventEmitter = require(4); + +// float handling accross browsers +util.float = require(6); + +// requires modules optionally and hides the call from bundlers +util.inquire = require(7); + +// converts to / from utf8 encoded strings +util.utf8 = require(10); + +// provides a node-like buffer pool in the browser +util.pool = require(9); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = require(38); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + +},{"1":1,"10":10,"2":2,"38":38,"4":4,"6":6,"7":7,"9":9}],40:[function(require,module,exports){ +"use strict"; +module.exports = verifier; + +var Enum = require(15), + util = require(37); + +function invalid(field, expected) { + return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; +} + +/** + * Generates a partial value verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyValue(gen, field, fieldIndex, ref) { + /* eslint-disable no-unexpected-multiline */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(%s){", ref) + ("default:") + ("return%j", invalid(field, "enum value")); + for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen + ("case %i:", field.resolvedType.values[keys[j]]); + gen + ("break") + ("}"); + } else { + gen + ("{") + ("var e=types[%i].verify(%s);", fieldIndex, ref) + ("if(e)") + ("return%j+e", field.name + ".") + ("}"); + } + } else { + switch (field.type) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.isInteger(%s))", ref) + ("return%j", invalid(field, "integer")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) + ("return%j", invalid(field, "integer|Long")); + break; + case "float": + case "double": gen + ("if(typeof %s!==\"number\")", ref) + ("return%j", invalid(field, "number")); + break; + case "bool": gen + ("if(typeof %s!==\"boolean\")", ref) + ("return%j", invalid(field, "boolean")); + break; + case "string": gen + ("if(!util.isString(%s))", ref) + ("return%j", invalid(field, "string")); + break; + case "bytes": gen + ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) + ("return%j", invalid(field, "buffer")); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a partial key verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyKey(gen, field, ref) { + /* eslint-disable no-unexpected-multiline */ + switch (field.keyType) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.key32Re.test(%s))", ref) + ("return%j", invalid(field, "integer key")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not + ("return%j", invalid(field, "integer|Long key")); + break; + case "bool": gen + ("if(!util.key2Re.test(%s))", ref) + ("return%j", invalid(field, "boolean key")); + break; + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a verifier specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function verifier(mtype) { + /* eslint-disable no-unexpected-multiline */ + + var gen = util.codegen(["m"], mtype.name + "$verify") + ("if(typeof m!==\"object\"||m===null)") + ("return%j", "object expected"); + var oneofs = mtype.oneofsArray, + seenFirstField = {}; + if (oneofs.length) gen + ("var p={}"); + + for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + ref = "m" + util.safeProp(field.name); + + if (field.optional) gen + ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null + + // map fields + if (field.map) { gen + ("if(!util.isObject(%s))", ref) + ("return%j", invalid(field, "object")) + ("var k=Object.keys(%s)", ref) + ("for(var i=0;i} + * @const + */ +var wrappers = exports; + +var Message = require(21); + +/** + * From object converter part of an {@link IWrapper}. + * @typedef WrapperFromObjectConverter + * @type {function} + * @param {Object.} object Plain object + * @returns {Message<{}>} Message instance + * @this Type + */ + +/** + * To object converter part of an {@link IWrapper}. + * @typedef WrapperToObjectConverter + * @type {function} + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @this Type + */ + +/** + * Common type wrapper part of {@link wrappers}. + * @interface IWrapper + * @property {WrapperFromObjectConverter} [fromObject] From object converter + * @property {WrapperToObjectConverter} [toObject] To object converter + */ + +// Custom wrapper for Any +wrappers[".google.protobuf.Any"] = { + + fromObject: function(object) { + + // unwrap value type if mapped + if (object && object["@type"]) { + // Only use fully qualified type name after the last '/' + var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) { + // type_url does not accept leading "." + var type_url = object["@type"].charAt(0) === "." ? + object["@type"].slice(1) : object["@type"]; + // type_url prefix is optional, but path seperator is required + if (type_url.indexOf("/") === -1) { + type_url = "/" + type_url; + } + return this.create({ + type_url: type_url, + value: type.encode(type.fromObject(object)).finish() + }); + } + } + + return this.fromObject(object); + }, + + toObject: function(message, options) { + + // Default prefix + var googleApi = "type.googleapis.com/"; + var prefix = ""; + var name = ""; + + // decode value if requested and unmapped + if (options && options.json && message.type_url && message.value) { + // Only use fully qualified type name after the last '/' + name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); + // Separate the prefix used + prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) + message = type.decode(message.value); + } + + // wrap value if unmapped + if (!(message instanceof this.ctor) && message instanceof Message) { + var object = message.$type.toObject(message, options); + var messageName = message.$type.fullName[0] === "." ? + message.$type.fullName.slice(1) : message.$type.fullName; + // Default to type.googleapis.com prefix if no prefix is used + if (prefix === "") { + prefix = googleApi; + } + name = prefix + messageName; + object["@type"] = name; + return object; + } + + return this.toObject(message, options); + } +}; + +},{"21":21}],42:[function(require,module,exports){ +"use strict"; +module.exports = Writer; + +var util = require(39); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + +},{"39":39}],43:[function(require,module,exports){ +"use strict"; +module.exports = BufferWriter; + +// extends Writer +var Writer = require(42); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = require(39); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + +},{"39":39,"42":42}]},{},[19]) + +})(); +//# sourceMappingURL=protobuf.js.map diff --git a/node_modules/protobufjs/dist/protobuf.js.map b/node_modules/protobufjs/dist/protobuf.js.map new file mode 100644 index 0000000..50fb02b --- /dev/null +++ b/node_modules/protobufjs/dist/protobuf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/common.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light.js","../src/index-minimal.js","../src/index","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/parse.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/tokenize.js","../src/type.js","../src/types.js","../src/util.js","../src/util/longbits.js","../src/util/minimal.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACz3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"protobuf.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nmodule.exports = common;\n\nvar commonRe = /\\/|\\./;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {INamespace} google/protobuf/any.proto Any\n * @property {INamespace} google/protobuf/duration.proto Duration\n * @property {INamespace} google/protobuf/empty.proto Empty\n * @property {INamespace} google/protobuf/field_mask.proto FieldMask\n * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {INamespace} google/protobuf/timestamp.proto Timestamp\n * @property {INamespace} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n if (!commonRe.test(name)) {\n name = \"google/protobuf/\" + name + \".proto\";\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n }\n common[name] = json;\n}\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n\n /**\n * Properties of a google.protobuf.Any message.\n * @interface IAny\n * @type {Object}\n * @property {string} [typeUrl]\n * @property {Uint8Array} [bytes]\n * @memberof common\n */\n Any: {\n fields: {\n type_url: {\n type: \"string\",\n id: 1\n },\n value: {\n type: \"bytes\",\n id: 2\n }\n }\n }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n\n /**\n * Properties of a google.protobuf.Duration message.\n * @interface IDuration\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Duration: timeType = {\n fields: {\n seconds: {\n type: \"int64\",\n id: 1\n },\n nanos: {\n type: \"int32\",\n id: 2\n }\n }\n }\n});\n\ncommon(\"timestamp\", {\n\n /**\n * Properties of a google.protobuf.Timestamp message.\n * @interface ITimestamp\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Timestamp: timeType\n});\n\ncommon(\"empty\", {\n\n /**\n * Properties of a google.protobuf.Empty message.\n * @interface IEmpty\n * @memberof common\n */\n Empty: {\n fields: {}\n }\n});\n\ncommon(\"struct\", {\n\n /**\n * Properties of a google.protobuf.Struct message.\n * @interface IStruct\n * @type {Object}\n * @property {Object.} [fields]\n * @memberof common\n */\n Struct: {\n fields: {\n fields: {\n keyType: \"string\",\n type: \"Value\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Value message.\n * @interface IValue\n * @type {Object}\n * @property {string} [kind]\n * @property {0} [nullValue]\n * @property {number} [numberValue]\n * @property {string} [stringValue]\n * @property {boolean} [boolValue]\n * @property {IStruct} [structValue]\n * @property {IListValue} [listValue]\n * @memberof common\n */\n Value: {\n oneofs: {\n kind: {\n oneof: [\n \"nullValue\",\n \"numberValue\",\n \"stringValue\",\n \"boolValue\",\n \"structValue\",\n \"listValue\"\n ]\n }\n },\n fields: {\n nullValue: {\n type: \"NullValue\",\n id: 1\n },\n numberValue: {\n type: \"double\",\n id: 2\n },\n stringValue: {\n type: \"string\",\n id: 3\n },\n boolValue: {\n type: \"bool\",\n id: 4\n },\n structValue: {\n type: \"Struct\",\n id: 5\n },\n listValue: {\n type: \"ListValue\",\n id: 6\n }\n }\n },\n\n NullValue: {\n values: {\n NULL_VALUE: 0\n }\n },\n\n /**\n * Properties of a google.protobuf.ListValue message.\n * @interface IListValue\n * @type {Object}\n * @property {Array.} [values]\n * @memberof common\n */\n ListValue: {\n fields: {\n values: {\n rule: \"repeated\",\n type: \"Value\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"wrappers\", {\n\n /**\n * Properties of a google.protobuf.DoubleValue message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n DoubleValue: {\n fields: {\n value: {\n type: \"double\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.FloatValue message.\n * @interface IFloatValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FloatValue: {\n fields: {\n value: {\n type: \"float\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int64Value message.\n * @interface IInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n Int64Value: {\n fields: {\n value: {\n type: \"int64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt64Value message.\n * @interface IUInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n UInt64Value: {\n fields: {\n value: {\n type: \"uint64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int32Value message.\n * @interface IInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n Int32Value: {\n fields: {\n value: {\n type: \"int32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt32Value message.\n * @interface IUInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n UInt32Value: {\n fields: {\n value: {\n type: \"uint32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BoolValue message.\n * @interface IBoolValue\n * @type {Object}\n * @property {boolean} [value]\n * @memberof common\n */\n BoolValue: {\n fields: {\n value: {\n type: \"bool\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.StringValue message.\n * @interface IStringValue\n * @type {Object}\n * @property {string} [value]\n * @memberof common\n */\n StringValue: {\n fields: {\n value: {\n type: \"string\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BytesValue message.\n * @interface IBytesValue\n * @type {Object}\n * @property {Uint8Array} [value]\n * @memberof common\n */\n BytesValue: {\n fields: {\n value: {\n type: \"bytes\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"field_mask\", {\n\n /**\n * Properties of a google.protobuf.FieldMask message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FieldMask: {\n fields: {\n paths: {\n rule: \"repeated\",\n type: \"string\",\n id: 1\n }\n }\n }\n});\n\n/**\n * Gets the root definition of the specified common proto file.\n *\n * Bundled definitions are:\n * - google/protobuf/any.proto\n * - google/protobuf/duration.proto\n * - google/protobuf/empty.proto\n * - google/protobuf/field_mask.proto\n * - google/protobuf/struct.proto\n * - google/protobuf/timestamp.proto\n * - google/protobuf/wrappers.proto\n *\n * @param {string} file Proto file name\n * @returns {INamespace|null} Root definition or `null` if not defined\n */\ncommon.get = function get(file) {\n return common[file] || null;\n};\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(15),\n util = require(37);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32())\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else gen\n (\"%s[k]=value\", ref);\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(23),\n util = require(37);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(15),\n types = require(36),\n util = require(37);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(18);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(14);\nprotobuf.decoder = require(13);\nprotobuf.verifier = require(40);\nprotobuf.converter = require(12);\n\n// Reflection\nprotobuf.ReflectionObject = require(24);\nprotobuf.Namespace = require(23);\nprotobuf.Root = require(29);\nprotobuf.Enum = require(15);\nprotobuf.Type = require(35);\nprotobuf.Field = require(16);\nprotobuf.OneOf = require(25);\nprotobuf.MapField = require(20);\nprotobuf.Service = require(33);\nprotobuf.Method = require(22);\n\n// Runtime\nprotobuf.Message = require(21);\nprotobuf.wrappers = require(41);\n\n// Utility\nprotobuf.types = require(36);\nprotobuf.util = require(37);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(42);\nprotobuf.BufferWriter = require(43);\nprotobuf.Reader = require(27);\nprotobuf.BufferReader = require(28);\n\n// Utility\nprotobuf.util = require(39);\nprotobuf.rpc = require(31);\nprotobuf.roots = require(30);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize = require(34);\nprotobuf.parse = require(26);\nprotobuf.common = require(11);\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(16);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(36),\n util = require(37);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(39);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(37);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(16),\n util = require(37),\n OneOf = require(25);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(37);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set it's property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(16),\n util = require(37);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize = require(34),\n Root = require(29),\n Type = require(35),\n Field = require(16),\n MapField = require(20),\n OneOf = require(25),\n Enum = require(15),\n Service = require(33),\n Method = require(22),\n types = require(36),\n util = require(37);\n\nvar base10Re = /^[1-9][0-9]*$/,\n base10NegRe = /^-?[1-9][0-9]*$/,\n base16Re = /^0[x][0-9a-fA-F]+$/,\n base16NegRe = /^-?0[x][0-9a-fA-F]+$/,\n base8Re = /^0[0-7]+$/,\n base8NegRe = /^-?0[0-7]+$/,\n numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,\n nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,\n fqTypeRefRe = /^(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;\n\n/**\n * Result object returned from {@link parse}.\n * @interface IParserResult\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @interface IParseOptions\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments.\n * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist.\n */\n\n/**\n * Options modifying the behavior of JSON serialization.\n * @interface IToJSONOptions\n * @property {boolean} [keepComments=false] Serializes comments.\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n */\nfunction parse(source, root, options) {\n /* eslint-disable callback-return */\n if (!(root instanceof Root)) {\n options = root;\n root = new Root();\n }\n if (!options)\n options = parse.defaults;\n\n var preferTrailingComment = options.preferTrailingComment || false;\n var tn = tokenize(source, options.alternateCommentMode || false),\n next = tn.next,\n push = tn.push,\n peek = tn.peek,\n skip = tn.skip,\n cmnt = tn.cmnt;\n\n var head = true,\n pkg,\n imports,\n weakImports,\n syntax,\n isProto3 = false;\n\n var ptr = root;\n\n var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase;\n\n /* istanbul ignore next */\n function illegal(token, name, insideTryCatch) {\n var filename = parse.filename;\n if (!insideTryCatch)\n parse.filename = null;\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line + \")\");\n }\n\n function readString() {\n var values = [],\n token;\n do {\n /* istanbul ignore if */\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\n throw illegal(token);\n\n values.push(next());\n skip(token);\n token = peek();\n } while (token === \"\\\"\" || token === \"'\");\n return values.join(\"\");\n }\n\n function readValue(acceptTypeRef) {\n var token = next();\n switch (token) {\n case \"'\":\n case \"\\\"\":\n push(token);\n return readString();\n case \"true\": case \"TRUE\":\n return true;\n case \"false\": case \"FALSE\":\n return false;\n }\n try {\n return parseNumber(token, /* insideTryCatch */ true);\n } catch (e) {\n\n /* istanbul ignore else */\n if (acceptTypeRef && typeRefRe.test(token))\n return token;\n\n /* istanbul ignore next */\n throw illegal(token, \"value\");\n }\n }\n\n function readRanges(target, acceptStrings) {\n var token, start;\n do {\n if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\"))\n target.push(readString());\n else\n target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n } while (skip(\",\", true));\n var dummy = {options: undefined};\n dummy.setOption = function(name, value) {\n if (this.options === undefined) this.options = {};\n this.options[name] = value;\n };\n ifBlock(\n dummy,\n function parseRange_block(token) {\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n },\n function parseRange_line() {\n parseInlineOptions(dummy); // skip\n });\n }\n\n function parseNumber(token, insideTryCatch) {\n var sign = 1;\n if (token.charAt(0) === \"-\") {\n sign = -1;\n token = token.substring(1);\n }\n switch (token) {\n case \"inf\": case \"INF\": case \"Inf\":\n return sign * Infinity;\n case \"nan\": case \"NAN\": case \"Nan\": case \"NaN\":\n return NaN;\n case \"0\":\n return 0;\n }\n if (base10Re.test(token))\n return sign * parseInt(token, 10);\n if (base16Re.test(token))\n return sign * parseInt(token, 16);\n if (base8Re.test(token))\n return sign * parseInt(token, 8);\n\n /* istanbul ignore else */\n if (numberRe.test(token))\n return sign * parseFloat(token);\n\n /* istanbul ignore next */\n throw illegal(token, \"number\", insideTryCatch);\n }\n\n function parseId(token, acceptNegative) {\n switch (token) {\n case \"max\": case \"MAX\": case \"Max\":\n return 536870911;\n case \"0\":\n return 0;\n }\n\n /* istanbul ignore if */\n if (!acceptNegative && token.charAt(0) === \"-\")\n throw illegal(token, \"id\");\n\n if (base10NegRe.test(token))\n return parseInt(token, 10);\n if (base16NegRe.test(token))\n return parseInt(token, 16);\n\n /* istanbul ignore else */\n if (base8NegRe.test(token))\n return parseInt(token, 8);\n\n /* istanbul ignore next */\n throw illegal(token, \"id\");\n }\n\n function parsePackage() {\n\n /* istanbul ignore if */\n if (pkg !== undefined)\n throw illegal(\"package\");\n\n pkg = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(pkg))\n throw illegal(pkg, \"name\");\n\n ptr = ptr.define(pkg);\n skip(\";\");\n }\n\n function parseImport() {\n var token = peek();\n var whichImports;\n switch (token) {\n case \"weak\":\n whichImports = weakImports || (weakImports = []);\n next();\n break;\n case \"public\":\n next();\n // eslint-disable-next-line no-fallthrough\n default:\n whichImports = imports || (imports = []);\n break;\n }\n token = readString();\n skip(\";\");\n whichImports.push(token);\n }\n\n function parseSyntax() {\n skip(\"=\");\n syntax = readString();\n isProto3 = syntax === \"proto3\";\n\n /* istanbul ignore if */\n if (!isProto3 && syntax !== \"proto2\")\n throw illegal(syntax, \"syntax\");\n\n skip(\";\");\n }\n\n function parseCommon(parent, token) {\n switch (token) {\n\n case \"option\":\n parseOption(parent, token);\n skip(\";\");\n return true;\n\n case \"message\":\n parseType(parent, token);\n return true;\n\n case \"enum\":\n parseEnum(parent, token);\n return true;\n\n case \"service\":\n parseService(parent, token);\n return true;\n\n case \"extend\":\n parseExtension(parent, token);\n return true;\n }\n return false;\n }\n\n function ifBlock(obj, fnIf, fnElse) {\n var trailingLine = tn.line;\n if (obj) {\n if(typeof obj.comment !== \"string\") {\n obj.comment = cmnt(); // try block-type comment\n }\n obj.filename = parse.filename;\n }\n if (skip(\"{\", true)) {\n var token;\n while ((token = next()) !== \"}\")\n fnIf(token);\n skip(\";\", true);\n } else {\n if (fnElse)\n fnElse();\n skip(\";\");\n if (obj && (typeof obj.comment !== \"string\" || preferTrailingComment))\n obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment\n }\n }\n\n function parseType(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"type name\");\n\n var type = new Type(token);\n ifBlock(type, function parseType_block(token) {\n if (parseCommon(type, token))\n return;\n\n switch (token) {\n\n case \"map\":\n parseMapField(type, token);\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"oneof\":\n parseOneOf(type, token);\n break;\n\n case \"extensions\":\n readRanges(type.extensions || (type.extensions = []));\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n\n push(token);\n parseField(type, \"optional\");\n break;\n }\n });\n parent.add(type);\n }\n\n function parseField(parent, rule, extend) {\n var type = next();\n if (type === \"group\") {\n parseGroup(parent, rule);\n return;\n }\n // Type names can consume multiple tokens, in multiple variants:\n // package.subpackage field tokens: \"package.subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package . subpackage field tokens: \"package\" \".\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package. subpackage field tokens: \"package.\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package .subpackage field tokens: \"package\" \".subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // Keep reading tokens until we get a type name with no period at the end,\n // and the next token does not start with a period.\n while (type.endsWith(\".\") || peek().startsWith(\".\")) {\n type += next();\n }\n\n /* istanbul ignore if */\n if (!typeRefRe.test(type))\n throw illegal(type, \"type\");\n\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n name = applyCase(name);\n skip(\"=\");\n\n var field = new Field(name, parseId(next()), type, rule, extend);\n ifBlock(field, function parseField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseField_line() {\n parseInlineOptions(field);\n });\n\n if (rule === \"proto3_optional\") {\n // for proto3 optional fields, we create a single-member Oneof to mimic \"optional\" behavior\n var oneof = new OneOf(\"_\" + name);\n field.setOption(\"proto3_optional\", true);\n oneof.add(field);\n parent.add(oneof);\n } else {\n parent.add(field);\n }\n\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\n // parsing proto2 descriptors without the option, where applicable. This must be done for\n // all known packable types and anything that could be an enum (= is not a basic type).\n if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined))\n field.setOption(\"packed\", false, /* ifNotSet */ true);\n }\n\n function parseGroup(parent, rule) {\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n var fieldName = util.lcFirst(name);\n if (name === fieldName)\n name = util.ucFirst(name);\n skip(\"=\");\n var id = parseId(next());\n var type = new Type(name);\n type.group = true;\n var field = new Field(fieldName, id, name, rule);\n field.filename = parse.filename;\n ifBlock(type, function parseGroup_block(token) {\n switch (token) {\n\n case \"option\":\n parseOption(type, token);\n skip(\";\");\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"message\":\n parseType(type, token);\n break;\n\n case \"enum\":\n parseEnum(type, token);\n break;\n\n /* istanbul ignore next */\n default:\n throw illegal(token); // there are no groups with proto3 semantics\n }\n });\n parent.add(type)\n .add(field);\n }\n\n function parseMapField(parent) {\n skip(\"<\");\n var keyType = next();\n\n /* istanbul ignore if */\n if (types.mapKey[keyType] === undefined)\n throw illegal(keyType, \"type\");\n\n skip(\",\");\n var valueType = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(valueType))\n throw illegal(valueType, \"type\");\n\n skip(\">\");\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n skip(\"=\");\n var field = new MapField(applyCase(name), parseId(next()), keyType, valueType);\n ifBlock(field, function parseMapField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseMapField_line() {\n parseInlineOptions(field);\n });\n parent.add(field);\n }\n\n function parseOneOf(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var oneof = new OneOf(applyCase(token));\n ifBlock(oneof, function parseOneOf_block(token) {\n if (token === \"option\") {\n parseOption(oneof, token);\n skip(\";\");\n } else {\n push(token);\n parseField(oneof, \"optional\");\n }\n });\n parent.add(oneof);\n }\n\n function parseEnum(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var enm = new Enum(token);\n ifBlock(enm, function parseEnum_block(token) {\n switch(token) {\n case \"option\":\n parseOption(enm, token);\n skip(\";\");\n break;\n\n case \"reserved\":\n readRanges(enm.reserved || (enm.reserved = []), true);\n break;\n\n default:\n parseEnumValue(enm, token);\n }\n });\n parent.add(enm);\n }\n\n function parseEnumValue(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token))\n throw illegal(token, \"name\");\n\n skip(\"=\");\n var value = parseId(next(), true),\n dummy = {\n options: undefined\n };\n dummy.setOption = function(name, value) {\n if (this.options === undefined)\n this.options = {};\n this.options[name] = value;\n };\n ifBlock(dummy, function parseEnumValue_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseEnumValue_line() {\n parseInlineOptions(dummy); // skip\n });\n parent.add(token, value, dummy.comment, dummy.options);\n }\n\n function parseOption(parent, token) {\n var isCustom = skip(\"(\", true);\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token;\n var option = name;\n var propName;\n\n if (isCustom) {\n skip(\")\");\n name = \"(\" + name + \")\";\n option = name;\n token = peek();\n if (fqTypeRefRe.test(token)) {\n propName = token.slice(1); //remove '.' before property name\n name += token;\n next();\n }\n }\n skip(\"=\");\n var optionValue = parseOptionValue(parent, name);\n setParsedOption(parent, option, optionValue, propName);\n }\n\n function parseOptionValue(parent, name) {\n // { a: \"foo\" b { c: \"bar\" } }\n if (skip(\"{\", true)) {\n var objectResult = {};\n\n while (!skip(\"}\", true)) {\n /* istanbul ignore if */\n if (!nameRe.test(token = next())) {\n throw illegal(token, \"name\");\n }\n if (token === null) {\n throw illegal(token, \"end of input\");\n }\n\n var value;\n var propName = token;\n\n skip(\":\", true);\n\n if (peek() === \"{\")\n value = parseOptionValue(parent, name + \".\" + token);\n else if (peek() === \"[\") {\n // option (my_option) = {\n // repeated_value: [ \"foo\", \"bar\" ]\n // };\n value = [];\n var lastValue;\n if (skip(\"[\", true)) {\n do {\n lastValue = readValue(true);\n value.push(lastValue);\n } while (skip(\",\", true));\n skip(\"]\");\n if (typeof lastValue !== \"undefined\") {\n setOption(parent, name + \".\" + token, lastValue);\n }\n }\n } else {\n value = readValue(true);\n setOption(parent, name + \".\" + token, value);\n }\n\n var prevValue = objectResult[propName];\n\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n\n objectResult[propName] = value;\n\n // Semicolons and commas can be optional\n skip(\",\", true);\n skip(\";\", true);\n }\n\n return objectResult;\n }\n\n var simpleValue = readValue(true);\n setOption(parent, name, simpleValue);\n return simpleValue;\n // Does not enforce a delimiter to be universal\n }\n\n function setOption(parent, name, value) {\n if (parent.setOption)\n parent.setOption(name, value);\n }\n\n function setParsedOption(parent, name, value, propName) {\n if (parent.setParsedOption)\n parent.setParsedOption(name, value, propName);\n }\n\n function parseInlineOptions(parent) {\n if (skip(\"[\", true)) {\n do {\n parseOption(parent, \"option\");\n } while (skip(\",\", true));\n skip(\"]\");\n }\n return parent;\n }\n\n function parseService(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"service name\");\n\n var service = new Service(token);\n ifBlock(service, function parseService_block(token) {\n if (parseCommon(service, token))\n return;\n\n /* istanbul ignore else */\n if (token === \"rpc\")\n parseMethod(service, token);\n else\n throw illegal(token);\n });\n parent.add(service);\n }\n\n function parseMethod(parent, token) {\n // Get the comment of the preceding line now (if one exists) in case the\n // method is defined across multiple lines.\n var commentText = cmnt();\n\n var type = token;\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token,\n requestType, requestStream,\n responseType, responseStream;\n\n skip(\"(\");\n if (skip(\"stream\", true))\n requestStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n requestType = token;\n skip(\")\"); skip(\"returns\"); skip(\"(\");\n if (skip(\"stream\", true))\n responseStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n responseType = token;\n skip(\")\");\n\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\n method.comment = commentText;\n ifBlock(method, function parseMethod_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(method, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n });\n parent.add(method);\n }\n\n function parseExtension(parent, token) {\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"reference\");\n\n var reference = token;\n ifBlock(null, function parseExtension_block(token) {\n switch (token) {\n\n case \"required\":\n case \"repeated\":\n parseField(parent, token, reference);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(parent, \"proto3_optional\", reference);\n } else {\n parseField(parent, \"optional\", reference);\n }\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n push(token);\n parseField(parent, \"optional\", reference);\n break;\n }\n });\n }\n\n var token;\n while ((token = next()) !== null) {\n switch (token) {\n\n case \"package\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parsePackage();\n break;\n\n case \"import\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseImport();\n break;\n\n case \"syntax\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseSyntax();\n break;\n\n case \"option\":\n\n parseOption(ptr, token);\n skip(\";\");\n break;\n\n default:\n\n /* istanbul ignore else */\n if (parseCommon(ptr, token)) {\n head = false;\n continue;\n }\n\n /* istanbul ignore next */\n throw illegal(token);\n }\n }\n\n parse.filename = null;\n return {\n \"package\" : pkg,\n \"imports\" : imports,\n weakImports : weakImports,\n syntax : syntax,\n root : root\n };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n * @variation 2\n */\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(39);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(27);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(39);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(23);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(16),\n Enum = require(15),\n OneOf = require(25),\n util = require(37);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n if (sync)\n throw err;\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(32);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(39);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(23);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(22),\n util = require(37),\n rpc = require(31);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n setCommentAltRe = /^\\s*\\*?\\/*/,\n setCommentSplitRe = /\\n/g,\n whitespaceRe = /\\s/,\n unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n \"0\": \"\\0\",\n \"r\": \"\\r\",\n \"n\": \"\\n\",\n \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.} map Special characters map\n * @memberof tokenize\n */\nfunction unescape(str) {\n return str.replace(unescapeRe, function($0, $1) {\n switch ($1) {\n case \"\\\\\":\n case \"\":\n return $1;\n default:\n return unescapeMap[$1] || \"\";\n }\n });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Gets the next token and advances.\n * @typedef TokenizerHandleNext\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Peeks for the next token.\n * @typedef TokenizerHandlePeek\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Pushes a token back to the stack.\n * @typedef TokenizerHandlePush\n * @type {function}\n * @param {string} token Token\n * @returns {undefined}\n */\n\n/**\n * Skips the next token.\n * @typedef TokenizerHandleSkip\n * @type {function}\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] If optional\n * @returns {boolean} Whether the token matched\n * @throws {Error} If the token didn't match and is not optional\n */\n\n/**\n * Gets the comment on the previous line or, alternatively, the line comment on the specified line.\n * @typedef TokenizerHandleCmnt\n * @type {function}\n * @param {number} [line] Line number\n * @returns {string|null} Comment text or `null` if none\n */\n\n/**\n * Handle object returned from {@link tokenize}.\n * @interface ITokenizerHandle\n * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof)\n * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof)\n * @property {TokenizerHandlePush} push Pushes a token back to the stack\n * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n * @property {number} line Current line number\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode.\n * @returns {ITokenizerHandle} Tokenizer handle\n */\nfunction tokenize(source, alternateCommentMode) {\n /* eslint-disable callback-return */\n source = source.toString();\n\n var offset = 0,\n length = source.length,\n line = 1,\n lastCommentLine = 0,\n comments = {};\n\n var stack = [];\n\n var stringDelim = null;\n\n /* istanbul ignore next */\n /**\n * Creates an error for illegal syntax.\n * @param {string} subject Subject\n * @returns {Error} Error created\n * @inner\n */\n function illegal(subject) {\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n }\n\n /**\n * Reads a string till its end.\n * @returns {string} String read\n * @inner\n */\n function readString() {\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n re.lastIndex = offset - 1;\n var match = re.exec(source);\n if (!match)\n throw illegal(\"string\");\n offset = re.lastIndex;\n push(stringDelim);\n stringDelim = null;\n return unescape(match[1]);\n }\n\n /**\n * Gets the character at `pos` within the source.\n * @param {number} pos Position\n * @returns {string} Character\n * @inner\n */\n function charAt(pos) {\n return source.charAt(pos);\n }\n\n /**\n * Sets the current comment text.\n * @param {number} start Start offset\n * @param {number} end End offset\n * @param {boolean} isLeading set if a leading comment\n * @returns {undefined}\n * @inner\n */\n function setComment(start, end, isLeading) {\n var comment = {\n type: source.charAt(start++),\n lineEmpty: false,\n leading: isLeading,\n };\n var lookback;\n if (alternateCommentMode) {\n lookback = 2; // alternate comment parsing: \"//\" or \"/*\"\n } else {\n lookback = 3; // \"///\" or \"/**\"\n }\n var commentOffset = start - lookback,\n c;\n do {\n if (--commentOffset < 0 ||\n (c = source.charAt(commentOffset)) === \"\\n\") {\n comment.lineEmpty = true;\n break;\n }\n } while (c === \" \" || c === \"\\t\");\n var lines = source\n .substring(start, end)\n .split(setCommentSplitRe);\n for (var i = 0; i < lines.length; ++i)\n lines[i] = lines[i]\n .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, \"\")\n .trim();\n comment.text = lines\n .join(\"\\n\")\n .trim();\n\n comments[line] = comment;\n lastCommentLine = line;\n }\n\n function isDoubleSlashCommentLine(startOffset) {\n var endOffset = findEndOfLine(startOffset);\n\n // see if remaining line matches comment pattern\n var lineText = source.substring(startOffset, endOffset);\n var isComment = /^\\s*\\/\\//.test(lineText);\n return isComment;\n }\n\n function findEndOfLine(cursor) {\n // find end of cursor's line\n var endOffset = cursor;\n while (endOffset < length && charAt(endOffset) !== \"\\n\") {\n endOffset++;\n }\n return endOffset;\n }\n\n /**\n * Obtains the next token.\n * @returns {string|null} Next token or `null` on eof\n * @inner\n */\n function next() {\n if (stack.length > 0)\n return stack.shift();\n if (stringDelim)\n return readString();\n var repeat,\n prev,\n curr,\n start,\n isDoc,\n isLeadingComment = offset === 0;\n do {\n if (offset === length)\n return null;\n repeat = false;\n while (whitespaceRe.test(curr = charAt(offset))) {\n if (curr === \"\\n\") {\n isLeadingComment = true;\n ++line;\n }\n if (++offset === length)\n return null;\n }\n\n if (charAt(offset) === \"/\") {\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n if (charAt(offset) === \"/\") { // Line\n if (!alternateCommentMode) {\n // check for triple-slash comment\n isDoc = charAt(start = offset + 1) === \"/\";\n\n while (charAt(++offset) !== \"\\n\") {\n if (offset === length) {\n return null;\n }\n }\n ++offset;\n if (isDoc) {\n setComment(start, offset - 1, isLeadingComment);\n // Trailing comment cannot not be multi-line,\n // so leading comment state should be reset to handle potential next comments\n isLeadingComment = true;\n }\n ++line;\n repeat = true;\n } else {\n // check for double-slash comments, consolidating consecutive lines\n start = offset;\n isDoc = false;\n if (isDoubleSlashCommentLine(offset - 1)) {\n isDoc = true;\n do {\n offset = findEndOfLine(offset);\n if (offset === length) {\n break;\n }\n offset++;\n if (!isLeadingComment) {\n // Trailing comment cannot not be multi-line\n break;\n }\n } while (isDoubleSlashCommentLine(offset));\n } else {\n offset = Math.min(length, findEndOfLine(offset) + 1);\n }\n if (isDoc) {\n setComment(start, offset, isLeadingComment);\n isLeadingComment = true;\n }\n line++;\n repeat = true;\n }\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n // check for /** (regular comment mode) or /* (alternate comment mode)\n start = offset + 1;\n isDoc = alternateCommentMode || charAt(start) === \"*\";\n do {\n if (curr === \"\\n\") {\n ++line;\n }\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n prev = curr;\n curr = charAt(offset);\n } while (prev !== \"*\" || curr !== \"/\");\n ++offset;\n if (isDoc) {\n setComment(start, offset - 2, isLeadingComment);\n isLeadingComment = true;\n }\n repeat = true;\n } else {\n return \"/\";\n }\n }\n } while (repeat);\n\n // offset !== length if we got here\n\n var end = offset;\n delimRe.lastIndex = 0;\n var delim = delimRe.test(charAt(end++));\n if (!delim)\n while (end < length && !delimRe.test(charAt(end)))\n ++end;\n var token = source.substring(offset, offset = end);\n if (token === \"\\\"\" || token === \"'\")\n stringDelim = token;\n return token;\n }\n\n /**\n * Pushes a token back to the stack.\n * @param {string} token Token\n * @returns {undefined}\n * @inner\n */\n function push(token) {\n stack.push(token);\n }\n\n /**\n * Peeks for the next token.\n * @returns {string|null} Token or `null` on eof\n * @inner\n */\n function peek() {\n if (!stack.length) {\n var token = next();\n if (token === null)\n return null;\n push(token);\n }\n return stack[0];\n }\n\n /**\n * Skips a token.\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] Whether the token is optional\n * @returns {boolean} `true` when skipped, `false` if not\n * @throws {Error} When a required token is not present\n * @inner\n */\n function skip(expected, optional) {\n var actual = peek(),\n equals = actual === expected;\n if (equals) {\n next();\n return true;\n }\n if (!optional)\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n return false;\n }\n\n /**\n * Gets a comment.\n * @param {number} [trailingLine] Line number if looking for a trailing comment\n * @returns {string|null} Comment text\n * @inner\n */\n function cmnt(trailingLine) {\n var ret = null;\n var comment;\n if (trailingLine === undefined) {\n comment = comments[line - 1];\n delete comments[line - 1];\n if (comment && (alternateCommentMode || comment.type === \"*\" || comment.lineEmpty)) {\n ret = comment.leading ? comment.text : null;\n }\n } else {\n /* istanbul ignore else */\n if (lastCommentLine < trailingLine) {\n peek();\n }\n comment = comments[trailingLine];\n delete comments[trailingLine];\n if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === \"/\")) {\n ret = comment.leading ? null : comment.text;\n }\n }\n return ret;\n }\n\n return Object.defineProperty({\n next: next,\n peek: peek,\n push: push,\n skip: skip,\n cmnt: cmnt\n }, \"line\", {\n get: function() { return line; }\n });\n /* eslint-enable callback-return */\n}\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(23);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(15),\n OneOf = require(25),\n Field = require(16),\n MapField = require(20),\n Service = require(33),\n Message = require(21),\n Reader = require(27),\n Writer = require(42),\n util = require(37),\n encoder = require(14),\n decoder = require(13),\n verifier = require(40),\n converter = require(12),\n wrappers = require(41);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {number[][]} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n return Namespace.prototype.resolveAll.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n return this.fields[name]\n || this.oneofs && this.oneofs[name]\n || this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n return this.setup().fromObject(object);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n return this.setup().toObject(message, options);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(37);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = {};\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(39);\n\nvar roots = require(30);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(8);\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n safePropQuoteRe = /\"/g;\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || util.isReserved(prop))\n return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(35);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(15);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (part === \"__proto__\" || part === \"prototype\") {\n return dst;\n }\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(29))());\n }\n});\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(39);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(6);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(7);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(10);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(9);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(38);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(15),\n util = require(37);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(21);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object)).finish()\n });\n }\n }\n\n return this.fromObject(object);\n },\n\n toObject: function(message, options) {\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(39);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(42);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(39);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/dist/protobuf.min.js b/node_modules/protobufjs/dist/protobuf.min.js new file mode 100644 index 0000000..2a238fb --- /dev/null +++ b/node_modules/protobufjs/dist/protobuf.min.js @@ -0,0 +1,8 @@ +/*! + * protobuf.js v7.3.0 (c) 2016, daniel wirtz + * compiled fri, 10 may 2024 03:38:35 utc + * licensed under the bsd-3-clause license + * see: https://github.com/dcodeio/protobuf.js for details + */ +!function(nt){"use strict";!function(r,e,t){var i=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}(t[0]);i.util.global.protobuf=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(i.util.Long=t,i.configure()),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}({1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,o=!0;for(;r>2],r=(3&f)<<4,u=1;break;case 1:s[o++]=h[r|f>>4],r=(15&f)<<2,u=2;break;case 2:s[o++]=h[r|f>>6],s[o++]=h[63&f],u=0}8191>4,r=u,s=2;break;case 2:i[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:i[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(a);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){function c(i,n){"string"==typeof i&&(n=i,i=nt);var f=[];function h(t){if("string"!=typeof t){var i=a();if(c.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){u[0]=t,i[n]=f[0],i[n+1]=f[1],i[n+2]=f[2],i[n+3]=f[3]}function e(t,i,n){u[0]=t,i[n]=f[3],i[n+1]=f[2],i[n+2]=f[1],i[n+3]=f[0]}function s(t,i){return f[0]=t[i],f[1]=t[i+1],f[2]=t[i+2],f[3]=t[i+3],u[0]}function o(t,i){return f[3]=t[i],f[2]=t[i+1],f[1]=t[i+2],f[0]=t[i+3],u[0]}var u,f,h,a,c;function l(t,i,n,r,e,s){var o,u=r<0?1:0;0===(r=u?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292>>0,e,s+n)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((u<<31|r+1023<<20|1048576*o&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function p(t,i,n){h[0]=t,i[n]=a[0],i[n+1]=a[1],i[n+2]=a[2],i[n+3]=a[3],i[n+4]=a[4],i[n+5]=a[5],i[n+6]=a[6],i[n+7]=a[7]}function v(t,i,n){h[0]=t,i[n]=a[7],i[n+1]=a[6],i[n+2]=a[5],i[n+3]=a[4],i[n+4]=a[3],i[n+5]=a[2],i[n+6]=a[1],i[n+7]=a[0]}function b(t,i){return a[0]=t[i],a[1]=t[i+1],a[2]=t[i+2],a[3]=t[i+3],a[4]=t[i+4],a[5]=t[i+5],a[6]=t[i+6],a[7]=t[i+7],h[0]}function w(t,i){return a[7]=t[i],a[6]=t[i+1],a[5]=t[i+2],a[4]=t[i+3],a[3]=t[i+4],a[2]=t[i+5],a[1]=t[i+6],a[0]=t[i+7],h[0]}return"undefined"!=typeof Float32Array?(u=new Float32Array([-0]),f=new Uint8Array(u.buffer),c=128===f[3],t.writeFloatLE=c?r:e,t.writeFloatBE=c?e:r,t.readFloatLE=c?s:o,t.readFloatBE=c?o:s):(t.writeFloatLE=i.bind(null,y),t.writeFloatBE=i.bind(null,m),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(h=new Float64Array([-0]),a=new Uint8Array(h.buffer),c=128===a[7],t.writeDoubleLE=c?p:v,t.writeDoubleBE=c?v:p,t.readDoubleLE=c?b:w,t.readDoubleBE=c?w:b):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,m,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function y(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function m(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],7:[function(t,i,n){function r(t){try{var i=eval("require")(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}i.exports=r},{}],8:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r>>1,s=null,o=r;return function(t){if(t<1||e>10),s[o++]=56320+(1023&r)):s[o++]=(15&r)<<12|(63&t[i++])<<6|63&t[i++],8191>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],11:[function(t,i,n){i.exports=e;var r=/\/|\./;function e(t,i){r.test(t)||(t="google/protobuf/"+t+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),e[t]=i}e("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),e("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),e("timestamp",{Timestamp:i}),e("empty",{Empty:{fields:{}}}),e("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),e("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),e("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),e.get=function(t){return e[t]||null}},{}],12:[function(t,i,n){var l=t(15),d=t(37);function o(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,f)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,f?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function p(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":e=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r>>3){");for(var n=0;n>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),f.basic[e]===nt?i("value=types[%i].decode(r,r.uint32())",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),f.long[r.keyType]!==nt?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):i("%s[k]=value",s)):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),f.packed[e]!==nt&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos>>0,8|a.mapKey[s.keyType],s.keyType),f===nt?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&a.packed[u]!==nt?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),f===nt?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|f)>>>0,u,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),f===nt?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|f)>>>0,u,i))}return n("return w")};var h=t(15),a=t(36),c=t(37);function l(t,i,n,r){i.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{15:15,36:36,37:37}],15:[function(t,i,n){i.exports=s;var f=t(24),r=(((s.prototype=Object.create(f.prototype)).constructor=s).className="Enum",t(23)),e=t(37);function s(t,i,n,r,e,s){if(f.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.reserved=nt,i)for(var o=Object.keys(i),u=0;ui)return!0;return!1},c.isReservedName=function(t,i){if(t)for(var n=0;n");var e=l();if(!Q.test(e))throw j(e,"name");v("=");var s=new q(g(e),A(l()),n,r);S(s,function(t){if("option"!==t)throw j(t);$(s,t),v(";")},function(){M(s)}),i.add(s);break;case"required":case"repeated":N(u,t);break;case"optional":N(u,y?"proto3_optional":"optional");break;case"oneof":e=u,n=t;if(!Q.test(n=l()))throw j(n,"name");var o=new R(g(n));S(o,function(t){"option"===t?($(o,t),v(";")):(d(t),N(o,"optional"))}),e.add(o);break;case"extensions":E(u.extensions||(u.extensions=[]));break;case"reserved":E(u.reserved||(u.reserved=[]),!0);break;default:if(!y||!Y.test(t))throw j(t);d(t),N(u,"optional")}}),t.add(u)}function N(t,i,n){var r=l();if("group"===r){var e,s,o=t,u=i,f=l();if(Q.test(f))return s=H.lcFirst(f),f===s&&(f=H.ucFirst(f)),v("="),h=A(l()),(e=new L(f)).group=!0,(s=new U(s,h,f,u)).filename=it.filename,S(e,function(t){switch(t){case"option":$(e,t),v(";");break;case"required":case"repeated":N(e,t);break;case"optional":N(e,y?"proto3_optional":"optional");break;case"message":T(e);break;case"enum":V(e);break;default:throw j(t)}}),void o.add(e).add(s);throw j(f,"name")}for(;r.endsWith(".")||p().startsWith(".");)r+=l();if(!Y.test(r))throw j(r,"type");var h=l();if(!Q.test(h))throw j(h,"name");h=g(h),v("=");var a=new U(h,A(l()),r,i,n);S(a,function(t){if("option"!==t)throw j(t);$(a,t),v(";")},function(){M(a)}),"proto3_optional"===i?(u=new R("_"+h),a.setOption("proto3_optional",!0),u.add(a),t.add(u)):t.add(a),y||!a.repeated||P.packed[r]===nt&&P.basic[r]!==nt||a.setOption("packed",!1,!0)}function V(t,i){if(!Q.test(i=l()))throw j(i,"name");var s=new z(i);S(s,function(t){switch(t){case"option":$(s,t),v(";");break;case"reserved":E(s.reserved||(s.reserved=[]),!0);break;default:var i=s,n=t;if(!Q.test(n))throw j(n,"name");v("=");var r=A(l(),!0),e={options:nt,setOption:function(t,i){this.options===nt&&(this.options={}),this.options[t]=i}};return S(e,function(t){if("option"!==t)throw j(t);$(e,t),v(";")},function(){M(e)}),void i.add(n,r,e.comment,e.options)}}),t.add(s)}function $(t,i){var n=v("(",!0);if(!Y.test(i=l()))throw j(i,"name");var r,e=i,s=e,n=(n&&(v(")"),s=e="("+e+")",i=p(),tt.test(i)&&(r=i.slice(1),e+=i,l())),v("="),function t(i,n){if(v("{",!0)){for(var r={};!v("}",!0);){if(!Q.test(h=l()))throw j(h,"name");if(null===h)throw j(h,"end of input");var e,s,o=h;if(v(":",!0),"{"===p())e=t(i,n+"."+h);else if("["===p()){if(e=[],v("[",!0)){for(;s=O(!0),e.push(s),v(",",!0););v("]"),void 0!==s&&_(i,n+"."+h,s)}}else e=O(!0),_(i,n+"."+h,e);var u=r[o];u&&(e=[].concat(u).concat(e)),r[o]=e,v(",",!0),v(";",!0)}return r}var f=O(!0);_(i,n,f);return f}(t,e));i=s,e=n,s=r,(n=t).setParsedOption&&n.setParsedOption(i,e,s)}function _(t,i,n){t.setOption&&t.setOption(i,n)}function M(t){if(v("[",!0)){for(;$(t,"option"),v(",",!0););v("]")}}for(;null!==(h=l());)switch(h){case"package":if(!w)throw j(h);if(r!==nt)throw j("package");if(r=l(),!Y.test(r))throw j(r,"name");m=m.define(r),v(";");break;case"import":if(!w)throw j(h);switch(f=u=void 0,p()){case"weak":f=s=s||[],l();break;case"public":l();default:f=e=e||[]}u=k(),v(";"),f.push(u);break;case"syntax":if(!w)throw j(h);if(v("="),o=k(),!(y="proto3"===o)&&"proto2"!==o)throw j(o,"syntax");v(";");break;case"option":$(m,h),v(";");break;default:if(x(m,h)){w=!1;continue}throw j(h)}return it.filename=null,{package:r,imports:e,weakImports:s,syntax:o,root:i}}},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[function(t,i,n){i.exports=f;var r,e=t(39),s=e.LongBits,o=e.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function f(t){this.buf=t,this.pos=0,this.len=t.length}function h(){return e.Buffer?function(t){return(f.create=function(t){return e.Buffer.isBuffer(t)?new r(t):c(t)})(t)}:c}var a,c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new f(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new f(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}f.create=h(),f.prototype.c=e.Array.prototype.subarray||e.Array.prototype.slice,f.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return a;throw this.pos=this.len,u(this,10)}),f.prototype.int32=function(){return 0|this.uint32()},f.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},f.prototype.bool=function(){return 0!==this.uint32()},f.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},f.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},f.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},f.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},f.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.c.call(this.buf,i,n)},f.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},f.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},f.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},f.u=function(t){r=t,f.create=h(),r.u();var i=e.Long?"toLong":"toNumber";e.merge(f.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return p.call(this)[i](!0)},sfixed64:function(){return p.call(this)[i](!1)}})}},{39:39}],28:[function(t,i,n){i.exports=s;var r=t(27),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(39));function s(t){r.call(this,t)}s.u=function(){e.Buffer&&(s.prototype.c=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.u()},{27:27,39:39}],29:[function(t,i,n){i.exports=f;var r,d,p,e=t(23),s=(((f.prototype=Object.create(e.prototype)).constructor=f).className="Root",t(16)),o=t(15),u=t(25),v=t(37);function f(t){e.call(this,"",t),this.deferred=[],this.files=[]}function b(){}f.fromJSON=function(t,i){return i=i||new f,t.options&&i.setOptions(t.options),i.addJSON(t.nested)},f.prototype.resolvePath=v.path.resolve,f.prototype.fetch=v.fetch,f.prototype.load=function t(i,s,e){"function"==typeof s&&(e=s,s=nt);var o=this;if(!e)return v.asPromise(t,o,i,s);var u=e===b;function f(t,i){if(e){if(u)throw t;var n=e;e=null,n(t,i)}}function h(t){var i=t.lastIndexOf("google/protobuf/");if(-1]/g,E=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,A=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,x=/^ *[*/]+ */,S=/^\s*\*?\/*/,T=/\n/g,N=/\s/,r=/\\(.?)/g,e={0:"\0",r:"\r",n:"\n",t:"\t"};function V(t){return t.replace(r,function(t,i){switch(i){case"\\":case"":return i;default:return e[i]||""}})}function s(h,a){h=h.toString();var c=0,l=h.length,d=1,f=0,p={},v=[],b=null;function w(t){return Error("illegal "+t+" (line "+d+")")}function y(t){return h[0|t]||""}function m(t,i,n){var r,e={type:h[0|t++]||"",lineEmpty:!1,leading:n},n=a?2:3,s=t-n;do{if(--s<0||"\n"==(r=h[0|s]||"")){e.lineEmpty=!0;break}}while(" "===r||"\t"===r);for(var o=h.substring(t,i).split(T),u=0;u>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),o=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{39:39}],39:[function(t,i,n){var r=n;function e(t,i,n){for(var r=Object.keys(i),e=0;e>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127>>7;i[n++]=t.lo}function b(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}c.create=l(),c.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(c.alloc=e.pool(c.alloc,e.Array.prototype.subarray)),c.prototype.g=function(t,i,n){return this.tail=this.tail.next=new f(t,i,n),this.len+=i,this},(p.prototype=Object.create(f.prototype)).fn=function(t,i,n){for(;127>>=7;i[n]=t},c.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},c.prototype.int32=function(t){return t<0?this.g(v,10,s.fromNumber(t)):this.uint32(t)},c.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},c.prototype.int64=c.prototype.uint64=function(t){t=s.from(t);return this.g(v,t.length(),t)},c.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.g(v,t.length(),t)},c.prototype.bool=function(t){return this.g(d,1,t?1:0)},c.prototype.sfixed32=c.prototype.fixed32=function(t){return this.g(b,4,t>>>0)},c.prototype.sfixed64=c.prototype.fixed64=function(t){t=s.from(t);return this.g(b,4,t.lo).g(b,4,t.hi)},c.prototype.float=function(t){return this.g(e.float.writeFloatLE,4,t)},c.prototype.double=function(t){return this.g(e.float.writeDoubleLE,8,t)};var w=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r>>0;return n?(e.isString(t)&&(i=c.alloc(n=o.length(t)),o.decode(t,i,0),t=i),this.uint32(n).g(w,n,t)):this.g(d,1,0)},c.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).g(u.write,i,t):this.g(d,1,0)},c.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new f(h,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new f(h,0,0),this.len=0),this},c.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},c.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},c.u=function(t){r=t,c.create=l(),r.u()}},{39:39}],43:[function(t,i,n){i.exports=s;var r=t(42),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(39));function s(){r.call(this)}function o(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.u=function(){s.alloc=e.y,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r>>0;return this.uint32(i),i&&this.g(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.g(o,i,t),this},s.u()},{39:39,42:42}]},{},[19])}(); +//# sourceMappingURL=protobuf.min.js.map diff --git a/node_modules/protobufjs/dist/protobuf.min.js.map b/node_modules/protobufjs/dist/protobuf.min.js.map new file mode 100644 index 0000000..97f18d4 --- /dev/null +++ b/node_modules/protobufjs/dist/protobuf.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["lib/prelude.js","../node_modules/@protobufjs/aspromise/index.js","../node_modules/@protobufjs/base64/index.js","../node_modules/@protobufjs/codegen/index.js","../node_modules/@protobufjs/eventemitter/index.js","../node_modules/@protobufjs/fetch/index.js","../node_modules/@protobufjs/float/index.js","../node_modules/@protobufjs/inquire/index.js","../node_modules/@protobufjs/path/index.js","../node_modules/@protobufjs/pool/index.js","../node_modules/@protobufjs/utf8/index.js","../src/common.js","../src/converter.js","../src/decoder.js","../src/encoder.js","../src/enum.js","../src/field.js","../src/index-light.js","../src/index-minimal.js","../src/index","../src/mapfield.js","../src/message.js","../src/method.js","../src/namespace.js","../src/object.js","../src/oneof.js","../src/parse.js","../src/reader.js","../src/reader_buffer.js","../src/root.js","../src/roots.js","../src/rpc.js","../src/rpc/service.js","../src/service.js","../src/tokenize.js","../src/type.js","../src/types.js","../src/util.js","../src/util/longbits.js","../src/util/minimal.js","../src/verifier.js","../src/wrappers.js","../src/writer.js","../src/writer_buffer.js"],"names":["undefined","modules","cache","entries","protobuf","$require","name","$module","call","exports","util","global","define","amd","Long","isLong","configure","module","1","require","fn","ctx","params","Array","arguments","length","offset","index","pending","Promise","resolve","reject","err","apply","base64","string","p","n","Math","ceil","b64","s64","i","encode","buffer","start","end","t","parts","chunk","j","b","push","String","fromCharCode","slice","join","invalidEncoding","decode","c","charCodeAt","Error","test","codegen","functionParams","functionName","body","Codegen","formatStringOrScope","source","toString","verbose","console","log","scopeKeys","Object","keys","scopeParams","scopeValues","scopeOffset","Function","formatParams","formatOffset","replace","$0","$1","value","Number","floor","JSON","stringify","functionNameOverride","EventEmitter","this","_listeners","prototype","on","evt","off","listeners","splice","emit","args","fetch","asPromise","fs","filename","options","callback","xhr","readFile","contents","XMLHttpRequest","binary","onreadystatechange","readyState","status","response","responseText","Uint8Array","overrideMimeType","responseType","open","send","factory","writeFloat_ieee754","writeUint","val","buf","pos","sign","isNaN","round","exponent","LN2","pow","readFloat_ieee754","readUint","uint","mantissa","NaN","Infinity","writeFloat_f32_cpy","f32","f8b","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","f64","le","writeDouble_ieee754","off0","off1","readDouble_ieee754","lo","hi","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","Float32Array","writeFloatLE","writeFloatBE","readFloatLE","readFloatBE","bind","writeUintLE","writeUintBE","readUintLE","readUintBE","Float64Array","writeDoubleLE","writeDoubleBE","readDoubleLE","readDoubleBE","inquire","moduleName","mod","eval","e","isAbsolute","path","normalize","split","absolute","prefix","shift","originPath","includePath","alreadyNormalized","alloc","size","SIZE","MAX","slab","utf8","len","read","write","c1","c2","common","commonRe","json","nested","google","Any","fields","type_url","type","id","Duration","timeType","seconds","nanos","Timestamp","Empty","Struct","keyType","Value","oneofs","kind","oneof","nullValue","numberValue","stringValue","boolValue","structValue","listValue","NullValue","values","NULL_VALUE","ListValue","rule","DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue","FieldMask","paths","get","file","Enum","genValuePartial_fromObject","gen","field","fieldIndex","prop","defaultAlreadyEmitted","resolvedType","typeDefault","repeated","fullName","isUnsigned","genValuePartial_toObject","converter","fromObject","mtype","fieldsArray","safeProp","map","toObject","sort","compareFieldsById","repeatedFields","mapFields","normalFields","partOf","arrayDefault","valuesById","long","low","high","unsigned","toNumber","bytes","hasKs2","_fieldsArray","indexOf","filter","group","ref","types","defaults","basic","packed","rfield","required","wireType","mapKey","genTypePartial","optional","ReflectionObject","Namespace","create","constructor","className","comment","comments","valuesOptions","TypeError","reserved","fromJSON","enm","toJSON","toJSONOptions","keepComments","Boolean","add","isString","isInteger","isReservedId","isReservedName","allow_alias","remove","Field","Type","ruleRe","extend","isObject","toLowerCase","message","defaultValue","extensionField","declaringField","_packed","defineProperty","getOption","setOption","ifNotSet","resolved","parent","lookupTypeOrEnum","proto3_optional","fromNumber","freeze","newBuffer","emptyObject","emptyArray","ctor","d","fieldId","fieldType","fieldRule","decorateType","decorateEnum","fieldName","default","_configure","Type_","build","load","root","Root","loadSync","encoder","decoder","verifier","OneOf","MapField","Service","Method","Message","wrappers","Writer","BufferWriter","Reader","BufferReader","rpc","roots","tokenize","parse","resolvedKeyType","fieldKeyType","fieldValueType","properties","$type","writer","encodeDelimited","reader","decodeDelimited","verify","object","requestType","requestStream","responseStream","parsedOptions","resolvedRequestType","resolvedResponseType","lookupType","arrayToJSON","array","obj","_nestedArray","clearCache","namespace","addJSON","toArray","nestedArray","nestedJson","names","methods","getEnum","prev","setOptions","onAdd","onRemove","isArray","ptr","part","resolveAll","lookup","filterTypes","parentAlreadyChecked","found","lookupEnum","lookupService","Service_","Enum_","defineProperties","unshift","_handleAdd","_handleRemove","setParsedOption","propName","opt","newOpt","find","hasOwnProperty","newValue","setProperty","Root_","fieldNames","addFieldsToParent","oneofName","oneOfGetter","set","oneOfSetter","keepCase","base10Re","base10NegRe","base16Re","base16NegRe","base8Re","base8NegRe","numberRe","nameRe","typeRefRe","fqTypeRefRe","pkg","imports","weakImports","syntax","token","whichImports","preferTrailingComment","tn","alternateCommentMode","next","peek","skip","cmnt","head","isProto3","applyCase","camelCase","illegal","insideTryCatch","line","readString","readValue","acceptTypeRef","parseNumber","substring","parseInt","parseFloat","readRanges","target","acceptStrings","parseId","dummy","ifBlock","parseOption","parseInlineOptions","acceptNegative","parseCommon","parseType","parseEnum","parseService","service","parseMethod","commentText","method","parseExtension","reference","parseField","fnIf","fnElse","trailingLine","parseMapField","valueType","extensions","parseGroup","lcFirst","ucFirst","endsWith","startsWith","parseEnumValue","isCustom","option","optionValue","parseOptionValue","objectResult","lastValue","prevValue","concat","simpleValue","package","LongBits","indexOutOfRange","writeLength","RangeError","Buffer","isBuffer","create_array","readLongVarint","bits","readFixed32_end","readFixed64","_slice","subarray","uint32","int32","sint32","bool","fixed32","sfixed32","float","double","nativeBuffer","skipType","BufferReader_","merge","int64","uint64","sint64","zzDecode","fixed64","sfixed64","utf8Slice","min","deferred","files","SYNC","resolvePath","self","sync","finish","cb","getBundledFileName","idx","lastIndexOf","altname","process","parsed","queued","weak","setTimeout","readFileSync","isNode","exposeRe","tryHandleExtension","sisterField","extendedType","parse_","common_","rpcImpl","requestDelimited","responseDelimited","rpcCall","requestCtor","responseCtor","request","endedByRPC","_methodsArray","inherited","methodsArray","rpcService","methodName","isReserved","m","q","s","delimRe","stringDoubleRe","stringSingleRe","setCommentRe","setCommentAltRe","setCommentSplitRe","whitespaceRe","unescapeRe","unescapeMap","0","r","unescape","str","lastCommentLine","stack","stringDelim","subject","charAt","setComment","isLeading","lineEmpty","leading","lookback","commentOffset","lines","trim","text","isDoubleSlashCommentLine","startOffset","endOffset","findEndOfLine","lineText","cursor","re","match","lastIndex","exec","repeat","curr","isDoc","isLeadingComment","expected","actual","ret","_fieldsById","_oneofsArray","_ctor","fieldsById","oneofsArray","generateConstructor","ctorProperties","setup","originalThis","wrapper","fork","ldelim","typeName","bake","o","safePropBackslashRe","key","safePropQuoteRe","camelCaseRe","toUpperCase","decorateEnumIndex","a","decorateRoot","enumerable","dst","setProp","zero","zzEncode","zeroHash","from","fromString","toLong","fromHash","hash","toHash","mask","part0","part1","part2","src","newError","CustomError","captureStackTrace","writable","configurable","pool","versions","node","window","isFinite","isset","isSet","utf8Write","_Buffer_from","_Buffer_allocUnsafe","sizeOrArray","dcodeIO","key2Re","key32Re","key64Re","longToHash","longFromHash","fromBits","ProtocolError","fieldMap","longs","enums","encoding","allocUnsafe","seenFirstField","oneofProp","invalid","genVerifyValue","messageName","Op","noop","State","tail","states","writeByte","VarintOp","writeVarint64","writeFixed32","_push","writeBytes","reset","BufferWriter_","writeStringBuffer","writeBytesBuffer","copy","byteLength"],"mappings":";;;;;;AAAA,CAAA,SAAAA,IAAA,aAAA,CAAA,SAAAC,EAAAC,EAAAC,GAcA,IAAAC,EAPA,SAAAC,EAAAC,GACA,IAAAC,EAAAL,EAAAI,GAGA,OAFAC,GACAN,EAAAK,GAAA,GAAAE,KAAAD,EAAAL,EAAAI,GAAA,CAAAG,QAAA,EAAA,EAAAJ,EAAAE,EAAAA,EAAAE,OAAA,EACAF,EAAAE,OACA,EAEAN,EAAA,EAAA,EAGAC,EAAAM,KAAAC,OAAAP,SAAAA,EAGA,YAAA,OAAAQ,QAAAA,OAAAC,KACAD,OAAA,CAAA,QAAA,SAAAE,GAKA,OAJAA,GAAAA,EAAAC,SACAX,EAAAM,KAAAI,KAAAA,EACAV,EAAAY,UAAA,GAEAZ,CACA,CAAA,EAGA,UAAA,OAAAa,QAAAA,QAAAA,OAAAR,UACAQ,OAAAR,QAAAL,EAEA,EAAA,CAAAc,EAAA,CAAA,SAAAC,EAAAF,EAAAR,GChCAQ,EAAAR,QAmBA,SAAAW,EAAAC,GACA,IAAAC,EAAAC,MAAAC,UAAAC,OAAA,CAAA,EACAC,EAAA,EACAC,EAAA,EACAC,EAAA,CAAA,EACA,KAAAD,EAAAH,UAAAC,QACAH,EAAAI,CAAA,IAAAF,UAAAG,CAAA,IACA,OAAA,IAAAE,QAAA,SAAAC,EAAAC,GACAT,EAAAI,GAAA,SAAAM,GACA,GAAAJ,EAEA,GADAA,EAAA,CAAA,EACAI,EACAD,EAAAC,CAAA,MACA,CAGA,IAFA,IAAAV,EAAAC,MAAAC,UAAAC,OAAA,CAAA,EACAC,EAAA,EACAA,EAAAJ,EAAAG,QACAH,EAAAI,CAAA,IAAAF,UAAAE,GACAI,EAAAG,MAAA,KAAAX,CAAA,CACA,CAEA,EACA,IACAF,EAAAa,MAAAZ,GAAA,KAAAC,CAAA,CAMA,CALA,MAAAU,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d,KAAA,YACAC,GAAA,CACA,EACAc,YAAA,CACAf,KAAA,SACAC,GAAA,CACA,EACAe,YAAA,CACAhB,KAAA,SACAC,GAAA,CACA,EACAgB,UAAA,CACAjB,KAAA,OACAC,GAAA,CACA,EACAiB,YAAA,CACAlB,KAAA,SACAC,GAAA,CACA,EACAkB,UAAA,CACAnB,KAAA,YACAC,GAAA,CACA,CACA,CACA,EAEAmB,UAAA,CACAC,OAAA,CACAC,WAAA,CACA,CACA,EASAC,UAAA,CACAzB,OAAA,CACAuB,OAAA,CACAG,KAAA,WACAxB,KAAA,QACAC,GAAA,CACA,CACA,CACA,CACA,CAAA,EAEAT,EAAA,WAAA,CASAiC,YAAA,CACA3B,OAAA,CACAzH,MAAA,CACA2H,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASAyB,WAAA,CACA5B,OAAA,CACAzH,MAAA,CACA2H,KAAA,QACAC,GAAA,CACA,CACA,CACA,EASA0B,WAAA,CACA7B,OAAA,CACAzH,MAAA,CACA2H,KAAA,QACAC,GAAA,CACA,CACA,CACA,EASA2B,YAAA,CACA9B,OAAA,CACAzH,MAAA,CACA2H,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASA4B,WAAA,CACA/B,OAAA,CACAzH,MAAA,CACA2H,KAAA,QACAC,GAAA,CACA,CACA,CACA,EASA6B,YAAA,CACAhC,OAAA,CACAzH,MAAA,CACA2H,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASA8B,UAAA,CACAjC,OAAA,CACAzH,MAAA,CACA2H,KAAA,OACAC,GAAA,CACA,CACA,CACA,EASA+B,YAAA,CACAlC,OAAA,CACAzH,MAAA,CACA2H,KAAA,SACAC,GAAA,CACA,CACA,CACA,EASAgC,WAAA,CACAnC,OAAA,CACAzH,MAAA,CACA2H,KAAA,QACAC,GAAA,CACA,CACA,CACA,CACA,CAAA,EAEAT,EAAA,aAAA,CASA0C,UAAA,CACApC,OAAA,CACAqC,MAAA,CACAX,KAAA,WACAxB,KAAA,SACAC,G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KAAAqF,IAAA,CACA,CAuCA,SAAA4nB,EAAA1lB,EAAAC,EAAAC,GACAF,EAAAtG,OAAA,GACAf,EAAAyL,KAAAG,MAAAvE,EAAAC,EAAAC,CAAA,EACAD,EAAAsjB,UACAtjB,EAAAsjB,UAAAvjB,EAAAE,CAAA,EAEAD,EAAAsE,MAAAvE,EAAAE,CAAA,CACA,CA5CAiP,EAAAjB,EAAA,WAOAiB,EAAApL,MAAApL,EAAA8qB,EAEAtU,EAAAwW,iBAAAhtB,EAAAqgB,QAAArgB,EAAAqgB,OAAAhb,qBAAAwB,YAAA,QAAA7G,EAAAqgB,OAAAhb,UAAA0V,IAAAnb,KACA,SAAAyH,EAAAC,EAAAC,GACAD,EAAAyT,IAAA1T,EAAAE,CAAA,CAEA,EAEA,SAAAF,EAAAC,EAAAC,GACA,GAAAF,EAAA4lB,KACA5lB,EAAA4lB,KAAA3lB,EAAAC,EAAA,EAAAF,EAAAtG,MAAA,OACA,IAAA,IAAAiB,EAAA,EAAAA,EAAAqF,EAAAtG,QACAuG,EAAAC,CAAA,IAAAF,EAAArF,CAAA,GACA,CACA,EAMAwU,EAAAnR,UAAAyL,MAAA,SAAAlM,GAGA,IAAA8G,GADA9G,EADA5E,EAAAgT,SAAApO,CAAA,EACA5E,EAAA6qB,EAAAjmB,EAAA,QAAA,EACAA,GAAA7D,SAAA,EAIA,OAHAoE,KAAA2b,OAAApV,CAAA,EACAA,GACAvG,KAAAwnB,EAAAnW,EAAAwW,iBAAAthB,EAAA9G,CAAA,EACAO,IACA,EAcAqR,EAAAnR,UAAA5D,OAAA,SAAAmD,GACA,IAAA8G,EAAA1L,EAAAqgB,OAAA6M,WAAAtoB,CAAA,EAIA,OAHAO,KAAA2b,OAAApV,CAAA,EACAA,GACAvG,KAAAwnB,EAAAI,EAAArhB,EAAA9G,CAAA,EACAO,IACA,EAUAqR,EAAAjB,EAAA","file":"protobuf.min.js","sourcesContent":["(function prelude(modules, cache, entries) {\n\n // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n // sources through a conflict-free require shim and is again wrapped within an iife that\n // provides a minification-friendly `undefined` var plus a global \"use strict\" directive\n // so that minification can remove the directives of each module.\n\n function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }\n\n var protobuf = $require(entries[0]);\n\n // Expose globally\n protobuf.util.global.protobuf = protobuf;\n\n // Be nice to AMD\n if (typeof define === \"function\" && define.amd)\n define([\"long\"], function(Long) {\n if (Long && Long.isLong) {\n protobuf.util.Long = Long;\n protobuf.configure();\n }\n return protobuf;\n });\n\n // Be nice to CommonJS\n if (typeof module === \"object\" && module && module.exports)\n module.exports = protobuf;\n\n})/* end of prelude */","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = codegen;\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @param {string[]} functionParams Function parameter names\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n */\r\nfunction codegen(functionParams, functionName) {\r\n\r\n /* istanbul ignore if */\r\n if (typeof functionParams === \"string\") {\r\n functionName = functionParams;\r\n functionParams = undefined;\r\n }\r\n\r\n var body = [];\r\n\r\n /**\r\n * Appends code to the function's body or finishes generation.\r\n * @typedef Codegen\r\n * @type {function}\r\n * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r\n * @param {...*} [formatParams] Format parameters\r\n * @returns {Codegen|Function} Itself or the generated function if finished\r\n * @throws {Error} If format parameter counts do not match\r\n */\r\n\r\n function Codegen(formatStringOrScope) {\r\n // note that explicit array handling below makes this ~50% faster\r\n\r\n // finish the function\r\n if (typeof formatStringOrScope !== \"string\") {\r\n var source = toString();\r\n if (codegen.verbose)\r\n console.log(\"codegen: \" + source); // eslint-disable-line no-console\r\n source = \"return \" + source;\r\n if (formatStringOrScope) {\r\n var scopeKeys = Object.keys(formatStringOrScope),\r\n scopeParams = new Array(scopeKeys.length + 1),\r\n scopeValues = new Array(scopeKeys.length),\r\n scopeOffset = 0;\r\n while (scopeOffset < scopeKeys.length) {\r\n scopeParams[scopeOffset] = scopeKeys[scopeOffset];\r\n scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];\r\n }\r\n scopeParams[scopeOffset] = source;\r\n return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func\r\n }\r\n return Function(source)(); // eslint-disable-line no-new-func\r\n }\r\n\r\n // otherwise append to body\r\n var formatParams = new Array(arguments.length - 1),\r\n formatOffset = 0;\r\n while (formatOffset < formatParams.length)\r\n formatParams[formatOffset] = arguments[++formatOffset];\r\n formatOffset = 0;\r\n formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {\r\n var value = formatParams[formatOffset++];\r\n switch ($1) {\r\n case \"d\": case \"f\": return String(Number(value));\r\n case \"i\": return String(Math.floor(value));\r\n case \"j\": return JSON.stringify(value);\r\n case \"s\": return String(value);\r\n }\r\n return \"%\";\r\n });\r\n if (formatOffset !== formatParams.length)\r\n throw Error(\"parameter count mismatch\");\r\n body.push(formatStringOrScope);\r\n return Codegen;\r\n }\r\n\r\n function toString(functionNameOverride) {\r\n return \"function \" + (functionNameOverride || functionName || \"\") + \"(\" + (functionParams && functionParams.join(\",\") || \"\") + \"){\\n \" + body.join(\"\\n \") + \"\\n}\";\r\n }\r\n\r\n Codegen.toString = toString;\r\n return Codegen;\r\n}\r\n\r\n/**\r\n * Begins generating a function.\r\n * @memberof util\r\n * @function codegen\r\n * @param {string} [functionName] Function name if not anonymous\r\n * @returns {Codegen} Appender that appends code to the function's body\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * When set to `true`, codegen will log generated code to console. Useful for debugging.\r\n * @name util.codegen.verbose\r\n * @type {boolean}\r\n */\r\ncodegen.verbose = false;\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\nmodule.exports = fetch;\r\n\r\nvar asPromise = require(1),\r\n inquire = require(7);\r\n\r\nvar fs = inquire(\"fs\");\r\n\r\n/**\r\n * Node-style callback as used by {@link util.fetch}.\r\n * @typedef FetchCallback\r\n * @type {function}\r\n * @param {?Error} error Error, if any, otherwise `null`\r\n * @param {string} [contents] File contents, if there hasn't been an error\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Options as used by {@link util.fetch}.\r\n * @typedef FetchOptions\r\n * @type {Object}\r\n * @property {boolean} [binary=false] Whether expecting a binary response\r\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @memberof util\r\n * @param {string} filename File path or url\r\n * @param {FetchOptions} options Fetch options\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n */\r\nfunction fetch(filename, options, callback) {\r\n if (typeof options === \"function\") {\r\n callback = options;\r\n options = {};\r\n } else if (!options)\r\n options = {};\r\n\r\n if (!callback)\r\n return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\r\n\r\n // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\r\n if (!options.xhr && fs && fs.readFile)\r\n return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\r\n return err && typeof XMLHttpRequest !== \"undefined\"\r\n ? fetch.xhr(filename, options, callback)\r\n : err\r\n ? callback(err)\r\n : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\r\n });\r\n\r\n // use the XHR version otherwise.\r\n return fetch.xhr(filename, options, callback);\r\n}\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchCallback} callback Callback function\r\n * @returns {undefined}\r\n * @variation 2\r\n */\r\n\r\n/**\r\n * Fetches the contents of a file.\r\n * @name util.fetch\r\n * @function\r\n * @param {string} path File path or url\r\n * @param {FetchOptions} [options] Fetch options\r\n * @returns {Promise} Promise\r\n * @variation 3\r\n */\r\n\r\n/**/\r\nfetch.xhr = function fetch_xhr(filename, options, callback) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\r\n\r\n if (xhr.readyState !== 4)\r\n return undefined;\r\n\r\n // local cors security errors return status 0 / empty string, too. afaik this cannot be\r\n // reliably distinguished from an actually empty file for security reasons. feel free\r\n // to send a pull request if you are aware of a solution.\r\n if (xhr.status !== 0 && xhr.status !== 200)\r\n return callback(Error(\"status \" + xhr.status));\r\n\r\n // if binary data is expected, make sure that some sort of array is returned, even if\r\n // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\r\n if (options.binary) {\r\n var buffer = xhr.response;\r\n if (!buffer) {\r\n buffer = [];\r\n for (var i = 0; i < xhr.responseText.length; ++i)\r\n buffer.push(xhr.responseText.charCodeAt(i) & 255);\r\n }\r\n return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\r\n }\r\n return callback(null, xhr.responseText);\r\n };\r\n\r\n if (options.binary) {\r\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\r\n if (\"overrideMimeType\" in xhr)\r\n xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\r\n xhr.responseType = \"arraybuffer\";\r\n }\r\n\r\n xhr.open(\"GET\", filename);\r\n xhr.send();\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal path module to resolve Unix, Windows and URL paths alike.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar path = exports;\r\n\r\nvar isAbsolute =\r\n/**\r\n * Tests if the specified path is absolute.\r\n * @param {string} path Path to test\r\n * @returns {boolean} `true` if path is absolute\r\n */\r\npath.isAbsolute = function isAbsolute(path) {\r\n return /^(?:\\/|\\w+:)/.test(path);\r\n};\r\n\r\nvar normalize =\r\n/**\r\n * Normalizes the specified path.\r\n * @param {string} path Path to normalize\r\n * @returns {string} Normalized path\r\n */\r\npath.normalize = function normalize(path) {\r\n path = path.replace(/\\\\/g, \"/\")\r\n .replace(/\\/{2,}/g, \"/\");\r\n var parts = path.split(\"/\"),\r\n absolute = isAbsolute(path),\r\n prefix = \"\";\r\n if (absolute)\r\n prefix = parts.shift() + \"/\";\r\n for (var i = 0; i < parts.length;) {\r\n if (parts[i] === \"..\") {\r\n if (i > 0 && parts[i - 1] !== \"..\")\r\n parts.splice(--i, 2);\r\n else if (absolute)\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n } else if (parts[i] === \".\")\r\n parts.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n return prefix + parts.join(\"/\");\r\n};\r\n\r\n/**\r\n * Resolves the specified include path against the specified origin path.\r\n * @param {string} originPath Path to the origin file\r\n * @param {string} includePath Include path relative to origin path\r\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\r\n * @returns {string} Path to the include file\r\n */\r\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\r\n if (!alreadyNormalized)\r\n includePath = normalize(includePath);\r\n if (isAbsolute(includePath))\r\n return includePath;\r\n if (!alreadyNormalized)\r\n originPath = normalize(originPath);\r\n return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nmodule.exports = common;\n\nvar commonRe = /\\/|\\./;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {INamespace} google/protobuf/any.proto Any\n * @property {INamespace} google/protobuf/duration.proto Duration\n * @property {INamespace} google/protobuf/empty.proto Empty\n * @property {INamespace} google/protobuf/field_mask.proto FieldMask\n * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {INamespace} google/protobuf/timestamp.proto Timestamp\n * @property {INamespace} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n if (!commonRe.test(name)) {\n name = \"google/protobuf/\" + name + \".proto\";\n json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n }\n common[name] = json;\n}\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n\n /**\n * Properties of a google.protobuf.Any message.\n * @interface IAny\n * @type {Object}\n * @property {string} [typeUrl]\n * @property {Uint8Array} [bytes]\n * @memberof common\n */\n Any: {\n fields: {\n type_url: {\n type: \"string\",\n id: 1\n },\n value: {\n type: \"bytes\",\n id: 2\n }\n }\n }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n\n /**\n * Properties of a google.protobuf.Duration message.\n * @interface IDuration\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Duration: timeType = {\n fields: {\n seconds: {\n type: \"int64\",\n id: 1\n },\n nanos: {\n type: \"int32\",\n id: 2\n }\n }\n }\n});\n\ncommon(\"timestamp\", {\n\n /**\n * Properties of a google.protobuf.Timestamp message.\n * @interface ITimestamp\n * @type {Object}\n * @property {number|Long} [seconds]\n * @property {number} [nanos]\n * @memberof common\n */\n Timestamp: timeType\n});\n\ncommon(\"empty\", {\n\n /**\n * Properties of a google.protobuf.Empty message.\n * @interface IEmpty\n * @memberof common\n */\n Empty: {\n fields: {}\n }\n});\n\ncommon(\"struct\", {\n\n /**\n * Properties of a google.protobuf.Struct message.\n * @interface IStruct\n * @type {Object}\n * @property {Object.} [fields]\n * @memberof common\n */\n Struct: {\n fields: {\n fields: {\n keyType: \"string\",\n type: \"Value\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Value message.\n * @interface IValue\n * @type {Object}\n * @property {string} [kind]\n * @property {0} [nullValue]\n * @property {number} [numberValue]\n * @property {string} [stringValue]\n * @property {boolean} [boolValue]\n * @property {IStruct} [structValue]\n * @property {IListValue} [listValue]\n * @memberof common\n */\n Value: {\n oneofs: {\n kind: {\n oneof: [\n \"nullValue\",\n \"numberValue\",\n \"stringValue\",\n \"boolValue\",\n \"structValue\",\n \"listValue\"\n ]\n }\n },\n fields: {\n nullValue: {\n type: \"NullValue\",\n id: 1\n },\n numberValue: {\n type: \"double\",\n id: 2\n },\n stringValue: {\n type: \"string\",\n id: 3\n },\n boolValue: {\n type: \"bool\",\n id: 4\n },\n structValue: {\n type: \"Struct\",\n id: 5\n },\n listValue: {\n type: \"ListValue\",\n id: 6\n }\n }\n },\n\n NullValue: {\n values: {\n NULL_VALUE: 0\n }\n },\n\n /**\n * Properties of a google.protobuf.ListValue message.\n * @interface IListValue\n * @type {Object}\n * @property {Array.} [values]\n * @memberof common\n */\n ListValue: {\n fields: {\n values: {\n rule: \"repeated\",\n type: \"Value\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"wrappers\", {\n\n /**\n * Properties of a google.protobuf.DoubleValue message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n DoubleValue: {\n fields: {\n value: {\n type: \"double\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.FloatValue message.\n * @interface IFloatValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FloatValue: {\n fields: {\n value: {\n type: \"float\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int64Value message.\n * @interface IInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n Int64Value: {\n fields: {\n value: {\n type: \"int64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt64Value message.\n * @interface IUInt64Value\n * @type {Object}\n * @property {number|Long} [value]\n * @memberof common\n */\n UInt64Value: {\n fields: {\n value: {\n type: \"uint64\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.Int32Value message.\n * @interface IInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n Int32Value: {\n fields: {\n value: {\n type: \"int32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.UInt32Value message.\n * @interface IUInt32Value\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n UInt32Value: {\n fields: {\n value: {\n type: \"uint32\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BoolValue message.\n * @interface IBoolValue\n * @type {Object}\n * @property {boolean} [value]\n * @memberof common\n */\n BoolValue: {\n fields: {\n value: {\n type: \"bool\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.StringValue message.\n * @interface IStringValue\n * @type {Object}\n * @property {string} [value]\n * @memberof common\n */\n StringValue: {\n fields: {\n value: {\n type: \"string\",\n id: 1\n }\n }\n },\n\n /**\n * Properties of a google.protobuf.BytesValue message.\n * @interface IBytesValue\n * @type {Object}\n * @property {Uint8Array} [value]\n * @memberof common\n */\n BytesValue: {\n fields: {\n value: {\n type: \"bytes\",\n id: 1\n }\n }\n }\n});\n\ncommon(\"field_mask\", {\n\n /**\n * Properties of a google.protobuf.FieldMask message.\n * @interface IDoubleValue\n * @type {Object}\n * @property {number} [value]\n * @memberof common\n */\n FieldMask: {\n fields: {\n paths: {\n rule: \"repeated\",\n type: \"string\",\n id: 1\n }\n }\n }\n});\n\n/**\n * Gets the root definition of the specified common proto file.\n *\n * Bundled definitions are:\n * - google/protobuf/any.proto\n * - google/protobuf/duration.proto\n * - google/protobuf/empty.proto\n * - google/protobuf/field_mask.proto\n * - google/protobuf/struct.proto\n * - google/protobuf/timestamp.proto\n * - google/protobuf/wrappers.proto\n *\n * @param {string} file Proto file name\n * @returns {INamespace|null} Root definition or `null` if not defined\n */\ncommon.get = function get(file) {\n return common[file] || null;\n};\n","\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(15),\n util = require(37);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n var defaultAlreadyEmitted = false;\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(d%s){\", prop);\n for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n // enum unknown values passthrough\n if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen\n (\"default:\")\n (\"if(typeof(d%s)===\\\"number\\\"){m%s=d%s;break}\", prop, prop, prop);\n if (!field.repeated) gen // fallback to default value only for\n // arrays, to avoid leaving holes.\n (\"break\"); // for non-repeated fields, just ignore\n defaultAlreadyEmitted = true;\n }\n gen\n (\"case%j:\", keys[i])\n (\"case %i:\", values[keys[i]])\n (\"m%s=%j\", prop, values[keys[i]])\n (\"break\");\n } gen\n (\"}\");\n } else gen\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s=types[%i].fromObject(d%s)\", prop, fieldIndex, prop);\n } else {\n var isUnsigned = false;\n switch (field.type) {\n case \"double\":\n case \"float\": gen\n (\"m%s=Number(d%s)\", prop, prop); // also catches \"NaN\", \"Infinity\"\n break;\n case \"uint32\":\n case \"fixed32\": gen\n (\"m%s=d%s>>>0\", prop, prop);\n break;\n case \"int32\":\n case \"sint32\":\n case \"sfixed32\": gen\n (\"m%s=d%s|0\", prop, prop);\n break;\n case \"uint64\":\n isUnsigned = true;\n // eslint-disable-next-line no-fallthrough\n case \"int64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(util.Long)\")\n (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n (\"else if(typeof d%s===\\\"string\\\")\", prop)\n (\"m%s=parseInt(d%s,10)\", prop, prop)\n (\"else if(typeof d%s===\\\"number\\\")\", prop)\n (\"m%s=d%s\", prop, prop)\n (\"else if(typeof d%s===\\\"object\\\")\", prop)\n (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n break;\n case \"bytes\": gen\n (\"if(typeof d%s===\\\"string\\\")\", prop)\n (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n (\"else if(d%s.length >= 0)\", prop)\n (\"m%s=d%s\", prop, prop);\n break;\n case \"string\": gen\n (\"m%s=String(d%s)\", prop, prop);\n break;\n case \"bool\": gen\n (\"m%s=Boolean(d%s)\", prop, prop);\n break;\n /* default: gen\n (\"m%s=d%s\", prop, prop);\n break; */\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray;\n var gen = util.codegen([\"d\"], mtype.name + \"$fromObject\")\n (\"if(d instanceof this.ctor)\")\n (\"return d\");\n if (!fields.length) return gen\n (\"return new this.ctor\");\n gen\n (\"var m=new this.ctor\");\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n prop = util.safeProp(field.name);\n\n // Map fields\n if (field.map) { gen\n (\"if(d%s){\", prop)\n (\"if(typeof d%s!==\\\"object\\\")\", prop)\n (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n (\"m%s={}\", prop)\n (\"for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n break;\n case \"bytes\": gen\n (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n break;\n default: gen\n (\"d%s=m%s\", prop, prop);\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);\n if (!fields.length)\n return util.codegen()(\"return {}\");\n var gen = util.codegen([\"m\", \"o\"], mtype.name + \"$toObject\")\n (\"if(!o)\")\n (\"o={}\")\n (\"var d={}\");\n\n var repeatedFields = [],\n mapFields = [],\n normalFields = [],\n i = 0;\n for (; i < fields.length; ++i)\n if (!fields[i].partOf)\n ( fields[i].resolve().repeated ? repeatedFields\n : fields[i].map ? mapFields\n : normalFields).push(fields[i]);\n\n if (repeatedFields.length) { gen\n (\"if(o.arrays||o.defaults){\");\n for (i = 0; i < repeatedFields.length; ++i) gen\n (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n gen\n (\"}\");\n }\n\n if (mapFields.length) { gen\n (\"if(o.objects||o.defaults){\");\n for (i = 0; i < mapFields.length; ++i) gen\n (\"d%s={}\", util.safeProp(mapFields[i].name));\n gen\n (\"}\");\n }\n\n if (normalFields.length) { gen\n (\"if(o.defaults){\");\n for (i = 0; i < normalFields.length; ++i) {\n var field = normalFields[i],\n prop = util.safeProp(field.name);\n if (field.resolvedType instanceof Enum) gen\n (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n else if (field.long) gen\n (\"if(util.Long){\")\n (\"var n=new util.Long(%i,%i,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n (\"}else\")\n (\"d%s=o.longs===String?%j:%i\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n else if (field.bytes) {\n var arrayDefault = \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\";\n gen\n (\"if(o.bytes===String)d%s=%j\", prop, String.fromCharCode.apply(String, field.typeDefault))\n (\"else{\")\n (\"d%s=%s\", prop, arrayDefault)\n (\"if(o.bytes!==Array)d%s=util.newBuffer(d%s)\", prop, prop)\n (\"}\");\n } else gen\n (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n } gen\n (\"}\");\n }\n var hasKs2 = false;\n for (i = 0; i < fields.length; ++i) {\n var field = fields[i],\n index = mtype._fieldsArray.indexOf(field),\n prop = util.safeProp(field.name);\n if (field.map) {\n if (!hasKs2) { hasKs2 = true; gen\n (\"var ks2\");\n } gen\n (\"if(m%s&&(ks2=Object.keys(m%s)).length){\", prop, prop)\n (\"d%s={}\", prop)\n (\"for(var j=0;j>>3){\");\n\n var i = 0;\n for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n ref = \"m\" + util.safeProp(field.name); gen\n (\"case %i: {\", field.id);\n\n // Map fields\n if (field.map) { gen\n (\"if(%s===util.emptyObject)\", ref)\n (\"%s={}\", ref)\n (\"var c2 = r.uint32()+r.pos\");\n\n if (types.defaults[field.keyType] !== undefined) gen\n (\"k=%j\", types.defaults[field.keyType]);\n else gen\n (\"k=null\");\n\n if (types.defaults[type] !== undefined) gen\n (\"value=%j\", types.defaults[type]);\n else gen\n (\"value=null\");\n\n gen\n (\"while(r.pos>>3){\")\n (\"case 1: k=r.%s(); break\", field.keyType)\n (\"case 2:\");\n\n if (types.basic[type] === undefined) gen\n (\"value=types[%i].decode(r,r.uint32())\", i); // can't be groups\n else gen\n (\"value=r.%s()\", type);\n\n gen\n (\"break\")\n (\"default:\")\n (\"r.skipType(tag2&7)\")\n (\"break\")\n (\"}\")\n (\"}\");\n\n if (types.long[field.keyType] !== undefined) gen\n (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=value\", ref);\n else gen\n (\"%s[k]=value\", ref);\n\n // Repeated fields\n } else if (field.repeated) { gen\n\n (\"if(!(%s&&%s.length))\", ref, ref)\n (\"%s=[]\", ref);\n\n // Packable (always check for forward and backward compatiblity)\n if (types.packed[type] !== undefined) gen\n (\"if((t&7)===2){\")\n (\"var c2=r.uint32()+r.pos\")\n (\"while(r.pos>> 0, (field.id << 3 | 4) >>> 0)\n : gen(\"types[%i].encode(%s,w.uint32(%i).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction encoder(mtype) {\n /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n var gen = util.codegen([\"m\", \"w\"], mtype.name + \"$encode\")\n (\"if(!w)\")\n (\"w=Writer.create()\");\n\n var i, ref;\n\n // \"when a message is serialized its known fields should be written sequentially by field number\"\n var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById);\n\n for (var i = 0; i < fields.length; ++i) {\n var field = fields[i].resolve(),\n index = mtype._fieldsArray.indexOf(field),\n type = field.resolvedType instanceof Enum ? \"int32\" : field.type,\n wireType = types.basic[type];\n ref = \"m\" + util.safeProp(field.name);\n\n // Map fields\n if (field.map) {\n gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j)){\", ref, field.name) // !== undefined && !== null\n (\"for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n if (wireType === undefined) gen\n (\"types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n else gen\n (\".uint32(%i).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n gen\n (\"}\")\n (\"}\");\n\n // Repeated fields\n } else if (field.repeated) { gen\n (\"if(%s!=null&&%s.length){\", ref, ref); // !== undefined && !== null\n\n // Packed repeated\n if (field.packed && types.packed[type] !== undefined) { gen\n\n (\"w.uint32(%i).fork()\", (field.id << 3 | 2) >>> 0)\n (\"for(var i=0;i<%s.length;++i)\", ref)\n (\"w.%s(%s[i])\", type, ref)\n (\"w.ldelim()\");\n\n // Non-packed\n } else { gen\n\n (\"for(var i=0;i<%s.length;++i)\", ref);\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref + \"[i]\");\n else gen\n (\"w.uint32(%i).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n } gen\n (\"}\");\n\n // Non-repeated\n } else {\n if (field.optional) gen\n (\"if(%s!=null&&Object.hasOwnProperty.call(m,%j))\", ref, field.name); // !== undefined && !== null\n\n if (wireType === undefined)\n genTypePartial(gen, field, index, ref);\n else gen\n (\"w.uint32(%i).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n }\n }\n\n return gen\n (\"return w\");\n /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n","\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar Namespace = require(23),\n util = require(37);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.} [values] Enum values as an object, by name\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this enum\n * @param {Object.} [comments] The value comments for this enum\n * @param {Object.>|undefined} [valuesOptions] The value options for this enum\n */\nfunction Enum(name, values, options, comment, comments, valuesOptions) {\n ReflectionObject.call(this, name, options);\n\n if (values && typeof values !== \"object\")\n throw TypeError(\"values must be an object\");\n\n /**\n * Enum values by id.\n * @type {Object.}\n */\n this.valuesById = {};\n\n /**\n * Enum values by name.\n * @type {Object.}\n */\n this.values = Object.create(this.valuesById); // toJSON, marker\n\n /**\n * Enum comment text.\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Value comment texts, if any.\n * @type {Object.}\n */\n this.comments = comments || {};\n\n /**\n * Values options, if any\n * @type {Object>|undefined}\n */\n this.valuesOptions = valuesOptions;\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n // compatible enum. This is used by pbts to write actual enum definitions that work for\n // static and reflection code alike instead of emitting generic object definitions.\n\n if (values)\n for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n if (typeof values[keys[i]] === \"number\") // use forward entries only\n this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Enum descriptor.\n * @interface IEnum\n * @property {Object.} values Enum values\n * @property {Object.} [options] Enum options\n */\n\n/**\n * Constructs an enum from an enum descriptor.\n * @param {string} name Enum name\n * @param {IEnum} json Enum descriptor\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n var enm = new Enum(name, json.values, json.options, json.comment, json.comments);\n enm.reserved = json.reserved;\n return enm;\n};\n\n/**\n * Converts this enum to an enum descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IEnum} Enum descriptor\n */\nEnum.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"valuesOptions\" , this.valuesOptions,\n \"values\" , this.values,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"comment\" , keepComments ? this.comment : undefined,\n \"comments\" , keepComments ? this.comments : undefined\n ]);\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {string} [comment] Comment, if any\n * @param {Object.|undefined} [options] Options, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function add(name, id, comment, options) {\n // utilized by the parser but not by .fromJSON\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (!util.isInteger(id))\n throw TypeError(\"id must be an integer\");\n\n if (this.values[name] !== undefined)\n throw Error(\"duplicate name '\" + name + \"' in \" + this);\n\n if (this.isReservedId(id))\n throw Error(\"id \" + id + \" is reserved in \" + this);\n\n if (this.isReservedName(name))\n throw Error(\"name '\" + name + \"' is reserved in \" + this);\n\n if (this.valuesById[id] !== undefined) {\n if (!(this.options && this.options.allow_alias))\n throw Error(\"duplicate id \" + id + \" in \" + this);\n this.values[name] = id;\n } else\n this.valuesById[this.values[name] = id] = name;\n\n if (options) {\n if (this.valuesOptions === undefined)\n this.valuesOptions = {};\n this.valuesOptions[name] = options || null;\n }\n\n this.comments[name] = comment || null;\n return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function remove(name) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n var val = this.values[name];\n if (val == null)\n throw Error(\"name '\" + name + \"' does not exist in \" + this);\n\n delete this.valuesById[val];\n delete this.values[name];\n delete this.comments[name];\n if (this.valuesOptions)\n delete this.valuesOptions[name];\n\n return this;\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nEnum.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n","\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum = require(15),\n types = require(36),\n util = require(37);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @name Field\n * @classdesc Reflected message field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a field from a field descriptor.\n * @param {string} name Field name\n * @param {IField} json Field descriptor\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment);\n};\n\n/**\n * Not an actual constructor. Use {@link Field} instead.\n * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports FieldBase\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.} [rule=\"optional\"] Field rule\n * @param {string|Object.} [extend] Extended type if different from parent\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction Field(name, id, type, rule, extend, options, comment) {\n\n if (util.isObject(rule)) {\n comment = extend;\n options = rule;\n rule = extend = undefined;\n } else if (util.isObject(extend)) {\n comment = options;\n options = extend;\n extend = undefined;\n }\n\n ReflectionObject.call(this, name, options);\n\n if (!util.isInteger(id) || id < 0)\n throw TypeError(\"id must be a non-negative integer\");\n\n if (!util.isString(type))\n throw TypeError(\"type must be a string\");\n\n if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n throw TypeError(\"rule must be a string rule\");\n\n if (extend !== undefined && !util.isString(extend))\n throw TypeError(\"extend must be a string\");\n\n /**\n * Field rule, if any.\n * @type {string|undefined}\n */\n if (rule === \"proto3_optional\") {\n rule = \"optional\";\n }\n this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n /**\n * Field type.\n * @type {string}\n */\n this.type = type; // toJSON\n\n /**\n * Unique field id.\n * @type {number}\n */\n this.id = id; // toJSON, marker\n\n /**\n * Extended type if different from parent.\n * @type {string|undefined}\n */\n this.extend = extend || undefined; // toJSON\n\n /**\n * Whether this field is required.\n * @type {boolean}\n */\n this.required = rule === \"required\";\n\n /**\n * Whether this field is optional.\n * @type {boolean}\n */\n this.optional = !this.required;\n\n /**\n * Whether this field is repeated.\n * @type {boolean}\n */\n this.repeated = rule === \"repeated\";\n\n /**\n * Whether this field is a map or not.\n * @type {boolean}\n */\n this.map = false;\n\n /**\n * Message this field belongs to.\n * @type {Type|null}\n */\n this.message = null;\n\n /**\n * OneOf this field belongs to, if any,\n * @type {OneOf|null}\n */\n this.partOf = null;\n\n /**\n * The field type's default value.\n * @type {*}\n */\n this.typeDefault = null;\n\n /**\n * The field's default value on prototypes.\n * @type {*}\n */\n this.defaultValue = null;\n\n /**\n * Whether this field's value should be treated as a long.\n * @type {boolean}\n */\n this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n /**\n * Whether this field's value is a buffer.\n * @type {boolean}\n */\n this.bytes = type === \"bytes\";\n\n /**\n * Resolved type if not a basic type.\n * @type {Type|Enum|null}\n */\n this.resolvedType = null;\n\n /**\n * Sister-field within the extended type if a declaring extension field.\n * @type {Field|null}\n */\n this.extensionField = null;\n\n /**\n * Sister-field within the declaring namespace if an extended field.\n * @type {Field|null}\n */\n this.declaringField = null;\n\n /**\n * Internally remembers whether this field is packed.\n * @type {boolean|null}\n * @private\n */\n this._packed = null;\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n get: function() {\n // defaults to packed=true if not explicity set to false\n if (this._packed === null)\n this._packed = this.getOption(\"packed\") !== false;\n return this._packed;\n }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (name === \"packed\") // clear cached before setting\n this._packed = null;\n return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Field descriptor.\n * @interface IField\n * @property {string} [rule=\"optional\"] Field rule\n * @property {string} type Field type\n * @property {number} id Field id\n * @property {Object.} [options] Field options\n */\n\n/**\n * Extension field descriptor.\n * @interface IExtensionField\n * @extends IField\n * @property {string} extend Extended type\n */\n\n/**\n * Converts this field to a field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IField} Field descriptor\n */\nField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"rule\" , this.rule !== \"optional\" && this.rule || undefined,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n if (this.resolved)\n return this;\n\n if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);\n if (this.resolvedType instanceof Type)\n this.typeDefault = null;\n else // instanceof Enum\n this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n } else if (this.options && this.options.proto3_optional) {\n // proto3 scalar value marked optional; should default to null\n this.typeDefault = null;\n }\n\n // use explicitly set default value if present\n if (this.options && this.options[\"default\"] != null) {\n this.typeDefault = this.options[\"default\"];\n if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n this.typeDefault = this.resolvedType.values[this.typeDefault];\n }\n\n // remove unnecessary options\n if (this.options) {\n if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n delete this.options.packed;\n if (!Object.keys(this.options).length)\n this.options = undefined;\n }\n\n // convert to internal data type if necesssary\n if (this.long) {\n this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n /* istanbul ignore else */\n if (Object.freeze)\n Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n } else if (this.bytes && typeof this.typeDefault === \"string\") {\n var buf;\n if (util.base64.test(this.typeDefault))\n util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n else\n util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n this.typeDefault = buf;\n }\n\n // take special care of maps and repeated fields\n if (this.map)\n this.defaultValue = util.emptyObject;\n else if (this.repeated)\n this.defaultValue = util.emptyArray;\n else\n this.defaultValue = this.typeDefault;\n\n // ensure proper value on prototype\n if (this.parent instanceof Type)\n this.parent.ctor.prototype[this.name] = this.defaultValue;\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n\n/**\n * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript).\n * @typedef FieldDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} fieldName Field name\n * @returns {undefined}\n */\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"string\"|\"bool\"|\"bytes\"|Object} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @param {T} [defaultValue] Default value\n * @returns {FieldDecorator} Decorator function\n * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[]\n */\nField.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) {\n\n // submessage: decorate the submessage and use its name as the type\n if (typeof fieldType === \"function\")\n fieldType = util.decorateType(fieldType).name;\n\n // enum reference: create a reflected copy of the enum and keep reuseing it\n else if (fieldType && typeof fieldType === \"object\")\n fieldType = util.decorateEnum(fieldType).name;\n\n return function fieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new Field(fieldName, fieldId, fieldType, fieldRule, { \"default\": defaultValue }));\n };\n};\n\n/**\n * Field decorator (TypeScript).\n * @name Field.d\n * @function\n * @param {number} fieldId Field id\n * @param {Constructor|string} fieldType Field type\n * @param {\"optional\"|\"required\"|\"repeated\"} [fieldRule=\"optional\"] Field rule\n * @returns {FieldDecorator} Decorator function\n * @template T extends Message\n * @variation 2\n */\n// like Field.d but without a default value\n\n// Sets up cyclic dependencies (called in index-light)\nField._configure = function configure(Type_) {\n Type = Type_;\n};\n","\"use strict\";\nvar protobuf = module.exports = require(18);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n if (typeof root === \"function\") {\n callback = root;\n root = new protobuf.Root();\n } else if (!root)\n root = new protobuf.Root();\n return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n if (!root)\n root = new protobuf.Root();\n return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder = require(14);\nprotobuf.decoder = require(13);\nprotobuf.verifier = require(40);\nprotobuf.converter = require(12);\n\n// Reflection\nprotobuf.ReflectionObject = require(24);\nprotobuf.Namespace = require(23);\nprotobuf.Root = require(29);\nprotobuf.Enum = require(15);\nprotobuf.Type = require(35);\nprotobuf.Field = require(16);\nprotobuf.OneOf = require(25);\nprotobuf.MapField = require(20);\nprotobuf.Service = require(33);\nprotobuf.Method = require(22);\n\n// Runtime\nprotobuf.Message = require(21);\nprotobuf.wrappers = require(41);\n\n// Utility\nprotobuf.types = require(36);\nprotobuf.util = require(37);\n\n// Set up possibly cyclic reflection dependencies\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);\nprotobuf.Root._configure(protobuf.Type);\nprotobuf.Field._configure(protobuf.Type);\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(42);\nprotobuf.BufferWriter = require(43);\nprotobuf.Reader = require(27);\nprotobuf.BufferReader = require(28);\n\n// Utility\nprotobuf.util = require(39);\nprotobuf.rpc = require(31);\nprotobuf.roots = require(30);\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize = require(34);\nprotobuf.parse = require(26);\nprotobuf.common = require(11);\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n","\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(16);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types = require(36),\n util = require(37);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends FieldBase\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction MapField(name, id, keyType, type, options, comment) {\n Field.call(this, name, id, type, undefined, undefined, options, comment);\n\n /* istanbul ignore if */\n if (!util.isString(keyType))\n throw TypeError(\"keyType must be a string\");\n\n /**\n * Key type.\n * @type {string}\n */\n this.keyType = keyType; // toJSON, marker\n\n /**\n * Resolved key type if not a basic type.\n * @type {ReflectionObject|null}\n */\n this.resolvedKeyType = null;\n\n // Overrides Field#map\n this.map = true;\n}\n\n/**\n * Map field descriptor.\n * @interface IMapField\n * @extends {IField}\n * @property {string} keyType Key type\n */\n\n/**\n * Extension map field descriptor.\n * @interface IExtensionMapField\n * @extends IMapField\n * @property {string} extend Extended type\n */\n\n/**\n * Constructs a map field from a map field descriptor.\n * @param {string} name Field name\n * @param {IMapField} json Map field descriptor\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment);\n};\n\n/**\n * Converts this map field to a map field descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMapField} Map field descriptor\n */\nMapField.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"keyType\" , this.keyType,\n \"type\" , this.type,\n \"id\" , this.id,\n \"extend\" , this.extend,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n\n // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n if (types.mapKey[this.keyType] === undefined)\n throw Error(\"invalid key type: \" + this.keyType);\n\n return Field.prototype.resolve.call(this);\n};\n\n/**\n * Map field decorator (TypeScript).\n * @name MapField.d\n * @function\n * @param {number} fieldId Field id\n * @param {\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"} fieldKeyType Field key type\n * @param {\"double\"|\"float\"|\"int32\"|\"uint32\"|\"sint32\"|\"fixed32\"|\"sfixed32\"|\"int64\"|\"uint64\"|\"sint64\"|\"fixed64\"|\"sfixed64\"|\"bool\"|\"string\"|\"bytes\"|Object|Constructor<{}>} fieldValueType Field value type\n * @returns {FieldDecorator} Decorator function\n * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> }\n */\nMapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) {\n\n // submessage value: decorate the submessage and use its name as the type\n if (typeof fieldValueType === \"function\")\n fieldValueType = util.decorateType(fieldValueType).name;\n\n // enum reference value: create a reflected copy of the enum and keep reuseing it\n else if (fieldValueType && typeof fieldValueType === \"object\")\n fieldValueType = util.decorateEnum(fieldValueType).name;\n\n return function mapFieldDecorator(prototype, fieldName) {\n util.decorateType(prototype.constructor)\n .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType));\n };\n};\n","\"use strict\";\nmodule.exports = Message;\n\nvar util = require(39);\n\n/**\n * Constructs a new message instance.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Properties} [properties] Properties to set\n * @template T extends object = object\n */\nfunction Message(properties) {\n // not used internally\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/*eslint-disable valid-jsdoc*/\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.create = function create(properties) {\n return this.$type.create(properties);\n};\n\n/**\n * Encodes a message of this type.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encode = function encode(message, writer) {\n return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {T|Object.} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n * @template T extends Message\n * @this Constructor\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decode = function decode(reader) {\n return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {T} Decoded message\n * @template T extends Message\n * @this Constructor\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object\n * @returns {T} Message instance\n * @template T extends Message\n * @this Constructor\n */\nMessage.fromObject = function fromObject(object) {\n return this.$type.fromObject(object);\n};\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {T} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @template T extends Message\n * @this Constructor\n */\nMessage.toObject = function toObject(message, options) {\n return this.$type.toObject(message, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n return this.$type.toObject(this, util.toJSONOptions);\n};\n\n/*eslint-enable valid-jsdoc*/","\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(37);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.} [requestStream] Whether the request is streamed\n * @param {boolean|Object.} [responseStream] Whether the response is streamed\n * @param {Object.} [options] Declared options\n * @param {string} [comment] The comment for this method\n * @param {Object.} [parsedOptions] Declared options, properly parsed into an object\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {\n\n /* istanbul ignore next */\n if (util.isObject(requestStream)) {\n options = requestStream;\n requestStream = responseStream = undefined;\n } else if (util.isObject(responseStream)) {\n options = responseStream;\n responseStream = undefined;\n }\n\n /* istanbul ignore if */\n if (!(type === undefined || util.isString(type)))\n throw TypeError(\"type must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(requestType))\n throw TypeError(\"requestType must be a string\");\n\n /* istanbul ignore if */\n if (!util.isString(responseType))\n throw TypeError(\"responseType must be a string\");\n\n ReflectionObject.call(this, name, options);\n\n /**\n * Method type.\n * @type {string}\n */\n this.type = type || \"rpc\"; // toJSON\n\n /**\n * Request type.\n * @type {string}\n */\n this.requestType = requestType; // toJSON, marker\n\n /**\n * Whether requests are streamed or not.\n * @type {boolean|undefined}\n */\n this.requestStream = requestStream ? true : undefined; // toJSON\n\n /**\n * Response type.\n * @type {string}\n */\n this.responseType = responseType; // toJSON\n\n /**\n * Whether responses are streamed or not.\n * @type {boolean|undefined}\n */\n this.responseStream = responseStream ? true : undefined; // toJSON\n\n /**\n * Resolved request type.\n * @type {Type|null}\n */\n this.resolvedRequestType = null;\n\n /**\n * Resolved response type.\n * @type {Type|null}\n */\n this.resolvedResponseType = null;\n\n /**\n * Comment for this method\n * @type {string|null}\n */\n this.comment = comment;\n\n /**\n * Options properly parsed into an object\n */\n this.parsedOptions = parsedOptions;\n}\n\n/**\n * Method descriptor.\n * @interface IMethod\n * @property {string} [type=\"rpc\"] Method type\n * @property {string} requestType Request type\n * @property {string} responseType Response type\n * @property {boolean} [requestStream=false] Whether requests are streamed\n * @property {boolean} [responseStream=false] Whether responses are streamed\n * @property {Object.} [options] Method options\n * @property {string} comment Method comments\n * @property {Object.} [parsedOptions] Method options properly parsed into an object\n */\n\n/**\n * Constructs a method from a method descriptor.\n * @param {string} name Method name\n * @param {IMethod} json Method descriptor\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions);\n};\n\n/**\n * Converts this method to a method descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IMethod} Method descriptor\n */\nMethod.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"type\" , this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n \"requestType\" , this.requestType,\n \"requestStream\" , this.requestStream,\n \"responseType\" , this.responseType,\n \"responseStream\" , this.responseStream,\n \"options\" , this.options,\n \"comment\" , keepComments ? this.comment : undefined,\n \"parsedOptions\" , this.parsedOptions,\n ]);\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n /* istanbul ignore if */\n if (this.resolved)\n return this;\n\n this.resolvedRequestType = this.parent.lookupType(this.requestType);\n this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n return ReflectionObject.prototype.resolve.call(this);\n};\n","\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Field = require(16),\n util = require(37),\n OneOf = require(25);\n\nvar Type, // cyclic\n Service,\n Enum;\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {Object.|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array, toJSONOptions) {\n if (!(array && array.length))\n return undefined;\n var obj = {};\n for (var i = 0; i < array.length; ++i)\n obj[array[i].name] = array[i].toJSON(toJSONOptions);\n return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Tests if the specified id is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedId = function isReservedId(reserved, id) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (typeof reserved[i] !== \"string\" && reserved[i][0] <= id && reserved[i][1] > id)\n return true;\n return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {Array.|undefined} reserved Array of reserved ranges and names\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nNamespace.isReservedName = function isReservedName(reserved, name) {\n if (reserved)\n for (var i = 0; i < reserved.length; ++i)\n if (reserved[i] === name)\n return true;\n return false;\n};\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n ReflectionObject.call(this, name, options);\n\n /**\n * Nested objects by name.\n * @type {Object.|undefined}\n */\n this.nested = undefined; // toJSON\n\n /**\n * Cached nested objects as an array.\n * @type {ReflectionObject[]|null}\n * @private\n */\n this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n namespace._nestedArray = null;\n return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n get: function() {\n return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n }\n});\n\n/**\n * Namespace descriptor.\n * @interface INamespace\n * @property {Object.} [options] Namespace options\n * @property {Object.} [nested] Nested object descriptors\n */\n\n/**\n * Any extension field descriptor.\n * @typedef AnyExtensionField\n * @type {IExtensionField|IExtensionMapField}\n */\n\n/**\n * Any nested object descriptor.\n * @typedef AnyNestedObject\n * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}\n */\n\n/**\n * Converts this namespace to a namespace descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {INamespace} Namespace descriptor\n */\nNamespace.prototype.toJSON = function toJSON(toJSONOptions) {\n return util.toObject([\n \"options\" , this.options,\n \"nested\" , arrayToJSON(this.nestedArray, toJSONOptions)\n ]);\n};\n\n/**\n * Adds nested objects to this namespace from nested object descriptors.\n * @param {Object.} nestedJson Any nested object descriptors\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n var ns = this;\n /* istanbul ignore else */\n if (nestedJson) {\n for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n nested = nestedJson[names[i]];\n ns.add( // most to least likely\n ( nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : nested.id !== undefined\n ? Field.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n }\n return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n return this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n if (this.nested && this.nested[name] instanceof Enum)\n return this.nested[name].values;\n throw Error(\"no such enum: \" + name);\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n throw TypeError(\"object must be a valid nested object\");\n\n if (!this.nested)\n this.nested = {};\n else {\n var prev = this.get(object.name);\n if (prev) {\n if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n // replace plain namespace but keep existing nested elements and options\n var nested = prev.nestedArray;\n for (var i = 0; i < nested.length; ++i)\n object.add(nested[i]);\n this.remove(prev);\n if (!this.nested)\n this.nested = {};\n object.setOptions(prev.options, true);\n\n } else\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n }\n }\n this.nested[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n if (!(object instanceof ReflectionObject))\n throw TypeError(\"object must be a ReflectionObject\");\n if (object.parent !== this)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.nested[object.name];\n if (!Object.keys(this.nested).length)\n this.nested = undefined;\n\n object.onRemove(this);\n return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n if (util.isString(path))\n path = path.split(\".\");\n else if (!Array.isArray(path))\n throw TypeError(\"illegal path\");\n if (path && path.length && path[0] === \"\")\n throw Error(\"path must be relative\");\n\n var ptr = this;\n while (path.length > 0) {\n var part = path.shift();\n if (ptr.nested && ptr.nested[part]) {\n ptr = ptr.nested[part];\n if (!(ptr instanceof Namespace))\n throw Error(\"path conflicts with non-namespace objects\");\n } else\n ptr.add(ptr = new Namespace(part));\n }\n if (json)\n ptr.addJSON(json);\n return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n var nested = this.nestedArray, i = 0;\n while (i < nested.length)\n if (nested[i] instanceof Namespace)\n nested[i++].resolveAll();\n else\n nested[i++].resolve();\n return this.resolve();\n};\n\n/**\n * Recursively looks up the reflection object matching the specified path in the scope of this namespace.\n * @param {string|string[]} path Path to look up\n * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {\n\n /* istanbul ignore next */\n if (typeof filterTypes === \"boolean\") {\n parentAlreadyChecked = filterTypes;\n filterTypes = undefined;\n } else if (filterTypes && !Array.isArray(filterTypes))\n filterTypes = [ filterTypes ];\n\n if (util.isString(path) && path.length) {\n if (path === \".\")\n return this.root;\n path = path.split(\".\");\n } else if (!path.length)\n return this;\n\n // Start at root if path is absolute\n if (path[0] === \"\")\n return this.root.lookup(path.slice(1), filterTypes);\n\n // Test if the first part matches any nested object, and if so, traverse if path contains more\n var found = this.get(path[0]);\n if (found) {\n if (path.length === 1) {\n if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)\n return found;\n } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))\n return found;\n\n // Otherwise try each nested namespace\n } else\n for (var i = 0; i < this.nestedArray.length; ++i)\n if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))\n return found;\n\n // If there hasn't been a match, try again at the parent\n if (this.parent === null || parentAlreadyChecked)\n return null;\n return this.parent.lookup(path, filterTypes);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {ReflectionObject|null} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n var found = this.lookup(path, [ Type ]);\n if (!found)\n throw Error(\"no such type: \" + path);\n return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Enum} Looked up enum\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n var found = this.lookup(path, [ Enum ]);\n if (!found)\n throw Error(\"no such Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type or enum\n * @throws {Error} If `path` does not point to a type or enum\n */\nNamespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {\n var found = this.lookup(path, [ Type, Enum ]);\n if (!found)\n throw Error(\"no such Type or Enum '\" + path + \"' in \" + this);\n return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n var found = this.lookup(path, [ Service ]);\n if (!found)\n throw Error(\"no such Service '\" + path + \"' in \" + this);\n return found;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nNamespace._configure = function(Type_, Service_, Enum_) {\n Type = Type_;\n Service = Service_;\n Enum = Enum_;\n};\n","\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(37);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n if (!util.isString(name))\n throw TypeError(\"name must be a string\");\n\n if (options && !util.isObject(options))\n throw TypeError(\"options must be an object\");\n\n /**\n * Options.\n * @type {Object.|undefined}\n */\n this.options = options; // toJSON\n\n /**\n * Parsed Options.\n * @type {Array.>|undefined}\n */\n this.parsedOptions = null;\n\n /**\n * Unique name within its namespace.\n * @type {string}\n */\n this.name = name;\n\n /**\n * Parent namespace.\n * @type {Namespace|null}\n */\n this.parent = null;\n\n /**\n * Whether already resolved or not.\n * @type {boolean}\n */\n this.resolved = false;\n\n /**\n * Comment text, if any.\n * @type {string|null}\n */\n this.comment = null;\n\n /**\n * Defining file name.\n * @type {string|null}\n */\n this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n /**\n * Reference to the root namespace.\n * @name ReflectionObject#root\n * @type {Root}\n * @readonly\n */\n root: {\n get: function() {\n var ptr = this;\n while (ptr.parent !== null)\n ptr = ptr.parent;\n return ptr;\n }\n },\n\n /**\n * Full name including leading dot.\n * @name ReflectionObject#fullName\n * @type {string}\n * @readonly\n */\n fullName: {\n get: function() {\n var path = [ this.name ],\n ptr = this.parent;\n while (ptr) {\n path.unshift(ptr.name);\n ptr = ptr.parent;\n }\n return path.join(\".\");\n }\n }\n});\n\n/**\n * Converts this reflection object to its descriptor representation.\n * @returns {Object.} Descriptor\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n if (this.parent && this.parent !== parent)\n this.parent.remove(this);\n this.parent = parent;\n this.resolved = false;\n var root = parent.root;\n if (root instanceof Root)\n root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n var root = parent.root;\n if (root instanceof Root)\n root._handleRemove(this);\n this.parent = null;\n this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n if (this.resolved)\n return this;\n if (this.root instanceof Root)\n this.resolved = true; // only if part of a root\n return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n if (this.options)\n return this.options[name];\n return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n if (!ifNotSet || !this.options || this.options[name] === undefined)\n (this.options || (this.options = {}))[name] = value;\n return this;\n};\n\n/**\n * Sets a parsed option.\n * @param {string} name parsed Option name\n * @param {*} value Option value\n * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\\empty, will add a new option with that value\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) {\n if (!this.parsedOptions) {\n this.parsedOptions = [];\n }\n var parsedOptions = this.parsedOptions;\n if (propName) {\n // If setting a sub property of an option then try to merge it\n // with an existing option\n var opt = parsedOptions.find(function (opt) {\n return Object.prototype.hasOwnProperty.call(opt, name);\n });\n if (opt) {\n // If we found an existing option - just merge the property value\n var newValue = opt[name];\n util.setProperty(newValue, propName, value);\n } else {\n // otherwise, create a new option, set it's property and add it to the list\n opt = {};\n opt[name] = util.setProperty({}, propName, value);\n parsedOptions.push(opt);\n }\n } else {\n // Always create a new option when setting the value of the option itself\n var newOpt = {};\n newOpt[name] = value;\n parsedOptions.push(newOpt);\n }\n return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n if (options)\n for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n this.setOption(keys[i], options[keys[i]], ifNotSet);\n return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n var className = this.constructor.className,\n fullName = this.fullName;\n if (fullName.length)\n return className + \" \" + fullName;\n return className;\n};\n\n// Sets up cyclic dependencies (called in index-light)\nReflectionObject._configure = function(Root_) {\n Root = Root_;\n};\n","\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(16),\n util = require(37);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object.} [fieldNames] Field names\n * @param {Object.} [options] Declared options\n * @param {string} [comment] Comment associated with this field\n */\nfunction OneOf(name, fieldNames, options, comment) {\n if (!Array.isArray(fieldNames)) {\n options = fieldNames;\n fieldNames = undefined;\n }\n ReflectionObject.call(this, name, options);\n\n /* istanbul ignore if */\n if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n throw TypeError(\"fieldNames must be an Array\");\n\n /**\n * Field names that belong to this oneof.\n * @type {string[]}\n */\n this.oneof = fieldNames || []; // toJSON, marker\n\n /**\n * Fields that belong to this oneof as an array for iteration.\n * @type {Field[]}\n * @readonly\n */\n this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n\n /**\n * Comment for this field.\n * @type {string|null}\n */\n this.comment = comment;\n}\n\n/**\n * Oneof descriptor.\n * @interface IOneOf\n * @property {Array.} oneof Oneof field names\n * @property {Object.} [options] Oneof options\n */\n\n/**\n * Constructs a oneof from a oneof descriptor.\n * @param {string} name Oneof name\n * @param {IOneOf} json Oneof descriptor\n * @returns {OneOf} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n return new OneOf(name, json.oneof, json.options, json.comment);\n};\n\n/**\n * Converts this oneof to a oneof descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IOneOf} Oneof descriptor\n */\nOneOf.prototype.toJSON = function toJSON(toJSONOptions) {\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , this.options,\n \"oneof\" , this.oneof,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n if (oneof.parent)\n for (var i = 0; i < oneof.fieldsArray.length; ++i)\n if (!oneof.fieldsArray[i].parent)\n oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n if (field.parent && field.parent !== this.parent)\n field.parent.remove(field);\n this.oneof.push(field.name);\n this.fieldsArray.push(field);\n field.partOf = this; // field.parent remains null\n addFieldsToParent(this);\n return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n /* istanbul ignore if */\n if (!(field instanceof Field))\n throw TypeError(\"field must be a Field\");\n\n var index = this.fieldsArray.indexOf(field);\n\n /* istanbul ignore if */\n if (index < 0)\n throw Error(field + \" is not a member of \" + this);\n\n this.fieldsArray.splice(index, 1);\n index = this.oneof.indexOf(field.name);\n\n /* istanbul ignore else */\n if (index > -1) // theoretical\n this.oneof.splice(index, 1);\n\n field.partOf = null;\n return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n ReflectionObject.prototype.onAdd.call(this, parent);\n var self = this;\n // Collect present fields\n for (var i = 0; i < this.oneof.length; ++i) {\n var field = parent.get(this.oneof[i]);\n if (field && !field.partOf) {\n field.partOf = self;\n self.fieldsArray.push(field);\n }\n }\n // Add not yet present fields\n addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n for (var i = 0, field; i < this.fieldsArray.length; ++i)\n if ((field = this.fieldsArray[i]).parent)\n field.parent.remove(field);\n ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n/**\n * Decorator function as returned by {@link OneOf.d} (TypeScript).\n * @typedef OneOfDecorator\n * @type {function}\n * @param {Object} prototype Target prototype\n * @param {string} oneofName OneOf name\n * @returns {undefined}\n */\n\n/**\n * OneOf decorator (TypeScript).\n * @function\n * @param {...string} fieldNames Field names\n * @returns {OneOfDecorator} Decorator function\n * @template T extends string\n */\nOneOf.d = function decorateOneOf() {\n var fieldNames = new Array(arguments.length),\n index = 0;\n while (index < arguments.length)\n fieldNames[index] = arguments[index++];\n return function oneOfDecorator(prototype, oneofName) {\n util.decorateType(prototype.constructor)\n .add(new OneOf(oneofName, fieldNames));\n Object.defineProperty(prototype, oneofName, {\n get: util.oneOfGetter(fieldNames),\n set: util.oneOfSetter(fieldNames)\n });\n };\n};\n","\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize = require(34),\n Root = require(29),\n Type = require(35),\n Field = require(16),\n MapField = require(20),\n OneOf = require(25),\n Enum = require(15),\n Service = require(33),\n Method = require(22),\n types = require(36),\n util = require(37);\n\nvar base10Re = /^[1-9][0-9]*$/,\n base10NegRe = /^-?[1-9][0-9]*$/,\n base16Re = /^0[x][0-9a-fA-F]+$/,\n base16NegRe = /^-?0[x][0-9a-fA-F]+$/,\n base8Re = /^0[0-7]+$/,\n base8NegRe = /^-?0[0-7]+$/,\n numberRe = /^(?![eE])[0-9]*(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,\n nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n typeRefRe = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,\n fqTypeRefRe = /^(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;\n\n/**\n * Result object returned from {@link parse}.\n * @interface IParserResult\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @interface IParseOptions\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments.\n * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist.\n */\n\n/**\n * Options modifying the behavior of JSON serialization.\n * @interface IToJSONOptions\n * @property {boolean} [keepComments=false] Serializes comments.\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n */\nfunction parse(source, root, options) {\n /* eslint-disable callback-return */\n if (!(root instanceof Root)) {\n options = root;\n root = new Root();\n }\n if (!options)\n options = parse.defaults;\n\n var preferTrailingComment = options.preferTrailingComment || false;\n var tn = tokenize(source, options.alternateCommentMode || false),\n next = tn.next,\n push = tn.push,\n peek = tn.peek,\n skip = tn.skip,\n cmnt = tn.cmnt;\n\n var head = true,\n pkg,\n imports,\n weakImports,\n syntax,\n isProto3 = false;\n\n var ptr = root;\n\n var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase;\n\n /* istanbul ignore next */\n function illegal(token, name, insideTryCatch) {\n var filename = parse.filename;\n if (!insideTryCatch)\n parse.filename = null;\n return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line + \")\");\n }\n\n function readString() {\n var values = [],\n token;\n do {\n /* istanbul ignore if */\n if ((token = next()) !== \"\\\"\" && token !== \"'\")\n throw illegal(token);\n\n values.push(next());\n skip(token);\n token = peek();\n } while (token === \"\\\"\" || token === \"'\");\n return values.join(\"\");\n }\n\n function readValue(acceptTypeRef) {\n var token = next();\n switch (token) {\n case \"'\":\n case \"\\\"\":\n push(token);\n return readString();\n case \"true\": case \"TRUE\":\n return true;\n case \"false\": case \"FALSE\":\n return false;\n }\n try {\n return parseNumber(token, /* insideTryCatch */ true);\n } catch (e) {\n\n /* istanbul ignore else */\n if (acceptTypeRef && typeRefRe.test(token))\n return token;\n\n /* istanbul ignore next */\n throw illegal(token, \"value\");\n }\n }\n\n function readRanges(target, acceptStrings) {\n var token, start;\n do {\n if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\"))\n target.push(readString());\n else\n target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n } while (skip(\",\", true));\n var dummy = {options: undefined};\n dummy.setOption = function(name, value) {\n if (this.options === undefined) this.options = {};\n this.options[name] = value;\n };\n ifBlock(\n dummy,\n function parseRange_block(token) {\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n },\n function parseRange_line() {\n parseInlineOptions(dummy); // skip\n });\n }\n\n function parseNumber(token, insideTryCatch) {\n var sign = 1;\n if (token.charAt(0) === \"-\") {\n sign = -1;\n token = token.substring(1);\n }\n switch (token) {\n case \"inf\": case \"INF\": case \"Inf\":\n return sign * Infinity;\n case \"nan\": case \"NAN\": case \"Nan\": case \"NaN\":\n return NaN;\n case \"0\":\n return 0;\n }\n if (base10Re.test(token))\n return sign * parseInt(token, 10);\n if (base16Re.test(token))\n return sign * parseInt(token, 16);\n if (base8Re.test(token))\n return sign * parseInt(token, 8);\n\n /* istanbul ignore else */\n if (numberRe.test(token))\n return sign * parseFloat(token);\n\n /* istanbul ignore next */\n throw illegal(token, \"number\", insideTryCatch);\n }\n\n function parseId(token, acceptNegative) {\n switch (token) {\n case \"max\": case \"MAX\": case \"Max\":\n return 536870911;\n case \"0\":\n return 0;\n }\n\n /* istanbul ignore if */\n if (!acceptNegative && token.charAt(0) === \"-\")\n throw illegal(token, \"id\");\n\n if (base10NegRe.test(token))\n return parseInt(token, 10);\n if (base16NegRe.test(token))\n return parseInt(token, 16);\n\n /* istanbul ignore else */\n if (base8NegRe.test(token))\n return parseInt(token, 8);\n\n /* istanbul ignore next */\n throw illegal(token, \"id\");\n }\n\n function parsePackage() {\n\n /* istanbul ignore if */\n if (pkg !== undefined)\n throw illegal(\"package\");\n\n pkg = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(pkg))\n throw illegal(pkg, \"name\");\n\n ptr = ptr.define(pkg);\n skip(\";\");\n }\n\n function parseImport() {\n var token = peek();\n var whichImports;\n switch (token) {\n case \"weak\":\n whichImports = weakImports || (weakImports = []);\n next();\n break;\n case \"public\":\n next();\n // eslint-disable-next-line no-fallthrough\n default:\n whichImports = imports || (imports = []);\n break;\n }\n token = readString();\n skip(\";\");\n whichImports.push(token);\n }\n\n function parseSyntax() {\n skip(\"=\");\n syntax = readString();\n isProto3 = syntax === \"proto3\";\n\n /* istanbul ignore if */\n if (!isProto3 && syntax !== \"proto2\")\n throw illegal(syntax, \"syntax\");\n\n skip(\";\");\n }\n\n function parseCommon(parent, token) {\n switch (token) {\n\n case \"option\":\n parseOption(parent, token);\n skip(\";\");\n return true;\n\n case \"message\":\n parseType(parent, token);\n return true;\n\n case \"enum\":\n parseEnum(parent, token);\n return true;\n\n case \"service\":\n parseService(parent, token);\n return true;\n\n case \"extend\":\n parseExtension(parent, token);\n return true;\n }\n return false;\n }\n\n function ifBlock(obj, fnIf, fnElse) {\n var trailingLine = tn.line;\n if (obj) {\n if(typeof obj.comment !== \"string\") {\n obj.comment = cmnt(); // try block-type comment\n }\n obj.filename = parse.filename;\n }\n if (skip(\"{\", true)) {\n var token;\n while ((token = next()) !== \"}\")\n fnIf(token);\n skip(\";\", true);\n } else {\n if (fnElse)\n fnElse();\n skip(\";\");\n if (obj && (typeof obj.comment !== \"string\" || preferTrailingComment))\n obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment\n }\n }\n\n function parseType(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"type name\");\n\n var type = new Type(token);\n ifBlock(type, function parseType_block(token) {\n if (parseCommon(type, token))\n return;\n\n switch (token) {\n\n case \"map\":\n parseMapField(type, token);\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"oneof\":\n parseOneOf(type, token);\n break;\n\n case \"extensions\":\n readRanges(type.extensions || (type.extensions = []));\n break;\n\n case \"reserved\":\n readRanges(type.reserved || (type.reserved = []), true);\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n\n push(token);\n parseField(type, \"optional\");\n break;\n }\n });\n parent.add(type);\n }\n\n function parseField(parent, rule, extend) {\n var type = next();\n if (type === \"group\") {\n parseGroup(parent, rule);\n return;\n }\n // Type names can consume multiple tokens, in multiple variants:\n // package.subpackage field tokens: \"package.subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package . subpackage field tokens: \"package\" \".\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package. subpackage field tokens: \"package.\" \"subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // package .subpackage field tokens: \"package\" \".subpackage\" [TYPE NAME ENDS HERE] \"field\"\n // Keep reading tokens until we get a type name with no period at the end,\n // and the next token does not start with a period.\n while (type.endsWith(\".\") || peek().startsWith(\".\")) {\n type += next();\n }\n\n /* istanbul ignore if */\n if (!typeRefRe.test(type))\n throw illegal(type, \"type\");\n\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n name = applyCase(name);\n skip(\"=\");\n\n var field = new Field(name, parseId(next()), type, rule, extend);\n ifBlock(field, function parseField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseField_line() {\n parseInlineOptions(field);\n });\n\n if (rule === \"proto3_optional\") {\n // for proto3 optional fields, we create a single-member Oneof to mimic \"optional\" behavior\n var oneof = new OneOf(\"_\" + name);\n field.setOption(\"proto3_optional\", true);\n oneof.add(field);\n parent.add(oneof);\n } else {\n parent.add(field);\n }\n\n // JSON defaults to packed=true if not set so we have to set packed=false explicity when\n // parsing proto2 descriptors without the option, where applicable. This must be done for\n // all known packable types and anything that could be an enum (= is not a basic type).\n if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined))\n field.setOption(\"packed\", false, /* ifNotSet */ true);\n }\n\n function parseGroup(parent, rule) {\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n var fieldName = util.lcFirst(name);\n if (name === fieldName)\n name = util.ucFirst(name);\n skip(\"=\");\n var id = parseId(next());\n var type = new Type(name);\n type.group = true;\n var field = new Field(fieldName, id, name, rule);\n field.filename = parse.filename;\n ifBlock(type, function parseGroup_block(token) {\n switch (token) {\n\n case \"option\":\n parseOption(type, token);\n skip(\";\");\n break;\n\n case \"required\":\n case \"repeated\":\n parseField(type, token);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(type, \"proto3_optional\");\n } else {\n parseField(type, \"optional\");\n }\n break;\n\n case \"message\":\n parseType(type, token);\n break;\n\n case \"enum\":\n parseEnum(type, token);\n break;\n\n /* istanbul ignore next */\n default:\n throw illegal(token); // there are no groups with proto3 semantics\n }\n });\n parent.add(type)\n .add(field);\n }\n\n function parseMapField(parent) {\n skip(\"<\");\n var keyType = next();\n\n /* istanbul ignore if */\n if (types.mapKey[keyType] === undefined)\n throw illegal(keyType, \"type\");\n\n skip(\",\");\n var valueType = next();\n\n /* istanbul ignore if */\n if (!typeRefRe.test(valueType))\n throw illegal(valueType, \"type\");\n\n skip(\">\");\n var name = next();\n\n /* istanbul ignore if */\n if (!nameRe.test(name))\n throw illegal(name, \"name\");\n\n skip(\"=\");\n var field = new MapField(applyCase(name), parseId(next()), keyType, valueType);\n ifBlock(field, function parseMapField_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(field, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseMapField_line() {\n parseInlineOptions(field);\n });\n parent.add(field);\n }\n\n function parseOneOf(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var oneof = new OneOf(applyCase(token));\n ifBlock(oneof, function parseOneOf_block(token) {\n if (token === \"option\") {\n parseOption(oneof, token);\n skip(\";\");\n } else {\n push(token);\n parseField(oneof, \"optional\");\n }\n });\n parent.add(oneof);\n }\n\n function parseEnum(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var enm = new Enum(token);\n ifBlock(enm, function parseEnum_block(token) {\n switch(token) {\n case \"option\":\n parseOption(enm, token);\n skip(\";\");\n break;\n\n case \"reserved\":\n readRanges(enm.reserved || (enm.reserved = []), true);\n break;\n\n default:\n parseEnumValue(enm, token);\n }\n });\n parent.add(enm);\n }\n\n function parseEnumValue(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token))\n throw illegal(token, \"name\");\n\n skip(\"=\");\n var value = parseId(next(), true),\n dummy = {\n options: undefined\n };\n dummy.setOption = function(name, value) {\n if (this.options === undefined)\n this.options = {};\n this.options[name] = value;\n };\n ifBlock(dummy, function parseEnumValue_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(dummy, token); // skip\n skip(\";\");\n } else\n throw illegal(token);\n\n }, function parseEnumValue_line() {\n parseInlineOptions(dummy); // skip\n });\n parent.add(token, value, dummy.comment, dummy.options);\n }\n\n function parseOption(parent, token) {\n var isCustom = skip(\"(\", true);\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token;\n var option = name;\n var propName;\n\n if (isCustom) {\n skip(\")\");\n name = \"(\" + name + \")\";\n option = name;\n token = peek();\n if (fqTypeRefRe.test(token)) {\n propName = token.slice(1); //remove '.' before property name\n name += token;\n next();\n }\n }\n skip(\"=\");\n var optionValue = parseOptionValue(parent, name);\n setParsedOption(parent, option, optionValue, propName);\n }\n\n function parseOptionValue(parent, name) {\n // { a: \"foo\" b { c: \"bar\" } }\n if (skip(\"{\", true)) {\n var objectResult = {};\n\n while (!skip(\"}\", true)) {\n /* istanbul ignore if */\n if (!nameRe.test(token = next())) {\n throw illegal(token, \"name\");\n }\n if (token === null) {\n throw illegal(token, \"end of input\");\n }\n\n var value;\n var propName = token;\n\n skip(\":\", true);\n\n if (peek() === \"{\")\n value = parseOptionValue(parent, name + \".\" + token);\n else if (peek() === \"[\") {\n // option (my_option) = {\n // repeated_value: [ \"foo\", \"bar\" ]\n // };\n value = [];\n var lastValue;\n if (skip(\"[\", true)) {\n do {\n lastValue = readValue(true);\n value.push(lastValue);\n } while (skip(\",\", true));\n skip(\"]\");\n if (typeof lastValue !== \"undefined\") {\n setOption(parent, name + \".\" + token, lastValue);\n }\n }\n } else {\n value = readValue(true);\n setOption(parent, name + \".\" + token, value);\n }\n\n var prevValue = objectResult[propName];\n\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n\n objectResult[propName] = value;\n\n // Semicolons and commas can be optional\n skip(\",\", true);\n skip(\";\", true);\n }\n\n return objectResult;\n }\n\n var simpleValue = readValue(true);\n setOption(parent, name, simpleValue);\n return simpleValue;\n // Does not enforce a delimiter to be universal\n }\n\n function setOption(parent, name, value) {\n if (parent.setOption)\n parent.setOption(name, value);\n }\n\n function setParsedOption(parent, name, value, propName) {\n if (parent.setParsedOption)\n parent.setParsedOption(name, value, propName);\n }\n\n function parseInlineOptions(parent) {\n if (skip(\"[\", true)) {\n do {\n parseOption(parent, \"option\");\n } while (skip(\",\", true));\n skip(\"]\");\n }\n return parent;\n }\n\n function parseService(parent, token) {\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"service name\");\n\n var service = new Service(token);\n ifBlock(service, function parseService_block(token) {\n if (parseCommon(service, token))\n return;\n\n /* istanbul ignore else */\n if (token === \"rpc\")\n parseMethod(service, token);\n else\n throw illegal(token);\n });\n parent.add(service);\n }\n\n function parseMethod(parent, token) {\n // Get the comment of the preceding line now (if one exists) in case the\n // method is defined across multiple lines.\n var commentText = cmnt();\n\n var type = token;\n\n /* istanbul ignore if */\n if (!nameRe.test(token = next()))\n throw illegal(token, \"name\");\n\n var name = token,\n requestType, requestStream,\n responseType, responseStream;\n\n skip(\"(\");\n if (skip(\"stream\", true))\n requestStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n requestType = token;\n skip(\")\"); skip(\"returns\"); skip(\"(\");\n if (skip(\"stream\", true))\n responseStream = true;\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token);\n\n responseType = token;\n skip(\")\");\n\n var method = new Method(name, type, requestType, responseType, requestStream, responseStream);\n method.comment = commentText;\n ifBlock(method, function parseMethod_block(token) {\n\n /* istanbul ignore else */\n if (token === \"option\") {\n parseOption(method, token);\n skip(\";\");\n } else\n throw illegal(token);\n\n });\n parent.add(method);\n }\n\n function parseExtension(parent, token) {\n\n /* istanbul ignore if */\n if (!typeRefRe.test(token = next()))\n throw illegal(token, \"reference\");\n\n var reference = token;\n ifBlock(null, function parseExtension_block(token) {\n switch (token) {\n\n case \"required\":\n case \"repeated\":\n parseField(parent, token, reference);\n break;\n\n case \"optional\":\n /* istanbul ignore if */\n if (isProto3) {\n parseField(parent, \"proto3_optional\", reference);\n } else {\n parseField(parent, \"optional\", reference);\n }\n break;\n\n default:\n /* istanbul ignore if */\n if (!isProto3 || !typeRefRe.test(token))\n throw illegal(token);\n push(token);\n parseField(parent, \"optional\", reference);\n break;\n }\n });\n }\n\n var token;\n while ((token = next()) !== null) {\n switch (token) {\n\n case \"package\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parsePackage();\n break;\n\n case \"import\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseImport();\n break;\n\n case \"syntax\":\n\n /* istanbul ignore if */\n if (!head)\n throw illegal(token);\n\n parseSyntax();\n break;\n\n case \"option\":\n\n parseOption(ptr, token);\n skip(\";\");\n break;\n\n default:\n\n /* istanbul ignore else */\n if (parseCommon(ptr, token)) {\n head = false;\n continue;\n }\n\n /* istanbul ignore next */\n throw illegal(token);\n }\n }\n\n parse.filename = null;\n return {\n \"package\" : pkg,\n \"imports\" : imports,\n weakImports : weakImports,\n syntax : syntax,\n root : root\n };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {IParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {IParseOptions} defaults Default {@link IParseOptions}\n * @variation 2\n */\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(39);\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(27);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(39);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(23);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field = require(16),\n Enum = require(15),\n OneOf = require(25),\n util = require(37);\n\nvar Type, // cyclic\n parse, // might be excluded\n common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.} [options] Top level options\n */\nfunction Root(options) {\n Namespace.call(this, \"\", options);\n\n /**\n * Deferred extension fields.\n * @type {Field[]}\n */\n this.deferred = [];\n\n /**\n * Resolved file names of loaded files.\n * @type {string[]}\n */\n this.files = [];\n}\n\n/**\n * Loads a namespace descriptor into a root namespace.\n * @param {INamespace} json Nameespace descriptor\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n if (!root)\n root = new Root();\n if (json.options)\n root.setOptions(json.options);\n return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {string|null} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n/**\n * Fetch content from file path or url\n * This method exists so you can override it with your own logic.\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.fetch = util.fetch;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n if (typeof options === \"function\") {\n callback = options;\n options = undefined;\n }\n var self = this;\n if (!callback)\n return util.asPromise(load, self, filename, options);\n\n var sync = callback === SYNC; // undocumented\n\n // Finishes loading by calling the callback (exactly once)\n function finish(err, root) {\n /* istanbul ignore if */\n if (!callback)\n return;\n if (sync)\n throw err;\n var cb = callback;\n callback = null;\n cb(err, root);\n }\n\n // Bundled definition existence checking\n function getBundledFileName(filename) {\n var idx = filename.lastIndexOf(\"google/protobuf/\");\n if (idx > -1) {\n var altname = filename.substring(idx);\n if (altname in common) return altname;\n }\n return null;\n }\n\n // Processes a single file\n function process(filename, source) {\n try {\n if (util.isString(source) && source.charAt(0) === \"{\")\n source = JSON.parse(source);\n if (!util.isString(source))\n self.setOptions(source.options).addJSON(source.nested);\n else {\n parse.filename = filename;\n var parsed = parse(source, self, options),\n resolved,\n i = 0;\n if (parsed.imports)\n for (; i < parsed.imports.length; ++i)\n if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i]))\n fetch(resolved);\n if (parsed.weakImports)\n for (i = 0; i < parsed.weakImports.length; ++i)\n if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i]))\n fetch(resolved, true);\n }\n } catch (err) {\n finish(err);\n }\n if (!sync && !queued)\n finish(null, self); // only once anyway\n }\n\n // Fetches a single file\n function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }\n var queued = 0;\n\n // Assembling the root namespace doesn't require working type\n // references anymore, so we can load everything in parallel\n if (util.isString(filename))\n filename = [ filename ];\n for (var i = 0, resolved; i < filename.length; ++i)\n if (resolved = self.resolvePath(\"\", filename[i]))\n fetch(resolved);\n\n if (sync)\n return self;\n if (!queued)\n finish(null, self);\n return undefined;\n};\n// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @function Root#load\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise} Promise\n * @variation 3\n */\n// function load(filename:string, [options:IParseOptions]):Promise\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @function Root#loadSync\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n if (!util.isNode)\n throw Error(\"not supported\");\n return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n if (this.deferred.length)\n throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n }).join(\", \"));\n return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n var extendedType = field.parent.lookup(field.extend);\n if (extendedType) {\n var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n //do not allow to extend same field twice to prevent the error\n if (extendedType.get(sisterField.name)) {\n return true;\n }\n sisterField.declaringField = field;\n field.extensionField = sisterField;\n extendedType.add(sisterField);\n return true;\n }\n return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n if (object instanceof Field) {\n\n if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n if (!tryHandleExtension(this, object))\n this.deferred.push(object);\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n } else if (!(object instanceof OneOf)) /* everything else is a namespace */ {\n\n if (object instanceof Type) // Try to handle any deferred extensions\n for (var i = 0; i < this.deferred.length;)\n if (tryHandleExtension(this, this.deferred[i]))\n this.deferred.splice(i, 1);\n else\n ++i;\n for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n this._handleAdd(object._nestedArray[j]);\n if (exposeRe.test(object.name))\n object.parent[object.name] = object; // expose namespace as property of its parent\n }\n\n // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n // properties of namespaces just like static code does. This allows using a .d.ts generated for\n // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n if (object instanceof Field) {\n\n if (/* an extension field */ object.extend !== undefined) {\n if (/* already handled */ object.extensionField) { // remove its sister field\n object.extensionField.parent.remove(object.extensionField);\n object.extensionField = null;\n } else { // cancel the extension\n var index = this.deferred.indexOf(object);\n /* istanbul ignore else */\n if (index > -1)\n this.deferred.splice(index, 1);\n }\n }\n\n } else if (object instanceof Enum) {\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose enum values\n\n } else if (object instanceof Namespace) {\n\n for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n this._handleRemove(object._nestedArray[i]);\n\n if (exposeRe.test(object.name))\n delete object.parent[object.name]; // unexpose namespaces\n\n }\n};\n\n// Sets up cyclic dependencies (called in index-light)\nRoot._configure = function(Type_, parse_, common_) {\n Type = Type_;\n parse = parse_;\n common = common_;\n};\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(32);\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(39);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(23);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(22),\n util = require(37),\n rpc = require(31);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Service methods.\n * @type {Object.}\n */\n this.methods = {}; // toJSON, marker\n\n /**\n * Cached methods as an array.\n * @type {Method[]|null}\n * @private\n */\n this._methodsArray = null;\n}\n\n/**\n * Service descriptor.\n * @interface IService\n * @extends INamespace\n * @property {Object.} methods Method descriptors\n */\n\n/**\n * Constructs a service from a service descriptor.\n * @param {string} name Service name\n * @param {IService} json Service descriptor\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n var service = new Service(name, json.options);\n /* istanbul ignore else */\n if (json.methods)\n for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n if (json.nested)\n service.addJSON(json.nested);\n service.comment = json.comment;\n return service;\n};\n\n/**\n * Converts this service to a service descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IService} Service descriptor\n */\nService.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"methods\" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {},\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n get: function() {\n return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n }\n});\n\nfunction clearCache(service) {\n service._methodsArray = null;\n return service;\n}\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n return this.methods[name]\n || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n var methods = this.methodsArray;\n for (var i = 0; i < methods.length; ++i)\n methods[i].resolve();\n return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n\n /* istanbul ignore if */\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Method) {\n this.methods[object.name] = object;\n object.parent = this;\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n if (object instanceof Method) {\n\n /* istanbul ignore if */\n if (this.methods[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.methods[object.name];\n object.parent = null;\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) {\n var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\\w_]/g, \"\");\n rpcService[methodName] = util.codegen([\"r\",\"c\"], util.isReserved(methodName) ? methodName + \"_\" : methodName)(\"return this.rpcCall(m,q,s,r,c)\")({\n m: method,\n q: method.resolvedRequestType.ctor,\n s: method.resolvedResponseType.ctor\n });\n }\n return rpcService;\n};\n","\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe = /[\\s{}=;:[\\],'\"()<>]/g,\n stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n setCommentAltRe = /^\\s*\\*?\\/*/,\n setCommentSplitRe = /\\n/g,\n whitespaceRe = /\\s/,\n unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n \"0\": \"\\0\",\n \"r\": \"\\r\",\n \"n\": \"\\n\",\n \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.} map Special characters map\n * @memberof tokenize\n */\nfunction unescape(str) {\n return str.replace(unescapeRe, function($0, $1) {\n switch ($1) {\n case \"\\\\\":\n case \"\":\n return $1;\n default:\n return unescapeMap[$1] || \"\";\n }\n });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Gets the next token and advances.\n * @typedef TokenizerHandleNext\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Peeks for the next token.\n * @typedef TokenizerHandlePeek\n * @type {function}\n * @returns {string|null} Next token or `null` on eof\n */\n\n/**\n * Pushes a token back to the stack.\n * @typedef TokenizerHandlePush\n * @type {function}\n * @param {string} token Token\n * @returns {undefined}\n */\n\n/**\n * Skips the next token.\n * @typedef TokenizerHandleSkip\n * @type {function}\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] If optional\n * @returns {boolean} Whether the token matched\n * @throws {Error} If the token didn't match and is not optional\n */\n\n/**\n * Gets the comment on the previous line or, alternatively, the line comment on the specified line.\n * @typedef TokenizerHandleCmnt\n * @type {function}\n * @param {number} [line] Line number\n * @returns {string|null} Comment text or `null` if none\n */\n\n/**\n * Handle object returned from {@link tokenize}.\n * @interface ITokenizerHandle\n * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof)\n * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof)\n * @property {TokenizerHandlePush} push Pushes a token back to the stack\n * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n * @property {number} line Current line number\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode.\n * @returns {ITokenizerHandle} Tokenizer handle\n */\nfunction tokenize(source, alternateCommentMode) {\n /* eslint-disable callback-return */\n source = source.toString();\n\n var offset = 0,\n length = source.length,\n line = 1,\n lastCommentLine = 0,\n comments = {};\n\n var stack = [];\n\n var stringDelim = null;\n\n /* istanbul ignore next */\n /**\n * Creates an error for illegal syntax.\n * @param {string} subject Subject\n * @returns {Error} Error created\n * @inner\n */\n function illegal(subject) {\n return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n }\n\n /**\n * Reads a string till its end.\n * @returns {string} String read\n * @inner\n */\n function readString() {\n var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n re.lastIndex = offset - 1;\n var match = re.exec(source);\n if (!match)\n throw illegal(\"string\");\n offset = re.lastIndex;\n push(stringDelim);\n stringDelim = null;\n return unescape(match[1]);\n }\n\n /**\n * Gets the character at `pos` within the source.\n * @param {number} pos Position\n * @returns {string} Character\n * @inner\n */\n function charAt(pos) {\n return source.charAt(pos);\n }\n\n /**\n * Sets the current comment text.\n * @param {number} start Start offset\n * @param {number} end End offset\n * @param {boolean} isLeading set if a leading comment\n * @returns {undefined}\n * @inner\n */\n function setComment(start, end, isLeading) {\n var comment = {\n type: source.charAt(start++),\n lineEmpty: false,\n leading: isLeading,\n };\n var lookback;\n if (alternateCommentMode) {\n lookback = 2; // alternate comment parsing: \"//\" or \"/*\"\n } else {\n lookback = 3; // \"///\" or \"/**\"\n }\n var commentOffset = start - lookback,\n c;\n do {\n if (--commentOffset < 0 ||\n (c = source.charAt(commentOffset)) === \"\\n\") {\n comment.lineEmpty = true;\n break;\n }\n } while (c === \" \" || c === \"\\t\");\n var lines = source\n .substring(start, end)\n .split(setCommentSplitRe);\n for (var i = 0; i < lines.length; ++i)\n lines[i] = lines[i]\n .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, \"\")\n .trim();\n comment.text = lines\n .join(\"\\n\")\n .trim();\n\n comments[line] = comment;\n lastCommentLine = line;\n }\n\n function isDoubleSlashCommentLine(startOffset) {\n var endOffset = findEndOfLine(startOffset);\n\n // see if remaining line matches comment pattern\n var lineText = source.substring(startOffset, endOffset);\n var isComment = /^\\s*\\/\\//.test(lineText);\n return isComment;\n }\n\n function findEndOfLine(cursor) {\n // find end of cursor's line\n var endOffset = cursor;\n while (endOffset < length && charAt(endOffset) !== \"\\n\") {\n endOffset++;\n }\n return endOffset;\n }\n\n /**\n * Obtains the next token.\n * @returns {string|null} Next token or `null` on eof\n * @inner\n */\n function next() {\n if (stack.length > 0)\n return stack.shift();\n if (stringDelim)\n return readString();\n var repeat,\n prev,\n curr,\n start,\n isDoc,\n isLeadingComment = offset === 0;\n do {\n if (offset === length)\n return null;\n repeat = false;\n while (whitespaceRe.test(curr = charAt(offset))) {\n if (curr === \"\\n\") {\n isLeadingComment = true;\n ++line;\n }\n if (++offset === length)\n return null;\n }\n\n if (charAt(offset) === \"/\") {\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n if (charAt(offset) === \"/\") { // Line\n if (!alternateCommentMode) {\n // check for triple-slash comment\n isDoc = charAt(start = offset + 1) === \"/\";\n\n while (charAt(++offset) !== \"\\n\") {\n if (offset === length) {\n return null;\n }\n }\n ++offset;\n if (isDoc) {\n setComment(start, offset - 1, isLeadingComment);\n // Trailing comment cannot not be multi-line,\n // so leading comment state should be reset to handle potential next comments\n isLeadingComment = true;\n }\n ++line;\n repeat = true;\n } else {\n // check for double-slash comments, consolidating consecutive lines\n start = offset;\n isDoc = false;\n if (isDoubleSlashCommentLine(offset - 1)) {\n isDoc = true;\n do {\n offset = findEndOfLine(offset);\n if (offset === length) {\n break;\n }\n offset++;\n if (!isLeadingComment) {\n // Trailing comment cannot not be multi-line\n break;\n }\n } while (isDoubleSlashCommentLine(offset));\n } else {\n offset = Math.min(length, findEndOfLine(offset) + 1);\n }\n if (isDoc) {\n setComment(start, offset, isLeadingComment);\n isLeadingComment = true;\n }\n line++;\n repeat = true;\n }\n } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n // check for /** (regular comment mode) or /* (alternate comment mode)\n start = offset + 1;\n isDoc = alternateCommentMode || charAt(start) === \"*\";\n do {\n if (curr === \"\\n\") {\n ++line;\n }\n if (++offset === length) {\n throw illegal(\"comment\");\n }\n prev = curr;\n curr = charAt(offset);\n } while (prev !== \"*\" || curr !== \"/\");\n ++offset;\n if (isDoc) {\n setComment(start, offset - 2, isLeadingComment);\n isLeadingComment = true;\n }\n repeat = true;\n } else {\n return \"/\";\n }\n }\n } while (repeat);\n\n // offset !== length if we got here\n\n var end = offset;\n delimRe.lastIndex = 0;\n var delim = delimRe.test(charAt(end++));\n if (!delim)\n while (end < length && !delimRe.test(charAt(end)))\n ++end;\n var token = source.substring(offset, offset = end);\n if (token === \"\\\"\" || token === \"'\")\n stringDelim = token;\n return token;\n }\n\n /**\n * Pushes a token back to the stack.\n * @param {string} token Token\n * @returns {undefined}\n * @inner\n */\n function push(token) {\n stack.push(token);\n }\n\n /**\n * Peeks for the next token.\n * @returns {string|null} Token or `null` on eof\n * @inner\n */\n function peek() {\n if (!stack.length) {\n var token = next();\n if (token === null)\n return null;\n push(token);\n }\n return stack[0];\n }\n\n /**\n * Skips a token.\n * @param {string} expected Expected token\n * @param {boolean} [optional=false] Whether the token is optional\n * @returns {boolean} `true` when skipped, `false` if not\n * @throws {Error} When a required token is not present\n * @inner\n */\n function skip(expected, optional) {\n var actual = peek(),\n equals = actual === expected;\n if (equals) {\n next();\n return true;\n }\n if (!optional)\n throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n return false;\n }\n\n /**\n * Gets a comment.\n * @param {number} [trailingLine] Line number if looking for a trailing comment\n * @returns {string|null} Comment text\n * @inner\n */\n function cmnt(trailingLine) {\n var ret = null;\n var comment;\n if (trailingLine === undefined) {\n comment = comments[line - 1];\n delete comments[line - 1];\n if (comment && (alternateCommentMode || comment.type === \"*\" || comment.lineEmpty)) {\n ret = comment.leading ? comment.text : null;\n }\n } else {\n /* istanbul ignore else */\n if (lastCommentLine < trailingLine) {\n peek();\n }\n comment = comments[trailingLine];\n delete comments[trailingLine];\n if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === \"/\")) {\n ret = comment.leading ? null : comment.text;\n }\n }\n return ret;\n }\n\n return Object.defineProperty({\n next: next,\n peek: peek,\n push: push,\n skip: skip,\n cmnt: cmnt\n }, \"line\", {\n get: function() { return line; }\n });\n /* eslint-enable callback-return */\n}\n","\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(23);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum = require(15),\n OneOf = require(25),\n Field = require(16),\n MapField = require(20),\n Service = require(33),\n Message = require(21),\n Reader = require(27),\n Writer = require(42),\n util = require(37),\n encoder = require(14),\n decoder = require(13),\n verifier = require(40),\n converter = require(12),\n wrappers = require(41);\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.} [options] Declared options\n */\nfunction Type(name, options) {\n Namespace.call(this, name, options);\n\n /**\n * Message fields.\n * @type {Object.}\n */\n this.fields = {}; // toJSON, marker\n\n /**\n * Oneofs declared within this namespace, if any.\n * @type {Object.}\n */\n this.oneofs = undefined; // toJSON\n\n /**\n * Extension ranges, if any.\n * @type {number[][]}\n */\n this.extensions = undefined; // toJSON\n\n /**\n * Reserved ranges, if any.\n * @type {Array.}\n */\n this.reserved = undefined; // toJSON\n\n /*?\n * Whether this type is a legacy group.\n * @type {boolean|undefined}\n */\n this.group = undefined; // toJSON\n\n /**\n * Cached fields by id.\n * @type {Object.|null}\n * @private\n */\n this._fieldsById = null;\n\n /**\n * Cached fields as an array.\n * @type {Field[]|null}\n * @private\n */\n this._fieldsArray = null;\n\n /**\n * Cached oneofs as an array.\n * @type {OneOf[]|null}\n * @private\n */\n this._oneofsArray = null;\n\n /**\n * Cached constructor.\n * @type {Constructor<{}>}\n * @private\n */\n this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n /**\n * Message fields by id.\n * @name Type#fieldsById\n * @type {Object.}\n * @readonly\n */\n fieldsById: {\n get: function() {\n\n /* istanbul ignore if */\n if (this._fieldsById)\n return this._fieldsById;\n\n this._fieldsById = {};\n for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n var field = this.fields[names[i]],\n id = field.id;\n\n /* istanbul ignore if */\n if (this._fieldsById[id])\n throw Error(\"duplicate id \" + id + \" in \" + this);\n\n this._fieldsById[id] = field;\n }\n return this._fieldsById;\n }\n },\n\n /**\n * Fields of this message as an array for iteration.\n * @name Type#fieldsArray\n * @type {Field[]}\n * @readonly\n */\n fieldsArray: {\n get: function() {\n return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n }\n },\n\n /**\n * Oneofs of this message as an array for iteration.\n * @name Type#oneofsArray\n * @type {OneOf[]}\n * @readonly\n */\n oneofsArray: {\n get: function() {\n return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n }\n },\n\n /**\n * The registered constructor, if any registered, otherwise a generic constructor.\n * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.\n * @name Type#ctor\n * @type {Constructor<{}>}\n */\n ctor: {\n get: function() {\n return this._ctor || (this.ctor = Type.generateConstructor(this)());\n },\n set: function(ctor) {\n\n // Ensure proper prototype\n var prototype = ctor.prototype;\n if (!(prototype instanceof Message)) {\n (ctor.prototype = new Message()).constructor = ctor;\n util.merge(ctor.prototype, prototype);\n }\n\n // Classes and messages reference their reflected type\n ctor.$type = ctor.prototype.$type = this;\n\n // Mix in static methods\n util.merge(ctor, Message, true);\n\n this._ctor = ctor;\n\n // Messages have non-enumerable default values on their prototype\n var i = 0;\n for (; i < /* initializes */ this.fieldsArray.length; ++i)\n this._fieldsArray[i].resolve(); // ensures a proper value\n\n // Messages have non-enumerable getters and setters for each virtual oneof field\n var ctorProperties = {};\n for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i)\n ctorProperties[this._oneofsArray[i].resolve().name] = {\n get: util.oneOfGetter(this._oneofsArray[i].oneof),\n set: util.oneOfSetter(this._oneofsArray[i].oneof)\n };\n if (i)\n Object.defineProperties(ctor.prototype, ctorProperties);\n }\n }\n});\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nType.generateConstructor = function generateConstructor(mtype) {\n /* eslint-disable no-unexpected-multiline */\n var gen = util.codegen([\"p\"], mtype.name);\n // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype\n for (var i = 0, field; i < mtype.fieldsArray.length; ++i)\n if ((field = mtype._fieldsArray[i]).map) gen\n (\"this%s={}\", util.safeProp(field.name));\n else if (field.repeated) gen\n (\"this%s=[]\", util.safeProp(field.name));\n return gen\n (\"if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors\n * @property {Object.} fields Field descriptors\n * @property {number[][]} [extensions] Extension ranges\n * @property {number[][]} [reserved] Reserved ranges\n * @property {boolean} [group=false] Whether a legacy group or not\n */\n\n/**\n * Creates a message type from a message type descriptor.\n * @param {string} name Message name\n * @param {IType} json Message type descriptor\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n var type = new Type(name, json.options);\n type.extensions = json.extensions;\n type.reserved = json.reserved;\n var names = Object.keys(json.fields),\n i = 0;\n for (; i < names.length; ++i)\n type.add(\n ( typeof json.fields[names[i]].keyType !== \"undefined\"\n ? MapField.fromJSON\n : Field.fromJSON )(names[i], json.fields[names[i]])\n );\n if (json.oneofs)\n for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n if (json.nested)\n for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n var nested = json.nested[names[i]];\n type.add( // most to least likely\n ( nested.id !== undefined\n ? Field.fromJSON\n : nested.fields !== undefined\n ? Type.fromJSON\n : nested.values !== undefined\n ? Enum.fromJSON\n : nested.methods !== undefined\n ? Service.fromJSON\n : Namespace.fromJSON )(names[i], nested)\n );\n }\n if (json.extensions && json.extensions.length)\n type.extensions = json.extensions;\n if (json.reserved && json.reserved.length)\n type.reserved = json.reserved;\n if (json.group)\n type.group = true;\n if (json.comment)\n type.comment = json.comment;\n return type;\n};\n\n/**\n * Converts this message type to a message type descriptor.\n * @param {IToJSONOptions} [toJSONOptions] JSON conversion options\n * @returns {IType} Message type descriptor\n */\nType.prototype.toJSON = function toJSON(toJSONOptions) {\n var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions);\n var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;\n return util.toObject([\n \"options\" , inherited && inherited.options || undefined,\n \"oneofs\" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions),\n \"fields\" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {},\n \"extensions\" , this.extensions && this.extensions.length ? this.extensions : undefined,\n \"reserved\" , this.reserved && this.reserved.length ? this.reserved : undefined,\n \"group\" , this.group || undefined,\n \"nested\" , inherited && inherited.nested || undefined,\n \"comment\" , keepComments ? this.comment : undefined\n ]);\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n var fields = this.fieldsArray, i = 0;\n while (i < fields.length)\n fields[i++].resolve();\n var oneofs = this.oneofsArray; i = 0;\n while (i < oneofs.length)\n oneofs[i++].resolve();\n return Namespace.prototype.resolveAll.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n return this.fields[name]\n || this.oneofs && this.oneofs[name]\n || this.nested && this.nested[name]\n || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n if (this.get(object.name))\n throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n if (object instanceof Field && object.extend === undefined) {\n // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n // The root object takes care of adding distinct sister-fields to the respective extended\n // type instead.\n\n // avoids calling the getter if not absolutely necessary because it's called quite frequently\n if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n throw Error(\"duplicate id \" + object.id + \" in \" + this);\n if (this.isReservedId(object.id))\n throw Error(\"id \" + object.id + \" is reserved in \" + this);\n if (this.isReservedName(object.name))\n throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n if (object.parent)\n object.parent.remove(object);\n this.fields[object.name] = object;\n object.message = this;\n object.onAdd(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n if (!this.oneofs)\n this.oneofs = {};\n this.oneofs[object.name] = object;\n object.onAdd(this);\n return clearCache(this);\n }\n return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n if (object instanceof Field && object.extend === undefined) {\n // See Type#add for the reason why extension fields are excluded here.\n\n /* istanbul ignore if */\n if (!this.fields || this.fields[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.fields[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n if (object instanceof OneOf) {\n\n /* istanbul ignore if */\n if (!this.oneofs || this.oneofs[object.name] !== object)\n throw Error(object + \" is not a member of \" + this);\n\n delete this.oneofs[object.name];\n object.parent = null;\n object.onRemove(this);\n return clearCache(this);\n }\n return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n return Namespace.isReservedId(this.reserved, id);\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n return Namespace.isReservedName(this.reserved, name);\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.} [properties] Properties to set\n * @returns {Message<{}>} Message instance\n */\nType.prototype.create = function create(properties) {\n return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n // multiple times (V8, soft-deopt prototype-check).\n\n var fullName = this.fullName,\n types = [];\n for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n types.push(this._fieldsArray[i].resolve().resolvedType);\n\n // Replace setup methods with type-specific generated functions\n this.encode = encoder(this)({\n Writer : Writer,\n types : types,\n util : util\n });\n this.decode = decoder(this)({\n Reader : Reader,\n types : types,\n util : util\n });\n this.verify = verifier(this)({\n types : types,\n util : util\n });\n this.fromObject = converter.fromObject(this)({\n types : types,\n util : util\n });\n this.toObject = converter.toObject(this)({\n types : types,\n util : util\n });\n\n // Inject custom wrappers for common types\n var wrapper = wrappers[fullName];\n if (wrapper) {\n var originalThis = Object.create(this);\n // if (wrapper.fromObject) {\n originalThis.fromObject = this.fromObject;\n this.fromObject = wrapper.fromObject.bind(originalThis);\n // }\n // if (wrapper.toObject) {\n originalThis.toObject = this.toObject;\n this.toObject = wrapper.toObject.bind(originalThis);\n // }\n }\n\n return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message<{}>|Object.} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError<{}>} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message<{}>} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof Reader))\n reader = Reader.create(reader);\n return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Object.} message Plain object to verify\n * @returns {null|string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.} object Plain object to convert\n * @returns {Message<{}>} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n return this.setup().fromObject(object);\n};\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @interface IConversionOptions\n * @property {Function} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {Function} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {Function} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any\n * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n return this.setup().toObject(message, options);\n};\n\n/**\n * Decorator function as returned by {@link Type.d} (TypeScript).\n * @typedef TypeDecorator\n * @type {function}\n * @param {Constructor} target Target constructor\n * @returns {undefined}\n * @template T extends Message\n */\n\n/**\n * Type decorator (TypeScript).\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {TypeDecorator} Decorator function\n * @template T extends Message\n */\nType.d = function decorateType(typeName) {\n return function typeDecorator(target) {\n util.decorateType(target, typeName);\n };\n};\n","\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(37);\n\nvar s = [\n \"double\", // 0\n \"float\", // 1\n \"int32\", // 2\n \"uint32\", // 3\n \"sint32\", // 4\n \"fixed32\", // 5\n \"sfixed32\", // 6\n \"int64\", // 7\n \"uint64\", // 8\n \"sint64\", // 9\n \"fixed64\", // 10\n \"sfixed64\", // 11\n \"bool\", // 12\n \"string\", // 13\n \"bytes\" // 14\n];\n\nfunction bake(values, offset) {\n var i = 0, o = {};\n offset |= 0;\n while (i < values.length) o[s[i + offset]] = values[i++];\n return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2,\n /* bytes */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.}\n * @const\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.} bytes=Array(0) Bytes default\n * @property {null} message=null Message default\n */\ntypes.defaults = bake([\n /* double */ 0,\n /* float */ 0,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 0,\n /* sfixed32 */ 0,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 0,\n /* sfixed64 */ 0,\n /* bool */ false,\n /* string */ \"\",\n /* bytes */ util.emptyArray,\n /* message */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.}\n * @const\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0,\n /* string */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.}\n * @const\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n /* double */ 1,\n /* float */ 5,\n /* int32 */ 0,\n /* uint32 */ 0,\n /* sint32 */ 0,\n /* fixed32 */ 5,\n /* sfixed32 */ 5,\n /* int64 */ 0,\n /* uint64 */ 0,\n /* sint64 */ 0,\n /* fixed64 */ 1,\n /* sfixed64 */ 1,\n /* bool */ 0\n]);\n","\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(39);\n\nvar roots = require(30);\n\nvar Type, // cyclic\n Enum;\n\nutil.codegen = require(3);\nutil.fetch = require(5);\nutil.path = require(8);\n\n/**\n * Node's fs module if available.\n * @type {Object.}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n if (object) {\n var keys = Object.keys(object),\n array = new Array(keys.length),\n index = 0;\n while (index < keys.length)\n array[index] = object[keys[index++]];\n return array;\n }\n return [];\n};\n\n/**\n * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values.\n * @param {Array.<*>} array Array to convert\n * @returns {Object.} Converted object\n */\nutil.toObject = function toObject(array) {\n var object = {},\n index = 0;\n while (index < array.length) {\n var key = array[index++],\n val = array[index++];\n if (val !== undefined)\n object[key] = val;\n }\n return object;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n safePropQuoteRe = /\"/g;\n\n/**\n * Tests whether the specified name is a reserved word in JS.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nutil.isReserved = function isReserved(name) {\n return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name);\n};\n\n/**\n * Returns a safe property accessor for the specified property name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n if (!/^[$\\w_]+$/.test(prop) || util.isReserved(prop))\n return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n return \".\" + prop;\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar camelCaseRe = /_([a-z])/g;\n\n/**\n * Converts a string to camel case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.camelCase = function camelCase(str) {\n return str.substring(0, 1)\n + str.substring(1)\n .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n};\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n */\nutil.compareFieldsById = function compareFieldsById(a, b) {\n return a.id - b.id;\n};\n\n/**\n * Decorator helper for types (TypeScript).\n * @param {Constructor} ctor Constructor function\n * @param {string} [typeName] Type name, defaults to the constructor's name\n * @returns {Type} Reflected type\n * @template T extends Message\n * @property {Root} root Decorators root\n */\nutil.decorateType = function decorateType(ctor, typeName) {\n\n /* istanbul ignore if */\n if (ctor.$type) {\n if (typeName && ctor.$type.name !== typeName) {\n util.decorateRoot.remove(ctor.$type);\n ctor.$type.name = typeName;\n util.decorateRoot.add(ctor.$type);\n }\n return ctor.$type;\n }\n\n /* istanbul ignore next */\n if (!Type)\n Type = require(35);\n\n var type = new Type(typeName || ctor.name);\n util.decorateRoot.add(type);\n type.ctor = ctor; // sets up .encode, .decode etc.\n Object.defineProperty(ctor, \"$type\", { value: type, enumerable: false });\n Object.defineProperty(ctor.prototype, \"$type\", { value: type, enumerable: false });\n return type;\n};\n\nvar decorateEnumIndex = 0;\n\n/**\n * Decorator helper for enums (TypeScript).\n * @param {Object} object Enum object\n * @returns {Enum} Reflected enum\n */\nutil.decorateEnum = function decorateEnum(object) {\n\n /* istanbul ignore if */\n if (object.$type)\n return object.$type;\n\n /* istanbul ignore next */\n if (!Enum)\n Enum = require(15);\n\n var enm = new Enum(\"Enum\" + decorateEnumIndex++, object);\n util.decorateRoot.add(enm);\n Object.defineProperty(object, \"$type\", { value: enm, enumerable: false });\n return enm;\n};\n\n\n/**\n * Sets the value of a property by property path. If a value already exists, it is turned to an array\n * @param {Object.} dst Destination object\n * @param {string} path dot '.' delimited path of the property to set\n * @param {Object} value the value to set\n * @returns {Object.} Destination object\n */\nutil.setProperty = function setProperty(dst, path, value) {\n function setProp(dst, path, value) {\n var part = path.shift();\n if (part === \"__proto__\" || part === \"prototype\") {\n return dst;\n }\n if (path.length > 0) {\n dst[part] = setProp(dst[part] || {}, path, value);\n } else {\n var prevValue = dst[part];\n if (prevValue)\n value = [].concat(prevValue).concat(value);\n dst[part] = value;\n }\n return dst;\n }\n\n if (typeof dst !== \"object\")\n throw TypeError(\"dst must be an object\");\n if (!path)\n throw TypeError(\"path must be specified\");\n\n path = path.split(\".\");\n return setProp(dst, path, value);\n};\n\n/**\n * Decorator root (TypeScript).\n * @name util.decorateRoot\n * @type {Root}\n * @readonly\n */\nObject.defineProperty(util, \"decorateRoot\", {\n get: function() {\n return roots[\"decorated\"] || (roots[\"decorated\"] = new (require(29))());\n }\n});\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(39);\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// float handling accross browsers\nutil.float = require(6);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(7);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(10);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(9);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(38);\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = verifier;\n\nvar Enum = require(15),\n util = require(37);\n\nfunction invalid(field, expected) {\n return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n /* eslint-disable no-unexpected-multiline */\n if (field.resolvedType) {\n if (field.resolvedType instanceof Enum) { gen\n (\"switch(%s){\", ref)\n (\"default:\")\n (\"return%j\", invalid(field, \"enum value\"));\n for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n (\"case %i:\", field.resolvedType.values[keys[j]]);\n gen\n (\"break\")\n (\"}\");\n } else {\n gen\n (\"{\")\n (\"var e=types[%i].verify(%s);\", fieldIndex, ref)\n (\"if(e)\")\n (\"return%j+e\", field.name + \".\")\n (\"}\");\n }\n } else {\n switch (field.type) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.isInteger(%s))\", ref)\n (\"return%j\", invalid(field, \"integer\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n (\"return%j\", invalid(field, \"integer|Long\"));\n break;\n case \"float\":\n case \"double\": gen\n (\"if(typeof %s!==\\\"number\\\")\", ref)\n (\"return%j\", invalid(field, \"number\"));\n break;\n case \"bool\": gen\n (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n (\"return%j\", invalid(field, \"boolean\"));\n break;\n case \"string\": gen\n (\"if(!util.isString(%s))\", ref)\n (\"return%j\", invalid(field, \"string\"));\n break;\n case \"bytes\": gen\n (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n (\"return%j\", invalid(field, \"buffer\"));\n break;\n }\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n /* eslint-disable no-unexpected-multiline */\n switch (field.keyType) {\n case \"int32\":\n case \"uint32\":\n case \"sint32\":\n case \"fixed32\":\n case \"sfixed32\": gen\n (\"if(!util.key32Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"integer key\"));\n break;\n case \"int64\":\n case \"uint64\":\n case \"sint64\":\n case \"fixed64\":\n case \"sfixed64\": gen\n (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n (\"return%j\", invalid(field, \"integer|Long key\"));\n break;\n case \"bool\": gen\n (\"if(!util.key2Re.test(%s))\", ref)\n (\"return%j\", invalid(field, \"boolean key\"));\n break;\n }\n return gen;\n /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n /* eslint-disable no-unexpected-multiline */\n\n var gen = util.codegen([\"m\"], mtype.name + \"$verify\")\n (\"if(typeof m!==\\\"object\\\"||m===null)\")\n (\"return%j\", \"object expected\");\n var oneofs = mtype.oneofsArray,\n seenFirstField = {};\n if (oneofs.length) gen\n (\"var p={}\");\n\n for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n var field = mtype._fieldsArray[i].resolve(),\n ref = \"m\" + util.safeProp(field.name);\n\n if (field.optional) gen\n (\"if(%s!=null&&m.hasOwnProperty(%j)){\", ref, field.name); // !== undefined && !== null\n\n // map fields\n if (field.map) { gen\n (\"if(!util.isObject(%s))\", ref)\n (\"return%j\", invalid(field, \"object\"))\n (\"var k=Object.keys(%s)\", ref)\n (\"for(var i=0;i}\n * @const\n */\nvar wrappers = exports;\n\nvar Message = require(21);\n\n/**\n * From object converter part of an {@link IWrapper}.\n * @typedef WrapperFromObjectConverter\n * @type {function}\n * @param {Object.} object Plain object\n * @returns {Message<{}>} Message instance\n * @this Type\n */\n\n/**\n * To object converter part of an {@link IWrapper}.\n * @typedef WrapperToObjectConverter\n * @type {function}\n * @param {Message<{}>} message Message instance\n * @param {IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n * @this Type\n */\n\n/**\n * Common type wrapper part of {@link wrappers}.\n * @interface IWrapper\n * @property {WrapperFromObjectConverter} [fromObject] From object converter\n * @property {WrapperToObjectConverter} [toObject] To object converter\n */\n\n// Custom wrapper for Any\nwrappers[\".google.protobuf.Any\"] = {\n\n fromObject: function(object) {\n\n // unwrap value type if mapped\n if (object && object[\"@type\"]) {\n // Only use fully qualified type name after the last '/'\n var name = object[\"@type\"].substring(object[\"@type\"].lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type) {\n // type_url does not accept leading \".\"\n var type_url = object[\"@type\"].charAt(0) === \".\" ?\n object[\"@type\"].slice(1) : object[\"@type\"];\n // type_url prefix is optional, but path seperator is required\n if (type_url.indexOf(\"/\") === -1) {\n type_url = \"/\" + type_url;\n }\n return this.create({\n type_url: type_url,\n value: type.encode(type.fromObject(object)).finish()\n });\n }\n }\n\n return this.fromObject(object);\n },\n\n toObject: function(message, options) {\n\n // Default prefix\n var googleApi = \"type.googleapis.com/\";\n var prefix = \"\";\n var name = \"\";\n\n // decode value if requested and unmapped\n if (options && options.json && message.type_url && message.value) {\n // Only use fully qualified type name after the last '/'\n name = message.type_url.substring(message.type_url.lastIndexOf(\"/\") + 1);\n // Separate the prefix used\n prefix = message.type_url.substring(0, message.type_url.lastIndexOf(\"/\") + 1);\n var type = this.lookup(name);\n /* istanbul ignore else */\n if (type)\n message = type.decode(message.value);\n }\n\n // wrap value if unmapped\n if (!(message instanceof this.ctor) && message instanceof Message) {\n var object = message.$type.toObject(message, options);\n var messageName = message.$type.fullName[0] === \".\" ?\n message.$type.fullName.slice(1) : message.$type.fullName;\n // Default to type.googleapis.com prefix if no prefix is used\n if (prefix === \"\") {\n prefix = googleApi;\n }\n name = prefix + messageName;\n object[\"@type\"] = name;\n return object;\n }\n\n return this.toObject(message, options);\n }\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(39);\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(42);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(39);\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n"],"sourceRoot":"."} \ No newline at end of file diff --git a/node_modules/protobufjs/ext/debug/README.md b/node_modules/protobufjs/ext/debug/README.md new file mode 100644 index 0000000..a48517e --- /dev/null +++ b/node_modules/protobufjs/ext/debug/README.md @@ -0,0 +1,4 @@ +protobufjs/ext/debug +========================= + +Experimental debugging extension. diff --git a/node_modules/protobufjs/ext/debug/index.js b/node_modules/protobufjs/ext/debug/index.js new file mode 100644 index 0000000..2b79766 --- /dev/null +++ b/node_modules/protobufjs/ext/debug/index.js @@ -0,0 +1,71 @@ +"use strict"; +var protobuf = require("../.."); + +/** + * Debugging utility functions. Only present in debug builds. + * @namespace + */ +var debug = protobuf.debug = module.exports = {}; + +var codegen = protobuf.util.codegen; + +var debugFnRe = /function ([^(]+)\(([^)]*)\) {/g; + +// Counts number of calls to any generated function +function codegen_debug() { + codegen_debug.supported = codegen.supported; + codegen_debug.verbose = codegen.verbose; + var gen = codegen.apply(null, Array.prototype.slice.call(arguments)); + gen.str = (function(str) { return function str_debug() { + return str.apply(null, Array.prototype.slice.call(arguments)).replace(debugFnRe, "function $1($2) {\n\t$1.calls=($1.calls|0)+1"); + };})(gen.str); + return gen; +} + +/** + * Returns a list of unused types within the specified root. + * @param {NamespaceBase} ns Namespace to search + * @returns {Type[]} Unused types + */ +debug.unusedTypes = function unusedTypes(ns) { + + /* istanbul ignore if */ + if (!(ns instanceof protobuf.Namespace)) + throw TypeError("ns must be a Namespace"); + + /* istanbul ignore if */ + if (!ns.nested) + return []; + + var unused = []; + for (var names = Object.keys(ns.nested), i = 0; i < names.length; ++i) { + var nested = ns.nested[names[i]]; + if (nested instanceof protobuf.Type) { + var calls = (nested.encode.calls|0) + + (nested.decode.calls|0) + + (nested.verify.calls|0) + + (nested.toObject.calls|0) + + (nested.fromObject.calls|0); + if (!calls) + unused.push(nested); + } else if (nested instanceof protobuf.Namespace) + Array.prototype.push.apply(unused, unusedTypes(nested)); + } + return unused; +}; + +/** + * Enables debugging extensions. + * @returns {undefined} + */ +debug.enable = function enable() { + protobuf.util.codegen = codegen_debug; +}; + +/** + * Disables debugging extensions. + * @returns {undefined} + */ +debug.disable = function disable() { + protobuf.util.codegen = codegen; +}; diff --git a/node_modules/protobufjs/ext/descriptor/README.md b/node_modules/protobufjs/ext/descriptor/README.md new file mode 100644 index 0000000..3bc4c6c --- /dev/null +++ b/node_modules/protobufjs/ext/descriptor/README.md @@ -0,0 +1,72 @@ +protobufjs/ext/descriptor +========================= + +Experimental extension for interoperability with [descriptor.proto](https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto) types. + +Usage +----- + +```js +var protobuf = require("protobufjs"), // requires the full library + descriptor = require("protobufjs/ext/descriptor"); + +var root = ...; + +// convert any existing root instance to the corresponding descriptor type +var descriptorMsg = root.toDescriptor("proto2"); +// ^ returns a FileDescriptorSet message, see table below + +// encode to a descriptor buffer +var buffer = descriptor.FileDescriptorSet.encode(descriptorMsg).finish(); + +// decode from a descriptor buffer +var decodedDescriptor = descriptor.FileDescriptorSet.decode(buffer); + +// convert any existing descriptor to a root instance +root = protobuf.Root.fromDescriptor(decodedDescriptor); +// ^ expects a FileDescriptorSet message or buffer, see table below + +// and start all over again +``` + +API +--- + +The extension adds `.fromDescriptor(descriptor[, syntax])` and `#toDescriptor([syntax])` methods to reflection objects and exports the `.google.protobuf` namespace of the internally used `Root` instance containing the following types present in descriptor.proto: + +| Descriptor type | protobuf.js type | Remarks +|-------------------------------|------------------|--------- +| **FileDescriptorSet** | Root | +| FileDescriptorProto | | dependencies are not supported +| FileOptions | | +| FileOptionsOptimizeMode | | +| SourceCodeInfo | | not supported +| SourceCodeInfoLocation | | +| GeneratedCodeInfo | | not supported +| GeneratedCodeInfoAnnotation | | +| **DescriptorProto** | Type | +| MessageOptions | | +| DescriptorProtoExtensionRange | | +| DescriptorProtoReservedRange | | +| **FieldDescriptorProto** | Field | +| FieldDescriptorProtoLabel | | +| FieldDescriptorProtoType | | +| FieldOptions | | +| FieldOptionsCType | | +| FieldOptionsJSType | | +| **OneofDescriptorProto** | OneOf | +| OneofOptions | | +| **EnumDescriptorProto** | Enum | +| EnumOptions | | +| EnumValueDescriptorProto | | +| EnumValueOptions | | not supported +| **ServiceDescriptorProto** | Service | +| ServiceOptions | | +| **MethodDescriptorProto** | Method | +| MethodOptions | | +| UninterpretedOption | | not supported +| UninterpretedOptionNamePart | | + +Note that not all features of descriptor.proto translate perfectly to a protobuf.js root instance. A root instance has only limited knowlege of packages or individual files for example, which is then compensated by guessing and generating fictional file names. + +When using TypeScript, the respective interface types can be used to reference specific message instances (i.e. `protobuf.Message`). diff --git a/node_modules/protobufjs/ext/descriptor/index.d.ts b/node_modules/protobufjs/ext/descriptor/index.d.ts new file mode 100644 index 0000000..1df2efc --- /dev/null +++ b/node_modules/protobufjs/ext/descriptor/index.d.ts @@ -0,0 +1,191 @@ +import * as $protobuf from "../.."; +export const FileDescriptorSet: $protobuf.Type; + +export const FileDescriptorProto: $protobuf.Type; + +export const DescriptorProto: $protobuf.Type & { + ExtensionRange: $protobuf.Type, + ReservedRange: $protobuf.Type +}; + +export const FieldDescriptorProto: $protobuf.Type & { + Label: $protobuf.Enum, + Type: $protobuf.Enum +}; + +export const OneofDescriptorProto: $protobuf.Type; + +export const EnumDescriptorProto: $protobuf.Type; + +export const ServiceDescriptorProto: $protobuf.Type; + +export const EnumValueDescriptorProto: $protobuf.Type; + +export const MethodDescriptorProto: $protobuf.Type; + +export const FileOptions: $protobuf.Type & { + OptimizeMode: $protobuf.Enum +}; + +export const MessageOptions: $protobuf.Type; + +export const FieldOptions: $protobuf.Type & { + CType: $protobuf.Enum, + JSType: $protobuf.Enum +}; + +export const OneofOptions: $protobuf.Type; + +export const EnumOptions: $protobuf.Type; + +export const EnumValueOptions: $protobuf.Type; + +export const ServiceOptions: $protobuf.Type; + +export const MethodOptions: $protobuf.Type; + +export const UninterpretedOption: $protobuf.Type & { + NamePart: $protobuf.Type +}; + +export const SourceCodeInfo: $protobuf.Type & { + Location: $protobuf.Type +}; + +export const GeneratedCodeInfo: $protobuf.Type & { + Annotation: $protobuf.Type +}; + +export interface IFileDescriptorSet { + file: IFileDescriptorProto[]; +} + +export interface IFileDescriptorProto { + name?: string; + package?: string; + dependency?: any; + publicDependency?: any; + weakDependency?: any; + messageType?: IDescriptorProto[]; + enumType?: IEnumDescriptorProto[]; + service?: IServiceDescriptorProto[]; + extension?: IFieldDescriptorProto[]; + options?: IFileOptions; + sourceCodeInfo?: any; + syntax?: string; +} + +export interface IFileOptions { + javaPackage?: string; + javaOuterClassname?: string; + javaMultipleFiles?: boolean; + javaGenerateEqualsAndHash?: boolean; + javaStringCheckUtf8?: boolean; + optimizeFor?: IFileOptionsOptimizeMode; + goPackage?: string; + ccGenericServices?: boolean; + javaGenericServices?: boolean; + pyGenericServices?: boolean; + deprecated?: boolean; + ccEnableArenas?: boolean; + objcClassPrefix?: string; + csharpNamespace?: string; +} + +type IFileOptionsOptimizeMode = number; + +export interface IDescriptorProto { + name?: string; + field?: IFieldDescriptorProto[]; + extension?: IFieldDescriptorProto[]; + nestedType?: IDescriptorProto[]; + enumType?: IEnumDescriptorProto[]; + extensionRange?: IDescriptorProtoExtensionRange[]; + oneofDecl?: IOneofDescriptorProto[]; + options?: IMessageOptions; + reservedRange?: IDescriptorProtoReservedRange[]; + reservedName?: string[]; +} + +export interface IMessageOptions { + mapEntry?: boolean; +} + +export interface IDescriptorProtoExtensionRange { + start?: number; + end?: number; +} + +export interface IDescriptorProtoReservedRange { + start?: number; + end?: number; +} + +export interface IFieldDescriptorProto { + name?: string; + number?: number; + label?: IFieldDescriptorProtoLabel; + type?: IFieldDescriptorProtoType; + typeName?: string; + extendee?: string; + defaultValue?: string; + oneofIndex?: number; + jsonName?: any; + options?: IFieldOptions; +} + +type IFieldDescriptorProtoLabel = number; + +type IFieldDescriptorProtoType = number; + +export interface IFieldOptions { + packed?: boolean; + jstype?: IFieldOptionsJSType; +} + +type IFieldOptionsJSType = number; + +export interface IEnumDescriptorProto { + name?: string; + value?: IEnumValueDescriptorProto[]; + options?: IEnumOptions; +} + +export interface IEnumValueDescriptorProto { + name?: string; + number?: number; + options?: any; +} + +export interface IEnumOptions { + allowAlias?: boolean; + deprecated?: boolean; +} + +export interface IOneofDescriptorProto { + name?: string; + options?: any; +} + +export interface IServiceDescriptorProto { + name?: string; + method?: IMethodDescriptorProto[]; + options?: IServiceOptions; +} + +export interface IServiceOptions { + deprecated?: boolean; +} + +export interface IMethodDescriptorProto { + name?: string; + inputType?: string; + outputType?: string; + options?: IMethodOptions; + clientStreaming?: boolean; + serverStreaming?: boolean; +} + +export interface IMethodOptions { + deprecated?: boolean; +} diff --git a/node_modules/protobufjs/ext/descriptor/index.js b/node_modules/protobufjs/ext/descriptor/index.js new file mode 100644 index 0000000..6aafd2a --- /dev/null +++ b/node_modules/protobufjs/ext/descriptor/index.js @@ -0,0 +1,1052 @@ +"use strict"; +var $protobuf = require("../.."); +module.exports = exports = $protobuf.descriptor = $protobuf.Root.fromJSON(require("../../google/protobuf/descriptor.json")).lookup(".google.protobuf"); + +var Namespace = $protobuf.Namespace, + Root = $protobuf.Root, + Enum = $protobuf.Enum, + Type = $protobuf.Type, + Field = $protobuf.Field, + MapField = $protobuf.MapField, + OneOf = $protobuf.OneOf, + Service = $protobuf.Service, + Method = $protobuf.Method; + +// --- Root --- + +/** + * Properties of a FileDescriptorSet message. + * @interface IFileDescriptorSet + * @property {IFileDescriptorProto[]} file Files + */ + +/** + * Properties of a FileDescriptorProto message. + * @interface IFileDescriptorProto + * @property {string} [name] File name + * @property {string} [package] Package + * @property {*} [dependency] Not supported + * @property {*} [publicDependency] Not supported + * @property {*} [weakDependency] Not supported + * @property {IDescriptorProto[]} [messageType] Nested message types + * @property {IEnumDescriptorProto[]} [enumType] Nested enums + * @property {IServiceDescriptorProto[]} [service] Nested services + * @property {IFieldDescriptorProto[]} [extension] Nested extension fields + * @property {IFileOptions} [options] Options + * @property {*} [sourceCodeInfo] Not supported + * @property {string} [syntax="proto2"] Syntax + */ + +/** + * Properties of a FileOptions message. + * @interface IFileOptions + * @property {string} [javaPackage] + * @property {string} [javaOuterClassname] + * @property {boolean} [javaMultipleFiles] + * @property {boolean} [javaGenerateEqualsAndHash] + * @property {boolean} [javaStringCheckUtf8] + * @property {IFileOptionsOptimizeMode} [optimizeFor=1] + * @property {string} [goPackage] + * @property {boolean} [ccGenericServices] + * @property {boolean} [javaGenericServices] + * @property {boolean} [pyGenericServices] + * @property {boolean} [deprecated] + * @property {boolean} [ccEnableArenas] + * @property {string} [objcClassPrefix] + * @property {string} [csharpNamespace] + */ + +/** + * Values of he FileOptions.OptimizeMode enum. + * @typedef IFileOptionsOptimizeMode + * @type {number} + * @property {number} SPEED=1 + * @property {number} CODE_SIZE=2 + * @property {number} LITE_RUNTIME=3 + */ + +/** + * Creates a root from a descriptor set. + * @param {IFileDescriptorSet|Reader|Uint8Array} descriptor Descriptor + * @returns {Root} Root instance + */ +Root.fromDescriptor = function fromDescriptor(descriptor) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.FileDescriptorSet.decode(descriptor); + + var root = new Root(); + + if (descriptor.file) { + var fileDescriptor, + filePackage; + for (var j = 0, i; j < descriptor.file.length; ++j) { + filePackage = root; + if ((fileDescriptor = descriptor.file[j])["package"] && fileDescriptor["package"].length) + filePackage = root.define(fileDescriptor["package"]); + if (fileDescriptor.name && fileDescriptor.name.length) + root.files.push(filePackage.filename = fileDescriptor.name); + if (fileDescriptor.messageType) + for (i = 0; i < fileDescriptor.messageType.length; ++i) + filePackage.add(Type.fromDescriptor(fileDescriptor.messageType[i], fileDescriptor.syntax)); + if (fileDescriptor.enumType) + for (i = 0; i < fileDescriptor.enumType.length; ++i) + filePackage.add(Enum.fromDescriptor(fileDescriptor.enumType[i])); + if (fileDescriptor.extension) + for (i = 0; i < fileDescriptor.extension.length; ++i) + filePackage.add(Field.fromDescriptor(fileDescriptor.extension[i])); + if (fileDescriptor.service) + for (i = 0; i < fileDescriptor.service.length; ++i) + filePackage.add(Service.fromDescriptor(fileDescriptor.service[i])); + var opts = fromDescriptorOptions(fileDescriptor.options, exports.FileOptions); + if (opts) { + var ks = Object.keys(opts); + for (i = 0; i < ks.length; ++i) + filePackage.setOption(ks[i], opts[ks[i]]); + } + } + } + + return root; +}; + +/** + * Converts a root to a descriptor set. + * @returns {Message} Descriptor + * @param {string} [syntax="proto2"] Syntax + */ +Root.prototype.toDescriptor = function toDescriptor(syntax) { + var set = exports.FileDescriptorSet.create(); + Root_toDescriptorRecursive(this, set.file, syntax); + return set; +}; + +// Traverses a namespace and assembles the descriptor set +function Root_toDescriptorRecursive(ns, files, syntax) { + + // Create a new file + var file = exports.FileDescriptorProto.create({ name: ns.filename || (ns.fullName.substring(1).replace(/\./g, "_") || "root") + ".proto" }); + if (syntax) + file.syntax = syntax; + if (!(ns instanceof Root)) + file["package"] = ns.fullName.substring(1); + + // Add nested types + for (var i = 0, nested; i < ns.nestedArray.length; ++i) + if ((nested = ns._nestedArray[i]) instanceof Type) + file.messageType.push(nested.toDescriptor(syntax)); + else if (nested instanceof Enum) + file.enumType.push(nested.toDescriptor()); + else if (nested instanceof Field) + file.extension.push(nested.toDescriptor(syntax)); + else if (nested instanceof Service) + file.service.push(nested.toDescriptor()); + else if (nested instanceof /* plain */ Namespace) + Root_toDescriptorRecursive(nested, files, syntax); // requires new file + + // Keep package-level options + file.options = toDescriptorOptions(ns.options, exports.FileOptions); + + // And keep the file only if there is at least one nested object + if (file.messageType.length + file.enumType.length + file.extension.length + file.service.length) + files.push(file); +} + +// --- Type --- + +/** + * Properties of a DescriptorProto message. + * @interface IDescriptorProto + * @property {string} [name] Message type name + * @property {IFieldDescriptorProto[]} [field] Fields + * @property {IFieldDescriptorProto[]} [extension] Extension fields + * @property {IDescriptorProto[]} [nestedType] Nested message types + * @property {IEnumDescriptorProto[]} [enumType] Nested enums + * @property {IDescriptorProtoExtensionRange[]} [extensionRange] Extension ranges + * @property {IOneofDescriptorProto[]} [oneofDecl] Oneofs + * @property {IMessageOptions} [options] Not supported + * @property {IDescriptorProtoReservedRange[]} [reservedRange] Reserved ranges + * @property {string[]} [reservedName] Reserved names + */ + +/** + * Properties of a MessageOptions message. + * @interface IMessageOptions + * @property {boolean} [mapEntry=false] Whether this message is a map entry + */ + +/** + * Properties of an ExtensionRange message. + * @interface IDescriptorProtoExtensionRange + * @property {number} [start] Start field id + * @property {number} [end] End field id + */ + +/** + * Properties of a ReservedRange message. + * @interface IDescriptorProtoReservedRange + * @property {number} [start] Start field id + * @property {number} [end] End field id + */ + +var unnamedMessageIndex = 0; + +/** + * Creates a type from a descriptor. + * @param {IDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @param {string} [syntax="proto2"] Syntax + * @returns {Type} Type instance + */ +Type.fromDescriptor = function fromDescriptor(descriptor, syntax) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.DescriptorProto.decode(descriptor); + + // Create the message type + var type = new Type(descriptor.name.length ? descriptor.name : "Type" + unnamedMessageIndex++, fromDescriptorOptions(descriptor.options, exports.MessageOptions)), + i; + + /* Oneofs */ if (descriptor.oneofDecl) + for (i = 0; i < descriptor.oneofDecl.length; ++i) + type.add(OneOf.fromDescriptor(descriptor.oneofDecl[i])); + /* Fields */ if (descriptor.field) + for (i = 0; i < descriptor.field.length; ++i) { + var field = Field.fromDescriptor(descriptor.field[i], syntax); + type.add(field); + if (descriptor.field[i].hasOwnProperty("oneofIndex")) // eslint-disable-line no-prototype-builtins + type.oneofsArray[descriptor.field[i].oneofIndex].add(field); + } + /* Extension fields */ if (descriptor.extension) + for (i = 0; i < descriptor.extension.length; ++i) + type.add(Field.fromDescriptor(descriptor.extension[i], syntax)); + /* Nested types */ if (descriptor.nestedType) + for (i = 0; i < descriptor.nestedType.length; ++i) { + type.add(Type.fromDescriptor(descriptor.nestedType[i], syntax)); + if (descriptor.nestedType[i].options && descriptor.nestedType[i].options.mapEntry) + type.setOption("map_entry", true); + } + /* Nested enums */ if (descriptor.enumType) + for (i = 0; i < descriptor.enumType.length; ++i) + type.add(Enum.fromDescriptor(descriptor.enumType[i])); + /* Extension ranges */ if (descriptor.extensionRange && descriptor.extensionRange.length) { + type.extensions = []; + for (i = 0; i < descriptor.extensionRange.length; ++i) + type.extensions.push([ descriptor.extensionRange[i].start, descriptor.extensionRange[i].end ]); + } + /* Reserved... */ if (descriptor.reservedRange && descriptor.reservedRange.length || descriptor.reservedName && descriptor.reservedName.length) { + type.reserved = []; + /* Ranges */ if (descriptor.reservedRange) + for (i = 0; i < descriptor.reservedRange.length; ++i) + type.reserved.push([ descriptor.reservedRange[i].start, descriptor.reservedRange[i].end ]); + /* Names */ if (descriptor.reservedName) + for (i = 0; i < descriptor.reservedName.length; ++i) + type.reserved.push(descriptor.reservedName[i]); + } + + return type; +}; + +/** + * Converts a type to a descriptor. + * @returns {Message} Descriptor + * @param {string} [syntax="proto2"] Syntax + */ +Type.prototype.toDescriptor = function toDescriptor(syntax) { + var descriptor = exports.DescriptorProto.create({ name: this.name }), + i; + + /* Fields */ for (i = 0; i < this.fieldsArray.length; ++i) { + var fieldDescriptor; + descriptor.field.push(fieldDescriptor = this._fieldsArray[i].toDescriptor(syntax)); + if (this._fieldsArray[i] instanceof MapField) { // map fields are repeated FieldNameEntry + var keyType = toDescriptorType(this._fieldsArray[i].keyType, this._fieldsArray[i].resolvedKeyType), + valueType = toDescriptorType(this._fieldsArray[i].type, this._fieldsArray[i].resolvedType), + valueTypeName = valueType === /* type */ 11 || valueType === /* enum */ 14 + ? this._fieldsArray[i].resolvedType && shortname(this.parent, this._fieldsArray[i].resolvedType) || this._fieldsArray[i].type + : undefined; + descriptor.nestedType.push(exports.DescriptorProto.create({ + name: fieldDescriptor.typeName, + field: [ + exports.FieldDescriptorProto.create({ name: "key", number: 1, label: 1, type: keyType }), // can't reference a type or enum + exports.FieldDescriptorProto.create({ name: "value", number: 2, label: 1, type: valueType, typeName: valueTypeName }) + ], + options: exports.MessageOptions.create({ mapEntry: true }) + })); + } + } + /* Oneofs */ for (i = 0; i < this.oneofsArray.length; ++i) + descriptor.oneofDecl.push(this._oneofsArray[i].toDescriptor()); + /* Nested... */ for (i = 0; i < this.nestedArray.length; ++i) { + /* Extension fields */ if (this._nestedArray[i] instanceof Field) + descriptor.field.push(this._nestedArray[i].toDescriptor(syntax)); + /* Types */ else if (this._nestedArray[i] instanceof Type) + descriptor.nestedType.push(this._nestedArray[i].toDescriptor(syntax)); + /* Enums */ else if (this._nestedArray[i] instanceof Enum) + descriptor.enumType.push(this._nestedArray[i].toDescriptor()); + // plain nested namespaces become packages instead in Root#toDescriptor + } + /* Extension ranges */ if (this.extensions) + for (i = 0; i < this.extensions.length; ++i) + descriptor.extensionRange.push(exports.DescriptorProto.ExtensionRange.create({ start: this.extensions[i][0], end: this.extensions[i][1] })); + /* Reserved... */ if (this.reserved) + for (i = 0; i < this.reserved.length; ++i) + /* Names */ if (typeof this.reserved[i] === "string") + descriptor.reservedName.push(this.reserved[i]); + /* Ranges */ else + descriptor.reservedRange.push(exports.DescriptorProto.ReservedRange.create({ start: this.reserved[i][0], end: this.reserved[i][1] })); + + descriptor.options = toDescriptorOptions(this.options, exports.MessageOptions); + + return descriptor; +}; + +// --- Field --- + +/** + * Properties of a FieldDescriptorProto message. + * @interface IFieldDescriptorProto + * @property {string} [name] Field name + * @property {number} [number] Field id + * @property {IFieldDescriptorProtoLabel} [label] Field rule + * @property {IFieldDescriptorProtoType} [type] Field basic type + * @property {string} [typeName] Field type name + * @property {string} [extendee] Extended type name + * @property {string} [defaultValue] Literal default value + * @property {number} [oneofIndex] Oneof index if part of a oneof + * @property {*} [jsonName] Not supported + * @property {IFieldOptions} [options] Field options + */ + +/** + * Values of the FieldDescriptorProto.Label enum. + * @typedef IFieldDescriptorProtoLabel + * @type {number} + * @property {number} LABEL_OPTIONAL=1 + * @property {number} LABEL_REQUIRED=2 + * @property {number} LABEL_REPEATED=3 + */ + +/** + * Values of the FieldDescriptorProto.Type enum. + * @typedef IFieldDescriptorProtoType + * @type {number} + * @property {number} TYPE_DOUBLE=1 + * @property {number} TYPE_FLOAT=2 + * @property {number} TYPE_INT64=3 + * @property {number} TYPE_UINT64=4 + * @property {number} TYPE_INT32=5 + * @property {number} TYPE_FIXED64=6 + * @property {number} TYPE_FIXED32=7 + * @property {number} TYPE_BOOL=8 + * @property {number} TYPE_STRING=9 + * @property {number} TYPE_GROUP=10 + * @property {number} TYPE_MESSAGE=11 + * @property {number} TYPE_BYTES=12 + * @property {number} TYPE_UINT32=13 + * @property {number} TYPE_ENUM=14 + * @property {number} TYPE_SFIXED32=15 + * @property {number} TYPE_SFIXED64=16 + * @property {number} TYPE_SINT32=17 + * @property {number} TYPE_SINT64=18 + */ + +/** + * Properties of a FieldOptions message. + * @interface IFieldOptions + * @property {boolean} [packed] Whether packed or not (defaults to `false` for proto2 and `true` for proto3) + * @property {IFieldOptionsJSType} [jstype] JavaScript value type (not used by protobuf.js) + */ + +/** + * Values of the FieldOptions.JSType enum. + * @typedef IFieldOptionsJSType + * @type {number} + * @property {number} JS_NORMAL=0 + * @property {number} JS_STRING=1 + * @property {number} JS_NUMBER=2 + */ + +// copied here from parse.js +var numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/; + +/** + * Creates a field from a descriptor. + * @param {IFieldDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @param {string} [syntax="proto2"] Syntax + * @returns {Field} Field instance + */ +Field.fromDescriptor = function fromDescriptor(descriptor, syntax) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.DescriptorProto.decode(descriptor); + + if (typeof descriptor.number !== "number") + throw Error("missing field id"); + + // Rewire field type + var fieldType; + if (descriptor.typeName && descriptor.typeName.length) + fieldType = descriptor.typeName; + else + fieldType = fromDescriptorType(descriptor.type); + + // Rewire field rule + var fieldRule; + switch (descriptor.label) { + // 0 is reserved for errors + case 1: fieldRule = undefined; break; + case 2: fieldRule = "required"; break; + case 3: fieldRule = "repeated"; break; + default: throw Error("illegal label: " + descriptor.label); + } + + var extendee = descriptor.extendee; + if (descriptor.extendee !== undefined) { + extendee = extendee.length ? extendee : undefined; + } + var field = new Field( + descriptor.name.length ? descriptor.name : "field" + descriptor.number, + descriptor.number, + fieldType, + fieldRule, + extendee + ); + + field.options = fromDescriptorOptions(descriptor.options, exports.FieldOptions); + + if (descriptor.defaultValue && descriptor.defaultValue.length) { + var defaultValue = descriptor.defaultValue; + switch (defaultValue) { + case "true": case "TRUE": + defaultValue = true; + break; + case "false": case "FALSE": + defaultValue = false; + break; + default: + var match = numberRe.exec(defaultValue); + if (match) + defaultValue = parseInt(defaultValue); // eslint-disable-line radix + break; + } + field.setOption("default", defaultValue); + } + + if (packableDescriptorType(descriptor.type)) { + if (syntax === "proto3") { // defaults to packed=true (internal preset is packed=true) + if (descriptor.options && !descriptor.options.packed) + field.setOption("packed", false); + } else if (!(descriptor.options && descriptor.options.packed)) // defaults to packed=false + field.setOption("packed", false); + } + + return field; +}; + +/** + * Converts a field to a descriptor. + * @returns {Message} Descriptor + * @param {string} [syntax="proto2"] Syntax + */ +Field.prototype.toDescriptor = function toDescriptor(syntax) { + var descriptor = exports.FieldDescriptorProto.create({ name: this.name, number: this.id }); + + if (this.map) { + + descriptor.type = 11; // message + descriptor.typeName = $protobuf.util.ucFirst(this.name); // fieldName -> FieldNameEntry (built in Type#toDescriptor) + descriptor.label = 3; // repeated + + } else { + + // Rewire field type + switch (descriptor.type = toDescriptorType(this.type, this.resolve().resolvedType)) { + case 10: // group + case 11: // type + case 14: // enum + descriptor.typeName = this.resolvedType ? shortname(this.parent, this.resolvedType) : this.type; + break; + } + + // Rewire field rule + switch (this.rule) { + case "repeated": descriptor.label = 3; break; + case "required": descriptor.label = 2; break; + default: descriptor.label = 1; break; + } + + } + + // Handle extension field + descriptor.extendee = this.extensionField ? this.extensionField.parent.fullName : this.extend; + + // Handle part of oneof + if (this.partOf) + if ((descriptor.oneofIndex = this.parent.oneofsArray.indexOf(this.partOf)) < 0) + throw Error("missing oneof"); + + if (this.options) { + descriptor.options = toDescriptorOptions(this.options, exports.FieldOptions); + if (this.options["default"] != null) + descriptor.defaultValue = String(this.options["default"]); + } + + if (syntax === "proto3") { // defaults to packed=true + if (!this.packed) + (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = false; + } else if (this.packed) // defaults to packed=false + (descriptor.options || (descriptor.options = exports.FieldOptions.create())).packed = true; + + return descriptor; +}; + +// --- Enum --- + +/** + * Properties of an EnumDescriptorProto message. + * @interface IEnumDescriptorProto + * @property {string} [name] Enum name + * @property {IEnumValueDescriptorProto[]} [value] Enum values + * @property {IEnumOptions} [options] Enum options + */ + +/** + * Properties of an EnumValueDescriptorProto message. + * @interface IEnumValueDescriptorProto + * @property {string} [name] Name + * @property {number} [number] Value + * @property {*} [options] Not supported + */ + +/** + * Properties of an EnumOptions message. + * @interface IEnumOptions + * @property {boolean} [allowAlias] Whether aliases are allowed + * @property {boolean} [deprecated] + */ + +var unnamedEnumIndex = 0; + +/** + * Creates an enum from a descriptor. + * @param {IEnumDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @returns {Enum} Enum instance + */ +Enum.fromDescriptor = function fromDescriptor(descriptor) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.EnumDescriptorProto.decode(descriptor); + + // Construct values object + var values = {}; + if (descriptor.value) + for (var i = 0; i < descriptor.value.length; ++i) { + var name = descriptor.value[i].name, + value = descriptor.value[i].number || 0; + values[name && name.length ? name : "NAME" + value] = value; + } + + return new Enum( + descriptor.name && descriptor.name.length ? descriptor.name : "Enum" + unnamedEnumIndex++, + values, + fromDescriptorOptions(descriptor.options, exports.EnumOptions) + ); +}; + +/** + * Converts an enum to a descriptor. + * @returns {Message} Descriptor + */ +Enum.prototype.toDescriptor = function toDescriptor() { + + // Values + var values = []; + for (var i = 0, ks = Object.keys(this.values); i < ks.length; ++i) + values.push(exports.EnumValueDescriptorProto.create({ name: ks[i], number: this.values[ks[i]] })); + + return exports.EnumDescriptorProto.create({ + name: this.name, + value: values, + options: toDescriptorOptions(this.options, exports.EnumOptions) + }); +}; + +// --- OneOf --- + +/** + * Properties of a OneofDescriptorProto message. + * @interface IOneofDescriptorProto + * @property {string} [name] Oneof name + * @property {*} [options] Not supported + */ + +var unnamedOneofIndex = 0; + +/** + * Creates a oneof from a descriptor. + * @param {IOneofDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @returns {OneOf} OneOf instance + */ +OneOf.fromDescriptor = function fromDescriptor(descriptor) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.OneofDescriptorProto.decode(descriptor); + + return new OneOf( + // unnamedOneOfIndex is global, not per type, because we have no ref to a type here + descriptor.name && descriptor.name.length ? descriptor.name : "oneof" + unnamedOneofIndex++ + // fromDescriptorOptions(descriptor.options, exports.OneofOptions) - only uninterpreted_option + ); +}; + +/** + * Converts a oneof to a descriptor. + * @returns {Message} Descriptor + */ +OneOf.prototype.toDescriptor = function toDescriptor() { + return exports.OneofDescriptorProto.create({ + name: this.name + // options: toDescriptorOptions(this.options, exports.OneofOptions) - only uninterpreted_option + }); +}; + +// --- Service --- + +/** + * Properties of a ServiceDescriptorProto message. + * @interface IServiceDescriptorProto + * @property {string} [name] Service name + * @property {IMethodDescriptorProto[]} [method] Methods + * @property {IServiceOptions} [options] Options + */ + +/** + * Properties of a ServiceOptions message. + * @interface IServiceOptions + * @property {boolean} [deprecated] + */ + +var unnamedServiceIndex = 0; + +/** + * Creates a service from a descriptor. + * @param {IServiceDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @returns {Service} Service instance + */ +Service.fromDescriptor = function fromDescriptor(descriptor) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.ServiceDescriptorProto.decode(descriptor); + + var service = new Service(descriptor.name && descriptor.name.length ? descriptor.name : "Service" + unnamedServiceIndex++, fromDescriptorOptions(descriptor.options, exports.ServiceOptions)); + if (descriptor.method) + for (var i = 0; i < descriptor.method.length; ++i) + service.add(Method.fromDescriptor(descriptor.method[i])); + + return service; +}; + +/** + * Converts a service to a descriptor. + * @returns {Message} Descriptor + */ +Service.prototype.toDescriptor = function toDescriptor() { + + // Methods + var methods = []; + for (var i = 0; i < this.methodsArray.length; ++i) + methods.push(this._methodsArray[i].toDescriptor()); + + return exports.ServiceDescriptorProto.create({ + name: this.name, + method: methods, + options: toDescriptorOptions(this.options, exports.ServiceOptions) + }); +}; + +// --- Method --- + +/** + * Properties of a MethodDescriptorProto message. + * @interface IMethodDescriptorProto + * @property {string} [name] Method name + * @property {string} [inputType] Request type name + * @property {string} [outputType] Response type name + * @property {IMethodOptions} [options] Not supported + * @property {boolean} [clientStreaming=false] Whether requests are streamed + * @property {boolean} [serverStreaming=false] Whether responses are streamed + */ + +/** + * Properties of a MethodOptions message. + * @interface IMethodOptions + * @property {boolean} [deprecated] + */ + +var unnamedMethodIndex = 0; + +/** + * Creates a method from a descriptor. + * @param {IMethodDescriptorProto|Reader|Uint8Array} descriptor Descriptor + * @returns {Method} Reflected method instance + */ +Method.fromDescriptor = function fromDescriptor(descriptor) { + + // Decode the descriptor message if specified as a buffer: + if (typeof descriptor.length === "number") + descriptor = exports.MethodDescriptorProto.decode(descriptor); + + return new Method( + // unnamedMethodIndex is global, not per service, because we have no ref to a service here + descriptor.name && descriptor.name.length ? descriptor.name : "Method" + unnamedMethodIndex++, + "rpc", + descriptor.inputType, + descriptor.outputType, + Boolean(descriptor.clientStreaming), + Boolean(descriptor.serverStreaming), + fromDescriptorOptions(descriptor.options, exports.MethodOptions) + ); +}; + +/** + * Converts a method to a descriptor. + * @returns {Message} Descriptor + */ +Method.prototype.toDescriptor = function toDescriptor() { + return exports.MethodDescriptorProto.create({ + name: this.name, + inputType: this.resolvedRequestType ? this.resolvedRequestType.fullName : this.requestType, + outputType: this.resolvedResponseType ? this.resolvedResponseType.fullName : this.responseType, + clientStreaming: this.requestStream, + serverStreaming: this.responseStream, + options: toDescriptorOptions(this.options, exports.MethodOptions) + }); +}; + +// --- utility --- + +// Converts a descriptor type to a protobuf.js basic type +function fromDescriptorType(type) { + switch (type) { + // 0 is reserved for errors + case 1: return "double"; + case 2: return "float"; + case 3: return "int64"; + case 4: return "uint64"; + case 5: return "int32"; + case 6: return "fixed64"; + case 7: return "fixed32"; + case 8: return "bool"; + case 9: return "string"; + case 12: return "bytes"; + case 13: return "uint32"; + case 15: return "sfixed32"; + case 16: return "sfixed64"; + case 17: return "sint32"; + case 18: return "sint64"; + } + throw Error("illegal type: " + type); +} + +// Tests if a descriptor type is packable +function packableDescriptorType(type) { + switch (type) { + case 1: // double + case 2: // float + case 3: // int64 + case 4: // uint64 + case 5: // int32 + case 6: // fixed64 + case 7: // fixed32 + case 8: // bool + case 13: // uint32 + case 14: // enum (!) + case 15: // sfixed32 + case 16: // sfixed64 + case 17: // sint32 + case 18: // sint64 + return true; + } + return false; +} + +// Converts a protobuf.js basic type to a descriptor type +function toDescriptorType(type, resolvedType) { + switch (type) { + // 0 is reserved for errors + case "double": return 1; + case "float": return 2; + case "int64": return 3; + case "uint64": return 4; + case "int32": return 5; + case "fixed64": return 6; + case "fixed32": return 7; + case "bool": return 8; + case "string": return 9; + case "bytes": return 12; + case "uint32": return 13; + case "sfixed32": return 15; + case "sfixed64": return 16; + case "sint32": return 17; + case "sint64": return 18; + } + if (resolvedType instanceof Enum) + return 14; + if (resolvedType instanceof Type) + return resolvedType.group ? 10 : 11; + throw Error("illegal type: " + type); +} + +// Converts descriptor options to an options object +function fromDescriptorOptions(options, type) { + if (!options) + return undefined; + var out = []; + for (var i = 0, field, key, val; i < type.fieldsArray.length; ++i) + if ((key = (field = type._fieldsArray[i]).name) !== "uninterpretedOption") + if (options.hasOwnProperty(key)) { // eslint-disable-line no-prototype-builtins + val = options[key]; + if (field.resolvedType instanceof Enum && typeof val === "number" && field.resolvedType.valuesById[val] !== undefined) + val = field.resolvedType.valuesById[val]; + out.push(underScore(key), val); + } + return out.length ? $protobuf.util.toObject(out) : undefined; +} + +// Converts an options object to descriptor options +function toDescriptorOptions(options, type) { + if (!options) + return undefined; + var out = []; + for (var i = 0, ks = Object.keys(options), key, val; i < ks.length; ++i) { + val = options[key = ks[i]]; + if (key === "default") + continue; + var field = type.fields[key]; + if (!field && !(field = type.fields[key = $protobuf.util.camelCase(key)])) + continue; + out.push(key, val); + } + return out.length ? type.fromObject($protobuf.util.toObject(out)) : undefined; +} + +// Calculates the shortest relative path from `from` to `to`. +function shortname(from, to) { + var fromPath = from.fullName.split("."), + toPath = to.fullName.split("."), + i = 0, + j = 0, + k = toPath.length - 1; + if (!(from instanceof Root) && to instanceof Namespace) + while (i < fromPath.length && j < k && fromPath[i] === toPath[j]) { + var other = to.lookup(fromPath[i++], true); + if (other !== null && other !== to) + break; + ++j; + } + else + for (; i < fromPath.length && j < k && fromPath[i] === toPath[j]; ++i, ++j); + return toPath.slice(j).join("."); +} + +// copied here from cli/targets/proto.js +function underScore(str) { + return str.substring(0,1) + + str.substring(1) + .replace(/([A-Z])(?=[a-z]|$)/g, function($0, $1) { return "_" + $1.toLowerCase(); }); +} + +// --- exports --- + +/** + * Reflected file descriptor set. + * @name FileDescriptorSet + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected file descriptor proto. + * @name FileDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected descriptor proto. + * @name DescriptorProto + * @type {Type} + * @property {Type} ExtensionRange + * @property {Type} ReservedRange + * @const + * @tstype $protobuf.Type & { + * ExtensionRange: $protobuf.Type, + * ReservedRange: $protobuf.Type + * } + */ + +/** + * Reflected field descriptor proto. + * @name FieldDescriptorProto + * @type {Type} + * @property {Enum} Label + * @property {Enum} Type + * @const + * @tstype $protobuf.Type & { + * Label: $protobuf.Enum, + * Type: $protobuf.Enum + * } + */ + +/** + * Reflected oneof descriptor proto. + * @name OneofDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected enum descriptor proto. + * @name EnumDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected service descriptor proto. + * @name ServiceDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected enum value descriptor proto. + * @name EnumValueDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected method descriptor proto. + * @name MethodDescriptorProto + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected file options. + * @name FileOptions + * @type {Type} + * @property {Enum} OptimizeMode + * @const + * @tstype $protobuf.Type & { + * OptimizeMode: $protobuf.Enum + * } + */ + +/** + * Reflected message options. + * @name MessageOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected field options. + * @name FieldOptions + * @type {Type} + * @property {Enum} CType + * @property {Enum} JSType + * @const + * @tstype $protobuf.Type & { + * CType: $protobuf.Enum, + * JSType: $protobuf.Enum + * } + */ + +/** + * Reflected oneof options. + * @name OneofOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected enum options. + * @name EnumOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected enum value options. + * @name EnumValueOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected service options. + * @name ServiceOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected method options. + * @name MethodOptions + * @type {Type} + * @const + * @tstype $protobuf.Type + */ + +/** + * Reflected uninterpretet option. + * @name UninterpretedOption + * @type {Type} + * @property {Type} NamePart + * @const + * @tstype $protobuf.Type & { + * NamePart: $protobuf.Type + * } + */ + +/** + * Reflected source code info. + * @name SourceCodeInfo + * @type {Type} + * @property {Type} Location + * @const + * @tstype $protobuf.Type & { + * Location: $protobuf.Type + * } + */ + +/** + * Reflected generated code info. + * @name GeneratedCodeInfo + * @type {Type} + * @property {Type} Annotation + * @const + * @tstype $protobuf.Type & { + * Annotation: $protobuf.Type + * } + */ diff --git a/node_modules/protobufjs/ext/descriptor/test.js b/node_modules/protobufjs/ext/descriptor/test.js new file mode 100644 index 0000000..ceb80f8 --- /dev/null +++ b/node_modules/protobufjs/ext/descriptor/test.js @@ -0,0 +1,54 @@ +/*eslint-disable no-console*/ +"use strict"; +var protobuf = require("../../"), + descriptor = require("."); + +/* var proto = { + nested: { + Message: { + fields: { + foo: { + type: "string", + id: 1 + } + }, + nested: { + SubMessage: { + fields: {} + } + } + }, + Enum: { + values: { + ONE: 1, + TWO: 2 + } + } + } +}; */ + +// var root = protobuf.Root.fromJSON(proto).resolveAll(); +var root = protobuf.loadSync("tests/data/google/protobuf/descriptor.proto").resolveAll(); + +// console.log("Original proto", JSON.stringify(root, null, 2)); + +var msg = root.toDescriptor(); + +// console.log("\nDescriptor", JSON.stringify(msg.toObject(), null, 2)); + +var buf = descriptor.FileDescriptorSet.encode(msg).finish(); +var root2 = protobuf.Root.fromDescriptor(buf, "proto2").resolveAll(); + +// console.log("\nDecoded proto", JSON.stringify(root2, null, 2)); + +var diff = require("deep-diff").diff(root.toJSON(), root2.toJSON()); +if (diff) { + diff.forEach(function(diff) { + console.log(diff.kind + " @ " + diff.path.join(".")); + console.log("lhs:", typeof diff.lhs, diff.lhs); + console.log("rhs:", typeof diff.rhs, diff.rhs); + console.log(); + }); + process.exitCode = 1; +} else + console.log("no differences"); diff --git a/node_modules/protobufjs/google/LICENSE b/node_modules/protobufjs/google/LICENSE new file mode 100644 index 0000000..868bd40 --- /dev/null +++ b/node_modules/protobufjs/google/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014, Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/protobufjs/google/README.md b/node_modules/protobufjs/google/README.md new file mode 100644 index 0000000..09e3f23 --- /dev/null +++ b/node_modules/protobufjs/google/README.md @@ -0,0 +1 @@ +This folder contains stripped and pre-parsed definitions of common Google types. These files are not used by protobuf.js directly but are here so you can use or include them where required. diff --git a/node_modules/protobufjs/google/api/annotations.json b/node_modules/protobufjs/google/api/annotations.json new file mode 100644 index 0000000..3f13a73 --- /dev/null +++ b/node_modules/protobufjs/google/api/annotations.json @@ -0,0 +1,83 @@ +{ + "nested": { + "google": { + "nested": { + "api": { + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "selector": { + "type": "string", + "id": 1 + }, + "body": { + "type": "string", + "id": 7 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + } + } + }, + "protobuf": { + "nested": { + "MethodOptions": { + "fields": {}, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/annotations.proto b/node_modules/protobufjs/google/api/annotations.proto new file mode 100644 index 0000000..63a8eef --- /dev/null +++ b/node_modules/protobufjs/google/api/annotations.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.MethodOptions { + + HttpRule http = 72295728; +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/http.json b/node_modules/protobufjs/google/api/http.json new file mode 100644 index 0000000..e3a0f4f --- /dev/null +++ b/node_modules/protobufjs/google/api/http.json @@ -0,0 +1,86 @@ +{ + "nested": { + "google": { + "nested": { + "api": { + "nested": { + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "selector": { + "type": "string", + "id": 1 + }, + "body": { + "type": "string", + "id": 7 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/api/http.proto b/node_modules/protobufjs/google/api/http.proto new file mode 100644 index 0000000..e9a7e9d --- /dev/null +++ b/node_modules/protobufjs/google/api/http.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package google.api; + +message Http { + + repeated HttpRule rules = 1; +} + +message HttpRule { + + oneof pattern { + + string get = 2; + string put = 3; + string post = 4; + string delete = 5; + string patch = 6; + CustomHttpPattern custom = 8; + } + + string selector = 1; + string body = 7; + repeated HttpRule additional_bindings = 11; +} + +message CustomHttpPattern { + + string kind = 1; + string path = 2; +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/api.json b/node_modules/protobufjs/google/protobuf/api.json new file mode 100644 index 0000000..5460612 --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/api.json @@ -0,0 +1,118 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "nested": { + "Api": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "methods": { + "rule": "repeated", + "type": "Method", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + }, + "version": { + "type": "string", + "id": 4 + }, + "sourceContext": { + "type": "SourceContext", + "id": 5 + }, + "mixins": { + "rule": "repeated", + "type": "Mixin", + "id": 6 + }, + "syntax": { + "type": "Syntax", + "id": 7 + } + } + }, + "Method": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "requestTypeUrl": { + "type": "string", + "id": 2 + }, + "requestStreaming": { + "type": "bool", + "id": 3 + }, + "responseTypeUrl": { + "type": "string", + "id": 4 + }, + "responseStreaming": { + "type": "bool", + "id": 5 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 6 + }, + "syntax": { + "type": "Syntax", + "id": 7 + } + } + }, + "Mixin": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "root": { + "type": "string", + "id": 2 + } + } + }, + "SourceContext": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + } + } + }, + "Option": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "type": "Any", + "id": 2 + } + } + }, + "Syntax": { + "values": { + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1 + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/api.proto b/node_modules/protobufjs/google/protobuf/api.proto new file mode 100644 index 0000000..cf6ae3f --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/api.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/source_context.proto"; +import "google/protobuf/type.proto"; + +message Api { + + string name = 1; + repeated Method methods = 2; + repeated Option options = 3; + string version = 4; + SourceContext source_context = 5; + repeated Mixin mixins = 6; + Syntax syntax = 7; +} + +message Method { + + string name = 1; + string request_type_url = 2; + bool request_streaming = 3; + string response_type_url = 4; + bool response_streaming = 5; + repeated Option options = 6; + Syntax syntax = 7; +} + +message Mixin { + + string name = 1; + string root = 2; +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/descriptor.json b/node_modules/protobufjs/google/protobuf/descriptor.json new file mode 100644 index 0000000..f6c5c11 --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/descriptor.json @@ -0,0 +1,739 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5 + }, + "serverStreaming": { + "type": "bool", + "id": 6 + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10 + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27 + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16 + }, + "javaGenericServices": { + "type": "bool", + "id": 17 + }, + "pyGenericServices": { + "type": "bool", + "id": 18 + }, + "deprecated": { + "type": "bool", + "id": 23 + }, + "ccEnableArenas": { + "type": "bool", + "id": 31 + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1 + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "weak": { + "type": "bool", + "id": 10 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/descriptor.proto b/node_modules/protobufjs/google/protobuf/descriptor.proto new file mode 100644 index 0000000..3279492 --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/descriptor.proto @@ -0,0 +1,286 @@ +syntax = "proto2"; + +package google.protobuf; + +message FileDescriptorSet { + + repeated FileDescriptorProto file = 1; +} + +message FileDescriptorProto { + + optional string name = 1; + optional string package = 2; + repeated string dependency = 3; + repeated int32 public_dependency = 10; + repeated int32 weak_dependency = 11; + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + optional FileOptions options = 8; + optional SourceCodeInfo source_code_info = 9; + optional string syntax = 12; +} + +message DescriptorProto { + + optional string name = 1; + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + repeated ExtensionRange extension_range = 5; + repeated OneofDescriptorProto oneof_decl = 8; + optional MessageOptions options = 7; + repeated ReservedRange reserved_range = 9; + repeated string reserved_name = 10; + + message ExtensionRange { + + optional int32 start = 1; + optional int32 end = 2; + } + + message ReservedRange { + + optional int32 start = 1; + optional int32 end = 2; + } +} + +message FieldDescriptorProto { + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + optional Type type = 5; + optional string type_name = 6; + optional string extendee = 2; + optional string default_value = 7; + optional int32 oneof_index = 9; + optional string json_name = 10; + optional FieldOptions options = 8; + + enum Type { + + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; + TYPE_SINT64 = 18; + } + + enum Label { + + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + } +} + +message OneofDescriptorProto { + + optional string name = 1; + optional OneofOptions options = 2; +} + +message EnumDescriptorProto { + + optional string name = 1; + repeated EnumValueDescriptorProto value = 2; + optional EnumOptions options = 3; +} + +message EnumValueDescriptorProto { + + optional string name = 1; + optional int32 number = 2; + optional EnumValueOptions options = 3; +} + +message ServiceDescriptorProto { + + optional string name = 1; + repeated MethodDescriptorProto method = 2; + optional ServiceOptions options = 3; +} + +message MethodDescriptorProto { + + optional string name = 1; + optional string input_type = 2; + optional string output_type = 3; + optional MethodOptions options = 4; + optional bool client_streaming = 5; + optional bool server_streaming = 6; +} + +message FileOptions { + + optional string java_package = 1; + optional string java_outer_classname = 8; + optional bool java_multiple_files = 10; + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + optional bool java_string_check_utf8 = 27; + optional OptimizeMode optimize_for = 9 [default=SPEED]; + optional string go_package = 11; + optional bool cc_generic_services = 16; + optional bool java_generic_services = 17; + optional bool py_generic_services = 18; + optional bool deprecated = 23; + optional bool cc_enable_arenas = 31; + optional string objc_class_prefix = 36; + optional string csharp_namespace = 37; + repeated UninterpretedOption uninterpreted_option = 999; + + enum OptimizeMode { + + SPEED = 1; + CODE_SIZE = 2; + LITE_RUNTIME = 3; + } + + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + + optional bool message_set_wire_format = 1; + optional bool no_standard_descriptor_accessor = 2; + optional bool deprecated = 3; + optional bool map_entry = 7; + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; + + reserved 8; +} + +message FieldOptions { + + optional CType ctype = 1 [default=STRING]; + optional bool packed = 2; + optional JSType jstype = 6 [default=JS_NORMAL]; + optional bool lazy = 5; + optional bool deprecated = 3; + optional bool weak = 10; + repeated UninterpretedOption uninterpreted_option = 999; + + enum CType { + + STRING = 0; + CORD = 1; + STRING_PIECE = 2; + } + + enum JSType { + + JS_NORMAL = 0; + JS_STRING = 1; + JS_NUMBER = 2; + } + + extensions 1000 to max; + + reserved 4; +} + +message OneofOptions { + + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; +} + +message EnumOptions { + + optional bool allow_alias = 2; + optional bool deprecated = 3; + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; +} + +message EnumValueOptions { + + optional bool deprecated = 1; + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; +} + +message ServiceOptions { + + optional bool deprecated = 33; + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; +} + +message MethodOptions { + + optional bool deprecated = 33; + repeated UninterpretedOption uninterpreted_option = 999; + + extensions 1000 to max; +} + +message UninterpretedOption { + + repeated NamePart name = 2; + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; + + message NamePart { + + required string name_part = 1; + required bool is_extension = 2; + } +} + +message SourceCodeInfo { + + repeated Location location = 1; + + message Location { + + repeated int32 path = 1 [packed=true]; + repeated int32 span = 2 [packed=true]; + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +message GeneratedCodeInfo { + + repeated Annotation annotation = 1; + + message Annotation { + + repeated int32 path = 1 [packed=true]; + optional string source_file = 2; + optional int32 begin = 3; + optional int32 end = 4; + } +} diff --git a/node_modules/protobufjs/google/protobuf/source_context.json b/node_modules/protobufjs/google/protobuf/source_context.json new file mode 100644 index 0000000..51adb63 --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/source_context.json @@ -0,0 +1,20 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "nested": { + "SourceContext": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/source_context.proto b/node_modules/protobufjs/google/protobuf/source_context.proto new file mode 100644 index 0000000..584d36c --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/source_context.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package google.protobuf; + +message SourceContext { + string file_name = 1; +} diff --git a/node_modules/protobufjs/google/protobuf/type.json b/node_modules/protobufjs/google/protobuf/type.json new file mode 100644 index 0000000..fffa70d --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/type.json @@ -0,0 +1,202 @@ +{ + "nested": { + "google": { + "nested": { + "protobuf": { + "nested": { + "Type": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "fields": { + "rule": "repeated", + "type": "Field", + "id": 2 + }, + "oneofs": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 4 + }, + "sourceContext": { + "type": "SourceContext", + "id": 5 + }, + "syntax": { + "type": "Syntax", + "id": 6 + } + } + }, + "Field": { + "fields": { + "kind": { + "type": "Kind", + "id": 1 + }, + "cardinality": { + "type": "Cardinality", + "id": 2 + }, + "number": { + "type": "int32", + "id": 3 + }, + "name": { + "type": "string", + "id": 4 + }, + "typeUrl": { + "type": "string", + "id": 6 + }, + "oneofIndex": { + "type": "int32", + "id": 7 + }, + "packed": { + "type": "bool", + "id": 8 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "defaultValue": { + "type": "string", + "id": 11 + } + }, + "nested": { + "Kind": { + "values": { + "TYPE_UNKNOWN": 0, + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Cardinality": { + "values": { + "CARDINALITY_UNKNOWN": 0, + "CARDINALITY_OPTIONAL": 1, + "CARDINALITY_REQUIRED": 2, + "CARDINALITY_REPEATED": 3 + } + } + } + }, + "Enum": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "enumvalue": { + "rule": "repeated", + "type": "EnumValue", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + }, + "sourceContext": { + "type": "SourceContext", + "id": 4 + }, + "syntax": { + "type": "Syntax", + "id": 5 + } + } + }, + "EnumValue": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "rule": "repeated", + "type": "Option", + "id": 3 + } + } + }, + "Option": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "type": "Any", + "id": 2 + } + } + }, + "Syntax": { + "values": { + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1 + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "SourceContext": { + "fields": { + "fileName": { + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/node_modules/protobufjs/google/protobuf/type.proto b/node_modules/protobufjs/google/protobuf/type.proto new file mode 100644 index 0000000..8ee445b --- /dev/null +++ b/node_modules/protobufjs/google/protobuf/type.proto @@ -0,0 +1,89 @@ +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/any.proto"; +import "google/protobuf/source_context.proto"; + +message Type { + + string name = 1; + repeated Field fields = 2; + repeated string oneofs = 3; + repeated Option options = 4; + SourceContext source_context = 5; + Syntax syntax = 6; +} + +message Field { + + Kind kind = 1; + Cardinality cardinality = 2; + int32 number = 3; + string name = 4; + string type_url = 6; + int32 oneof_index = 7; + bool packed = 8; + repeated Option options = 9; + string json_name = 10; + string default_value = 11; + + enum Kind { + + TYPE_UNKNOWN = 0; + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; + TYPE_SINT64 = 18; + } + + enum Cardinality { + + CARDINALITY_UNKNOWN = 0; + CARDINALITY_OPTIONAL = 1; + CARDINALITY_REQUIRED = 2; + CARDINALITY_REPEATED = 3; + } +} + +message Enum { + + string name = 1; + repeated EnumValue enumvalue = 2; + repeated Option options = 3; + SourceContext source_context = 4; + Syntax syntax = 5; +} + +message EnumValue { + + string name = 1; + int32 number = 2; + repeated Option options = 3; +} + +message Option { + + string name = 1; + Any value = 2; +} + +enum Syntax { + + SYNTAX_PROTO2 = 0; + SYNTAX_PROTO3 = 1; +} diff --git a/node_modules/protobufjs/index.d.ts b/node_modules/protobufjs/index.d.ts new file mode 100644 index 0000000..750ad2f --- /dev/null +++ b/node_modules/protobufjs/index.d.ts @@ -0,0 +1,2741 @@ +// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run build:types'. + +export as namespace protobuf; + +/** + * Provides common type definitions. + * Can also be used to provide additional google types or your own custom types. + * @param name Short name as in `google/protobuf/[name].proto` or full file name + * @param json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + */ +export function common(name: string, json: { [k: string]: any }): void; + +export namespace common { + + /** Properties of a google.protobuf.Any message. */ + interface IAny { + typeUrl?: string; + bytes?: Uint8Array; + } + + /** Properties of a google.protobuf.Duration message. */ + interface IDuration { + seconds?: (number|Long); + nanos?: number; + } + + /** Properties of a google.protobuf.Timestamp message. */ + interface ITimestamp { + seconds?: (number|Long); + nanos?: number; + } + + /** Properties of a google.protobuf.Empty message. */ + interface IEmpty { + } + + /** Properties of a google.protobuf.Struct message. */ + interface IStruct { + fields?: { [k: string]: IValue }; + } + + /** Properties of a google.protobuf.Value message. */ + interface IValue { + kind?: string; + nullValue?: 0; + numberValue?: number; + stringValue?: string; + boolValue?: boolean; + structValue?: IStruct; + listValue?: IListValue; + } + + /** Properties of a google.protobuf.ListValue message. */ + interface IListValue { + values?: IValue[]; + } + + /** Properties of a google.protobuf.DoubleValue message. */ + interface IDoubleValue { + value?: number; + } + + /** Properties of a google.protobuf.FloatValue message. */ + interface IFloatValue { + value?: number; + } + + /** Properties of a google.protobuf.Int64Value message. */ + interface IInt64Value { + value?: (number|Long); + } + + /** Properties of a google.protobuf.UInt64Value message. */ + interface IUInt64Value { + value?: (number|Long); + } + + /** Properties of a google.protobuf.Int32Value message. */ + interface IInt32Value { + value?: number; + } + + /** Properties of a google.protobuf.UInt32Value message. */ + interface IUInt32Value { + value?: number; + } + + /** Properties of a google.protobuf.BoolValue message. */ + interface IBoolValue { + value?: boolean; + } + + /** Properties of a google.protobuf.StringValue message. */ + interface IStringValue { + value?: string; + } + + /** Properties of a google.protobuf.BytesValue message. */ + interface IBytesValue { + value?: Uint8Array; + } + + /** + * Gets the root definition of the specified common proto file. + * + * Bundled definitions are: + * - google/protobuf/any.proto + * - google/protobuf/duration.proto + * - google/protobuf/empty.proto + * - google/protobuf/field_mask.proto + * - google/protobuf/struct.proto + * - google/protobuf/timestamp.proto + * - google/protobuf/wrappers.proto + * + * @param file Proto file name + * @returns Root definition or `null` if not defined + */ + function get(file: string): (INamespace|null); +} + +/** Runtime message from/to plain object converters. */ +export namespace converter { + + /** + * Generates a plain object to runtime message converter specific to the specified message type. + * @param mtype Message type + * @returns Codegen instance + */ + function fromObject(mtype: Type): Codegen; + + /** + * Generates a runtime message to plain object converter specific to the specified message type. + * @param mtype Message type + * @returns Codegen instance + */ + function toObject(mtype: Type): Codegen; +} + +/** + * Generates a decoder specific to the specified message type. + * @param mtype Message type + * @returns Codegen instance + */ +export function decoder(mtype: Type): Codegen; + +/** + * Generates an encoder specific to the specified message type. + * @param mtype Message type + * @returns Codegen instance + */ +export function encoder(mtype: Type): Codegen; + +/** Reflected enum. */ +export class Enum extends ReflectionObject { + + /** + * Constructs a new enum instance. + * @param name Unique name within its namespace + * @param [values] Enum values as an object, by name + * @param [options] Declared options + * @param [comment] The comment for this enum + * @param [comments] The value comments for this enum + * @param [valuesOptions] The value options for this enum + */ + constructor(name: string, values?: { [k: string]: number }, options?: { [k: string]: any }, comment?: string, comments?: { [k: string]: string }, valuesOptions?: ({ [k: string]: { [k: string]: any } }|undefined)); + + /** Enum values by id. */ + public valuesById: { [k: number]: string }; + + /** Enum values by name. */ + public values: { [k: string]: number }; + + /** Enum comment text. */ + public comment: (string|null); + + /** Value comment texts, if any. */ + public comments: { [k: string]: string }; + + /** Values options, if any */ + public valuesOptions?: { [k: string]: { [k: string]: any } }; + + /** Reserved ranges, if any. */ + public reserved: (number[]|string)[]; + + /** + * Constructs an enum from an enum descriptor. + * @param name Enum name + * @param json Enum descriptor + * @returns Created enum + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IEnum): Enum; + + /** + * Converts this enum to an enum descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Enum descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IEnum; + + /** + * Adds a value to this enum. + * @param name Value name + * @param id Value id + * @param [comment] Comment, if any + * @param {Object.|undefined} [options] Options, if any + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a value with this name or id + */ + public add(name: string, id: number, comment?: string, options?: ({ [k: string]: any }|undefined)): Enum; + + /** + * Removes a value from this enum + * @param name Value name + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `name` is not a name of this enum + */ + public remove(name: string): Enum; + + /** + * Tests if the specified id is reserved. + * @param id Id to test + * @returns `true` if reserved, otherwise `false` + */ + public isReservedId(id: number): boolean; + + /** + * Tests if the specified name is reserved. + * @param name Name to test + * @returns `true` if reserved, otherwise `false` + */ + public isReservedName(name: string): boolean; +} + +/** Enum descriptor. */ +export interface IEnum { + + /** Enum values */ + values: { [k: string]: number }; + + /** Enum options */ + options?: { [k: string]: any }; +} + +/** Reflected message field. */ +export class Field extends FieldBase { + + /** + * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. + * @param name Unique name within its namespace + * @param id Unique id within its namespace + * @param type Value type + * @param [rule="optional"] Field rule + * @param [extend] Extended type if different from parent + * @param [options] Declared options + */ + constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }); + + /** + * Constructs a field from a field descriptor. + * @param name Field name + * @param json Field descriptor + * @returns Created field + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IField): Field; + + /** Determines whether this field is packed. Only relevant when repeated and working with proto2. */ + public readonly packed: boolean; + + /** + * Field decorator (TypeScript). + * @param fieldId Field id + * @param fieldType Field type + * @param [fieldRule="optional"] Field rule + * @param [defaultValue] Default value + * @returns Decorator function + */ + public static d(fieldId: number, fieldType: ("double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|object), fieldRule?: ("optional"|"required"|"repeated"), defaultValue?: T): FieldDecorator; + + /** + * Field decorator (TypeScript). + * @param fieldId Field id + * @param fieldType Field type + * @param [fieldRule="optional"] Field rule + * @returns Decorator function + */ + public static d>(fieldId: number, fieldType: (Constructor|string), fieldRule?: ("optional"|"required"|"repeated")): FieldDecorator; +} + +/** Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. */ +export class FieldBase extends ReflectionObject { + + /** + * Not an actual constructor. Use {@link Field} instead. + * @param name Unique name within its namespace + * @param id Unique id within its namespace + * @param type Value type + * @param [rule="optional"] Field rule + * @param [extend] Extended type if different from parent + * @param [options] Declared options + * @param [comment] Comment associated with this field + */ + constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string); + + /** Field type. */ + public type: string; + + /** Unique field id. */ + public id: number; + + /** Extended type if different from parent. */ + public extend?: string; + + /** Whether this field is required. */ + public required: boolean; + + /** Whether this field is optional. */ + public optional: boolean; + + /** Whether this field is repeated. */ + public repeated: boolean; + + /** Whether this field is a map or not. */ + public map: boolean; + + /** Message this field belongs to. */ + public message: (Type|null); + + /** OneOf this field belongs to, if any, */ + public partOf: (OneOf|null); + + /** The field type's default value. */ + public typeDefault: any; + + /** The field's default value on prototypes. */ + public defaultValue: any; + + /** Whether this field's value should be treated as a long. */ + public long: boolean; + + /** Whether this field's value is a buffer. */ + public bytes: boolean; + + /** Resolved type if not a basic type. */ + public resolvedType: (Type|Enum|null); + + /** Sister-field within the extended type if a declaring extension field. */ + public extensionField: (Field|null); + + /** Sister-field within the declaring namespace if an extended field. */ + public declaringField: (Field|null); + + /** Comment for this field. */ + public comment: (string|null); + + /** + * Converts this field to a field descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Field descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IField; + + /** + * Resolves this field's type references. + * @returns `this` + * @throws {Error} If any reference cannot be resolved + */ + public resolve(): Field; +} + +/** Field descriptor. */ +export interface IField { + + /** Field rule */ + rule?: string; + + /** Field type */ + type: string; + + /** Field id */ + id: number; + + /** Field options */ + options?: { [k: string]: any }; +} + +/** Extension field descriptor. */ +export interface IExtensionField extends IField { + + /** Extended type */ + extend: string; +} + +/** + * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). + * @param prototype Target prototype + * @param fieldName Field name + */ +type FieldDecorator = (prototype: object, fieldName: string) => void; + +/** + * A node-style callback as used by {@link load} and {@link Root#load}. + * @param error Error, if any, otherwise `null` + * @param [root] Root, if there hasn't been an error + */ +type LoadCallback = (error: (Error|null), root?: Root) => void; + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param filename One or multiple files to load + * @param root Root namespace, defaults to create a new one if omitted. + * @param callback Callback function + * @see {@link Root#load} + */ +export function load(filename: (string|string[]), root: Root, callback: LoadCallback): void; + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param filename One or multiple files to load + * @param callback Callback function + * @see {@link Root#load} + */ +export function load(filename: (string|string[]), callback: LoadCallback): void; + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. + * @param filename One or multiple files to load + * @param [root] Root namespace, defaults to create a new one if omitted. + * @returns Promise + * @see {@link Root#load} + */ +export function load(filename: (string|string[]), root?: Root): Promise; + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). + * @param filename One or multiple files to load + * @param [root] Root namespace, defaults to create a new one if omitted. + * @returns Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + * @see {@link Root#loadSync} + */ +export function loadSync(filename: (string|string[]), root?: Root): Root; + +/** Build type, one of `"full"`, `"light"` or `"minimal"`. */ +export const build: string; + +/** Reconfigures the library according to the environment. */ +export function configure(): void; + +/** Reflected map field. */ +export class MapField extends FieldBase { + + /** + * Constructs a new map field instance. + * @param name Unique name within its namespace + * @param id Unique id within its namespace + * @param keyType Key type + * @param type Value type + * @param [options] Declared options + * @param [comment] Comment associated with this field + */ + constructor(name: string, id: number, keyType: string, type: string, options?: { [k: string]: any }, comment?: string); + + /** Key type. */ + public keyType: string; + + /** Resolved key type if not a basic type. */ + public resolvedKeyType: (ReflectionObject|null); + + /** + * Constructs a map field from a map field descriptor. + * @param name Field name + * @param json Map field descriptor + * @returns Created map field + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IMapField): MapField; + + /** + * Converts this map field to a map field descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Map field descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IMapField; + + /** + * Map field decorator (TypeScript). + * @param fieldId Field id + * @param fieldKeyType Field key type + * @param fieldValueType Field value type + * @returns Decorator function + */ + public static d }>(fieldId: number, fieldKeyType: ("int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"), fieldValueType: ("double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|object|Constructor<{}>)): FieldDecorator; +} + +/** Map field descriptor. */ +export interface IMapField extends IField { + + /** Key type */ + keyType: string; +} + +/** Extension map field descriptor. */ +export interface IExtensionMapField extends IMapField { + + /** Extended type */ + extend: string; +} + +/** Abstract runtime message. */ +export class Message { + + /** + * Constructs a new message instance. + * @param [properties] Properties to set + */ + constructor(properties?: Properties); + + /** Reference to the reflected type. */ + public static readonly $type: Type; + + /** Reference to the reflected type. */ + public readonly $type: Type; + + /** + * Creates a new message of this type using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create>(this: Constructor, properties?: { [k: string]: any }): Message; + + /** + * Encodes a message of this type. + * @param message Message to encode + * @param [writer] Writer to use + * @returns Writer + */ + public static encode>(this: Constructor, message: (T|{ [k: string]: any }), writer?: Writer): Writer; + + /** + * Encodes a message of this type preceeded by its length as a varint. + * @param message Message to encode + * @param [writer] Writer to use + * @returns Writer + */ + public static encodeDelimited>(this: Constructor, message: (T|{ [k: string]: any }), writer?: Writer): Writer; + + /** + * Decodes a message of this type. + * @param reader Reader or buffer to decode + * @returns Decoded message + */ + public static decode>(this: Constructor, reader: (Reader|Uint8Array)): T; + + /** + * Decodes a message of this type preceeded by its length as a varint. + * @param reader Reader or buffer to decode + * @returns Decoded message + */ + public static decodeDelimited>(this: Constructor, reader: (Reader|Uint8Array)): T; + + /** + * Verifies a message of this type. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message instance + */ + public static fromObject>(this: Constructor, object: { [k: string]: any }): T; + + /** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param message Message instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject>(this: Constructor, message: T, options?: IConversionOptions): { [k: string]: any }; + + /** + * Converts this message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; +} + +/** Reflected service method. */ +export class Method extends ReflectionObject { + + /** + * Constructs a new service method instance. + * @param name Method name + * @param type Method type, usually `"rpc"` + * @param requestType Request message type + * @param responseType Response message type + * @param [requestStream] Whether the request is streamed + * @param [responseStream] Whether the response is streamed + * @param [options] Declared options + * @param [comment] The comment for this method + * @param [parsedOptions] Declared options, properly parsed into an object + */ + constructor(name: string, type: (string|undefined), requestType: string, responseType: string, requestStream?: (boolean|{ [k: string]: any }), responseStream?: (boolean|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string, parsedOptions?: { [k: string]: any }); + + /** Method type. */ + public type: string; + + /** Request type. */ + public requestType: string; + + /** Whether requests are streamed or not. */ + public requestStream?: boolean; + + /** Response type. */ + public responseType: string; + + /** Whether responses are streamed or not. */ + public responseStream?: boolean; + + /** Resolved request type. */ + public resolvedRequestType: (Type|null); + + /** Resolved response type. */ + public resolvedResponseType: (Type|null); + + /** Comment for this method */ + public comment: (string|null); + + /** Options properly parsed into an object */ + public parsedOptions: any; + + /** + * Constructs a method from a method descriptor. + * @param name Method name + * @param json Method descriptor + * @returns Created method + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IMethod): Method; + + /** + * Converts this method to a method descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Method descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IMethod; +} + +/** Method descriptor. */ +export interface IMethod { + + /** Method type */ + type?: string; + + /** Request type */ + requestType: string; + + /** Response type */ + responseType: string; + + /** Whether requests are streamed */ + requestStream?: boolean; + + /** Whether responses are streamed */ + responseStream?: boolean; + + /** Method options */ + options?: { [k: string]: any }; + + /** Method comments */ + comment: string; + + /** Method options properly parsed into an object */ + parsedOptions?: { [k: string]: any }; +} + +/** Reflected namespace. */ +export class Namespace extends NamespaceBase { + + /** + * Constructs a new namespace instance. + * @param name Namespace name + * @param [options] Declared options + */ + constructor(name: string, options?: { [k: string]: any }); + + /** + * Constructs a namespace from JSON. + * @param name Namespace name + * @param json JSON object + * @returns Created namespace + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: { [k: string]: any }): Namespace; + + /** + * Converts an array of reflection objects to JSON. + * @param array Object array + * @param [toJSONOptions] JSON conversion options + * @returns JSON object or `undefined` when array is empty + */ + public static arrayToJSON(array: ReflectionObject[], toJSONOptions?: IToJSONOptions): ({ [k: string]: any }|undefined); + + /** + * Tests if the specified id is reserved. + * @param reserved Array of reserved ranges and names + * @param id Id to test + * @returns `true` if reserved, otherwise `false` + */ + public static isReservedId(reserved: ((number[]|string)[]|undefined), id: number): boolean; + + /** + * Tests if the specified name is reserved. + * @param reserved Array of reserved ranges and names + * @param name Name to test + * @returns `true` if reserved, otherwise `false` + */ + public static isReservedName(reserved: ((number[]|string)[]|undefined), name: string): boolean; +} + +/** Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. */ +export abstract class NamespaceBase extends ReflectionObject { + + /** Nested objects by name. */ + public nested?: { [k: string]: ReflectionObject }; + + /** Nested objects of this namespace as an array for iteration. */ + public readonly nestedArray: ReflectionObject[]; + + /** + * Converts this namespace to a namespace descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Namespace descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): INamespace; + + /** + * Adds nested objects to this namespace from nested object descriptors. + * @param nestedJson Any nested object descriptors + * @returns `this` + */ + public addJSON(nestedJson: { [k: string]: AnyNestedObject }): Namespace; + + /** + * Gets the nested object of the specified name. + * @param name Nested object name + * @returns The reflection object or `null` if it doesn't exist + */ + public get(name: string): (ReflectionObject|null); + + /** + * Gets the values of the nested {@link Enum|enum} of the specified name. + * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. + * @param name Nested enum name + * @returns Enum values + * @throws {Error} If there is no such enum + */ + public getEnum(name: string): { [k: string]: number }; + + /** + * Adds a nested object to this namespace. + * @param object Nested object to add + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name + */ + public add(object: ReflectionObject): Namespace; + + /** + * Removes a nested object from this namespace. + * @param object Nested object to remove + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this namespace + */ + public remove(object: ReflectionObject): Namespace; + + /** + * Defines additial namespaces within this one if not yet existing. + * @param path Path to create + * @param [json] Nested types to create from JSON + * @returns Pointer to the last namespace created or `this` if path is empty + */ + public define(path: (string|string[]), json?: any): Namespace; + + /** + * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. + * @returns `this` + */ + public resolveAll(): Namespace; + + /** + * Recursively looks up the reflection object matching the specified path in the scope of this namespace. + * @param path Path to look up + * @param filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. + * @param [parentAlreadyChecked=false] If known, whether the parent has already been checked + * @returns Looked up object or `null` if none could be found + */ + public lookup(path: (string|string[]), filterTypes: (any|any[]), parentAlreadyChecked?: boolean): (ReflectionObject|null); + + /** + * Looks up the reflection object at the specified path, relative to this namespace. + * @param path Path to look up + * @param [parentAlreadyChecked=false] Whether the parent has already been checked + * @returns Looked up object or `null` if none could be found + */ + public lookup(path: (string|string[]), parentAlreadyChecked?: boolean): (ReflectionObject|null); + + /** + * Looks up the {@link Type|type} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param path Path to look up + * @returns Looked up type + * @throws {Error} If `path` does not point to a type + */ + public lookupType(path: (string|string[])): Type; + + /** + * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param path Path to look up + * @returns Looked up enum + * @throws {Error} If `path` does not point to an enum + */ + public lookupEnum(path: (string|string[])): Enum; + + /** + * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param path Path to look up + * @returns Looked up type or enum + * @throws {Error} If `path` does not point to a type or enum + */ + public lookupTypeOrEnum(path: (string|string[])): Type; + + /** + * Looks up the {@link Service|service} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param path Path to look up + * @returns Looked up service + * @throws {Error} If `path` does not point to a service + */ + public lookupService(path: (string|string[])): Service; +} + +/** Namespace descriptor. */ +export interface INamespace { + + /** Namespace options */ + options?: { [k: string]: any }; + + /** Nested object descriptors */ + nested?: { [k: string]: AnyNestedObject }; +} + +/** Any extension field descriptor. */ +type AnyExtensionField = (IExtensionField|IExtensionMapField); + +/** Any nested object descriptor. */ +type AnyNestedObject = (IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf); + +/** Base class of all reflection objects. */ +export abstract class ReflectionObject { + + /** Options. */ + public options?: { [k: string]: any }; + + /** Parsed Options. */ + public parsedOptions?: { [k: string]: any[] }; + + /** Unique name within its namespace. */ + public name: string; + + /** Parent namespace. */ + public parent: (Namespace|null); + + /** Whether already resolved or not. */ + public resolved: boolean; + + /** Comment text, if any. */ + public comment: (string|null); + + /** Defining file name. */ + public filename: (string|null); + + /** Reference to the root namespace. */ + public readonly root: Root; + + /** Full name including leading dot. */ + public readonly fullName: string; + + /** + * Converts this reflection object to its descriptor representation. + * @returns Descriptor + */ + public toJSON(): { [k: string]: any }; + + /** + * Called when this object is added to a parent. + * @param parent Parent added to + */ + public onAdd(parent: ReflectionObject): void; + + /** + * Called when this object is removed from a parent. + * @param parent Parent removed from + */ + public onRemove(parent: ReflectionObject): void; + + /** + * Resolves this objects type references. + * @returns `this` + */ + public resolve(): ReflectionObject; + + /** + * Gets an option value. + * @param name Option name + * @returns Option value or `undefined` if not set + */ + public getOption(name: string): any; + + /** + * Sets an option. + * @param name Option name + * @param value Option value + * @param [ifNotSet] Sets the option only if it isn't currently set + * @returns `this` + */ + public setOption(name: string, value: any, ifNotSet?: boolean): ReflectionObject; + + /** + * Sets a parsed option. + * @param name parsed Option name + * @param value Option value + * @param propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value + * @returns `this` + */ + public setParsedOption(name: string, value: any, propName: string): ReflectionObject; + + /** + * Sets multiple options. + * @param options Options to set + * @param [ifNotSet] Sets an option only if it isn't currently set + * @returns `this` + */ + public setOptions(options: { [k: string]: any }, ifNotSet?: boolean): ReflectionObject; + + /** + * Converts this instance to its string representation. + * @returns Class name[, space, full name] + */ + public toString(): string; +} + +/** Reflected oneof. */ +export class OneOf extends ReflectionObject { + + /** + * Constructs a new oneof instance. + * @param name Oneof name + * @param [fieldNames] Field names + * @param [options] Declared options + * @param [comment] Comment associated with this field + */ + constructor(name: string, fieldNames?: (string[]|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string); + + /** Field names that belong to this oneof. */ + public oneof: string[]; + + /** Fields that belong to this oneof as an array for iteration. */ + public readonly fieldsArray: Field[]; + + /** Comment for this field. */ + public comment: (string|null); + + /** + * Constructs a oneof from a oneof descriptor. + * @param name Oneof name + * @param json Oneof descriptor + * @returns Created oneof + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IOneOf): OneOf; + + /** + * Converts this oneof to a oneof descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Oneof descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IOneOf; + + /** + * Adds a field to this oneof and removes it from its current parent, if any. + * @param field Field to add + * @returns `this` + */ + public add(field: Field): OneOf; + + /** + * Removes a field from this oneof and puts it back to the oneof's parent. + * @param field Field to remove + * @returns `this` + */ + public remove(field: Field): OneOf; + + /** + * OneOf decorator (TypeScript). + * @param fieldNames Field names + * @returns Decorator function + */ + public static d(...fieldNames: string[]): OneOfDecorator; +} + +/** Oneof descriptor. */ +export interface IOneOf { + + /** Oneof field names */ + oneof: string[]; + + /** Oneof options */ + options?: { [k: string]: any }; +} + +/** + * Decorator function as returned by {@link OneOf.d} (TypeScript). + * @param prototype Target prototype + * @param oneofName OneOf name + */ +type OneOfDecorator = (prototype: object, oneofName: string) => void; + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @param source Source contents + * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns Parser result + */ +export function parse(source: string, options?: IParseOptions): IParserResult; + +/** Result object returned from {@link parse}. */ +export interface IParserResult { + + /** Package name, if declared */ + package: (string|undefined); + + /** Imports, if any */ + imports: (string[]|undefined); + + /** Weak imports, if any */ + weakImports: (string[]|undefined); + + /** Syntax, if specified (either `"proto2"` or `"proto3"`) */ + syntax: (string|undefined); + + /** Populated root instance */ + root: Root; +} + +/** Options modifying the behavior of {@link parse}. */ +export interface IParseOptions { + + /** Keeps field casing instead of converting to camel case */ + keepCase?: boolean; + + /** Recognize double-slash comments in addition to doc-block comments. */ + alternateCommentMode?: boolean; + + /** Use trailing comment when both leading comment and trailing comment exist. */ + preferTrailingComment?: boolean; +} + +/** Options modifying the behavior of JSON serialization. */ +export interface IToJSONOptions { + + /** Serializes comments. */ + keepComments?: boolean; +} + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @param source Source contents + * @param root Root to populate + * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns Parser result + */ +export function parse(source: string, root: Root, options?: IParseOptions): IParserResult; + +/** Wire format reader using `Uint8Array` if available, otherwise `Array`. */ +export class Reader { + + /** + * Constructs a new reader instance using the specified buffer. + * @param buffer Buffer to read from + */ + constructor(buffer: Uint8Array); + + /** Read buffer. */ + public buf: Uint8Array; + + /** Read buffer position. */ + public pos: number; + + /** Read buffer length. */ + public len: number; + + /** + * Creates a new reader using the specified buffer. + * @param buffer Buffer to read from + * @returns A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ + public static create(buffer: (Uint8Array|Buffer)): (Reader|BufferReader); + + /** + * Reads a varint as an unsigned 32 bit value. + * @returns Value read + */ + public uint32(): number; + + /** + * Reads a varint as a signed 32 bit value. + * @returns Value read + */ + public int32(): number; + + /** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns Value read + */ + public sint32(): number; + + /** + * Reads a varint as a signed 64 bit value. + * @returns Value read + */ + public int64(): Long; + + /** + * Reads a varint as an unsigned 64 bit value. + * @returns Value read + */ + public uint64(): Long; + + /** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @returns Value read + */ + public sint64(): Long; + + /** + * Reads a varint as a boolean. + * @returns Value read + */ + public bool(): boolean; + + /** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns Value read + */ + public fixed32(): number; + + /** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns Value read + */ + public sfixed32(): number; + + /** + * Reads fixed 64 bits. + * @returns Value read + */ + public fixed64(): Long; + + /** + * Reads zig-zag encoded fixed 64 bits. + * @returns Value read + */ + public sfixed64(): Long; + + /** + * Reads a float (32 bit) as a number. + * @returns Value read + */ + public float(): number; + + /** + * Reads a double (64 bit float) as a number. + * @returns Value read + */ + public double(): number; + + /** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns Value read + */ + public bytes(): Uint8Array; + + /** + * Reads a string preceeded by its byte length as a varint. + * @returns Value read + */ + public string(): string; + + /** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param [length] Length if known, otherwise a varint is assumed + * @returns `this` + */ + public skip(length?: number): Reader; + + /** + * Skips the next element of the specified wire type. + * @param wireType Wire type received + * @returns `this` + */ + public skipType(wireType: number): Reader; +} + +/** Wire format reader using node buffers. */ +export class BufferReader extends Reader { + + /** + * Constructs a new buffer reader instance. + * @param buffer Buffer to read from + */ + constructor(buffer: Buffer); + + /** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns Value read + */ + public bytes(): Buffer; +} + +/** Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. */ +export class Root extends NamespaceBase { + + /** + * Constructs a new root namespace instance. + * @param [options] Top level options + */ + constructor(options?: { [k: string]: any }); + + /** Deferred extension fields. */ + public deferred: Field[]; + + /** Resolved file names of loaded files. */ + public files: string[]; + + /** + * Loads a namespace descriptor into a root namespace. + * @param json Nameespace descriptor + * @param [root] Root namespace, defaults to create a new one if omitted + * @returns Root namespace + */ + public static fromJSON(json: INamespace, root?: Root): Root; + + /** + * Resolves the path of an imported file, relative to the importing origin. + * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. + * @param origin The file name of the importing file + * @param target The file name being imported + * @returns Resolved path to `target` or `null` to skip the file + */ + public resolvePath(origin: string, target: string): (string|null); + + /** + * Fetch content from file path or url + * This method exists so you can override it with your own logic. + * @param path File path or url + * @param callback Callback function + */ + public fetch(path: string, callback: FetchCallback): void; + + /** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param filename Names of one or multiple files to load + * @param options Parse options + * @param callback Callback function + */ + public load(filename: (string|string[]), options: IParseOptions, callback: LoadCallback): void; + + /** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param filename Names of one or multiple files to load + * @param callback Callback function + */ + public load(filename: (string|string[]), callback: LoadCallback): void; + + /** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. + * @param filename Names of one or multiple files to load + * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns Promise + */ + public load(filename: (string|string[]), options?: IParseOptions): Promise; + + /** + * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). + * @param filename Names of one or multiple files to load + * @param [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + */ + public loadSync(filename: (string|string[]), options?: IParseOptions): Root; +} + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + */ +export let roots: { [k: string]: Root }; + +/** Streaming RPC helpers. */ +export namespace rpc { + + /** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @param error Error, if any + * @param [response] Response message + */ + type ServiceMethodCallback> = (error: (Error|null), response?: TRes) => void; + + /** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @param request Request message or plain object + * @param [callback] Node-style callback called with the error, if any, and the response message + * @returns Promise if `callback` has been omitted, otherwise `undefined` + */ + type ServiceMethod, TRes extends Message> = (request: (TReq|Properties), callback?: rpc.ServiceMethodCallback) => Promise>; + + /** An RPC service as returned by {@link Service#create}. */ + class Service extends util.EventEmitter { + + /** + * Constructs a new RPC service instance. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** RPC implementation. Becomes `null` once the service is ended. */ + public rpcImpl: (RPCImpl|null); + + /** Whether requests are length-delimited. */ + public requestDelimited: boolean; + + /** Whether responses are length-delimited. */ + public responseDelimited: boolean; + + /** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param method Reflected or static method + * @param requestCtor Request constructor + * @param responseCtor Response constructor + * @param request Request message or plain object + * @param callback Service callback + */ + public rpcCall, TRes extends Message>(method: (Method|rpc.ServiceMethod), requestCtor: Constructor, responseCtor: Constructor, request: (TReq|Properties), callback: rpc.ServiceMethodCallback): void; + + /** + * Ends this service and emits the `end` event. + * @param [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns `this` + */ + public end(endedByRPC?: boolean): rpc.Service; + } +} + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @param method Reflected or static method being called + * @param requestData Request data + * @param callback Callback function + */ +type RPCImpl = (method: (Method|rpc.ServiceMethod, Message<{}>>), requestData: Uint8Array, callback: RPCImplCallback) => void; + +/** + * Node-style callback as used by {@link RPCImpl}. + * @param error Error, if any, otherwise `null` + * @param [response] Response data or `null` to signal end of stream, if there hasn't been an error + */ +type RPCImplCallback = (error: (Error|null), response?: (Uint8Array|null)) => void; + +/** Reflected service. */ +export class Service extends NamespaceBase { + + /** + * Constructs a new service instance. + * @param name Service name + * @param [options] Service options + * @throws {TypeError} If arguments are invalid + */ + constructor(name: string, options?: { [k: string]: any }); + + /** Service methods. */ + public methods: { [k: string]: Method }; + + /** + * Constructs a service from a service descriptor. + * @param name Service name + * @param json Service descriptor + * @returns Created service + * @throws {TypeError} If arguments are invalid + */ + public static fromJSON(name: string, json: IService): Service; + + /** + * Converts this service to a service descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Service descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IService; + + /** Methods of this service as an array for iteration. */ + public readonly methodsArray: Method[]; + + /** + * Creates a runtime service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public create(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): rpc.Service; +} + +/** Service descriptor. */ +export interface IService extends INamespace { + + /** Method descriptors */ + methods: { [k: string]: IMethod }; +} + +/** + * Gets the next token and advances. + * @returns Next token or `null` on eof + */ +type TokenizerHandleNext = () => (string|null); + +/** + * Peeks for the next token. + * @returns Next token or `null` on eof + */ +type TokenizerHandlePeek = () => (string|null); + +/** + * Pushes a token back to the stack. + * @param token Token + */ +type TokenizerHandlePush = (token: string) => void; + +/** + * Skips the next token. + * @param expected Expected token + * @param [optional=false] If optional + * @returns Whether the token matched + * @throws {Error} If the token didn't match and is not optional + */ +type TokenizerHandleSkip = (expected: string, optional?: boolean) => boolean; + +/** + * Gets the comment on the previous line or, alternatively, the line comment on the specified line. + * @param [line] Line number + * @returns Comment text or `null` if none + */ +type TokenizerHandleCmnt = (line?: number) => (string|null); + +/** Handle object returned from {@link tokenize}. */ +export interface ITokenizerHandle { + + /** Gets the next token and advances (`null` on eof) */ + next: TokenizerHandleNext; + + /** Peeks for the next token (`null` on eof) */ + peek: TokenizerHandlePeek; + + /** Pushes a token back to the stack */ + push: TokenizerHandlePush; + + /** Skips a token, returns its presence and advances or, if non-optional and not present, throws */ + skip: TokenizerHandleSkip; + + /** Gets the comment on the previous line or the line comment on the specified line, if any */ + cmnt: TokenizerHandleCmnt; + + /** Current line number */ + line: number; +} + +/** + * Tokenizes the given .proto source and returns an object with useful utility functions. + * @param source Source contents + * @param alternateCommentMode Whether we should activate alternate comment parsing mode. + * @returns Tokenizer handle + */ +export function tokenize(source: string, alternateCommentMode: boolean): ITokenizerHandle; + +export namespace tokenize { + + /** + * Unescapes a string. + * @param str String to unescape + * @returns Unescaped string + */ + function unescape(str: string): string; +} + +/** Reflected message type. */ +export class Type extends NamespaceBase { + + /** + * Constructs a new reflected message type instance. + * @param name Message name + * @param [options] Declared options + */ + constructor(name: string, options?: { [k: string]: any }); + + /** Message fields. */ + public fields: { [k: string]: Field }; + + /** Oneofs declared within this namespace, if any. */ + public oneofs: { [k: string]: OneOf }; + + /** Extension ranges, if any. */ + public extensions: number[][]; + + /** Reserved ranges, if any. */ + public reserved: (number[]|string)[]; + + /** Message fields by id. */ + public readonly fieldsById: { [k: number]: Field }; + + /** Fields of this message as an array for iteration. */ + public readonly fieldsArray: Field[]; + + /** Oneofs of this message as an array for iteration. */ + public readonly oneofsArray: OneOf[]; + + /** + * The registered constructor, if any registered, otherwise a generic constructor. + * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. + */ + public ctor: Constructor<{}>; + + /** + * Generates a constructor function for the specified type. + * @param mtype Message type + * @returns Codegen instance + */ + public static generateConstructor(mtype: Type): Codegen; + + /** + * Creates a message type from a message type descriptor. + * @param name Message name + * @param json Message type descriptor + * @returns Created message type + */ + public static fromJSON(name: string, json: IType): Type; + + /** + * Converts this message type to a message type descriptor. + * @param [toJSONOptions] JSON conversion options + * @returns Message type descriptor + */ + public toJSON(toJSONOptions?: IToJSONOptions): IType; + + /** + * Adds a nested object to this type. + * @param object Nested object to add + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id + */ + public add(object: ReflectionObject): Type; + + /** + * Removes a nested object from this type. + * @param object Nested object to remove + * @returns `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this type + */ + public remove(object: ReflectionObject): Type; + + /** + * Tests if the specified id is reserved. + * @param id Id to test + * @returns `true` if reserved, otherwise `false` + */ + public isReservedId(id: number): boolean; + + /** + * Tests if the specified name is reserved. + * @param name Name to test + * @returns `true` if reserved, otherwise `false` + */ + public isReservedName(name: string): boolean; + + /** + * Creates a new message of this type using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public create(properties?: { [k: string]: any }): Message<{}>; + + /** + * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. + * @returns `this` + */ + public setup(): Type; + + /** + * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. + * @param message Message instance or plain object + * @param [writer] Writer to encode to + * @returns writer + */ + public encode(message: (Message<{}>|{ [k: string]: any }), writer?: Writer): Writer; + + /** + * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. + * @param message Message instance or plain object + * @param [writer] Writer to encode to + * @returns writer + */ + public encodeDelimited(message: (Message<{}>|{ [k: string]: any }), writer?: Writer): Writer; + + /** + * Decodes a message of this type. + * @param reader Reader or buffer to decode from + * @param [length] Length of the message, if known beforehand + * @returns Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError<{}>} If required fields are missing + */ + public decode(reader: (Reader|Uint8Array), length?: number): Message<{}>; + + /** + * Decodes a message of this type preceeded by its byte length as a varint. + * @param reader Reader or buffer to decode from + * @returns Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError} If required fields are missing + */ + public decodeDelimited(reader: (Reader|Uint8Array)): Message<{}>; + + /** + * Verifies that field values are valid and that required fields are present. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public verify(message: { [k: string]: any }): (null|string); + + /** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param object Plain object to convert + * @returns Message instance + */ + public fromObject(object: { [k: string]: any }): Message<{}>; + + /** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param message Message instance + * @param [options] Conversion options + * @returns Plain object + */ + public toObject(message: Message<{}>, options?: IConversionOptions): { [k: string]: any }; + + /** + * Type decorator (TypeScript). + * @param [typeName] Type name, defaults to the constructor's name + * @returns Decorator function + */ + public static d>(typeName?: string): TypeDecorator; +} + +/** Message type descriptor. */ +export interface IType extends INamespace { + + /** Oneof descriptors */ + oneofs?: { [k: string]: IOneOf }; + + /** Field descriptors */ + fields: { [k: string]: IField }; + + /** Extension ranges */ + extensions?: number[][]; + + /** Reserved ranges */ + reserved?: number[][]; + + /** Whether a legacy group or not */ + group?: boolean; +} + +/** Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. */ +export interface IConversionOptions { + + /** + * Long conversion type. + * Valid values are `String` and `Number` (the global types). + * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. + */ + longs?: Function; + + /** + * Enum value conversion type. + * Only valid value is `String` (the global type). + * Defaults to copy the present value, which is the numeric id. + */ + enums?: Function; + + /** + * Bytes value conversion type. + * Valid values are `Array` and (a base64 encoded) `String` (the global types). + * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. + */ + bytes?: Function; + + /** Also sets default values on the resulting object */ + defaults?: boolean; + + /** Sets empty arrays for missing repeated fields even if `defaults=false` */ + arrays?: boolean; + + /** Sets empty objects for missing map fields even if `defaults=false` */ + objects?: boolean; + + /** Includes virtual oneof properties set to the present field's name, if any */ + oneofs?: boolean; + + /** Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings */ + json?: boolean; +} + +/** + * Decorator function as returned by {@link Type.d} (TypeScript). + * @param target Target constructor + */ +type TypeDecorator> = (target: Constructor) => void; + +/** Common type constants. */ +export namespace types { + + /** Basic type wire types. */ + const basic: { + "double": number, + "float": number, + "int32": number, + "uint32": number, + "sint32": number, + "fixed32": number, + "sfixed32": number, + "int64": number, + "uint64": number, + "sint64": number, + "fixed64": number, + "sfixed64": number, + "bool": number, + "string": number, + "bytes": number + }; + + /** Basic type defaults. */ + const defaults: { + "double": number, + "float": number, + "int32": number, + "uint32": number, + "sint32": number, + "fixed32": number, + "sfixed32": number, + "int64": number, + "uint64": number, + "sint64": number, + "fixed64": number, + "sfixed64": number, + "bool": boolean, + "string": string, + "bytes": number[], + "message": null + }; + + /** Basic long type wire types. */ + const long: { + "int64": number, + "uint64": number, + "sint64": number, + "fixed64": number, + "sfixed64": number + }; + + /** Allowed types for map keys with their associated wire type. */ + const mapKey: { + "int32": number, + "uint32": number, + "sint32": number, + "fixed32": number, + "sfixed32": number, + "int64": number, + "uint64": number, + "sint64": number, + "fixed64": number, + "sfixed64": number, + "bool": number, + "string": number + }; + + /** Allowed types for packed repeated fields with their associated wire type. */ + const packed: { + "double": number, + "float": number, + "int32": number, + "uint32": number, + "sint32": number, + "fixed32": number, + "sfixed32": number, + "int64": number, + "uint64": number, + "sint64": number, + "fixed64": number, + "sfixed64": number, + "bool": number + }; +} + +/** Constructor type. */ +export interface Constructor extends Function { + new(...params: any[]): T; prototype: T; +} + +/** Properties type. */ +type Properties = { [P in keyof T]?: T[P] }; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + */ +export interface Buffer extends Uint8Array { +} + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + */ +export interface Long { + + /** Low bits */ + low: number; + + /** High bits */ + high: number; + + /** Whether unsigned or not */ + unsigned: boolean; +} + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @returns Set field name, if any + */ +type OneOfGetter = () => (string|undefined); + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @param value Field name + */ +type OneOfSetter = (value: (string|undefined)) => void; + +/** Various utility functions. */ +export namespace util { + + /** Helper class for working with the low and high bits of a 64 bit value. */ + class LongBits { + + /** + * Constructs new long bits. + * @param lo Low 32 bits, unsigned + * @param hi High 32 bits, unsigned + */ + constructor(lo: number, hi: number); + + /** Low bits. */ + public lo: number; + + /** High bits. */ + public hi: number; + + /** Zero bits. */ + public static zero: util.LongBits; + + /** Zero hash. */ + public static zeroHash: string; + + /** + * Constructs new long bits from the specified number. + * @param value Value + * @returns Instance + */ + public static fromNumber(value: number): util.LongBits; + + /** + * Constructs new long bits from a number, long or string. + * @param value Value + * @returns Instance + */ + public static from(value: (Long|number|string)): util.LongBits; + + /** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param [unsigned=false] Whether unsigned or not + * @returns Possibly unsafe number + */ + public toNumber(unsigned?: boolean): number; + + /** + * Converts this long bits to a long. + * @param [unsigned=false] Whether unsigned or not + * @returns Long + */ + public toLong(unsigned?: boolean): Long; + + /** + * Constructs new long bits from the specified 8 characters long hash. + * @param hash Hash + * @returns Bits + */ + public static fromHash(hash: string): util.LongBits; + + /** + * Converts this long bits to a 8 characters long hash. + * @returns Hash + */ + public toHash(): string; + + /** + * Zig-zag encodes this long bits. + * @returns `this` + */ + public zzEncode(): util.LongBits; + + /** + * Zig-zag decodes this long bits. + * @returns `this` + */ + public zzDecode(): util.LongBits; + + /** + * Calculates the length of this longbits when encoded as a varint. + * @returns Length + */ + public length(): number; + } + + /** Whether running within node or not. */ + let isNode: boolean; + + /** Global object reference. */ + let global: object; + + /** An immuable empty array. */ + const emptyArray: any[]; + + /** An immutable empty object. */ + const emptyObject: object; + + /** + * Tests if the specified value is an integer. + * @param value Value to test + * @returns `true` if the value is an integer + */ + function isInteger(value: any): boolean; + + /** + * Tests if the specified value is a string. + * @param value Value to test + * @returns `true` if the value is a string + */ + function isString(value: any): boolean; + + /** + * Tests if the specified value is a non-null object. + * @param value Value to test + * @returns `true` if the value is a non-null object + */ + function isObject(value: any): boolean; + + /** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @param obj Plain object or message instance + * @param prop Property name + * @returns `true` if considered to be present, otherwise `false` + */ + function isset(obj: object, prop: string): boolean; + + /** + * Checks if a property on a message is considered to be present. + * @param obj Plain object or message instance + * @param prop Property name + * @returns `true` if considered to be present, otherwise `false` + */ + function isSet(obj: object, prop: string): boolean; + + /** Node's Buffer class if available. */ + let Buffer: Constructor; + + /** + * Creates a new buffer of whatever type supported by the environment. + * @param [sizeOrArray=0] Buffer size or number array + * @returns Buffer + */ + function newBuffer(sizeOrArray?: (number|number[])): (Uint8Array|Buffer); + + /** Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. */ + let Array: Constructor; + + /** Long.js's Long class if available. */ + let Long: Constructor; + + /** Regular expression used to verify 2 bit (`bool`) map keys. */ + const key2Re: RegExp; + + /** Regular expression used to verify 32 bit (`int32` etc.) map keys. */ + const key32Re: RegExp; + + /** Regular expression used to verify 64 bit (`int64` etc.) map keys. */ + const key64Re: RegExp; + + /** + * Converts a number or long to an 8 characters long hash string. + * @param value Value to convert + * @returns Hash + */ + function longToHash(value: (Long|number)): string; + + /** + * Converts an 8 characters long hash string to a long or number. + * @param hash Hash + * @param [unsigned=false] Whether unsigned or not + * @returns Original value + */ + function longFromHash(hash: string, unsigned?: boolean): (Long|number); + + /** + * Merges the properties of the source object into the destination object. + * @param dst Destination object + * @param src Source object + * @param [ifNotSet=false] Merges only if the key is not already set + * @returns Destination object + */ + function merge(dst: { [k: string]: any }, src: { [k: string]: any }, ifNotSet?: boolean): { [k: string]: any }; + + /** + * Converts the first character of a string to lower case. + * @param str String to convert + * @returns Converted string + */ + function lcFirst(str: string): string; + + /** + * Creates a custom error constructor. + * @param name Error name + * @returns Custom error constructor + */ + function newError(name: string): Constructor; + + /** Error subclass indicating a protocol specifc error. */ + class ProtocolError> extends Error { + + /** + * Constructs a new protocol error. + * @param message Error message + * @param [properties] Additional properties + */ + constructor(message: string, properties?: { [k: string]: any }); + + /** So far decoded message instance. */ + public instance: Message; + } + + /** + * Builds a getter for a oneof's present field name. + * @param fieldNames Field names + * @returns Unbound getter + */ + function oneOfGetter(fieldNames: string[]): OneOfGetter; + + /** + * Builds a setter for a oneof's present field name. + * @param fieldNames Field names + * @returns Unbound setter + */ + function oneOfSetter(fieldNames: string[]): OneOfSetter; + + /** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ + let toJSONOptions: IConversionOptions; + + /** Node's fs module if available. */ + let fs: { [k: string]: any }; + + /** + * Converts an object's values to an array. + * @param object Object to convert + * @returns Converted array + */ + function toArray(object: { [k: string]: any }): any[]; + + /** + * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. + * @param array Array to convert + * @returns Converted object + */ + function toObject(array: any[]): { [k: string]: any }; + + /** + * Tests whether the specified name is a reserved word in JS. + * @param name Name to test + * @returns `true` if reserved, otherwise `false` + */ + function isReserved(name: string): boolean; + + /** + * Returns a safe property accessor for the specified property name. + * @param prop Property name + * @returns Safe accessor + */ + function safeProp(prop: string): string; + + /** + * Converts the first character of a string to upper case. + * @param str String to convert + * @returns Converted string + */ + function ucFirst(str: string): string; + + /** + * Converts a string to camel case. + * @param str String to convert + * @returns Converted string + */ + function camelCase(str: string): string; + + /** + * Compares reflected fields by id. + * @param a First field + * @param b Second field + * @returns Comparison value + */ + function compareFieldsById(a: Field, b: Field): number; + + /** + * Decorator helper for types (TypeScript). + * @param ctor Constructor function + * @param [typeName] Type name, defaults to the constructor's name + * @returns Reflected type + */ + function decorateType>(ctor: Constructor, typeName?: string): Type; + + /** + * Decorator helper for enums (TypeScript). + * @param object Enum object + * @returns Reflected enum + */ + function decorateEnum(object: object): Enum; + + /** + * Sets the value of a property by property path. If a value already exists, it is turned to an array + * @param dst Destination object + * @param path dot '.' delimited path of the property to set + * @param value the value to set + * @returns Destination object + */ + function setProperty(dst: { [k: string]: any }, path: string, value: object): { [k: string]: any }; + + /** Decorator root (TypeScript). */ + let decorateRoot: Root; + + /** + * Returns a promise from a node-style callback function. + * @param fn Function to call + * @param ctx Function context + * @param params Function arguments + * @returns Promisified function + */ + function asPromise(fn: asPromiseCallback, ctx: any, ...params: any[]): Promise; + + /** A minimal base64 implementation for number arrays. */ + namespace base64 { + + /** + * Calculates the byte length of a base64 encoded string. + * @param string Base64 encoded string + * @returns Byte length + */ + function length(string: string): number; + + /** + * Encodes a buffer to a base64 encoded string. + * @param buffer Source buffer + * @param start Source start + * @param end Source end + * @returns Base64 encoded string + */ + function encode(buffer: Uint8Array, start: number, end: number): string; + + /** + * Decodes a base64 encoded string to a buffer. + * @param string Source string + * @param buffer Destination buffer + * @param offset Destination offset + * @returns Number of bytes written + * @throws {Error} If encoding is invalid + */ + function decode(string: string, buffer: Uint8Array, offset: number): number; + + /** + * Tests if the specified string appears to be base64 encoded. + * @param string String to test + * @returns `true` if probably base64 encoded, otherwise false + */ + function test(string: string): boolean; + } + + /** + * Begins generating a function. + * @param functionParams Function parameter names + * @param [functionName] Function name if not anonymous + * @returns Appender that appends code to the function's body + */ + function codegen(functionParams: string[], functionName?: string): Codegen; + + namespace codegen { + + /** When set to `true`, codegen will log generated code to console. Useful for debugging. */ + let verbose: boolean; + } + + /** + * Begins generating a function. + * @param [functionName] Function name if not anonymous + * @returns Appender that appends code to the function's body + */ + function codegen(functionName?: string): Codegen; + + /** A minimal event emitter. */ + class EventEmitter { + + /** Constructs a new event emitter instance. */ + constructor(); + + /** + * Registers an event listener. + * @param evt Event name + * @param fn Listener + * @param [ctx] Listener context + * @returns `this` + */ + public on(evt: string, fn: EventEmitterListener, ctx?: any): this; + + /** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param [evt] Event name. Removes all listeners if omitted. + * @param [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns `this` + */ + public off(evt?: string, fn?: EventEmitterListener): this; + + /** + * Emits an event by calling its listeners with the specified arguments. + * @param evt Event name + * @param args Arguments + * @returns `this` + */ + public emit(evt: string, ...args: any[]): this; + } + + /** Reads / writes floats / doubles from / to buffers. */ + namespace float { + + /** + * Writes a 32 bit float to a buffer using little endian byte order. + * @param val Value to write + * @param buf Target buffer + * @param pos Target buffer offset + */ + function writeFloatLE(val: number, buf: Uint8Array, pos: number): void; + + /** + * Writes a 32 bit float to a buffer using big endian byte order. + * @param val Value to write + * @param buf Target buffer + * @param pos Target buffer offset + */ + function writeFloatBE(val: number, buf: Uint8Array, pos: number): void; + + /** + * Reads a 32 bit float from a buffer using little endian byte order. + * @param buf Source buffer + * @param pos Source buffer offset + * @returns Value read + */ + function readFloatLE(buf: Uint8Array, pos: number): number; + + /** + * Reads a 32 bit float from a buffer using big endian byte order. + * @param buf Source buffer + * @param pos Source buffer offset + * @returns Value read + */ + function readFloatBE(buf: Uint8Array, pos: number): number; + + /** + * Writes a 64 bit double to a buffer using little endian byte order. + * @param val Value to write + * @param buf Target buffer + * @param pos Target buffer offset + */ + function writeDoubleLE(val: number, buf: Uint8Array, pos: number): void; + + /** + * Writes a 64 bit double to a buffer using big endian byte order. + * @param val Value to write + * @param buf Target buffer + * @param pos Target buffer offset + */ + function writeDoubleBE(val: number, buf: Uint8Array, pos: number): void; + + /** + * Reads a 64 bit double from a buffer using little endian byte order. + * @param buf Source buffer + * @param pos Source buffer offset + * @returns Value read + */ + function readDoubleLE(buf: Uint8Array, pos: number): number; + + /** + * Reads a 64 bit double from a buffer using big endian byte order. + * @param buf Source buffer + * @param pos Source buffer offset + * @returns Value read + */ + function readDoubleBE(buf: Uint8Array, pos: number): number; + } + + /** + * Fetches the contents of a file. + * @param filename File path or url + * @param options Fetch options + * @param callback Callback function + */ + function fetch(filename: string, options: IFetchOptions, callback: FetchCallback): void; + + /** + * Fetches the contents of a file. + * @param path File path or url + * @param callback Callback function + */ + function fetch(path: string, callback: FetchCallback): void; + + /** + * Fetches the contents of a file. + * @param path File path or url + * @param [options] Fetch options + * @returns Promise + */ + function fetch(path: string, options?: IFetchOptions): Promise<(string|Uint8Array)>; + + /** + * Requires a module only if available. + * @param moduleName Module to require + * @returns Required module if available and not empty, otherwise `null` + */ + function inquire(moduleName: string): object; + + /** A minimal path module to resolve Unix, Windows and URL paths alike. */ + namespace path { + + /** + * Tests if the specified path is absolute. + * @param path Path to test + * @returns `true` if path is absolute + */ + function isAbsolute(path: string): boolean; + + /** + * Normalizes the specified path. + * @param path Path to normalize + * @returns Normalized path + */ + function normalize(path: string): string; + + /** + * Resolves the specified include path against the specified origin path. + * @param originPath Path to the origin file + * @param includePath Include path relative to origin path + * @param [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns Path to the include file + */ + function resolve(originPath: string, includePath: string, alreadyNormalized?: boolean): string; + } + + /** + * A general purpose buffer pool. + * @param alloc Allocator + * @param slice Slicer + * @param [size=8192] Slab size + * @returns Pooled allocator + */ + function pool(alloc: PoolAllocator, slice: PoolSlicer, size?: number): PoolAllocator; + + /** A minimal UTF8 implementation for number arrays. */ + namespace utf8 { + + /** + * Calculates the UTF8 byte length of a string. + * @param string String + * @returns Byte length + */ + function length(string: string): number; + + /** + * Reads UTF8 bytes as a string. + * @param buffer Source buffer + * @param start Source start + * @param end Source end + * @returns String read + */ + function read(buffer: Uint8Array, start: number, end: number): string; + + /** + * Writes a string as UTF8 bytes. + * @param string Source string + * @param buffer Destination buffer + * @param offset Destination offset + * @returns Bytes written + */ + function write(string: string, buffer: Uint8Array, offset: number): number; + } +} + +/** + * Generates a verifier specific to the specified message type. + * @param mtype Message type + * @returns Codegen instance + */ +export function verifier(mtype: Type): Codegen; + +/** Wrappers for common types. */ +export const wrappers: { [k: string]: IWrapper }; + +/** + * From object converter part of an {@link IWrapper}. + * @param object Plain object + * @returns Message instance + */ +type WrapperFromObjectConverter = (this: Type, object: { [k: string]: any }) => Message<{}>; + +/** + * To object converter part of an {@link IWrapper}. + * @param message Message instance + * @param [options] Conversion options + * @returns Plain object + */ +type WrapperToObjectConverter = (this: Type, message: Message<{}>, options?: IConversionOptions) => { [k: string]: any }; + +/** Common type wrapper part of {@link wrappers}. */ +export interface IWrapper { + + /** From object converter */ + fromObject?: WrapperFromObjectConverter; + + /** To object converter */ + toObject?: WrapperToObjectConverter; +} + +/** Wire format writer using `Uint8Array` if available, otherwise `Array`. */ +export class Writer { + + /** Constructs a new writer instance. */ + constructor(); + + /** Current length. */ + public len: number; + + /** Operations head. */ + public head: object; + + /** Operations tail */ + public tail: object; + + /** Linked forked states. */ + public states: (object|null); + + /** + * Creates a new writer. + * @returns A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ + public static create(): (BufferWriter|Writer); + + /** + * Allocates a buffer of the specified size. + * @param size Buffer size + * @returns Buffer + */ + public static alloc(size: number): Uint8Array; + + /** + * Writes an unsigned 32 bit value as a varint. + * @param value Value to write + * @returns `this` + */ + public uint32(value: number): Writer; + + /** + * Writes a signed 32 bit value as a varint. + * @param value Value to write + * @returns `this` + */ + public int32(value: number): Writer; + + /** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param value Value to write + * @returns `this` + */ + public sint32(value: number): Writer; + + /** + * Writes an unsigned 64 bit value as a varint. + * @param value Value to write + * @returns `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ + public uint64(value: (Long|number|string)): Writer; + + /** + * Writes a signed 64 bit value as a varint. + * @param value Value to write + * @returns `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ + public int64(value: (Long|number|string)): Writer; + + /** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param value Value to write + * @returns `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ + public sint64(value: (Long|number|string)): Writer; + + /** + * Writes a boolish value as a varint. + * @param value Value to write + * @returns `this` + */ + public bool(value: boolean): Writer; + + /** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param value Value to write + * @returns `this` + */ + public fixed32(value: number): Writer; + + /** + * Writes a signed 32 bit value as fixed 32 bits. + * @param value Value to write + * @returns `this` + */ + public sfixed32(value: number): Writer; + + /** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param value Value to write + * @returns `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ + public fixed64(value: (Long|number|string)): Writer; + + /** + * Writes a signed 64 bit value as fixed 64 bits. + * @param value Value to write + * @returns `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ + public sfixed64(value: (Long|number|string)): Writer; + + /** + * Writes a float (32 bit). + * @param value Value to write + * @returns `this` + */ + public float(value: number): Writer; + + /** + * Writes a double (64 bit float). + * @param value Value to write + * @returns `this` + */ + public double(value: number): Writer; + + /** + * Writes a sequence of bytes. + * @param value Buffer or base64 encoded string to write + * @returns `this` + */ + public bytes(value: (Uint8Array|string)): Writer; + + /** + * Writes a string. + * @param value Value to write + * @returns `this` + */ + public string(value: string): Writer; + + /** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns `this` + */ + public fork(): Writer; + + /** + * Resets this instance to the last state. + * @returns `this` + */ + public reset(): Writer; + + /** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns `this` + */ + public ldelim(): Writer; + + /** + * Finishes the write operation. + * @returns Finished buffer + */ + public finish(): Uint8Array; +} + +/** Wire format writer using node buffers. */ +export class BufferWriter extends Writer { + + /** Constructs a new buffer writer instance. */ + constructor(); + + /** + * Allocates a buffer of the specified size. + * @param size Buffer size + * @returns Buffer + */ + public static alloc(size: number): Buffer; + + /** + * Finishes the write operation. + * @returns Finished buffer + */ + public finish(): Buffer; +} + +/** + * Callback as used by {@link util.asPromise}. + * @param error Error, if any + * @param params Additional arguments + */ +type asPromiseCallback = (error: (Error|null), ...params: any[]) => void; + +/** + * Appends code to the function's body or finishes generation. + * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param [formatParams] Format parameters + * @returns Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match + */ +type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function); + +/** + * Event listener as used by {@link util.EventEmitter}. + * @param args Arguments + */ +type EventEmitterListener = (...args: any[]) => void; + +/** + * Node-style callback as used by {@link util.fetch}. + * @param error Error, if any, otherwise `null` + * @param [contents] File contents, if there hasn't been an error + */ +type FetchCallback = (error: Error, contents?: string) => void; + +/** Options as used by {@link util.fetch}. */ +export interface IFetchOptions { + + /** Whether expecting a binary response */ + binary?: boolean; + + /** If `true`, forces the use of XMLHttpRequest */ + xhr?: boolean; +} + +/** + * An allocator as used by {@link util.pool}. + * @param size Buffer size + * @returns Buffer + */ +type PoolAllocator = (size: number) => Uint8Array; + +/** + * A slicer as used by {@link util.pool}. + * @param start Start offset + * @param end End offset + * @returns Buffer slice + */ +type PoolSlicer = (this: Uint8Array, start: number, end: number) => Uint8Array; diff --git a/node_modules/protobufjs/index.js b/node_modules/protobufjs/index.js new file mode 100644 index 0000000..042042a --- /dev/null +++ b/node_modules/protobufjs/index.js @@ -0,0 +1,4 @@ +// full library entry point. + +"use strict"; +module.exports = require("./src/index"); diff --git a/node_modules/protobufjs/light.d.ts b/node_modules/protobufjs/light.d.ts new file mode 100644 index 0000000..d83e7f9 --- /dev/null +++ b/node_modules/protobufjs/light.d.ts @@ -0,0 +1,2 @@ +export as namespace protobuf; +export * from "./index"; diff --git a/node_modules/protobufjs/light.js b/node_modules/protobufjs/light.js new file mode 100644 index 0000000..1209e64 --- /dev/null +++ b/node_modules/protobufjs/light.js @@ -0,0 +1,4 @@ +// light library entry point. + +"use strict"; +module.exports = require("./src/index-light"); \ No newline at end of file diff --git a/node_modules/protobufjs/minimal.d.ts b/node_modules/protobufjs/minimal.d.ts new file mode 100644 index 0000000..d83e7f9 --- /dev/null +++ b/node_modules/protobufjs/minimal.d.ts @@ -0,0 +1,2 @@ +export as namespace protobuf; +export * from "./index"; diff --git a/node_modules/protobufjs/minimal.js b/node_modules/protobufjs/minimal.js new file mode 100644 index 0000000..1f35ec9 --- /dev/null +++ b/node_modules/protobufjs/minimal.js @@ -0,0 +1,4 @@ +// minimal library entry point. + +"use strict"; +module.exports = require("./src/index-minimal"); diff --git a/node_modules/protobufjs/package.json b/node_modules/protobufjs/package.json new file mode 100644 index 0000000..8a0e4cb --- /dev/null +++ b/node_modules/protobufjs/package.json @@ -0,0 +1,111 @@ +{ + "name": "protobufjs", + "version": "7.3.0", + "versionScheme": "~", + "description": "Protocol Buffers for JavaScript (& TypeScript).", + "author": "Daniel Wirtz ", + "license": "BSD-3-Clause", + "repository": "protobufjs/protobuf.js", + "bugs": "https://github.com/protobufjs/protobuf.js/issues", + "homepage": "https://protobufjs.github.io/protobuf.js/", + "engines": { + "node": ">=12.0.0" + }, + "eslintConfig": { + "env": { + "es6": true + }, + "parserOptions": { + "ecmaVersion": 6 + } + }, + "keywords": [ + "protobuf", + "protocol-buffers", + "serialization", + "typescript" + ], + "main": "index.js", + "types": "index.d.ts", + "scripts": { + "bench": "node bench", + "build": "npm run build:bundle && npm run build:types", + "build:bundle": "gulp --gulpfile scripts/gulpfile.js", + "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js", + "changelog": "node scripts/changelog -w", + "coverage": "nyc tape -r ./lib/tape-adapter tests/*.js tests/node/*.js", + "docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic", + "lint": "npm run lint:sources && npm run lint:types", + "lint:sources": "eslint \"**/*.js\" -c config/eslint.json", + "lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json", + "pages": "node scripts/pages", + "prepublish": "cd cli && npm install && cd .. && npm run build", + "postinstall": "node scripts/postinstall", + "prof": "node bench/prof", + "test": "npm run test:sources && npm run test:types", + "test:sources": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js", + "test:types": "tsc tests/comp_typescript.ts --lib es2015 --esModuleInterop --strictNullChecks --experimentalDecorators --emitDecoratorMetadata && tsc tests/data/test.js.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks && tsc tests/data/*.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks", + "make": "npm run lint:sources && npm run build && npm run lint:types && node ./scripts/gentests.js && npm test" + }, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "devDependencies": { + "benchmark": "^2.1.4", + "browserify": "^17.0.0", + "browserify-wrap": "^1.0.2", + "bundle-collapser": "^1.3.0", + "chalk": "^4.0.0", + "escodegen": "^1.13.0", + "eslint": "^8.15.0", + "espree": "^9.0.0", + "estraverse": "^5.1.0", + "gh-pages": "^4.0.0", + "git-raw-commits": "^2.0.3", + "git-semver-tags": "^4.0.0", + "google-protobuf": "^3.11.3", + "gulp": "^4.0.2", + "gulp-header": "^2.0.9", + "gulp-if": "^3.0.0", + "gulp-sourcemaps": "^3.0.0", + "gulp-uglify": "^3.0.2", + "jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc", + "jsdoc": "^4.0.0", + "minimist": "^1.2.0", + "nyc": "^15.0.0", + "reflect-metadata": "^0.1.13", + "tape": "^5.0.0", + "tslint": "^6.0.0", + "typescript": "^3.7.5", + "uglify-js": "^3.7.7", + "vinyl-buffer": "^1.0.1", + "vinyl-fs": "^3.0.3", + "vinyl-source-stream": "^2.0.0" + }, + "files": [ + "index.js", + "index.d.ts", + "light.d.ts", + "light.js", + "minimal.d.ts", + "minimal.js", + "package-lock.json", + "tsconfig.json", + "scripts/postinstall.js", + "dist/**", + "ext/**", + "google/**", + "src/**" + ] +} diff --git a/node_modules/protobufjs/scripts/postinstall.js b/node_modules/protobufjs/scripts/postinstall.js new file mode 100644 index 0000000..bf4ff45 --- /dev/null +++ b/node_modules/protobufjs/scripts/postinstall.js @@ -0,0 +1,32 @@ +"use strict"; + +var path = require("path"), + fs = require("fs"), + pkg = require(path.join(__dirname, "..", "package.json")); + +// check version scheme used by dependents +if (!pkg.versionScheme) + return; + +var warn = process.stderr.isTTY + ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m" + : "WARN " + path.basename(process.argv[1], ".js"); + +var basePkg; +try { + basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json"))); +} catch (e) { + return; +} + +[ + "dependencies", + "devDependencies", + "optionalDependencies", + "peerDependencies" +] +.forEach(function(check) { + var version = basePkg && basePkg[check] && basePkg[check][pkg.name]; + if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme) + process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n"); +}); diff --git a/node_modules/protobufjs/src/common.js b/node_modules/protobufjs/src/common.js new file mode 100644 index 0000000..489ee1c --- /dev/null +++ b/node_modules/protobufjs/src/common.js @@ -0,0 +1,399 @@ +"use strict"; +module.exports = common; + +var commonRe = /\/|\./; + +/** + * Provides common type definitions. + * Can also be used to provide additional google types or your own custom types. + * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name + * @param {Object.} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition + * @returns {undefined} + * @property {INamespace} google/protobuf/any.proto Any + * @property {INamespace} google/protobuf/duration.proto Duration + * @property {INamespace} google/protobuf/empty.proto Empty + * @property {INamespace} google/protobuf/field_mask.proto FieldMask + * @property {INamespace} google/protobuf/struct.proto Struct, Value, NullValue and ListValue + * @property {INamespace} google/protobuf/timestamp.proto Timestamp + * @property {INamespace} google/protobuf/wrappers.proto Wrappers + * @example + * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension) + * protobuf.common("descriptor", descriptorJson); + * + * // manually provides a custom definition (uses my.foo namespace) + * protobuf.common("my/foo/bar.proto", myFooBarJson); + */ +function common(name, json) { + if (!commonRe.test(name)) { + name = "google/protobuf/" + name + ".proto"; + json = { nested: { google: { nested: { protobuf: { nested: json } } } } }; + } + common[name] = json; +} + +// Not provided because of limited use (feel free to discuss or to provide yourself): +// +// google/protobuf/descriptor.proto +// google/protobuf/source_context.proto +// google/protobuf/type.proto +// +// Stripped and pre-parsed versions of these non-bundled files are instead available as part of +// the repository or package within the google/protobuf directory. + +common("any", { + + /** + * Properties of a google.protobuf.Any message. + * @interface IAny + * @type {Object} + * @property {string} [typeUrl] + * @property {Uint8Array} [bytes] + * @memberof common + */ + Any: { + fields: { + type_url: { + type: "string", + id: 1 + }, + value: { + type: "bytes", + id: 2 + } + } + } +}); + +var timeType; + +common("duration", { + + /** + * Properties of a google.protobuf.Duration message. + * @interface IDuration + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Duration: timeType = { + fields: { + seconds: { + type: "int64", + id: 1 + }, + nanos: { + type: "int32", + id: 2 + } + } + } +}); + +common("timestamp", { + + /** + * Properties of a google.protobuf.Timestamp message. + * @interface ITimestamp + * @type {Object} + * @property {number|Long} [seconds] + * @property {number} [nanos] + * @memberof common + */ + Timestamp: timeType +}); + +common("empty", { + + /** + * Properties of a google.protobuf.Empty message. + * @interface IEmpty + * @memberof common + */ + Empty: { + fields: {} + } +}); + +common("struct", { + + /** + * Properties of a google.protobuf.Struct message. + * @interface IStruct + * @type {Object} + * @property {Object.} [fields] + * @memberof common + */ + Struct: { + fields: { + fields: { + keyType: "string", + type: "Value", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Value message. + * @interface IValue + * @type {Object} + * @property {string} [kind] + * @property {0} [nullValue] + * @property {number} [numberValue] + * @property {string} [stringValue] + * @property {boolean} [boolValue] + * @property {IStruct} [structValue] + * @property {IListValue} [listValue] + * @memberof common + */ + Value: { + oneofs: { + kind: { + oneof: [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + fields: { + nullValue: { + type: "NullValue", + id: 1 + }, + numberValue: { + type: "double", + id: 2 + }, + stringValue: { + type: "string", + id: 3 + }, + boolValue: { + type: "bool", + id: 4 + }, + structValue: { + type: "Struct", + id: 5 + }, + listValue: { + type: "ListValue", + id: 6 + } + } + }, + + NullValue: { + values: { + NULL_VALUE: 0 + } + }, + + /** + * Properties of a google.protobuf.ListValue message. + * @interface IListValue + * @type {Object} + * @property {Array.} [values] + * @memberof common + */ + ListValue: { + fields: { + values: { + rule: "repeated", + type: "Value", + id: 1 + } + } + } +}); + +common("wrappers", { + + /** + * Properties of a google.protobuf.DoubleValue message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + DoubleValue: { + fields: { + value: { + type: "double", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.FloatValue message. + * @interface IFloatValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FloatValue: { + fields: { + value: { + type: "float", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int64Value message. + * @interface IInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + Int64Value: { + fields: { + value: { + type: "int64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt64Value message. + * @interface IUInt64Value + * @type {Object} + * @property {number|Long} [value] + * @memberof common + */ + UInt64Value: { + fields: { + value: { + type: "uint64", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.Int32Value message. + * @interface IInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + Int32Value: { + fields: { + value: { + type: "int32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.UInt32Value message. + * @interface IUInt32Value + * @type {Object} + * @property {number} [value] + * @memberof common + */ + UInt32Value: { + fields: { + value: { + type: "uint32", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BoolValue message. + * @interface IBoolValue + * @type {Object} + * @property {boolean} [value] + * @memberof common + */ + BoolValue: { + fields: { + value: { + type: "bool", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.StringValue message. + * @interface IStringValue + * @type {Object} + * @property {string} [value] + * @memberof common + */ + StringValue: { + fields: { + value: { + type: "string", + id: 1 + } + } + }, + + /** + * Properties of a google.protobuf.BytesValue message. + * @interface IBytesValue + * @type {Object} + * @property {Uint8Array} [value] + * @memberof common + */ + BytesValue: { + fields: { + value: { + type: "bytes", + id: 1 + } + } + } +}); + +common("field_mask", { + + /** + * Properties of a google.protobuf.FieldMask message. + * @interface IDoubleValue + * @type {Object} + * @property {number} [value] + * @memberof common + */ + FieldMask: { + fields: { + paths: { + rule: "repeated", + type: "string", + id: 1 + } + } + } +}); + +/** + * Gets the root definition of the specified common proto file. + * + * Bundled definitions are: + * - google/protobuf/any.proto + * - google/protobuf/duration.proto + * - google/protobuf/empty.proto + * - google/protobuf/field_mask.proto + * - google/protobuf/struct.proto + * - google/protobuf/timestamp.proto + * - google/protobuf/wrappers.proto + * + * @param {string} file Proto file name + * @returns {INamespace|null} Root definition or `null` if not defined + */ +common.get = function get(file) { + return common[file] || null; +}; diff --git a/node_modules/protobufjs/src/converter.js b/node_modules/protobufjs/src/converter.js new file mode 100644 index 0000000..086e003 --- /dev/null +++ b/node_modules/protobufjs/src/converter.js @@ -0,0 +1,301 @@ +"use strict"; +/** + * Runtime message from/to plain object converters. + * @namespace + */ +var converter = exports; + +var Enum = require("./enum"), + util = require("./util"); + +/** + * Generates a partial value fromObject conveter. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} prop Property reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genValuePartial_fromObject(gen, field, fieldIndex, prop) { + var defaultAlreadyEmitted = false; + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(d%s){", prop); + for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) { + // enum unknown values passthrough + if (values[keys[i]] === field.typeDefault && !defaultAlreadyEmitted) { gen + ("default:") + ("if(typeof(d%s)===\"number\"){m%s=d%s;break}", prop, prop, prop); + if (!field.repeated) gen // fallback to default value only for + // arrays, to avoid leaving holes. + ("break"); // for non-repeated fields, just ignore + defaultAlreadyEmitted = true; + } + gen + ("case%j:", keys[i]) + ("case %i:", values[keys[i]]) + ("m%s=%j", prop, values[keys[i]]) + ("break"); + } gen + ("}"); + } else gen + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop); + } else { + var isUnsigned = false; + switch (field.type) { + case "double": + case "float": gen + ("m%s=Number(d%s)", prop, prop); // also catches "NaN", "Infinity" + break; + case "uint32": + case "fixed32": gen + ("m%s=d%s>>>0", prop, prop); + break; + case "int32": + case "sint32": + case "sfixed32": gen + ("m%s=d%s|0", prop, prop); + break; + case "uint64": + isUnsigned = true; + // eslint-disable-next-line no-fallthrough + case "int64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(util.Long)") + ("(m%s=util.Long.fromValue(d%s)).unsigned=%j", prop, prop, isUnsigned) + ("else if(typeof d%s===\"string\")", prop) + ("m%s=parseInt(d%s,10)", prop, prop) + ("else if(typeof d%s===\"number\")", prop) + ("m%s=d%s", prop, prop) + ("else if(typeof d%s===\"object\")", prop) + ("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : ""); + break; + case "bytes": gen + ("if(typeof d%s===\"string\")", prop) + ("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop) + ("else if(d%s.length >= 0)", prop) + ("m%s=d%s", prop, prop); + break; + case "string": gen + ("m%s=String(d%s)", prop, prop); + break; + case "bool": gen + ("m%s=Boolean(d%s)", prop, prop); + break; + /* default: gen + ("m%s=d%s", prop, prop); + break; */ + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a plain object to runtime message converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.fromObject = function fromObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray; + var gen = util.codegen(["d"], mtype.name + "$fromObject") + ("if(d instanceof this.ctor)") + ("return d"); + if (!fields.length) return gen + ("return new this.ctor"); + gen + ("var m=new this.ctor"); + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + prop = util.safeProp(field.name); + + // Map fields + if (field.map) { gen + ("if(d%s){", prop) + ("if(typeof d%s!==\"object\")", prop) + ("throw TypeError(%j)", field.fullName + ": object expected") + ("m%s={}", prop) + ("for(var ks=Object.keys(d%s),i=0;i>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true": "", prop); + break; + case "bytes": gen + ("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop); + break; + default: gen + ("d%s=m%s", prop, prop); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} + +/** + * Generates a runtime message to plain object converter specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +converter.toObject = function toObject(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById); + if (!fields.length) + return util.codegen()("return {}"); + var gen = util.codegen(["m", "o"], mtype.name + "$toObject") + ("if(!o)") + ("o={}") + ("var d={}"); + + var repeatedFields = [], + mapFields = [], + normalFields = [], + i = 0; + for (; i < fields.length; ++i) + if (!fields[i].partOf) + ( fields[i].resolve().repeated ? repeatedFields + : fields[i].map ? mapFields + : normalFields).push(fields[i]); + + if (repeatedFields.length) { gen + ("if(o.arrays||o.defaults){"); + for (i = 0; i < repeatedFields.length; ++i) gen + ("d%s=[]", util.safeProp(repeatedFields[i].name)); + gen + ("}"); + } + + if (mapFields.length) { gen + ("if(o.objects||o.defaults){"); + for (i = 0; i < mapFields.length; ++i) gen + ("d%s={}", util.safeProp(mapFields[i].name)); + gen + ("}"); + } + + if (normalFields.length) { gen + ("if(o.defaults){"); + for (i = 0; i < normalFields.length; ++i) { + var field = normalFields[i], + prop = util.safeProp(field.name); + if (field.resolvedType instanceof Enum) gen + ("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault); + else if (field.long) gen + ("if(util.Long){") + ("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned) + ("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", prop) + ("}else") + ("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber()); + else if (field.bytes) { + var arrayDefault = "[" + Array.prototype.slice.call(field.typeDefault).join(",") + "]"; + gen + ("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault)) + ("else{") + ("d%s=%s", prop, arrayDefault) + ("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop) + ("}"); + } else gen + ("d%s=%j", prop, field.typeDefault); // also messages (=null) + } gen + ("}"); + } + var hasKs2 = false; + for (i = 0; i < fields.length; ++i) { + var field = fields[i], + index = mtype._fieldsArray.indexOf(field), + prop = util.safeProp(field.name); + if (field.map) { + if (!hasKs2) { hasKs2 = true; gen + ("var ks2"); + } gen + ("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop) + ("d%s={}", prop) + ("for(var j=0;j>>3){"); + + var i = 0; + for (; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + ref = "m" + util.safeProp(field.name); gen + ("case %i: {", field.id); + + // Map fields + if (field.map) { gen + ("if(%s===util.emptyObject)", ref) + ("%s={}", ref) + ("var c2 = r.uint32()+r.pos"); + + if (types.defaults[field.keyType] !== undefined) gen + ("k=%j", types.defaults[field.keyType]); + else gen + ("k=null"); + + if (types.defaults[type] !== undefined) gen + ("value=%j", types.defaults[type]); + else gen + ("value=null"); + + gen + ("while(r.pos>>3){") + ("case 1: k=r.%s(); break", field.keyType) + ("case 2:"); + + if (types.basic[type] === undefined) gen + ("value=types[%i].decode(r,r.uint32())", i); // can't be groups + else gen + ("value=r.%s()", type); + + gen + ("break") + ("default:") + ("r.skipType(tag2&7)") + ("break") + ("}") + ("}"); + + if (types.long[field.keyType] !== undefined) gen + ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); + else gen + ("%s[k]=value", ref); + + // Repeated fields + } else if (field.repeated) { gen + + ("if(!(%s&&%s.length))", ref, ref) + ("%s=[]", ref); + + // Packable (always check for forward and backward compatiblity) + if (types.packed[type] !== undefined) gen + ("if((t&7)===2){") + ("var c2=r.uint32()+r.pos") + ("while(r.pos>> 0, (field.id << 3 | 4) >>> 0) + : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0); +} + +/** + * Generates an encoder specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function encoder(mtype) { + /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */ + var gen = util.codegen(["m", "w"], mtype.name + "$encode") + ("if(!w)") + ("w=Writer.create()"); + + var i, ref; + + // "when a message is serialized its known fields should be written sequentially by field number" + var fields = /* initializes */ mtype.fieldsArray.slice().sort(util.compareFieldsById); + + for (var i = 0; i < fields.length; ++i) { + var field = fields[i].resolve(), + index = mtype._fieldsArray.indexOf(field), + type = field.resolvedType instanceof Enum ? "int32" : field.type, + wireType = types.basic[type]; + ref = "m" + util.safeProp(field.name); + + // Map fields + if (field.map) { + gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name) // !== undefined && !== null + ("for(var ks=Object.keys(%s),i=0;i>> 0, 8 | types.mapKey[field.keyType], field.keyType); + if (wireType === undefined) gen + ("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref); // can't be groups + else gen + (".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref); + gen + ("}") + ("}"); + + // Repeated fields + } else if (field.repeated) { gen + ("if(%s!=null&&%s.length){", ref, ref); // !== undefined && !== null + + // Packed repeated + if (field.packed && types.packed[type] !== undefined) { gen + + ("w.uint32(%i).fork()", (field.id << 3 | 2) >>> 0) + ("for(var i=0;i<%s.length;++i)", ref) + ("w.%s(%s[i])", type, ref) + ("w.ldelim()"); + + // Non-packed + } else { gen + + ("for(var i=0;i<%s.length;++i)", ref); + if (wireType === undefined) + genTypePartial(gen, field, index, ref + "[i]"); + else gen + ("w.uint32(%i).%s(%s[i])", (field.id << 3 | wireType) >>> 0, type, ref); + + } gen + ("}"); + + // Non-repeated + } else { + if (field.optional) gen + ("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", ref, field.name); // !== undefined && !== null + + if (wireType === undefined) + genTypePartial(gen, field, index, ref); + else gen + ("w.uint32(%i).%s(%s)", (field.id << 3 | wireType) >>> 0, type, ref); + + } + } + + return gen + ("return w"); + /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */ +} diff --git a/node_modules/protobufjs/src/enum.js b/node_modules/protobufjs/src/enum.js new file mode 100644 index 0000000..1c01620 --- /dev/null +++ b/node_modules/protobufjs/src/enum.js @@ -0,0 +1,198 @@ +"use strict"; +module.exports = Enum; + +// extends ReflectionObject +var ReflectionObject = require("./object"); +((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = "Enum"; + +var Namespace = require("./namespace"), + util = require("./util"); + +/** + * Constructs a new enum instance. + * @classdesc Reflected enum. + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {Object.} [values] Enum values as an object, by name + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this enum + * @param {Object.} [comments] The value comments for this enum + * @param {Object.>|undefined} [valuesOptions] The value options for this enum + */ +function Enum(name, values, options, comment, comments, valuesOptions) { + ReflectionObject.call(this, name, options); + + if (values && typeof values !== "object") + throw TypeError("values must be an object"); + + /** + * Enum values by id. + * @type {Object.} + */ + this.valuesById = {}; + + /** + * Enum values by name. + * @type {Object.} + */ + this.values = Object.create(this.valuesById); // toJSON, marker + + /** + * Enum comment text. + * @type {string|null} + */ + this.comment = comment; + + /** + * Value comment texts, if any. + * @type {Object.} + */ + this.comments = comments || {}; + + /** + * Values options, if any + * @type {Object>|undefined} + */ + this.valuesOptions = valuesOptions; + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + // Note that values inherit valuesById on their prototype which makes them a TypeScript- + // compatible enum. This is used by pbts to write actual enum definitions that work for + // static and reflection code alike instead of emitting generic object definitions. + + if (values) + for (var keys = Object.keys(values), i = 0; i < keys.length; ++i) + if (typeof values[keys[i]] === "number") // use forward entries only + this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i]; +} + +/** + * Enum descriptor. + * @interface IEnum + * @property {Object.} values Enum values + * @property {Object.} [options] Enum options + */ + +/** + * Constructs an enum from an enum descriptor. + * @param {string} name Enum name + * @param {IEnum} json Enum descriptor + * @returns {Enum} Created enum + * @throws {TypeError} If arguments are invalid + */ +Enum.fromJSON = function fromJSON(name, json) { + var enm = new Enum(name, json.values, json.options, json.comment, json.comments); + enm.reserved = json.reserved; + return enm; +}; + +/** + * Converts this enum to an enum descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IEnum} Enum descriptor + */ +Enum.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "valuesOptions" , this.valuesOptions, + "values" , this.values, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "comment" , keepComments ? this.comment : undefined, + "comments" , keepComments ? this.comments : undefined + ]); +}; + +/** + * Adds a value to this enum. + * @param {string} name Value name + * @param {number} id Value id + * @param {string} [comment] Comment, if any + * @param {Object.|undefined} [options] Options, if any + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a value with this name or id + */ +Enum.prototype.add = function add(name, id, comment, options) { + // utilized by the parser but not by .fromJSON + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (!util.isInteger(id)) + throw TypeError("id must be an integer"); + + if (this.values[name] !== undefined) + throw Error("duplicate name '" + name + "' in " + this); + + if (this.isReservedId(id)) + throw Error("id " + id + " is reserved in " + this); + + if (this.isReservedName(name)) + throw Error("name '" + name + "' is reserved in " + this); + + if (this.valuesById[id] !== undefined) { + if (!(this.options && this.options.allow_alias)) + throw Error("duplicate id " + id + " in " + this); + this.values[name] = id; + } else + this.valuesById[this.values[name] = id] = name; + + if (options) { + if (this.valuesOptions === undefined) + this.valuesOptions = {}; + this.valuesOptions[name] = options || null; + } + + this.comments[name] = comment || null; + return this; +}; + +/** + * Removes a value from this enum + * @param {string} name Value name + * @returns {Enum} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `name` is not a name of this enum + */ +Enum.prototype.remove = function remove(name) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + var val = this.values[name]; + if (val == null) + throw Error("name '" + name + "' does not exist in " + this); + + delete this.valuesById[val]; + delete this.values[name]; + delete this.comments[name]; + if (this.valuesOptions) + delete this.valuesOptions[name]; + + return this; +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Enum.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; diff --git a/node_modules/protobufjs/src/field.js b/node_modules/protobufjs/src/field.js new file mode 100644 index 0000000..e0feb8b --- /dev/null +++ b/node_modules/protobufjs/src/field.js @@ -0,0 +1,377 @@ +"use strict"; +module.exports = Field; + +// extends ReflectionObject +var ReflectionObject = require("./object"); +((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field"; + +var Enum = require("./enum"), + types = require("./types"), + util = require("./util"); + +var Type; // cyclic + +var ruleRe = /^required|optional|repeated$/; + +/** + * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class. + * @name Field + * @classdesc Reflected message field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a field from a field descriptor. + * @param {string} name Field name + * @param {IField} json Field descriptor + * @returns {Field} Created field + * @throws {TypeError} If arguments are invalid + */ +Field.fromJSON = function fromJSON(name, json) { + return new Field(name, json.id, json.type, json.rule, json.extend, json.options, json.comment); +}; + +/** + * Not an actual constructor. Use {@link Field} instead. + * @classdesc Base class of all reflected message fields. This is not an actual class but here for the sake of having consistent type definitions. + * @exports FieldBase + * @extends ReflectionObject + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} type Value type + * @param {string|Object.} [rule="optional"] Field rule + * @param {string|Object.} [extend] Extended type if different from parent + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function Field(name, id, type, rule, extend, options, comment) { + + if (util.isObject(rule)) { + comment = extend; + options = rule; + rule = extend = undefined; + } else if (util.isObject(extend)) { + comment = options; + options = extend; + extend = undefined; + } + + ReflectionObject.call(this, name, options); + + if (!util.isInteger(id) || id < 0) + throw TypeError("id must be a non-negative integer"); + + if (!util.isString(type)) + throw TypeError("type must be a string"); + + if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase())) + throw TypeError("rule must be a string rule"); + + if (extend !== undefined && !util.isString(extend)) + throw TypeError("extend must be a string"); + + /** + * Field rule, if any. + * @type {string|undefined} + */ + if (rule === "proto3_optional") { + rule = "optional"; + } + this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON + + /** + * Field type. + * @type {string} + */ + this.type = type; // toJSON + + /** + * Unique field id. + * @type {number} + */ + this.id = id; // toJSON, marker + + /** + * Extended type if different from parent. + * @type {string|undefined} + */ + this.extend = extend || undefined; // toJSON + + /** + * Whether this field is required. + * @type {boolean} + */ + this.required = rule === "required"; + + /** + * Whether this field is optional. + * @type {boolean} + */ + this.optional = !this.required; + + /** + * Whether this field is repeated. + * @type {boolean} + */ + this.repeated = rule === "repeated"; + + /** + * Whether this field is a map or not. + * @type {boolean} + */ + this.map = false; + + /** + * Message this field belongs to. + * @type {Type|null} + */ + this.message = null; + + /** + * OneOf this field belongs to, if any, + * @type {OneOf|null} + */ + this.partOf = null; + + /** + * The field type's default value. + * @type {*} + */ + this.typeDefault = null; + + /** + * The field's default value on prototypes. + * @type {*} + */ + this.defaultValue = null; + + /** + * Whether this field's value should be treated as a long. + * @type {boolean} + */ + this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false; + + /** + * Whether this field's value is a buffer. + * @type {boolean} + */ + this.bytes = type === "bytes"; + + /** + * Resolved type if not a basic type. + * @type {Type|Enum|null} + */ + this.resolvedType = null; + + /** + * Sister-field within the extended type if a declaring extension field. + * @type {Field|null} + */ + this.extensionField = null; + + /** + * Sister-field within the declaring namespace if an extended field. + * @type {Field|null} + */ + this.declaringField = null; + + /** + * Internally remembers whether this field is packed. + * @type {boolean|null} + * @private + */ + this._packed = null; + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Determines whether this field is packed. Only relevant when repeated and working with proto2. + * @name Field#packed + * @type {boolean} + * @readonly + */ +Object.defineProperty(Field.prototype, "packed", { + get: function() { + // defaults to packed=true if not explicity set to false + if (this._packed === null) + this._packed = this.getOption("packed") !== false; + return this._packed; + } +}); + +/** + * @override + */ +Field.prototype.setOption = function setOption(name, value, ifNotSet) { + if (name === "packed") // clear cached before setting + this._packed = null; + return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet); +}; + +/** + * Field descriptor. + * @interface IField + * @property {string} [rule="optional"] Field rule + * @property {string} type Field type + * @property {number} id Field id + * @property {Object.} [options] Field options + */ + +/** + * Extension field descriptor. + * @interface IExtensionField + * @extends IField + * @property {string} extend Extended type + */ + +/** + * Converts this field to a field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IField} Field descriptor + */ +Field.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "rule" , this.rule !== "optional" && this.rule || undefined, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Resolves this field's type references. + * @returns {Field} `this` + * @throws {Error} If any reference cannot be resolved + */ +Field.prototype.resolve = function resolve() { + + if (this.resolved) + return this; + + if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it + this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type); + if (this.resolvedType instanceof Type) + this.typeDefault = null; + else // instanceof Enum + this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined + } else if (this.options && this.options.proto3_optional) { + // proto3 scalar value marked optional; should default to null + this.typeDefault = null; + } + + // use explicitly set default value if present + if (this.options && this.options["default"] != null) { + this.typeDefault = this.options["default"]; + if (this.resolvedType instanceof Enum && typeof this.typeDefault === "string") + this.typeDefault = this.resolvedType.values[this.typeDefault]; + } + + // remove unnecessary options + if (this.options) { + if (this.options.packed === true || this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum)) + delete this.options.packed; + if (!Object.keys(this.options).length) + this.options = undefined; + } + + // convert to internal data type if necesssary + if (this.long) { + this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"); + + /* istanbul ignore else */ + if (Object.freeze) + Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it) + + } else if (this.bytes && typeof this.typeDefault === "string") { + var buf; + if (util.base64.test(this.typeDefault)) + util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0); + else + util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0); + this.typeDefault = buf; + } + + // take special care of maps and repeated fields + if (this.map) + this.defaultValue = util.emptyObject; + else if (this.repeated) + this.defaultValue = util.emptyArray; + else + this.defaultValue = this.typeDefault; + + // ensure proper value on prototype + if (this.parent instanceof Type) + this.parent.ctor.prototype[this.name] = this.defaultValue; + + return ReflectionObject.prototype.resolve.call(this); +}; + +/** + * Decorator function as returned by {@link Field.d} and {@link MapField.d} (TypeScript). + * @typedef FieldDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} fieldName Field name + * @returns {undefined} + */ + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"string"|"bool"|"bytes"|Object} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @param {T} [defaultValue] Default value + * @returns {FieldDecorator} Decorator function + * @template T extends number | number[] | Long | Long[] | string | string[] | boolean | boolean[] | Uint8Array | Uint8Array[] | Buffer | Buffer[] + */ +Field.d = function decorateField(fieldId, fieldType, fieldRule, defaultValue) { + + // submessage: decorate the submessage and use its name as the type + if (typeof fieldType === "function") + fieldType = util.decorateType(fieldType).name; + + // enum reference: create a reflected copy of the enum and keep reuseing it + else if (fieldType && typeof fieldType === "object") + fieldType = util.decorateEnum(fieldType).name; + + return function fieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new Field(fieldName, fieldId, fieldType, fieldRule, { "default": defaultValue })); + }; +}; + +/** + * Field decorator (TypeScript). + * @name Field.d + * @function + * @param {number} fieldId Field id + * @param {Constructor|string} fieldType Field type + * @param {"optional"|"required"|"repeated"} [fieldRule="optional"] Field rule + * @returns {FieldDecorator} Decorator function + * @template T extends Message + * @variation 2 + */ +// like Field.d but without a default value + +// Sets up cyclic dependencies (called in index-light) +Field._configure = function configure(Type_) { + Type = Type_; +}; diff --git a/node_modules/protobufjs/src/index-light.js b/node_modules/protobufjs/src/index-light.js new file mode 100644 index 0000000..32c6a05 --- /dev/null +++ b/node_modules/protobufjs/src/index-light.js @@ -0,0 +1,104 @@ +"use strict"; +var protobuf = module.exports = require("./index-minimal"); + +protobuf.build = "light"; + +/** + * A node-style callback as used by {@link load} and {@link Root#load}. + * @typedef LoadCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Root} [root] Root, if there hasn't been an error + * @returns {undefined} + */ + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @param {string|string[]} filename One or multiple files to load + * @param {Root} root Root namespace, defaults to create a new one if omitted. + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + */ +function load(filename, root, callback) { + if (typeof root === "function") { + callback = root; + root = new protobuf.Root(); + } else if (!root) + root = new protobuf.Root(); + return root.load(filename, callback); +} + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @see {@link Root#load} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise. + * @name load + * @function + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Promise} Promise + * @see {@link Root#load} + * @variation 3 + */ +// function load(filename:string, [root:Root]):Promise + +protobuf.load = load; + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only). + * @param {string|string[]} filename One or multiple files to load + * @param {Root} [root] Root namespace, defaults to create a new one if omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + * @see {@link Root#loadSync} + */ +function loadSync(filename, root) { + if (!root) + root = new protobuf.Root(); + return root.loadSync(filename); +} + +protobuf.loadSync = loadSync; + +// Serialization +protobuf.encoder = require("./encoder"); +protobuf.decoder = require("./decoder"); +protobuf.verifier = require("./verifier"); +protobuf.converter = require("./converter"); + +// Reflection +protobuf.ReflectionObject = require("./object"); +protobuf.Namespace = require("./namespace"); +protobuf.Root = require("./root"); +protobuf.Enum = require("./enum"); +protobuf.Type = require("./type"); +protobuf.Field = require("./field"); +protobuf.OneOf = require("./oneof"); +protobuf.MapField = require("./mapfield"); +protobuf.Service = require("./service"); +protobuf.Method = require("./method"); + +// Runtime +protobuf.Message = require("./message"); +protobuf.wrappers = require("./wrappers"); + +// Utility +protobuf.types = require("./types"); +protobuf.util = require("./util"); + +// Set up possibly cyclic reflection dependencies +protobuf.ReflectionObject._configure(protobuf.Root); +protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum); +protobuf.Root._configure(protobuf.Type); +protobuf.Field._configure(protobuf.Type); diff --git a/node_modules/protobufjs/src/index-minimal.js b/node_modules/protobufjs/src/index-minimal.js new file mode 100644 index 0000000..1f4aaea --- /dev/null +++ b/node_modules/protobufjs/src/index-minimal.js @@ -0,0 +1,36 @@ +"use strict"; +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = require("./writer"); +protobuf.BufferWriter = require("./writer_buffer"); +protobuf.Reader = require("./reader"); +protobuf.BufferReader = require("./reader_buffer"); + +// Utility +protobuf.util = require("./util/minimal"); +protobuf.rpc = require("./rpc"); +protobuf.roots = require("./roots"); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); diff --git a/node_modules/protobufjs/src/index.js b/node_modules/protobufjs/src/index.js new file mode 100644 index 0000000..56bd3d5 --- /dev/null +++ b/node_modules/protobufjs/src/index.js @@ -0,0 +1,12 @@ +"use strict"; +var protobuf = module.exports = require("./index-light"); + +protobuf.build = "full"; + +// Parser +protobuf.tokenize = require("./tokenize"); +protobuf.parse = require("./parse"); +protobuf.common = require("./common"); + +// Configure parser +protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common); diff --git a/node_modules/protobufjs/src/mapfield.js b/node_modules/protobufjs/src/mapfield.js new file mode 100644 index 0000000..67c7097 --- /dev/null +++ b/node_modules/protobufjs/src/mapfield.js @@ -0,0 +1,126 @@ +"use strict"; +module.exports = MapField; + +// extends Field +var Field = require("./field"); +((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = "MapField"; + +var types = require("./types"), + util = require("./util"); + +/** + * Constructs a new map field instance. + * @classdesc Reflected map field. + * @extends FieldBase + * @constructor + * @param {string} name Unique name within its namespace + * @param {number} id Unique id within its namespace + * @param {string} keyType Key type + * @param {string} type Value type + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function MapField(name, id, keyType, type, options, comment) { + Field.call(this, name, id, type, undefined, undefined, options, comment); + + /* istanbul ignore if */ + if (!util.isString(keyType)) + throw TypeError("keyType must be a string"); + + /** + * Key type. + * @type {string} + */ + this.keyType = keyType; // toJSON, marker + + /** + * Resolved key type if not a basic type. + * @type {ReflectionObject|null} + */ + this.resolvedKeyType = null; + + // Overrides Field#map + this.map = true; +} + +/** + * Map field descriptor. + * @interface IMapField + * @extends {IField} + * @property {string} keyType Key type + */ + +/** + * Extension map field descriptor. + * @interface IExtensionMapField + * @extends IMapField + * @property {string} extend Extended type + */ + +/** + * Constructs a map field from a map field descriptor. + * @param {string} name Field name + * @param {IMapField} json Map field descriptor + * @returns {MapField} Created map field + * @throws {TypeError} If arguments are invalid + */ +MapField.fromJSON = function fromJSON(name, json) { + return new MapField(name, json.id, json.keyType, json.type, json.options, json.comment); +}; + +/** + * Converts this map field to a map field descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMapField} Map field descriptor + */ +MapField.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "keyType" , this.keyType, + "type" , this.type, + "id" , this.id, + "extend" , this.extend, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +MapField.prototype.resolve = function resolve() { + if (this.resolved) + return this; + + // Besides a value type, map fields have a key type that may be "any scalar type except for floating point types and bytes" + if (types.mapKey[this.keyType] === undefined) + throw Error("invalid key type: " + this.keyType); + + return Field.prototype.resolve.call(this); +}; + +/** + * Map field decorator (TypeScript). + * @name MapField.d + * @function + * @param {number} fieldId Field id + * @param {"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"} fieldKeyType Field key type + * @param {"double"|"float"|"int32"|"uint32"|"sint32"|"fixed32"|"sfixed32"|"int64"|"uint64"|"sint64"|"fixed64"|"sfixed64"|"bool"|"string"|"bytes"|Object|Constructor<{}>} fieldValueType Field value type + * @returns {FieldDecorator} Decorator function + * @template T extends { [key: string]: number | Long | string | boolean | Uint8Array | Buffer | number[] | Message<{}> } + */ +MapField.d = function decorateMapField(fieldId, fieldKeyType, fieldValueType) { + + // submessage value: decorate the submessage and use its name as the type + if (typeof fieldValueType === "function") + fieldValueType = util.decorateType(fieldValueType).name; + + // enum reference value: create a reflected copy of the enum and keep reuseing it + else if (fieldValueType && typeof fieldValueType === "object") + fieldValueType = util.decorateEnum(fieldValueType).name; + + return function mapFieldDecorator(prototype, fieldName) { + util.decorateType(prototype.constructor) + .add(new MapField(fieldName, fieldId, fieldKeyType, fieldValueType)); + }; +}; diff --git a/node_modules/protobufjs/src/message.js b/node_modules/protobufjs/src/message.js new file mode 100644 index 0000000..3f94bf6 --- /dev/null +++ b/node_modules/protobufjs/src/message.js @@ -0,0 +1,139 @@ +"use strict"; +module.exports = Message; + +var util = require("./util/minimal"); + +/** + * Constructs a new message instance. + * @classdesc Abstract runtime message. + * @constructor + * @param {Properties} [properties] Properties to set + * @template T extends object = object + */ +function Message(properties) { + // not used internally + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + this[keys[i]] = properties[keys[i]]; +} + +/** + * Reference to the reflected type. + * @name Message.$type + * @type {Type} + * @readonly + */ + +/** + * Reference to the reflected type. + * @name Message#$type + * @type {Type} + * @readonly + */ + +/*eslint-disable valid-jsdoc*/ + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message} Message instance + * @template T extends Message + * @this Constructor + */ +Message.create = function create(properties) { + return this.$type.create(properties); +}; + +/** + * Encodes a message of this type. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encode = function encode(message, writer) { + return this.$type.encode(message, writer); +}; + +/** + * Encodes a message of this type preceeded by its length as a varint. + * @param {T|Object.} message Message to encode + * @param {Writer} [writer] Writer to use + * @returns {Writer} Writer + * @template T extends Message + * @this Constructor + */ +Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.$type.encodeDelimited(message, writer); +}; + +/** + * Decodes a message of this type. + * @name Message.decode + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decode = function decode(reader) { + return this.$type.decode(reader); +}; + +/** + * Decodes a message of this type preceeded by its length as a varint. + * @name Message.decodeDelimited + * @function + * @param {Reader|Uint8Array} reader Reader or buffer to decode + * @returns {T} Decoded message + * @template T extends Message + * @this Constructor + */ +Message.decodeDelimited = function decodeDelimited(reader) { + return this.$type.decodeDelimited(reader); +}; + +/** + * Verifies a message of this type. + * @name Message.verify + * @function + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ +Message.verify = function verify(message) { + return this.$type.verify(message); +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object + * @returns {T} Message instance + * @template T extends Message + * @this Constructor + */ +Message.fromObject = function fromObject(object) { + return this.$type.fromObject(object); +}; + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {T} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @template T extends Message + * @this Constructor + */ +Message.toObject = function toObject(message, options) { + return this.$type.toObject(message, options); +}; + +/** + * Converts this message to JSON. + * @returns {Object.} JSON object + */ +Message.prototype.toJSON = function toJSON() { + return this.$type.toObject(this, util.toJSONOptions); +}; + +/*eslint-enable valid-jsdoc*/ \ No newline at end of file diff --git a/node_modules/protobufjs/src/method.js b/node_modules/protobufjs/src/method.js new file mode 100644 index 0000000..18a6ab2 --- /dev/null +++ b/node_modules/protobufjs/src/method.js @@ -0,0 +1,160 @@ +"use strict"; +module.exports = Method; + +// extends ReflectionObject +var ReflectionObject = require("./object"); +((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method"; + +var util = require("./util"); + +/** + * Constructs a new service method instance. + * @classdesc Reflected service method. + * @extends ReflectionObject + * @constructor + * @param {string} name Method name + * @param {string|undefined} type Method type, usually `"rpc"` + * @param {string} requestType Request message type + * @param {string} responseType Response message type + * @param {boolean|Object.} [requestStream] Whether the request is streamed + * @param {boolean|Object.} [responseStream] Whether the response is streamed + * @param {Object.} [options] Declared options + * @param {string} [comment] The comment for this method + * @param {Object.} [parsedOptions] Declared options, properly parsed into an object + */ +function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) { + + /* istanbul ignore next */ + if (util.isObject(requestStream)) { + options = requestStream; + requestStream = responseStream = undefined; + } else if (util.isObject(responseStream)) { + options = responseStream; + responseStream = undefined; + } + + /* istanbul ignore if */ + if (!(type === undefined || util.isString(type))) + throw TypeError("type must be a string"); + + /* istanbul ignore if */ + if (!util.isString(requestType)) + throw TypeError("requestType must be a string"); + + /* istanbul ignore if */ + if (!util.isString(responseType)) + throw TypeError("responseType must be a string"); + + ReflectionObject.call(this, name, options); + + /** + * Method type. + * @type {string} + */ + this.type = type || "rpc"; // toJSON + + /** + * Request type. + * @type {string} + */ + this.requestType = requestType; // toJSON, marker + + /** + * Whether requests are streamed or not. + * @type {boolean|undefined} + */ + this.requestStream = requestStream ? true : undefined; // toJSON + + /** + * Response type. + * @type {string} + */ + this.responseType = responseType; // toJSON + + /** + * Whether responses are streamed or not. + * @type {boolean|undefined} + */ + this.responseStream = responseStream ? true : undefined; // toJSON + + /** + * Resolved request type. + * @type {Type|null} + */ + this.resolvedRequestType = null; + + /** + * Resolved response type. + * @type {Type|null} + */ + this.resolvedResponseType = null; + + /** + * Comment for this method + * @type {string|null} + */ + this.comment = comment; + + /** + * Options properly parsed into an object + */ + this.parsedOptions = parsedOptions; +} + +/** + * Method descriptor. + * @interface IMethod + * @property {string} [type="rpc"] Method type + * @property {string} requestType Request type + * @property {string} responseType Response type + * @property {boolean} [requestStream=false] Whether requests are streamed + * @property {boolean} [responseStream=false] Whether responses are streamed + * @property {Object.} [options] Method options + * @property {string} comment Method comments + * @property {Object.} [parsedOptions] Method options properly parsed into an object + */ + +/** + * Constructs a method from a method descriptor. + * @param {string} name Method name + * @param {IMethod} json Method descriptor + * @returns {Method} Created method + * @throws {TypeError} If arguments are invalid + */ +Method.fromJSON = function fromJSON(name, json) { + return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options, json.comment, json.parsedOptions); +}; + +/** + * Converts this method to a method descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IMethod} Method descriptor + */ +Method.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "type" , this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined, + "requestType" , this.requestType, + "requestStream" , this.requestStream, + "responseType" , this.responseType, + "responseStream" , this.responseStream, + "options" , this.options, + "comment" , keepComments ? this.comment : undefined, + "parsedOptions" , this.parsedOptions, + ]); +}; + +/** + * @override + */ +Method.prototype.resolve = function resolve() { + + /* istanbul ignore if */ + if (this.resolved) + return this; + + this.resolvedRequestType = this.parent.lookupType(this.requestType); + this.resolvedResponseType = this.parent.lookupType(this.responseType); + + return ReflectionObject.prototype.resolve.call(this); +}; diff --git a/node_modules/protobufjs/src/namespace.js b/node_modules/protobufjs/src/namespace.js new file mode 100644 index 0000000..731afc7 --- /dev/null +++ b/node_modules/protobufjs/src/namespace.js @@ -0,0 +1,433 @@ +"use strict"; +module.exports = Namespace; + +// extends ReflectionObject +var ReflectionObject = require("./object"); +((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace"; + +var Field = require("./field"), + util = require("./util"), + OneOf = require("./oneof"); + +var Type, // cyclic + Service, + Enum; + +/** + * Constructs a new namespace instance. + * @name Namespace + * @classdesc Reflected namespace. + * @extends NamespaceBase + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + */ + +/** + * Constructs a namespace from JSON. + * @memberof Namespace + * @function + * @param {string} name Namespace name + * @param {Object.} json JSON object + * @returns {Namespace} Created namespace + * @throws {TypeError} If arguments are invalid + */ +Namespace.fromJSON = function fromJSON(name, json) { + return new Namespace(name, json.options).addJSON(json.nested); +}; + +/** + * Converts an array of reflection objects to JSON. + * @memberof Namespace + * @param {ReflectionObject[]} array Object array + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {Object.|undefined} JSON object or `undefined` when array is empty + */ +function arrayToJSON(array, toJSONOptions) { + if (!(array && array.length)) + return undefined; + var obj = {}; + for (var i = 0; i < array.length; ++i) + obj[array[i].name] = array[i].toJSON(toJSONOptions); + return obj; +} + +Namespace.arrayToJSON = arrayToJSON; + +/** + * Tests if the specified id is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedId = function isReservedId(reserved, id) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (typeof reserved[i] !== "string" && reserved[i][0] <= id && reserved[i][1] > id) + return true; + return false; +}; + +/** + * Tests if the specified name is reserved. + * @param {Array.|undefined} reserved Array of reserved ranges and names + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Namespace.isReservedName = function isReservedName(reserved, name) { + if (reserved) + for (var i = 0; i < reserved.length; ++i) + if (reserved[i] === name) + return true; + return false; +}; + +/** + * Not an actual constructor. Use {@link Namespace} instead. + * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions. + * @exports NamespaceBase + * @extends ReflectionObject + * @abstract + * @constructor + * @param {string} name Namespace name + * @param {Object.} [options] Declared options + * @see {@link Namespace} + */ +function Namespace(name, options) { + ReflectionObject.call(this, name, options); + + /** + * Nested objects by name. + * @type {Object.|undefined} + */ + this.nested = undefined; // toJSON + + /** + * Cached nested objects as an array. + * @type {ReflectionObject[]|null} + * @private + */ + this._nestedArray = null; +} + +function clearCache(namespace) { + namespace._nestedArray = null; + return namespace; +} + +/** + * Nested objects of this namespace as an array for iteration. + * @name NamespaceBase#nestedArray + * @type {ReflectionObject[]} + * @readonly + */ +Object.defineProperty(Namespace.prototype, "nestedArray", { + get: function() { + return this._nestedArray || (this._nestedArray = util.toArray(this.nested)); + } +}); + +/** + * Namespace descriptor. + * @interface INamespace + * @property {Object.} [options] Namespace options + * @property {Object.} [nested] Nested object descriptors + */ + +/** + * Any extension field descriptor. + * @typedef AnyExtensionField + * @type {IExtensionField|IExtensionMapField} + */ + +/** + * Any nested object descriptor. + * @typedef AnyNestedObject + * @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf} + */ + +/** + * Converts this namespace to a namespace descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {INamespace} Namespace descriptor + */ +Namespace.prototype.toJSON = function toJSON(toJSONOptions) { + return util.toObject([ + "options" , this.options, + "nested" , arrayToJSON(this.nestedArray, toJSONOptions) + ]); +}; + +/** + * Adds nested objects to this namespace from nested object descriptors. + * @param {Object.} nestedJson Any nested object descriptors + * @returns {Namespace} `this` + */ +Namespace.prototype.addJSON = function addJSON(nestedJson) { + var ns = this; + /* istanbul ignore else */ + if (nestedJson) { + for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) { + nested = nestedJson[names[i]]; + ns.add( // most to least likely + ( nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : nested.id !== undefined + ? Field.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + } + return this; +}; + +/** + * Gets the nested object of the specified name. + * @param {string} name Nested object name + * @returns {ReflectionObject|null} The reflection object or `null` if it doesn't exist + */ +Namespace.prototype.get = function get(name) { + return this.nested && this.nested[name] + || null; +}; + +/** + * Gets the values of the nested {@link Enum|enum} of the specified name. + * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`. + * @param {string} name Nested enum name + * @returns {Object.} Enum values + * @throws {Error} If there is no such enum + */ +Namespace.prototype.getEnum = function getEnum(name) { + if (this.nested && this.nested[name] instanceof Enum) + return this.nested[name].values; + throw Error("no such enum: " + name); +}; + +/** + * Adds a nested object to this namespace. + * @param {ReflectionObject} object Nested object to add + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name + */ +Namespace.prototype.add = function add(object) { + + if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace)) + throw TypeError("object must be a valid nested object"); + + if (!this.nested) + this.nested = {}; + else { + var prev = this.get(object.name); + if (prev) { + if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) { + // replace plain namespace but keep existing nested elements and options + var nested = prev.nestedArray; + for (var i = 0; i < nested.length; ++i) + object.add(nested[i]); + this.remove(prev); + if (!this.nested) + this.nested = {}; + object.setOptions(prev.options, true); + + } else + throw Error("duplicate name '" + object.name + "' in " + this); + } + } + this.nested[object.name] = object; + object.onAdd(this); + return clearCache(this); +}; + +/** + * Removes a nested object from this namespace. + * @param {ReflectionObject} object Nested object to remove + * @returns {Namespace} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this namespace + */ +Namespace.prototype.remove = function remove(object) { + + if (!(object instanceof ReflectionObject)) + throw TypeError("object must be a ReflectionObject"); + if (object.parent !== this) + throw Error(object + " is not a member of " + this); + + delete this.nested[object.name]; + if (!Object.keys(this.nested).length) + this.nested = undefined; + + object.onRemove(this); + return clearCache(this); +}; + +/** + * Defines additial namespaces within this one if not yet existing. + * @param {string|string[]} path Path to create + * @param {*} [json] Nested types to create from JSON + * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty + */ +Namespace.prototype.define = function define(path, json) { + + if (util.isString(path)) + path = path.split("."); + else if (!Array.isArray(path)) + throw TypeError("illegal path"); + if (path && path.length && path[0] === "") + throw Error("path must be relative"); + + var ptr = this; + while (path.length > 0) { + var part = path.shift(); + if (ptr.nested && ptr.nested[part]) { + ptr = ptr.nested[part]; + if (!(ptr instanceof Namespace)) + throw Error("path conflicts with non-namespace objects"); + } else + ptr.add(ptr = new Namespace(part)); + } + if (json) + ptr.addJSON(json); + return ptr; +}; + +/** + * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. + * @returns {Namespace} `this` + */ +Namespace.prototype.resolveAll = function resolveAll() { + var nested = this.nestedArray, i = 0; + while (i < nested.length) + if (nested[i] instanceof Namespace) + nested[i++].resolveAll(); + else + nested[i++].resolve(); + return this.resolve(); +}; + +/** + * Recursively looks up the reflection object matching the specified path in the scope of this namespace. + * @param {string|string[]} path Path to look up + * @param {*|Array.<*>} filterTypes Filter types, any combination of the constructors of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc. + * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + */ +Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) { + + /* istanbul ignore next */ + if (typeof filterTypes === "boolean") { + parentAlreadyChecked = filterTypes; + filterTypes = undefined; + } else if (filterTypes && !Array.isArray(filterTypes)) + filterTypes = [ filterTypes ]; + + if (util.isString(path) && path.length) { + if (path === ".") + return this.root; + path = path.split("."); + } else if (!path.length) + return this; + + // Start at root if path is absolute + if (path[0] === "") + return this.root.lookup(path.slice(1), filterTypes); + + // Test if the first part matches any nested object, and if so, traverse if path contains more + var found = this.get(path[0]); + if (found) { + if (path.length === 1) { + if (!filterTypes || filterTypes.indexOf(found.constructor) > -1) + return found; + } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true))) + return found; + + // Otherwise try each nested namespace + } else + for (var i = 0; i < this.nestedArray.length; ++i) + if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true))) + return found; + + // If there hasn't been a match, try again at the parent + if (this.parent === null || parentAlreadyChecked) + return null; + return this.parent.lookup(path, filterTypes); +}; + +/** + * Looks up the reflection object at the specified path, relative to this namespace. + * @name NamespaceBase#lookup + * @function + * @param {string|string[]} path Path to look up + * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked + * @returns {ReflectionObject|null} Looked up object or `null` if none could be found + * @variation 2 + */ +// lookup(path: string, [parentAlreadyChecked: boolean]) + +/** + * Looks up the {@link Type|type} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type + * @throws {Error} If `path` does not point to a type + */ +Namespace.prototype.lookupType = function lookupType(path) { + var found = this.lookup(path, [ Type ]); + if (!found) + throw Error("no such type: " + path); + return found; +}; + +/** + * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Enum} Looked up enum + * @throws {Error} If `path` does not point to an enum + */ +Namespace.prototype.lookupEnum = function lookupEnum(path) { + var found = this.lookup(path, [ Enum ]); + if (!found) + throw Error("no such Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Type|type} or {@link Enum|enum} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Type} Looked up type or enum + * @throws {Error} If `path` does not point to a type or enum + */ +Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) { + var found = this.lookup(path, [ Type, Enum ]); + if (!found) + throw Error("no such Type or Enum '" + path + "' in " + this); + return found; +}; + +/** + * Looks up the {@link Service|service} at the specified path, relative to this namespace. + * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`. + * @param {string|string[]} path Path to look up + * @returns {Service} Looked up service + * @throws {Error} If `path` does not point to a service + */ +Namespace.prototype.lookupService = function lookupService(path) { + var found = this.lookup(path, [ Service ]); + if (!found) + throw Error("no such Service '" + path + "' in " + this); + return found; +}; + +// Sets up cyclic dependencies (called in index-light) +Namespace._configure = function(Type_, Service_, Enum_) { + Type = Type_; + Service = Service_; + Enum = Enum_; +}; diff --git a/node_modules/protobufjs/src/object.js b/node_modules/protobufjs/src/object.js new file mode 100644 index 0000000..bd04cec --- /dev/null +++ b/node_modules/protobufjs/src/object.js @@ -0,0 +1,243 @@ +"use strict"; +module.exports = ReflectionObject; + +ReflectionObject.className = "ReflectionObject"; + +var util = require("./util"); + +var Root; // cyclic + +/** + * Constructs a new reflection object instance. + * @classdesc Base class of all reflection objects. + * @constructor + * @param {string} name Object name + * @param {Object.} [options] Declared options + * @abstract + */ +function ReflectionObject(name, options) { + + if (!util.isString(name)) + throw TypeError("name must be a string"); + + if (options && !util.isObject(options)) + throw TypeError("options must be an object"); + + /** + * Options. + * @type {Object.|undefined} + */ + this.options = options; // toJSON + + /** + * Parsed Options. + * @type {Array.>|undefined} + */ + this.parsedOptions = null; + + /** + * Unique name within its namespace. + * @type {string} + */ + this.name = name; + + /** + * Parent namespace. + * @type {Namespace|null} + */ + this.parent = null; + + /** + * Whether already resolved or not. + * @type {boolean} + */ + this.resolved = false; + + /** + * Comment text, if any. + * @type {string|null} + */ + this.comment = null; + + /** + * Defining file name. + * @type {string|null} + */ + this.filename = null; +} + +Object.defineProperties(ReflectionObject.prototype, { + + /** + * Reference to the root namespace. + * @name ReflectionObject#root + * @type {Root} + * @readonly + */ + root: { + get: function() { + var ptr = this; + while (ptr.parent !== null) + ptr = ptr.parent; + return ptr; + } + }, + + /** + * Full name including leading dot. + * @name ReflectionObject#fullName + * @type {string} + * @readonly + */ + fullName: { + get: function() { + var path = [ this.name ], + ptr = this.parent; + while (ptr) { + path.unshift(ptr.name); + ptr = ptr.parent; + } + return path.join("."); + } + } +}); + +/** + * Converts this reflection object to its descriptor representation. + * @returns {Object.} Descriptor + * @abstract + */ +ReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() { + throw Error(); // not implemented, shouldn't happen +}; + +/** + * Called when this object is added to a parent. + * @param {ReflectionObject} parent Parent added to + * @returns {undefined} + */ +ReflectionObject.prototype.onAdd = function onAdd(parent) { + if (this.parent && this.parent !== parent) + this.parent.remove(this); + this.parent = parent; + this.resolved = false; + var root = parent.root; + if (root instanceof Root) + root._handleAdd(this); +}; + +/** + * Called when this object is removed from a parent. + * @param {ReflectionObject} parent Parent removed from + * @returns {undefined} + */ +ReflectionObject.prototype.onRemove = function onRemove(parent) { + var root = parent.root; + if (root instanceof Root) + root._handleRemove(this); + this.parent = null; + this.resolved = false; +}; + +/** + * Resolves this objects type references. + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.resolve = function resolve() { + if (this.resolved) + return this; + if (this.root instanceof Root) + this.resolved = true; // only if part of a root + return this; +}; + +/** + * Gets an option value. + * @param {string} name Option name + * @returns {*} Option value or `undefined` if not set + */ +ReflectionObject.prototype.getOption = function getOption(name) { + if (this.options) + return this.options[name]; + return undefined; +}; + +/** + * Sets an option. + * @param {string} name Option name + * @param {*} value Option value + * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) { + if (!ifNotSet || !this.options || this.options[name] === undefined) + (this.options || (this.options = {}))[name] = value; + return this; +}; + +/** + * Sets a parsed option. + * @param {string} name parsed Option name + * @param {*} value Option value + * @param {string} propName dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setParsedOption = function setParsedOption(name, value, propName) { + if (!this.parsedOptions) { + this.parsedOptions = []; + } + var parsedOptions = this.parsedOptions; + if (propName) { + // If setting a sub property of an option then try to merge it + // with an existing option + var opt = parsedOptions.find(function (opt) { + return Object.prototype.hasOwnProperty.call(opt, name); + }); + if (opt) { + // If we found an existing option - just merge the property value + var newValue = opt[name]; + util.setProperty(newValue, propName, value); + } else { + // otherwise, create a new option, set it's property and add it to the list + opt = {}; + opt[name] = util.setProperty({}, propName, value); + parsedOptions.push(opt); + } + } else { + // Always create a new option when setting the value of the option itself + var newOpt = {}; + newOpt[name] = value; + parsedOptions.push(newOpt); + } + return this; +}; + +/** + * Sets multiple options. + * @param {Object.} options Options to set + * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set + * @returns {ReflectionObject} `this` + */ +ReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) { + if (options) + for (var keys = Object.keys(options), i = 0; i < keys.length; ++i) + this.setOption(keys[i], options[keys[i]], ifNotSet); + return this; +}; + +/** + * Converts this instance to its string representation. + * @returns {string} Class name[, space, full name] + */ +ReflectionObject.prototype.toString = function toString() { + var className = this.constructor.className, + fullName = this.fullName; + if (fullName.length) + return className + " " + fullName; + return className; +}; + +// Sets up cyclic dependencies (called in index-light) +ReflectionObject._configure = function(Root_) { + Root = Root_; +}; diff --git a/node_modules/protobufjs/src/oneof.js b/node_modules/protobufjs/src/oneof.js new file mode 100644 index 0000000..ba0e902 --- /dev/null +++ b/node_modules/protobufjs/src/oneof.js @@ -0,0 +1,203 @@ +"use strict"; +module.exports = OneOf; + +// extends ReflectionObject +var ReflectionObject = require("./object"); +((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf"; + +var Field = require("./field"), + util = require("./util"); + +/** + * Constructs a new oneof instance. + * @classdesc Reflected oneof. + * @extends ReflectionObject + * @constructor + * @param {string} name Oneof name + * @param {string[]|Object.} [fieldNames] Field names + * @param {Object.} [options] Declared options + * @param {string} [comment] Comment associated with this field + */ +function OneOf(name, fieldNames, options, comment) { + if (!Array.isArray(fieldNames)) { + options = fieldNames; + fieldNames = undefined; + } + ReflectionObject.call(this, name, options); + + /* istanbul ignore if */ + if (!(fieldNames === undefined || Array.isArray(fieldNames))) + throw TypeError("fieldNames must be an Array"); + + /** + * Field names that belong to this oneof. + * @type {string[]} + */ + this.oneof = fieldNames || []; // toJSON, marker + + /** + * Fields that belong to this oneof as an array for iteration. + * @type {Field[]} + * @readonly + */ + this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent + + /** + * Comment for this field. + * @type {string|null} + */ + this.comment = comment; +} + +/** + * Oneof descriptor. + * @interface IOneOf + * @property {Array.} oneof Oneof field names + * @property {Object.} [options] Oneof options + */ + +/** + * Constructs a oneof from a oneof descriptor. + * @param {string} name Oneof name + * @param {IOneOf} json Oneof descriptor + * @returns {OneOf} Created oneof + * @throws {TypeError} If arguments are invalid + */ +OneOf.fromJSON = function fromJSON(name, json) { + return new OneOf(name, json.oneof, json.options, json.comment); +}; + +/** + * Converts this oneof to a oneof descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IOneOf} Oneof descriptor + */ +OneOf.prototype.toJSON = function toJSON(toJSONOptions) { + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , this.options, + "oneof" , this.oneof, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Adds the fields of the specified oneof to the parent if not already done so. + * @param {OneOf} oneof The oneof + * @returns {undefined} + * @inner + * @ignore + */ +function addFieldsToParent(oneof) { + if (oneof.parent) + for (var i = 0; i < oneof.fieldsArray.length; ++i) + if (!oneof.fieldsArray[i].parent) + oneof.parent.add(oneof.fieldsArray[i]); +} + +/** + * Adds a field to this oneof and removes it from its current parent, if any. + * @param {Field} field Field to add + * @returns {OneOf} `this` + */ +OneOf.prototype.add = function add(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + if (field.parent && field.parent !== this.parent) + field.parent.remove(field); + this.oneof.push(field.name); + this.fieldsArray.push(field); + field.partOf = this; // field.parent remains null + addFieldsToParent(this); + return this; +}; + +/** + * Removes a field from this oneof and puts it back to the oneof's parent. + * @param {Field} field Field to remove + * @returns {OneOf} `this` + */ +OneOf.prototype.remove = function remove(field) { + + /* istanbul ignore if */ + if (!(field instanceof Field)) + throw TypeError("field must be a Field"); + + var index = this.fieldsArray.indexOf(field); + + /* istanbul ignore if */ + if (index < 0) + throw Error(field + " is not a member of " + this); + + this.fieldsArray.splice(index, 1); + index = this.oneof.indexOf(field.name); + + /* istanbul ignore else */ + if (index > -1) // theoretical + this.oneof.splice(index, 1); + + field.partOf = null; + return this; +}; + +/** + * @override + */ +OneOf.prototype.onAdd = function onAdd(parent) { + ReflectionObject.prototype.onAdd.call(this, parent); + var self = this; + // Collect present fields + for (var i = 0; i < this.oneof.length; ++i) { + var field = parent.get(this.oneof[i]); + if (field && !field.partOf) { + field.partOf = self; + self.fieldsArray.push(field); + } + } + // Add not yet present fields + addFieldsToParent(this); +}; + +/** + * @override + */ +OneOf.prototype.onRemove = function onRemove(parent) { + for (var i = 0, field; i < this.fieldsArray.length; ++i) + if ((field = this.fieldsArray[i]).parent) + field.parent.remove(field); + ReflectionObject.prototype.onRemove.call(this, parent); +}; + +/** + * Decorator function as returned by {@link OneOf.d} (TypeScript). + * @typedef OneOfDecorator + * @type {function} + * @param {Object} prototype Target prototype + * @param {string} oneofName OneOf name + * @returns {undefined} + */ + +/** + * OneOf decorator (TypeScript). + * @function + * @param {...string} fieldNames Field names + * @returns {OneOfDecorator} Decorator function + * @template T extends string + */ +OneOf.d = function decorateOneOf() { + var fieldNames = new Array(arguments.length), + index = 0; + while (index < arguments.length) + fieldNames[index] = arguments[index++]; + return function oneOfDecorator(prototype, oneofName) { + util.decorateType(prototype.constructor) + .add(new OneOf(oneofName, fieldNames)); + Object.defineProperty(prototype, oneofName, { + get: util.oneOfGetter(fieldNames), + set: util.oneOfSetter(fieldNames) + }); + }; +}; diff --git a/node_modules/protobufjs/src/parse.js b/node_modules/protobufjs/src/parse.js new file mode 100644 index 0000000..f5f070e --- /dev/null +++ b/node_modules/protobufjs/src/parse.js @@ -0,0 +1,889 @@ +"use strict"; +module.exports = parse; + +parse.filename = null; +parse.defaults = { keepCase: false }; + +var tokenize = require("./tokenize"), + Root = require("./root"), + Type = require("./type"), + Field = require("./field"), + MapField = require("./mapfield"), + OneOf = require("./oneof"), + Enum = require("./enum"), + Service = require("./service"), + Method = require("./method"), + types = require("./types"), + util = require("./util"); + +var base10Re = /^[1-9][0-9]*$/, + base10NegRe = /^-?[1-9][0-9]*$/, + base16Re = /^0[x][0-9a-fA-F]+$/, + base16NegRe = /^-?0[x][0-9a-fA-F]+$/, + base8Re = /^0[0-7]+$/, + base8NegRe = /^-?0[0-7]+$/, + numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, + nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/, + typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, + fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/; + +/** + * Result object returned from {@link parse}. + * @interface IParserResult + * @property {string|undefined} package Package name, if declared + * @property {string[]|undefined} imports Imports, if any + * @property {string[]|undefined} weakImports Weak imports, if any + * @property {string|undefined} syntax Syntax, if specified (either `"proto2"` or `"proto3"`) + * @property {Root} root Populated root instance + */ + +/** + * Options modifying the behavior of {@link parse}. + * @interface IParseOptions + * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case + * @property {boolean} [alternateCommentMode=false] Recognize double-slash comments in addition to doc-block comments. + * @property {boolean} [preferTrailingComment=false] Use trailing comment when both leading comment and trailing comment exist. + */ + +/** + * Options modifying the behavior of JSON serialization. + * @interface IToJSONOptions + * @property {boolean} [keepComments=false] Serializes comments. + */ + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @param {string} source Source contents + * @param {Root} root Root to populate + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + */ +function parse(source, root, options) { + /* eslint-disable callback-return */ + if (!(root instanceof Root)) { + options = root; + root = new Root(); + } + if (!options) + options = parse.defaults; + + var preferTrailingComment = options.preferTrailingComment || false; + var tn = tokenize(source, options.alternateCommentMode || false), + next = tn.next, + push = tn.push, + peek = tn.peek, + skip = tn.skip, + cmnt = tn.cmnt; + + var head = true, + pkg, + imports, + weakImports, + syntax, + isProto3 = false; + + var ptr = root; + + var applyCase = options.keepCase ? function(name) { return name; } : util.camelCase; + + /* istanbul ignore next */ + function illegal(token, name, insideTryCatch) { + var filename = parse.filename; + if (!insideTryCatch) + parse.filename = null; + return Error("illegal " + (name || "token") + " '" + token + "' (" + (filename ? filename + ", " : "") + "line " + tn.line + ")"); + } + + function readString() { + var values = [], + token; + do { + /* istanbul ignore if */ + if ((token = next()) !== "\"" && token !== "'") + throw illegal(token); + + values.push(next()); + skip(token); + token = peek(); + } while (token === "\"" || token === "'"); + return values.join(""); + } + + function readValue(acceptTypeRef) { + var token = next(); + switch (token) { + case "'": + case "\"": + push(token); + return readString(); + case "true": case "TRUE": + return true; + case "false": case "FALSE": + return false; + } + try { + return parseNumber(token, /* insideTryCatch */ true); + } catch (e) { + + /* istanbul ignore else */ + if (acceptTypeRef && typeRefRe.test(token)) + return token; + + /* istanbul ignore next */ + throw illegal(token, "value"); + } + } + + function readRanges(target, acceptStrings) { + var token, start; + do { + if (acceptStrings && ((token = peek()) === "\"" || token === "'")) + target.push(readString()); + else + target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]); + } while (skip(",", true)); + var dummy = {options: undefined}; + dummy.setOption = function(name, value) { + if (this.options === undefined) this.options = {}; + this.options[name] = value; + }; + ifBlock( + dummy, + function parseRange_block(token) { + /* istanbul ignore else */ + if (token === "option") { + parseOption(dummy, token); // skip + skip(";"); + } else + throw illegal(token); + }, + function parseRange_line() { + parseInlineOptions(dummy); // skip + }); + } + + function parseNumber(token, insideTryCatch) { + var sign = 1; + if (token.charAt(0) === "-") { + sign = -1; + token = token.substring(1); + } + switch (token) { + case "inf": case "INF": case "Inf": + return sign * Infinity; + case "nan": case "NAN": case "Nan": case "NaN": + return NaN; + case "0": + return 0; + } + if (base10Re.test(token)) + return sign * parseInt(token, 10); + if (base16Re.test(token)) + return sign * parseInt(token, 16); + if (base8Re.test(token)) + return sign * parseInt(token, 8); + + /* istanbul ignore else */ + if (numberRe.test(token)) + return sign * parseFloat(token); + + /* istanbul ignore next */ + throw illegal(token, "number", insideTryCatch); + } + + function parseId(token, acceptNegative) { + switch (token) { + case "max": case "MAX": case "Max": + return 536870911; + case "0": + return 0; + } + + /* istanbul ignore if */ + if (!acceptNegative && token.charAt(0) === "-") + throw illegal(token, "id"); + + if (base10NegRe.test(token)) + return parseInt(token, 10); + if (base16NegRe.test(token)) + return parseInt(token, 16); + + /* istanbul ignore else */ + if (base8NegRe.test(token)) + return parseInt(token, 8); + + /* istanbul ignore next */ + throw illegal(token, "id"); + } + + function parsePackage() { + + /* istanbul ignore if */ + if (pkg !== undefined) + throw illegal("package"); + + pkg = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(pkg)) + throw illegal(pkg, "name"); + + ptr = ptr.define(pkg); + skip(";"); + } + + function parseImport() { + var token = peek(); + var whichImports; + switch (token) { + case "weak": + whichImports = weakImports || (weakImports = []); + next(); + break; + case "public": + next(); + // eslint-disable-next-line no-fallthrough + default: + whichImports = imports || (imports = []); + break; + } + token = readString(); + skip(";"); + whichImports.push(token); + } + + function parseSyntax() { + skip("="); + syntax = readString(); + isProto3 = syntax === "proto3"; + + /* istanbul ignore if */ + if (!isProto3 && syntax !== "proto2") + throw illegal(syntax, "syntax"); + + skip(";"); + } + + function parseCommon(parent, token) { + switch (token) { + + case "option": + parseOption(parent, token); + skip(";"); + return true; + + case "message": + parseType(parent, token); + return true; + + case "enum": + parseEnum(parent, token); + return true; + + case "service": + parseService(parent, token); + return true; + + case "extend": + parseExtension(parent, token); + return true; + } + return false; + } + + function ifBlock(obj, fnIf, fnElse) { + var trailingLine = tn.line; + if (obj) { + if(typeof obj.comment !== "string") { + obj.comment = cmnt(); // try block-type comment + } + obj.filename = parse.filename; + } + if (skip("{", true)) { + var token; + while ((token = next()) !== "}") + fnIf(token); + skip(";", true); + } else { + if (fnElse) + fnElse(); + skip(";"); + if (obj && (typeof obj.comment !== "string" || preferTrailingComment)) + obj.comment = cmnt(trailingLine) || obj.comment; // try line-type comment + } + } + + function parseType(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "type name"); + + var type = new Type(token); + ifBlock(type, function parseType_block(token) { + if (parseCommon(type, token)) + return; + + switch (token) { + + case "map": + parseMapField(type, token); + break; + + case "required": + case "repeated": + parseField(type, token); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(type, "proto3_optional"); + } else { + parseField(type, "optional"); + } + break; + + case "oneof": + parseOneOf(type, token); + break; + + case "extensions": + readRanges(type.extensions || (type.extensions = [])); + break; + + case "reserved": + readRanges(type.reserved || (type.reserved = []), true); + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + + push(token); + parseField(type, "optional"); + break; + } + }); + parent.add(type); + } + + function parseField(parent, rule, extend) { + var type = next(); + if (type === "group") { + parseGroup(parent, rule); + return; + } + // Type names can consume multiple tokens, in multiple variants: + // package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field" + // package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field" + // package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field" + // package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field" + // Keep reading tokens until we get a type name with no period at the end, + // and the next token does not start with a period. + while (type.endsWith(".") || peek().startsWith(".")) { + type += next(); + } + + /* istanbul ignore if */ + if (!typeRefRe.test(type)) + throw illegal(type, "type"); + + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + name = applyCase(name); + skip("="); + + var field = new Field(name, parseId(next()), type, rule, extend); + ifBlock(field, function parseField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseField_line() { + parseInlineOptions(field); + }); + + if (rule === "proto3_optional") { + // for proto3 optional fields, we create a single-member Oneof to mimic "optional" behavior + var oneof = new OneOf("_" + name); + field.setOption("proto3_optional", true); + oneof.add(field); + parent.add(oneof); + } else { + parent.add(field); + } + + // JSON defaults to packed=true if not set so we have to set packed=false explicity when + // parsing proto2 descriptors without the option, where applicable. This must be done for + // all known packable types and anything that could be an enum (= is not a basic type). + if (!isProto3 && field.repeated && (types.packed[type] !== undefined || types.basic[type] === undefined)) + field.setOption("packed", false, /* ifNotSet */ true); + } + + function parseGroup(parent, rule) { + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + var fieldName = util.lcFirst(name); + if (name === fieldName) + name = util.ucFirst(name); + skip("="); + var id = parseId(next()); + var type = new Type(name); + type.group = true; + var field = new Field(fieldName, id, name, rule); + field.filename = parse.filename; + ifBlock(type, function parseGroup_block(token) { + switch (token) { + + case "option": + parseOption(type, token); + skip(";"); + break; + + case "required": + case "repeated": + parseField(type, token); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(type, "proto3_optional"); + } else { + parseField(type, "optional"); + } + break; + + case "message": + parseType(type, token); + break; + + case "enum": + parseEnum(type, token); + break; + + /* istanbul ignore next */ + default: + throw illegal(token); // there are no groups with proto3 semantics + } + }); + parent.add(type) + .add(field); + } + + function parseMapField(parent) { + skip("<"); + var keyType = next(); + + /* istanbul ignore if */ + if (types.mapKey[keyType] === undefined) + throw illegal(keyType, "type"); + + skip(","); + var valueType = next(); + + /* istanbul ignore if */ + if (!typeRefRe.test(valueType)) + throw illegal(valueType, "type"); + + skip(">"); + var name = next(); + + /* istanbul ignore if */ + if (!nameRe.test(name)) + throw illegal(name, "name"); + + skip("="); + var field = new MapField(applyCase(name), parseId(next()), keyType, valueType); + ifBlock(field, function parseMapField_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(field, token); + skip(";"); + } else + throw illegal(token); + + }, function parseMapField_line() { + parseInlineOptions(field); + }); + parent.add(field); + } + + function parseOneOf(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var oneof = new OneOf(applyCase(token)); + ifBlock(oneof, function parseOneOf_block(token) { + if (token === "option") { + parseOption(oneof, token); + skip(";"); + } else { + push(token); + parseField(oneof, "optional"); + } + }); + parent.add(oneof); + } + + function parseEnum(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var enm = new Enum(token); + ifBlock(enm, function parseEnum_block(token) { + switch(token) { + case "option": + parseOption(enm, token); + skip(";"); + break; + + case "reserved": + readRanges(enm.reserved || (enm.reserved = []), true); + break; + + default: + parseEnumValue(enm, token); + } + }); + parent.add(enm); + } + + function parseEnumValue(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token)) + throw illegal(token, "name"); + + skip("="); + var value = parseId(next(), true), + dummy = { + options: undefined + }; + dummy.setOption = function(name, value) { + if (this.options === undefined) + this.options = {}; + this.options[name] = value; + }; + ifBlock(dummy, function parseEnumValue_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(dummy, token); // skip + skip(";"); + } else + throw illegal(token); + + }, function parseEnumValue_line() { + parseInlineOptions(dummy); // skip + }); + parent.add(token, value, dummy.comment, dummy.options); + } + + function parseOption(parent, token) { + var isCustom = skip("(", true); + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "name"); + + var name = token; + var option = name; + var propName; + + if (isCustom) { + skip(")"); + name = "(" + name + ")"; + option = name; + token = peek(); + if (fqTypeRefRe.test(token)) { + propName = token.slice(1); //remove '.' before property name + name += token; + next(); + } + } + skip("="); + var optionValue = parseOptionValue(parent, name); + setParsedOption(parent, option, optionValue, propName); + } + + function parseOptionValue(parent, name) { + // { a: "foo" b { c: "bar" } } + if (skip("{", true)) { + var objectResult = {}; + + while (!skip("}", true)) { + /* istanbul ignore if */ + if (!nameRe.test(token = next())) { + throw illegal(token, "name"); + } + if (token === null) { + throw illegal(token, "end of input"); + } + + var value; + var propName = token; + + skip(":", true); + + if (peek() === "{") + value = parseOptionValue(parent, name + "." + token); + else if (peek() === "[") { + // option (my_option) = { + // repeated_value: [ "foo", "bar" ] + // }; + value = []; + var lastValue; + if (skip("[", true)) { + do { + lastValue = readValue(true); + value.push(lastValue); + } while (skip(",", true)); + skip("]"); + if (typeof lastValue !== "undefined") { + setOption(parent, name + "." + token, lastValue); + } + } + } else { + value = readValue(true); + setOption(parent, name + "." + token, value); + } + + var prevValue = objectResult[propName]; + + if (prevValue) + value = [].concat(prevValue).concat(value); + + objectResult[propName] = value; + + // Semicolons and commas can be optional + skip(",", true); + skip(";", true); + } + + return objectResult; + } + + var simpleValue = readValue(true); + setOption(parent, name, simpleValue); + return simpleValue; + // Does not enforce a delimiter to be universal + } + + function setOption(parent, name, value) { + if (parent.setOption) + parent.setOption(name, value); + } + + function setParsedOption(parent, name, value, propName) { + if (parent.setParsedOption) + parent.setParsedOption(name, value, propName); + } + + function parseInlineOptions(parent) { + if (skip("[", true)) { + do { + parseOption(parent, "option"); + } while (skip(",", true)); + skip("]"); + } + return parent; + } + + function parseService(parent, token) { + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "service name"); + + var service = new Service(token); + ifBlock(service, function parseService_block(token) { + if (parseCommon(service, token)) + return; + + /* istanbul ignore else */ + if (token === "rpc") + parseMethod(service, token); + else + throw illegal(token); + }); + parent.add(service); + } + + function parseMethod(parent, token) { + // Get the comment of the preceding line now (if one exists) in case the + // method is defined across multiple lines. + var commentText = cmnt(); + + var type = token; + + /* istanbul ignore if */ + if (!nameRe.test(token = next())) + throw illegal(token, "name"); + + var name = token, + requestType, requestStream, + responseType, responseStream; + + skip("("); + if (skip("stream", true)) + requestStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + requestType = token; + skip(")"); skip("returns"); skip("("); + if (skip("stream", true)) + responseStream = true; + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token); + + responseType = token; + skip(")"); + + var method = new Method(name, type, requestType, responseType, requestStream, responseStream); + method.comment = commentText; + ifBlock(method, function parseMethod_block(token) { + + /* istanbul ignore else */ + if (token === "option") { + parseOption(method, token); + skip(";"); + } else + throw illegal(token); + + }); + parent.add(method); + } + + function parseExtension(parent, token) { + + /* istanbul ignore if */ + if (!typeRefRe.test(token = next())) + throw illegal(token, "reference"); + + var reference = token; + ifBlock(null, function parseExtension_block(token) { + switch (token) { + + case "required": + case "repeated": + parseField(parent, token, reference); + break; + + case "optional": + /* istanbul ignore if */ + if (isProto3) { + parseField(parent, "proto3_optional", reference); + } else { + parseField(parent, "optional", reference); + } + break; + + default: + /* istanbul ignore if */ + if (!isProto3 || !typeRefRe.test(token)) + throw illegal(token); + push(token); + parseField(parent, "optional", reference); + break; + } + }); + } + + var token; + while ((token = next()) !== null) { + switch (token) { + + case "package": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parsePackage(); + break; + + case "import": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseImport(); + break; + + case "syntax": + + /* istanbul ignore if */ + if (!head) + throw illegal(token); + + parseSyntax(); + break; + + case "option": + + parseOption(ptr, token); + skip(";"); + break; + + default: + + /* istanbul ignore else */ + if (parseCommon(ptr, token)) { + head = false; + continue; + } + + /* istanbul ignore next */ + throw illegal(token); + } + } + + parse.filename = null; + return { + "package" : pkg, + "imports" : imports, + weakImports : weakImports, + syntax : syntax, + root : root + }; +} + +/** + * Parses the given .proto source and returns an object with the parsed contents. + * @name parse + * @function + * @param {string} source Source contents + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {IParserResult} Parser result + * @property {string} filename=null Currently processing file name for error reporting, if known + * @property {IParseOptions} defaults Default {@link IParseOptions} + * @variation 2 + */ diff --git a/node_modules/protobufjs/src/reader.js b/node_modules/protobufjs/src/reader.js new file mode 100644 index 0000000..b4fbf29 --- /dev/null +++ b/node_modules/protobufjs/src/reader.js @@ -0,0 +1,416 @@ +"use strict"; +module.exports = Reader; + +var util = require("./util/minimal"); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; diff --git a/node_modules/protobufjs/src/reader_buffer.js b/node_modules/protobufjs/src/reader_buffer.js new file mode 100644 index 0000000..e547424 --- /dev/null +++ b/node_modules/protobufjs/src/reader_buffer.js @@ -0,0 +1,51 @@ +"use strict"; +module.exports = BufferReader; + +// extends Reader +var Reader = require("./reader"); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = require("./util/minimal"); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); diff --git a/node_modules/protobufjs/src/root.js b/node_modules/protobufjs/src/root.js new file mode 100644 index 0000000..2776f96 --- /dev/null +++ b/node_modules/protobufjs/src/root.js @@ -0,0 +1,368 @@ +"use strict"; +module.exports = Root; + +// extends Namespace +var Namespace = require("./namespace"); +((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = "Root"; + +var Field = require("./field"), + Enum = require("./enum"), + OneOf = require("./oneof"), + util = require("./util"); + +var Type, // cyclic + parse, // might be excluded + common; // " + +/** + * Constructs a new root namespace instance. + * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together. + * @extends NamespaceBase + * @constructor + * @param {Object.} [options] Top level options + */ +function Root(options) { + Namespace.call(this, "", options); + + /** + * Deferred extension fields. + * @type {Field[]} + */ + this.deferred = []; + + /** + * Resolved file names of loaded files. + * @type {string[]} + */ + this.files = []; +} + +/** + * Loads a namespace descriptor into a root namespace. + * @param {INamespace} json Nameespace descriptor + * @param {Root} [root] Root namespace, defaults to create a new one if omitted + * @returns {Root} Root namespace + */ +Root.fromJSON = function fromJSON(json, root) { + if (!root) + root = new Root(); + if (json.options) + root.setOptions(json.options); + return root.addJSON(json.nested); +}; + +/** + * Resolves the path of an imported file, relative to the importing origin. + * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories. + * @function + * @param {string} origin The file name of the importing file + * @param {string} target The file name being imported + * @returns {string|null} Resolved path to `target` or `null` to skip the file + */ +Root.prototype.resolvePath = util.path.resolve; + +/** + * Fetch content from file path or url + * This method exists so you can override it with your own logic. + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.fetch = util.fetch; + +// A symbol-like function to safely signal synchronous loading +/* istanbul ignore next */ +function SYNC() {} // eslint-disable-line no-empty-function + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} options Parse options + * @param {LoadCallback} callback Callback function + * @returns {undefined} + */ +Root.prototype.load = function load(filename, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + var self = this; + if (!callback) + return util.asPromise(load, self, filename, options); + + var sync = callback === SYNC; // undocumented + + // Finishes loading by calling the callback (exactly once) + function finish(err, root) { + /* istanbul ignore if */ + if (!callback) + return; + if (sync) + throw err; + var cb = callback; + callback = null; + cb(err, root); + } + + // Bundled definition existence checking + function getBundledFileName(filename) { + var idx = filename.lastIndexOf("google/protobuf/"); + if (idx > -1) { + var altname = filename.substring(idx); + if (altname in common) return altname; + } + return null; + } + + // Processes a single file + function process(filename, source) { + try { + if (util.isString(source) && source.charAt(0) === "{") + source = JSON.parse(source); + if (!util.isString(source)) + self.setOptions(source.options).addJSON(source.nested); + else { + parse.filename = filename; + var parsed = parse(source, self, options), + resolved, + i = 0; + if (parsed.imports) + for (; i < parsed.imports.length; ++i) + if (resolved = getBundledFileName(parsed.imports[i]) || self.resolvePath(filename, parsed.imports[i])) + fetch(resolved); + if (parsed.weakImports) + for (i = 0; i < parsed.weakImports.length; ++i) + if (resolved = getBundledFileName(parsed.weakImports[i]) || self.resolvePath(filename, parsed.weakImports[i])) + fetch(resolved, true); + } + } catch (err) { + finish(err); + } + if (!sync && !queued) + finish(null, self); // only once anyway + } + + // Fetches a single file + function fetch(filename, weak) { + filename = getBundledFileName(filename) || filename; + + // Skip if already loaded / attempted + if (self.files.indexOf(filename) > -1) + return; + self.files.push(filename); + + // Shortcut bundled definitions + if (filename in common) { + if (sync) + process(filename, common[filename]); + else { + ++queued; + setTimeout(function() { + --queued; + process(filename, common[filename]); + }); + } + return; + } + + // Otherwise fetch from disk or network + if (sync) { + var source; + try { + source = util.fs.readFileSync(filename).toString("utf8"); + } catch (err) { + if (!weak) + finish(err); + return; + } + process(filename, source); + } else { + ++queued; + self.fetch(filename, function(err, source) { + --queued; + /* istanbul ignore if */ + if (!callback) + return; // terminated meanwhile + if (err) { + /* istanbul ignore else */ + if (!weak) + finish(err); + else if (!queued) // can't be covered reliably + finish(null, self); + return; + } + process(filename, source); + }); + } + } + var queued = 0; + + // Assembling the root namespace doesn't require working type + // references anymore, so we can load everything in parallel + if (util.isString(filename)) + filename = [ filename ]; + for (var i = 0, resolved; i < filename.length; ++i) + if (resolved = self.resolvePath("", filename[i])) + fetch(resolved); + + if (sync) + return self; + if (!queued) + finish(null, self); + return undefined; +}; +// function load(filename:string, options:IParseOptions, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {LoadCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ +// function load(filename:string, callback:LoadCallback):undefined + +/** + * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. + * @function Root#load + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Promise} Promise + * @variation 3 + */ +// function load(filename:string, [options:IParseOptions]):Promise + +/** + * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). + * @function Root#loadSync + * @param {string|string[]} filename Names of one or multiple files to load + * @param {IParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted. + * @returns {Root} Root namespace + * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid + */ +Root.prototype.loadSync = function loadSync(filename, options) { + if (!util.isNode) + throw Error("not supported"); + return this.load(filename, options, SYNC); +}; + +/** + * @override + */ +Root.prototype.resolveAll = function resolveAll() { + if (this.deferred.length) + throw Error("unresolvable extensions: " + this.deferred.map(function(field) { + return "'extend " + field.extend + "' in " + field.parent.fullName; + }).join(", ")); + return Namespace.prototype.resolveAll.call(this); +}; + +// only uppercased (and thus conflict-free) children are exposed, see below +var exposeRe = /^[A-Z]/; + +/** + * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type. + * @param {Root} root Root instance + * @param {Field} field Declaring extension field witin the declaring type + * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise + * @inner + * @ignore + */ +function tryHandleExtension(root, field) { + var extendedType = field.parent.lookup(field.extend); + if (extendedType) { + var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options); + //do not allow to extend same field twice to prevent the error + if (extendedType.get(sisterField.name)) { + return true; + } + sisterField.declaringField = field; + field.extensionField = sisterField; + extendedType.add(sisterField); + return true; + } + return false; +} + +/** + * Called when any object is added to this root or its sub-namespaces. + * @param {ReflectionObject} object Object added + * @returns {undefined} + * @private + */ +Root.prototype._handleAdd = function _handleAdd(object) { + if (object instanceof Field) { + + if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField) + if (!tryHandleExtension(this, object)) + this.deferred.push(object); + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + object.parent[object.name] = object.values; // expose enum values as property of its parent + + } else if (!(object instanceof OneOf)) /* everything else is a namespace */ { + + if (object instanceof Type) // Try to handle any deferred extensions + for (var i = 0; i < this.deferred.length;) + if (tryHandleExtension(this, this.deferred[i])) + this.deferred.splice(i, 1); + else + ++i; + for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace + this._handleAdd(object._nestedArray[j]); + if (exposeRe.test(object.name)) + object.parent[object.name] = object; // expose namespace as property of its parent + } + + // The above also adds uppercased (and thus conflict-free) nested types, services and enums as + // properties of namespaces just like static code does. This allows using a .d.ts generated for + // a static module with reflection-based solutions where the condition is met. +}; + +/** + * Called when any object is removed from this root or its sub-namespaces. + * @param {ReflectionObject} object Object removed + * @returns {undefined} + * @private + */ +Root.prototype._handleRemove = function _handleRemove(object) { + if (object instanceof Field) { + + if (/* an extension field */ object.extend !== undefined) { + if (/* already handled */ object.extensionField) { // remove its sister field + object.extensionField.parent.remove(object.extensionField); + object.extensionField = null; + } else { // cancel the extension + var index = this.deferred.indexOf(object); + /* istanbul ignore else */ + if (index > -1) + this.deferred.splice(index, 1); + } + } + + } else if (object instanceof Enum) { + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose enum values + + } else if (object instanceof Namespace) { + + for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace + this._handleRemove(object._nestedArray[i]); + + if (exposeRe.test(object.name)) + delete object.parent[object.name]; // unexpose namespaces + + } +}; + +// Sets up cyclic dependencies (called in index-light) +Root._configure = function(Type_, parse_, common_) { + Type = Type_; + parse = parse_; + common = common_; +}; diff --git a/node_modules/protobufjs/src/roots.js b/node_modules/protobufjs/src/roots.js new file mode 100644 index 0000000..1d93086 --- /dev/null +++ b/node_modules/protobufjs/src/roots.js @@ -0,0 +1,18 @@ +"use strict"; +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ diff --git a/node_modules/protobufjs/src/rpc.js b/node_modules/protobufjs/src/rpc.js new file mode 100644 index 0000000..894e5c7 --- /dev/null +++ b/node_modules/protobufjs/src/rpc.js @@ -0,0 +1,36 @@ +"use strict"; + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = require("./rpc/service"); diff --git a/node_modules/protobufjs/src/rpc/service.js b/node_modules/protobufjs/src/rpc/service.js new file mode 100644 index 0000000..757f382 --- /dev/null +++ b/node_modules/protobufjs/src/rpc/service.js @@ -0,0 +1,142 @@ +"use strict"; +module.exports = Service; + +var util = require("../util/minimal"); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; diff --git a/node_modules/protobufjs/src/service.js b/node_modules/protobufjs/src/service.js new file mode 100644 index 0000000..bc2c308 --- /dev/null +++ b/node_modules/protobufjs/src/service.js @@ -0,0 +1,167 @@ +"use strict"; +module.exports = Service; + +// extends Namespace +var Namespace = require("./namespace"); +((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = "Service"; + +var Method = require("./method"), + util = require("./util"), + rpc = require("./rpc"); + +/** + * Constructs a new service instance. + * @classdesc Reflected service. + * @extends NamespaceBase + * @constructor + * @param {string} name Service name + * @param {Object.} [options] Service options + * @throws {TypeError} If arguments are invalid + */ +function Service(name, options) { + Namespace.call(this, name, options); + + /** + * Service methods. + * @type {Object.} + */ + this.methods = {}; // toJSON, marker + + /** + * Cached methods as an array. + * @type {Method[]|null} + * @private + */ + this._methodsArray = null; +} + +/** + * Service descriptor. + * @interface IService + * @extends INamespace + * @property {Object.} methods Method descriptors + */ + +/** + * Constructs a service from a service descriptor. + * @param {string} name Service name + * @param {IService} json Service descriptor + * @returns {Service} Created service + * @throws {TypeError} If arguments are invalid + */ +Service.fromJSON = function fromJSON(name, json) { + var service = new Service(name, json.options); + /* istanbul ignore else */ + if (json.methods) + for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i) + service.add(Method.fromJSON(names[i], json.methods[names[i]])); + if (json.nested) + service.addJSON(json.nested); + service.comment = json.comment; + return service; +}; + +/** + * Converts this service to a service descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IService} Service descriptor + */ +Service.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "methods" , Namespace.arrayToJSON(this.methodsArray, toJSONOptions) || /* istanbul ignore next */ {}, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * Methods of this service as an array for iteration. + * @name Service#methodsArray + * @type {Method[]} + * @readonly + */ +Object.defineProperty(Service.prototype, "methodsArray", { + get: function() { + return this._methodsArray || (this._methodsArray = util.toArray(this.methods)); + } +}); + +function clearCache(service) { + service._methodsArray = null; + return service; +} + +/** + * @override + */ +Service.prototype.get = function get(name) { + return this.methods[name] + || Namespace.prototype.get.call(this, name); +}; + +/** + * @override + */ +Service.prototype.resolveAll = function resolveAll() { + var methods = this.methodsArray; + for (var i = 0; i < methods.length; ++i) + methods[i].resolve(); + return Namespace.prototype.resolve.call(this); +}; + +/** + * @override + */ +Service.prototype.add = function add(object) { + + /* istanbul ignore if */ + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Method) { + this.methods[object.name] = object; + object.parent = this; + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * @override + */ +Service.prototype.remove = function remove(object) { + if (object instanceof Method) { + + /* istanbul ignore if */ + if (this.methods[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.methods[object.name]; + object.parent = null; + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Creates a runtime service using the specified rpc implementation. + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. + */ +Service.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) { + var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited); + for (var i = 0, method; i < /* initializes */ this.methodsArray.length; ++i) { + var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, ""); + rpcService[methodName] = util.codegen(["r","c"], util.isReserved(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({ + m: method, + q: method.resolvedRequestType.ctor, + s: method.resolvedResponseType.ctor + }); + } + return rpcService; +}; diff --git a/node_modules/protobufjs/src/tokenize.js b/node_modules/protobufjs/src/tokenize.js new file mode 100644 index 0000000..f107bea --- /dev/null +++ b/node_modules/protobufjs/src/tokenize.js @@ -0,0 +1,416 @@ +"use strict"; +module.exports = tokenize; + +var delimRe = /[\s{}=;:[\],'"()<>]/g, + stringDoubleRe = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, + stringSingleRe = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g; + +var setCommentRe = /^ *[*/]+ */, + setCommentAltRe = /^\s*\*?\/*/, + setCommentSplitRe = /\n/g, + whitespaceRe = /\s/, + unescapeRe = /\\(.?)/g; + +var unescapeMap = { + "0": "\0", + "r": "\r", + "n": "\n", + "t": "\t" +}; + +/** + * Unescapes a string. + * @param {string} str String to unescape + * @returns {string} Unescaped string + * @property {Object.} map Special characters map + * @memberof tokenize + */ +function unescape(str) { + return str.replace(unescapeRe, function($0, $1) { + switch ($1) { + case "\\": + case "": + return $1; + default: + return unescapeMap[$1] || ""; + } + }); +} + +tokenize.unescape = unescape; + +/** + * Gets the next token and advances. + * @typedef TokenizerHandleNext + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Peeks for the next token. + * @typedef TokenizerHandlePeek + * @type {function} + * @returns {string|null} Next token or `null` on eof + */ + +/** + * Pushes a token back to the stack. + * @typedef TokenizerHandlePush + * @type {function} + * @param {string} token Token + * @returns {undefined} + */ + +/** + * Skips the next token. + * @typedef TokenizerHandleSkip + * @type {function} + * @param {string} expected Expected token + * @param {boolean} [optional=false] If optional + * @returns {boolean} Whether the token matched + * @throws {Error} If the token didn't match and is not optional + */ + +/** + * Gets the comment on the previous line or, alternatively, the line comment on the specified line. + * @typedef TokenizerHandleCmnt + * @type {function} + * @param {number} [line] Line number + * @returns {string|null} Comment text or `null` if none + */ + +/** + * Handle object returned from {@link tokenize}. + * @interface ITokenizerHandle + * @property {TokenizerHandleNext} next Gets the next token and advances (`null` on eof) + * @property {TokenizerHandlePeek} peek Peeks for the next token (`null` on eof) + * @property {TokenizerHandlePush} push Pushes a token back to the stack + * @property {TokenizerHandleSkip} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws + * @property {TokenizerHandleCmnt} cmnt Gets the comment on the previous line or the line comment on the specified line, if any + * @property {number} line Current line number + */ + +/** + * Tokenizes the given .proto source and returns an object with useful utility functions. + * @param {string} source Source contents + * @param {boolean} alternateCommentMode Whether we should activate alternate comment parsing mode. + * @returns {ITokenizerHandle} Tokenizer handle + */ +function tokenize(source, alternateCommentMode) { + /* eslint-disable callback-return */ + source = source.toString(); + + var offset = 0, + length = source.length, + line = 1, + lastCommentLine = 0, + comments = {}; + + var stack = []; + + var stringDelim = null; + + /* istanbul ignore next */ + /** + * Creates an error for illegal syntax. + * @param {string} subject Subject + * @returns {Error} Error created + * @inner + */ + function illegal(subject) { + return Error("illegal " + subject + " (line " + line + ")"); + } + + /** + * Reads a string till its end. + * @returns {string} String read + * @inner + */ + function readString() { + var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe; + re.lastIndex = offset - 1; + var match = re.exec(source); + if (!match) + throw illegal("string"); + offset = re.lastIndex; + push(stringDelim); + stringDelim = null; + return unescape(match[1]); + } + + /** + * Gets the character at `pos` within the source. + * @param {number} pos Position + * @returns {string} Character + * @inner + */ + function charAt(pos) { + return source.charAt(pos); + } + + /** + * Sets the current comment text. + * @param {number} start Start offset + * @param {number} end End offset + * @param {boolean} isLeading set if a leading comment + * @returns {undefined} + * @inner + */ + function setComment(start, end, isLeading) { + var comment = { + type: source.charAt(start++), + lineEmpty: false, + leading: isLeading, + }; + var lookback; + if (alternateCommentMode) { + lookback = 2; // alternate comment parsing: "//" or "/*" + } else { + lookback = 3; // "///" or "/**" + } + var commentOffset = start - lookback, + c; + do { + if (--commentOffset < 0 || + (c = source.charAt(commentOffset)) === "\n") { + comment.lineEmpty = true; + break; + } + } while (c === " " || c === "\t"); + var lines = source + .substring(start, end) + .split(setCommentSplitRe); + for (var i = 0; i < lines.length; ++i) + lines[i] = lines[i] + .replace(alternateCommentMode ? setCommentAltRe : setCommentRe, "") + .trim(); + comment.text = lines + .join("\n") + .trim(); + + comments[line] = comment; + lastCommentLine = line; + } + + function isDoubleSlashCommentLine(startOffset) { + var endOffset = findEndOfLine(startOffset); + + // see if remaining line matches comment pattern + var lineText = source.substring(startOffset, endOffset); + var isComment = /^\s*\/\//.test(lineText); + return isComment; + } + + function findEndOfLine(cursor) { + // find end of cursor's line + var endOffset = cursor; + while (endOffset < length && charAt(endOffset) !== "\n") { + endOffset++; + } + return endOffset; + } + + /** + * Obtains the next token. + * @returns {string|null} Next token or `null` on eof + * @inner + */ + function next() { + if (stack.length > 0) + return stack.shift(); + if (stringDelim) + return readString(); + var repeat, + prev, + curr, + start, + isDoc, + isLeadingComment = offset === 0; + do { + if (offset === length) + return null; + repeat = false; + while (whitespaceRe.test(curr = charAt(offset))) { + if (curr === "\n") { + isLeadingComment = true; + ++line; + } + if (++offset === length) + return null; + } + + if (charAt(offset) === "/") { + if (++offset === length) { + throw illegal("comment"); + } + if (charAt(offset) === "/") { // Line + if (!alternateCommentMode) { + // check for triple-slash comment + isDoc = charAt(start = offset + 1) === "/"; + + while (charAt(++offset) !== "\n") { + if (offset === length) { + return null; + } + } + ++offset; + if (isDoc) { + setComment(start, offset - 1, isLeadingComment); + // Trailing comment cannot not be multi-line, + // so leading comment state should be reset to handle potential next comments + isLeadingComment = true; + } + ++line; + repeat = true; + } else { + // check for double-slash comments, consolidating consecutive lines + start = offset; + isDoc = false; + if (isDoubleSlashCommentLine(offset - 1)) { + isDoc = true; + do { + offset = findEndOfLine(offset); + if (offset === length) { + break; + } + offset++; + if (!isLeadingComment) { + // Trailing comment cannot not be multi-line + break; + } + } while (isDoubleSlashCommentLine(offset)); + } else { + offset = Math.min(length, findEndOfLine(offset) + 1); + } + if (isDoc) { + setComment(start, offset, isLeadingComment); + isLeadingComment = true; + } + line++; + repeat = true; + } + } else if ((curr = charAt(offset)) === "*") { /* Block */ + // check for /** (regular comment mode) or /* (alternate comment mode) + start = offset + 1; + isDoc = alternateCommentMode || charAt(start) === "*"; + do { + if (curr === "\n") { + ++line; + } + if (++offset === length) { + throw illegal("comment"); + } + prev = curr; + curr = charAt(offset); + } while (prev !== "*" || curr !== "/"); + ++offset; + if (isDoc) { + setComment(start, offset - 2, isLeadingComment); + isLeadingComment = true; + } + repeat = true; + } else { + return "/"; + } + } + } while (repeat); + + // offset !== length if we got here + + var end = offset; + delimRe.lastIndex = 0; + var delim = delimRe.test(charAt(end++)); + if (!delim) + while (end < length && !delimRe.test(charAt(end))) + ++end; + var token = source.substring(offset, offset = end); + if (token === "\"" || token === "'") + stringDelim = token; + return token; + } + + /** + * Pushes a token back to the stack. + * @param {string} token Token + * @returns {undefined} + * @inner + */ + function push(token) { + stack.push(token); + } + + /** + * Peeks for the next token. + * @returns {string|null} Token or `null` on eof + * @inner + */ + function peek() { + if (!stack.length) { + var token = next(); + if (token === null) + return null; + push(token); + } + return stack[0]; + } + + /** + * Skips a token. + * @param {string} expected Expected token + * @param {boolean} [optional=false] Whether the token is optional + * @returns {boolean} `true` when skipped, `false` if not + * @throws {Error} When a required token is not present + * @inner + */ + function skip(expected, optional) { + var actual = peek(), + equals = actual === expected; + if (equals) { + next(); + return true; + } + if (!optional) + throw illegal("token '" + actual + "', '" + expected + "' expected"); + return false; + } + + /** + * Gets a comment. + * @param {number} [trailingLine] Line number if looking for a trailing comment + * @returns {string|null} Comment text + * @inner + */ + function cmnt(trailingLine) { + var ret = null; + var comment; + if (trailingLine === undefined) { + comment = comments[line - 1]; + delete comments[line - 1]; + if (comment && (alternateCommentMode || comment.type === "*" || comment.lineEmpty)) { + ret = comment.leading ? comment.text : null; + } + } else { + /* istanbul ignore else */ + if (lastCommentLine < trailingLine) { + peek(); + } + comment = comments[trailingLine]; + delete comments[trailingLine]; + if (comment && !comment.lineEmpty && (alternateCommentMode || comment.type === "/")) { + ret = comment.leading ? null : comment.text; + } + } + return ret; + } + + return Object.defineProperty({ + next: next, + peek: peek, + push: push, + skip: skip, + cmnt: cmnt + }, "line", { + get: function() { return line; } + }); + /* eslint-enable callback-return */ +} diff --git a/node_modules/protobufjs/src/type.js b/node_modules/protobufjs/src/type.js new file mode 100644 index 0000000..2e7bda4 --- /dev/null +++ b/node_modules/protobufjs/src/type.js @@ -0,0 +1,589 @@ +"use strict"; +module.exports = Type; + +// extends Namespace +var Namespace = require("./namespace"); +((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = "Type"; + +var Enum = require("./enum"), + OneOf = require("./oneof"), + Field = require("./field"), + MapField = require("./mapfield"), + Service = require("./service"), + Message = require("./message"), + Reader = require("./reader"), + Writer = require("./writer"), + util = require("./util"), + encoder = require("./encoder"), + decoder = require("./decoder"), + verifier = require("./verifier"), + converter = require("./converter"), + wrappers = require("./wrappers"); + +/** + * Constructs a new reflected message type instance. + * @classdesc Reflected message type. + * @extends NamespaceBase + * @constructor + * @param {string} name Message name + * @param {Object.} [options] Declared options + */ +function Type(name, options) { + Namespace.call(this, name, options); + + /** + * Message fields. + * @type {Object.} + */ + this.fields = {}; // toJSON, marker + + /** + * Oneofs declared within this namespace, if any. + * @type {Object.} + */ + this.oneofs = undefined; // toJSON + + /** + * Extension ranges, if any. + * @type {number[][]} + */ + this.extensions = undefined; // toJSON + + /** + * Reserved ranges, if any. + * @type {Array.} + */ + this.reserved = undefined; // toJSON + + /*? + * Whether this type is a legacy group. + * @type {boolean|undefined} + */ + this.group = undefined; // toJSON + + /** + * Cached fields by id. + * @type {Object.|null} + * @private + */ + this._fieldsById = null; + + /** + * Cached fields as an array. + * @type {Field[]|null} + * @private + */ + this._fieldsArray = null; + + /** + * Cached oneofs as an array. + * @type {OneOf[]|null} + * @private + */ + this._oneofsArray = null; + + /** + * Cached constructor. + * @type {Constructor<{}>} + * @private + */ + this._ctor = null; +} + +Object.defineProperties(Type.prototype, { + + /** + * Message fields by id. + * @name Type#fieldsById + * @type {Object.} + * @readonly + */ + fieldsById: { + get: function() { + + /* istanbul ignore if */ + if (this._fieldsById) + return this._fieldsById; + + this._fieldsById = {}; + for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) { + var field = this.fields[names[i]], + id = field.id; + + /* istanbul ignore if */ + if (this._fieldsById[id]) + throw Error("duplicate id " + id + " in " + this); + + this._fieldsById[id] = field; + } + return this._fieldsById; + } + }, + + /** + * Fields of this message as an array for iteration. + * @name Type#fieldsArray + * @type {Field[]} + * @readonly + */ + fieldsArray: { + get: function() { + return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields)); + } + }, + + /** + * Oneofs of this message as an array for iteration. + * @name Type#oneofsArray + * @type {OneOf[]} + * @readonly + */ + oneofsArray: { + get: function() { + return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs)); + } + }, + + /** + * The registered constructor, if any registered, otherwise a generic constructor. + * Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor. + * @name Type#ctor + * @type {Constructor<{}>} + */ + ctor: { + get: function() { + return this._ctor || (this.ctor = Type.generateConstructor(this)()); + }, + set: function(ctor) { + + // Ensure proper prototype + var prototype = ctor.prototype; + if (!(prototype instanceof Message)) { + (ctor.prototype = new Message()).constructor = ctor; + util.merge(ctor.prototype, prototype); + } + + // Classes and messages reference their reflected type + ctor.$type = ctor.prototype.$type = this; + + // Mix in static methods + util.merge(ctor, Message, true); + + this._ctor = ctor; + + // Messages have non-enumerable default values on their prototype + var i = 0; + for (; i < /* initializes */ this.fieldsArray.length; ++i) + this._fieldsArray[i].resolve(); // ensures a proper value + + // Messages have non-enumerable getters and setters for each virtual oneof field + var ctorProperties = {}; + for (i = 0; i < /* initializes */ this.oneofsArray.length; ++i) + ctorProperties[this._oneofsArray[i].resolve().name] = { + get: util.oneOfGetter(this._oneofsArray[i].oneof), + set: util.oneOfSetter(this._oneofsArray[i].oneof) + }; + if (i) + Object.defineProperties(ctor.prototype, ctorProperties); + } + } +}); + +/** + * Generates a constructor function for the specified type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +Type.generateConstructor = function generateConstructor(mtype) { + /* eslint-disable no-unexpected-multiline */ + var gen = util.codegen(["p"], mtype.name); + // explicitly initialize mutable object/array fields so that these aren't just inherited from the prototype + for (var i = 0, field; i < mtype.fieldsArray.length; ++i) + if ((field = mtype._fieldsArray[i]).map) gen + ("this%s={}", util.safeProp(field.name)); + else if (field.repeated) gen + ("this%s=[]", util.safeProp(field.name)); + return gen + ("if(p)for(var ks=Object.keys(p),i=0;i} [oneofs] Oneof descriptors + * @property {Object.} fields Field descriptors + * @property {number[][]} [extensions] Extension ranges + * @property {number[][]} [reserved] Reserved ranges + * @property {boolean} [group=false] Whether a legacy group or not + */ + +/** + * Creates a message type from a message type descriptor. + * @param {string} name Message name + * @param {IType} json Message type descriptor + * @returns {Type} Created message type + */ +Type.fromJSON = function fromJSON(name, json) { + var type = new Type(name, json.options); + type.extensions = json.extensions; + type.reserved = json.reserved; + var names = Object.keys(json.fields), + i = 0; + for (; i < names.length; ++i) + type.add( + ( typeof json.fields[names[i]].keyType !== "undefined" + ? MapField.fromJSON + : Field.fromJSON )(names[i], json.fields[names[i]]) + ); + if (json.oneofs) + for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i) + type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]])); + if (json.nested) + for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) { + var nested = json.nested[names[i]]; + type.add( // most to least likely + ( nested.id !== undefined + ? Field.fromJSON + : nested.fields !== undefined + ? Type.fromJSON + : nested.values !== undefined + ? Enum.fromJSON + : nested.methods !== undefined + ? Service.fromJSON + : Namespace.fromJSON )(names[i], nested) + ); + } + if (json.extensions && json.extensions.length) + type.extensions = json.extensions; + if (json.reserved && json.reserved.length) + type.reserved = json.reserved; + if (json.group) + type.group = true; + if (json.comment) + type.comment = json.comment; + return type; +}; + +/** + * Converts this message type to a message type descriptor. + * @param {IToJSONOptions} [toJSONOptions] JSON conversion options + * @returns {IType} Message type descriptor + */ +Type.prototype.toJSON = function toJSON(toJSONOptions) { + var inherited = Namespace.prototype.toJSON.call(this, toJSONOptions); + var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false; + return util.toObject([ + "options" , inherited && inherited.options || undefined, + "oneofs" , Namespace.arrayToJSON(this.oneofsArray, toJSONOptions), + "fields" , Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; }), toJSONOptions) || {}, + "extensions" , this.extensions && this.extensions.length ? this.extensions : undefined, + "reserved" , this.reserved && this.reserved.length ? this.reserved : undefined, + "group" , this.group || undefined, + "nested" , inherited && inherited.nested || undefined, + "comment" , keepComments ? this.comment : undefined + ]); +}; + +/** + * @override + */ +Type.prototype.resolveAll = function resolveAll() { + var fields = this.fieldsArray, i = 0; + while (i < fields.length) + fields[i++].resolve(); + var oneofs = this.oneofsArray; i = 0; + while (i < oneofs.length) + oneofs[i++].resolve(); + return Namespace.prototype.resolveAll.call(this); +}; + +/** + * @override + */ +Type.prototype.get = function get(name) { + return this.fields[name] + || this.oneofs && this.oneofs[name] + || this.nested && this.nested[name] + || null; +}; + +/** + * Adds a nested object to this type. + * @param {ReflectionObject} object Nested object to add + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id + */ +Type.prototype.add = function add(object) { + + if (this.get(object.name)) + throw Error("duplicate name '" + object.name + "' in " + this); + + if (object instanceof Field && object.extend === undefined) { + // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects. + // The root object takes care of adding distinct sister-fields to the respective extended + // type instead. + + // avoids calling the getter if not absolutely necessary because it's called quite frequently + if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id]) + throw Error("duplicate id " + object.id + " in " + this); + if (this.isReservedId(object.id)) + throw Error("id " + object.id + " is reserved in " + this); + if (this.isReservedName(object.name)) + throw Error("name '" + object.name + "' is reserved in " + this); + + if (object.parent) + object.parent.remove(object); + this.fields[object.name] = object; + object.message = this; + object.onAdd(this); + return clearCache(this); + } + if (object instanceof OneOf) { + if (!this.oneofs) + this.oneofs = {}; + this.oneofs[object.name] = object; + object.onAdd(this); + return clearCache(this); + } + return Namespace.prototype.add.call(this, object); +}; + +/** + * Removes a nested object from this type. + * @param {ReflectionObject} object Nested object to remove + * @returns {Type} `this` + * @throws {TypeError} If arguments are invalid + * @throws {Error} If `object` is not a member of this type + */ +Type.prototype.remove = function remove(object) { + if (object instanceof Field && object.extend === undefined) { + // See Type#add for the reason why extension fields are excluded here. + + /* istanbul ignore if */ + if (!this.fields || this.fields[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.fields[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + if (object instanceof OneOf) { + + /* istanbul ignore if */ + if (!this.oneofs || this.oneofs[object.name] !== object) + throw Error(object + " is not a member of " + this); + + delete this.oneofs[object.name]; + object.parent = null; + object.onRemove(this); + return clearCache(this); + } + return Namespace.prototype.remove.call(this, object); +}; + +/** + * Tests if the specified id is reserved. + * @param {number} id Id to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedId = function isReservedId(id) { + return Namespace.isReservedId(this.reserved, id); +}; + +/** + * Tests if the specified name is reserved. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +Type.prototype.isReservedName = function isReservedName(name) { + return Namespace.isReservedName(this.reserved, name); +}; + +/** + * Creates a new message of this type using the specified properties. + * @param {Object.} [properties] Properties to set + * @returns {Message<{}>} Message instance + */ +Type.prototype.create = function create(properties) { + return new this.ctor(properties); +}; + +/** + * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. + * @returns {Type} `this` + */ +Type.prototype.setup = function setup() { + // Sets up everything at once so that the prototype chain does not have to be re-evaluated + // multiple times (V8, soft-deopt prototype-check). + + var fullName = this.fullName, + types = []; + for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i) + types.push(this._fieldsArray[i].resolve().resolvedType); + + // Replace setup methods with type-specific generated functions + this.encode = encoder(this)({ + Writer : Writer, + types : types, + util : util + }); + this.decode = decoder(this)({ + Reader : Reader, + types : types, + util : util + }); + this.verify = verifier(this)({ + types : types, + util : util + }); + this.fromObject = converter.fromObject(this)({ + types : types, + util : util + }); + this.toObject = converter.toObject(this)({ + types : types, + util : util + }); + + // Inject custom wrappers for common types + var wrapper = wrappers[fullName]; + if (wrapper) { + var originalThis = Object.create(this); + // if (wrapper.fromObject) { + originalThis.fromObject = this.fromObject; + this.fromObject = wrapper.fromObject.bind(originalThis); + // } + // if (wrapper.toObject) { + originalThis.toObject = this.toObject; + this.toObject = wrapper.toObject.bind(originalThis); + // } + } + + return this; +}; + +/** + * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encode = function encode_setup(message, writer) { + return this.setup().encode(message, writer); // overrides this method +}; + +/** + * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. + * @param {Message<{}>|Object.} message Message instance or plain object + * @param {Writer} [writer] Writer to encode to + * @returns {Writer} writer + */ +Type.prototype.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); +}; + +/** + * Decodes a message of this type. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Length of the message, if known beforehand + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError<{}>} If required fields are missing + */ +Type.prototype.decode = function decode_setup(reader, length) { + return this.setup().decode(reader, length); // overrides this method +}; + +/** + * Decodes a message of this type preceeded by its byte length as a varint. + * @param {Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {Message<{}>} Decoded message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {util.ProtocolError} If required fields are missing + */ +Type.prototype.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof Reader)) + reader = Reader.create(reader); + return this.decode(reader, reader.uint32()); +}; + +/** + * Verifies that field values are valid and that required fields are present. + * @param {Object.} message Plain object to verify + * @returns {null|string} `null` if valid, otherwise the reason why it is not + */ +Type.prototype.verify = function verify_setup(message) { + return this.setup().verify(message); // overrides this method +}; + +/** + * Creates a new message of this type from a plain object. Also converts values to their respective internal types. + * @param {Object.} object Plain object to convert + * @returns {Message<{}>} Message instance + */ +Type.prototype.fromObject = function fromObject(object) { + return this.setup().fromObject(object); +}; + +/** + * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}. + * @interface IConversionOptions + * @property {Function} [longs] Long conversion type. + * Valid values are `String` and `Number` (the global types). + * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library. + * @property {Function} [enums] Enum value conversion type. + * Only valid value is `String` (the global type). + * Defaults to copy the present value, which is the numeric id. + * @property {Function} [bytes] Bytes value conversion type. + * Valid values are `Array` and (a base64 encoded) `String` (the global types). + * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser. + * @property {boolean} [defaults=false] Also sets default values on the resulting object + * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false` + * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false` + * @property {boolean} [oneofs=false] Includes virtual oneof properties set to the present field's name, if any + * @property {boolean} [json=false] Performs additional JSON compatibility conversions, i.e. NaN and Infinity to strings + */ + +/** + * Creates a plain object from a message of this type. Also converts values to other types if specified. + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ +Type.prototype.toObject = function toObject(message, options) { + return this.setup().toObject(message, options); +}; + +/** + * Decorator function as returned by {@link Type.d} (TypeScript). + * @typedef TypeDecorator + * @type {function} + * @param {Constructor} target Target constructor + * @returns {undefined} + * @template T extends Message + */ + +/** + * Type decorator (TypeScript). + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {TypeDecorator} Decorator function + * @template T extends Message + */ +Type.d = function decorateType(typeName) { + return function typeDecorator(target) { + util.decorateType(target, typeName); + }; +}; diff --git a/node_modules/protobufjs/src/types.js b/node_modules/protobufjs/src/types.js new file mode 100644 index 0000000..5fda19a --- /dev/null +++ b/node_modules/protobufjs/src/types.js @@ -0,0 +1,196 @@ +"use strict"; + +/** + * Common type constants. + * @namespace + */ +var types = exports; + +var util = require("./util"); + +var s = [ + "double", // 0 + "float", // 1 + "int32", // 2 + "uint32", // 3 + "sint32", // 4 + "fixed32", // 5 + "sfixed32", // 6 + "int64", // 7 + "uint64", // 8 + "sint64", // 9 + "fixed64", // 10 + "sfixed64", // 11 + "bool", // 12 + "string", // 13 + "bytes" // 14 +]; + +function bake(values, offset) { + var i = 0, o = {}; + offset |= 0; + while (i < values.length) o[s[i + offset]] = values[i++]; + return o; +} + +/** + * Basic type wire types. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + * @property {number} bytes=2 Ldelim wire type + */ +types.basic = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2, + /* bytes */ 2 +]); + +/** + * Basic type defaults. + * @type {Object.} + * @const + * @property {number} double=0 Double default + * @property {number} float=0 Float default + * @property {number} int32=0 Int32 default + * @property {number} uint32=0 Uint32 default + * @property {number} sint32=0 Sint32 default + * @property {number} fixed32=0 Fixed32 default + * @property {number} sfixed32=0 Sfixed32 default + * @property {number} int64=0 Int64 default + * @property {number} uint64=0 Uint64 default + * @property {number} sint64=0 Sint32 default + * @property {number} fixed64=0 Fixed64 default + * @property {number} sfixed64=0 Sfixed64 default + * @property {boolean} bool=false Bool default + * @property {string} string="" String default + * @property {Array.} bytes=Array(0) Bytes default + * @property {null} message=null Message default + */ +types.defaults = bake([ + /* double */ 0, + /* float */ 0, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 0, + /* sfixed32 */ 0, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 0, + /* sfixed64 */ 0, + /* bool */ false, + /* string */ "", + /* bytes */ util.emptyArray, + /* message */ null +]); + +/** + * Basic long type wire types. + * @type {Object.} + * @const + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + */ +types.long = bake([ + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1 +], 7); + +/** + * Allowed types for map keys with their associated wire type. + * @type {Object.} + * @const + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + * @property {number} string=2 Ldelim wire type + */ +types.mapKey = bake([ + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0, + /* string */ 2 +], 2); + +/** + * Allowed types for packed repeated fields with their associated wire type. + * @type {Object.} + * @const + * @property {number} double=1 Fixed64 wire type + * @property {number} float=5 Fixed32 wire type + * @property {number} int32=0 Varint wire type + * @property {number} uint32=0 Varint wire type + * @property {number} sint32=0 Varint wire type + * @property {number} fixed32=5 Fixed32 wire type + * @property {number} sfixed32=5 Fixed32 wire type + * @property {number} int64=0 Varint wire type + * @property {number} uint64=0 Varint wire type + * @property {number} sint64=0 Varint wire type + * @property {number} fixed64=1 Fixed64 wire type + * @property {number} sfixed64=1 Fixed64 wire type + * @property {number} bool=0 Varint wire type + */ +types.packed = bake([ + /* double */ 1, + /* float */ 5, + /* int32 */ 0, + /* uint32 */ 0, + /* sint32 */ 0, + /* fixed32 */ 5, + /* sfixed32 */ 5, + /* int64 */ 0, + /* uint64 */ 0, + /* sint64 */ 0, + /* fixed64 */ 1, + /* sfixed64 */ 1, + /* bool */ 0 +]); diff --git a/node_modules/protobufjs/src/typescript.jsdoc b/node_modules/protobufjs/src/typescript.jsdoc new file mode 100644 index 0000000..9a67101 --- /dev/null +++ b/node_modules/protobufjs/src/typescript.jsdoc @@ -0,0 +1,15 @@ +/** + * Constructor type. + * @interface Constructor + * @extends Function + * @template T + * @tstype new(...params: any[]): T; prototype: T; + */ + +/** + * Properties type. + * @typedef Properties + * @template T + * @type {Object.} + * @tstype { [P in keyof T]?: T[P] } + */ diff --git a/node_modules/protobufjs/src/util.js b/node_modules/protobufjs/src/util.js new file mode 100644 index 0000000..6c50899 --- /dev/null +++ b/node_modules/protobufjs/src/util.js @@ -0,0 +1,212 @@ +"use strict"; + +/** + * Various utility functions. + * @namespace + */ +var util = module.exports = require("./util/minimal"); + +var roots = require("./roots"); + +var Type, // cyclic + Enum; + +util.codegen = require("@protobufjs/codegen"); +util.fetch = require("@protobufjs/fetch"); +util.path = require("@protobufjs/path"); + +/** + * Node's fs module if available. + * @type {Object.} + */ +util.fs = util.inquire("fs"); + +/** + * Converts an object's values to an array. + * @param {Object.} object Object to convert + * @returns {Array.<*>} Converted array + */ +util.toArray = function toArray(object) { + if (object) { + var keys = Object.keys(object), + array = new Array(keys.length), + index = 0; + while (index < keys.length) + array[index] = object[keys[index++]]; + return array; + } + return []; +}; + +/** + * Converts an array of keys immediately followed by their respective value to an object, omitting undefined values. + * @param {Array.<*>} array Array to convert + * @returns {Object.} Converted object + */ +util.toObject = function toObject(array) { + var object = {}, + index = 0; + while (index < array.length) { + var key = array[index++], + val = array[index++]; + if (val !== undefined) + object[key] = val; + } + return object; +}; + +var safePropBackslashRe = /\\/g, + safePropQuoteRe = /"/g; + +/** + * Tests whether the specified name is a reserved word in JS. + * @param {string} name Name to test + * @returns {boolean} `true` if reserved, otherwise `false` + */ +util.isReserved = function isReserved(name) { + return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name); +}; + +/** + * Returns a safe property accessor for the specified property name. + * @param {string} prop Property name + * @returns {string} Safe accessor + */ +util.safeProp = function safeProp(prop) { + if (!/^[$\w_]+$/.test(prop) || util.isReserved(prop)) + return "[\"" + prop.replace(safePropBackslashRe, "\\\\").replace(safePropQuoteRe, "\\\"") + "\"]"; + return "." + prop; +}; + +/** + * Converts the first character of a string to upper case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.ucFirst = function ucFirst(str) { + return str.charAt(0).toUpperCase() + str.substring(1); +}; + +var camelCaseRe = /_([a-z])/g; + +/** + * Converts a string to camel case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.camelCase = function camelCase(str) { + return str.substring(0, 1) + + str.substring(1) + .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); }); +}; + +/** + * Compares reflected fields by id. + * @param {Field} a First field + * @param {Field} b Second field + * @returns {number} Comparison value + */ +util.compareFieldsById = function compareFieldsById(a, b) { + return a.id - b.id; +}; + +/** + * Decorator helper for types (TypeScript). + * @param {Constructor} ctor Constructor function + * @param {string} [typeName] Type name, defaults to the constructor's name + * @returns {Type} Reflected type + * @template T extends Message + * @property {Root} root Decorators root + */ +util.decorateType = function decorateType(ctor, typeName) { + + /* istanbul ignore if */ + if (ctor.$type) { + if (typeName && ctor.$type.name !== typeName) { + util.decorateRoot.remove(ctor.$type); + ctor.$type.name = typeName; + util.decorateRoot.add(ctor.$type); + } + return ctor.$type; + } + + /* istanbul ignore next */ + if (!Type) + Type = require("./type"); + + var type = new Type(typeName || ctor.name); + util.decorateRoot.add(type); + type.ctor = ctor; // sets up .encode, .decode etc. + Object.defineProperty(ctor, "$type", { value: type, enumerable: false }); + Object.defineProperty(ctor.prototype, "$type", { value: type, enumerable: false }); + return type; +}; + +var decorateEnumIndex = 0; + +/** + * Decorator helper for enums (TypeScript). + * @param {Object} object Enum object + * @returns {Enum} Reflected enum + */ +util.decorateEnum = function decorateEnum(object) { + + /* istanbul ignore if */ + if (object.$type) + return object.$type; + + /* istanbul ignore next */ + if (!Enum) + Enum = require("./enum"); + + var enm = new Enum("Enum" + decorateEnumIndex++, object); + util.decorateRoot.add(enm); + Object.defineProperty(object, "$type", { value: enm, enumerable: false }); + return enm; +}; + + +/** + * Sets the value of a property by property path. If a value already exists, it is turned to an array + * @param {Object.} dst Destination object + * @param {string} path dot '.' delimited path of the property to set + * @param {Object} value the value to set + * @returns {Object.} Destination object + */ +util.setProperty = function setProperty(dst, path, value) { + function setProp(dst, path, value) { + var part = path.shift(); + if (part === "__proto__" || part === "prototype") { + return dst; + } + if (path.length > 0) { + dst[part] = setProp(dst[part] || {}, path, value); + } else { + var prevValue = dst[part]; + if (prevValue) + value = [].concat(prevValue).concat(value); + dst[part] = value; + } + return dst; + } + + if (typeof dst !== "object") + throw TypeError("dst must be an object"); + if (!path) + throw TypeError("path must be specified"); + + path = path.split("."); + return setProp(dst, path, value); +}; + +/** + * Decorator root (TypeScript). + * @name util.decorateRoot + * @type {Root} + * @readonly + */ +Object.defineProperty(util, "decorateRoot", { + get: function() { + return roots["decorated"] || (roots["decorated"] = new (require("./root"))()); + } +}); diff --git a/node_modules/protobufjs/src/util/longbits.js b/node_modules/protobufjs/src/util/longbits.js new file mode 100644 index 0000000..11bfb1c --- /dev/null +++ b/node_modules/protobufjs/src/util/longbits.js @@ -0,0 +1,200 @@ +"use strict"; +module.exports = LongBits; + +var util = require("../util/minimal"); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; diff --git a/node_modules/protobufjs/src/util/minimal.js b/node_modules/protobufjs/src/util/minimal.js new file mode 100644 index 0000000..62d6833 --- /dev/null +++ b/node_modules/protobufjs/src/util/minimal.js @@ -0,0 +1,438 @@ +"use strict"; +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = require("@protobufjs/aspromise"); + +// converts to / from base64 encoded strings +util.base64 = require("@protobufjs/base64"); + +// base class of rpc.Service +util.EventEmitter = require("@protobufjs/eventemitter"); + +// float handling accross browsers +util.float = require("@protobufjs/float"); + +// requires modules optionally and hides the call from bundlers +util.inquire = require("@protobufjs/inquire"); + +// converts to / from utf8 encoded strings +util.utf8 = require("@protobufjs/utf8"); + +// provides a node-like buffer pool in the browser +util.pool = require("@protobufjs/pool"); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = require("./longbits"); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; diff --git a/node_modules/protobufjs/src/verifier.js b/node_modules/protobufjs/src/verifier.js new file mode 100644 index 0000000..d58e27a --- /dev/null +++ b/node_modules/protobufjs/src/verifier.js @@ -0,0 +1,177 @@ +"use strict"; +module.exports = verifier; + +var Enum = require("./enum"), + util = require("./util"); + +function invalid(field, expected) { + return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:"+field.keyType+"}" : "") + " expected"; +} + +/** + * Generates a partial value verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {number} fieldIndex Field index + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyValue(gen, field, fieldIndex, ref) { + /* eslint-disable no-unexpected-multiline */ + if (field.resolvedType) { + if (field.resolvedType instanceof Enum) { gen + ("switch(%s){", ref) + ("default:") + ("return%j", invalid(field, "enum value")); + for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen + ("case %i:", field.resolvedType.values[keys[j]]); + gen + ("break") + ("}"); + } else { + gen + ("{") + ("var e=types[%i].verify(%s);", fieldIndex, ref) + ("if(e)") + ("return%j+e", field.name + ".") + ("}"); + } + } else { + switch (field.type) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.isInteger(%s))", ref) + ("return%j", invalid(field, "integer")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) + ("return%j", invalid(field, "integer|Long")); + break; + case "float": + case "double": gen + ("if(typeof %s!==\"number\")", ref) + ("return%j", invalid(field, "number")); + break; + case "bool": gen + ("if(typeof %s!==\"boolean\")", ref) + ("return%j", invalid(field, "boolean")); + break; + case "string": gen + ("if(!util.isString(%s))", ref) + ("return%j", invalid(field, "string")); + break; + case "bytes": gen + ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) + ("return%j", invalid(field, "buffer")); + break; + } + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a partial key verifier. + * @param {Codegen} gen Codegen instance + * @param {Field} field Reflected field + * @param {string} ref Variable reference + * @returns {Codegen} Codegen instance + * @ignore + */ +function genVerifyKey(gen, field, ref) { + /* eslint-disable no-unexpected-multiline */ + switch (field.keyType) { + case "int32": + case "uint32": + case "sint32": + case "fixed32": + case "sfixed32": gen + ("if(!util.key32Re.test(%s))", ref) + ("return%j", invalid(field, "integer key")); + break; + case "int64": + case "uint64": + case "sint64": + case "fixed64": + case "sfixed64": gen + ("if(!util.key64Re.test(%s))", ref) // see comment above: x is ok, d is not + ("return%j", invalid(field, "integer|Long key")); + break; + case "bool": gen + ("if(!util.key2Re.test(%s))", ref) + ("return%j", invalid(field, "boolean key")); + break; + } + return gen; + /* eslint-enable no-unexpected-multiline */ +} + +/** + * Generates a verifier specific to the specified message type. + * @param {Type} mtype Message type + * @returns {Codegen} Codegen instance + */ +function verifier(mtype) { + /* eslint-disable no-unexpected-multiline */ + + var gen = util.codegen(["m"], mtype.name + "$verify") + ("if(typeof m!==\"object\"||m===null)") + ("return%j", "object expected"); + var oneofs = mtype.oneofsArray, + seenFirstField = {}; + if (oneofs.length) gen + ("var p={}"); + + for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) { + var field = mtype._fieldsArray[i].resolve(), + ref = "m" + util.safeProp(field.name); + + if (field.optional) gen + ("if(%s!=null&&m.hasOwnProperty(%j)){", ref, field.name); // !== undefined && !== null + + // map fields + if (field.map) { gen + ("if(!util.isObject(%s))", ref) + ("return%j", invalid(field, "object")) + ("var k=Object.keys(%s)", ref) + ("for(var i=0;i} + * @const + */ +var wrappers = exports; + +var Message = require("./message"); + +/** + * From object converter part of an {@link IWrapper}. + * @typedef WrapperFromObjectConverter + * @type {function} + * @param {Object.} object Plain object + * @returns {Message<{}>} Message instance + * @this Type + */ + +/** + * To object converter part of an {@link IWrapper}. + * @typedef WrapperToObjectConverter + * @type {function} + * @param {Message<{}>} message Message instance + * @param {IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + * @this Type + */ + +/** + * Common type wrapper part of {@link wrappers}. + * @interface IWrapper + * @property {WrapperFromObjectConverter} [fromObject] From object converter + * @property {WrapperToObjectConverter} [toObject] To object converter + */ + +// Custom wrapper for Any +wrappers[".google.protobuf.Any"] = { + + fromObject: function(object) { + + // unwrap value type if mapped + if (object && object["@type"]) { + // Only use fully qualified type name after the last '/' + var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) { + // type_url does not accept leading "." + var type_url = object["@type"].charAt(0) === "." ? + object["@type"].slice(1) : object["@type"]; + // type_url prefix is optional, but path seperator is required + if (type_url.indexOf("/") === -1) { + type_url = "/" + type_url; + } + return this.create({ + type_url: type_url, + value: type.encode(type.fromObject(object)).finish() + }); + } + } + + return this.fromObject(object); + }, + + toObject: function(message, options) { + + // Default prefix + var googleApi = "type.googleapis.com/"; + var prefix = ""; + var name = ""; + + // decode value if requested and unmapped + if (options && options.json && message.type_url && message.value) { + // Only use fully qualified type name after the last '/' + name = message.type_url.substring(message.type_url.lastIndexOf("/") + 1); + // Separate the prefix used + prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1); + var type = this.lookup(name); + /* istanbul ignore else */ + if (type) + message = type.decode(message.value); + } + + // wrap value if unmapped + if (!(message instanceof this.ctor) && message instanceof Message) { + var object = message.$type.toObject(message, options); + var messageName = message.$type.fullName[0] === "." ? + message.$type.fullName.slice(1) : message.$type.fullName; + // Default to type.googleapis.com prefix if no prefix is used + if (prefix === "") { + prefix = googleApi; + } + name = prefix + messageName; + object["@type"] = name; + return object; + } + + return this.toObject(message, options); + } +}; diff --git a/node_modules/protobufjs/src/writer.js b/node_modules/protobufjs/src/writer.js new file mode 100644 index 0000000..cc84a00 --- /dev/null +++ b/node_modules/protobufjs/src/writer.js @@ -0,0 +1,465 @@ +"use strict"; +module.exports = Writer; + +var util = require("./util/minimal"); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; diff --git a/node_modules/protobufjs/src/writer_buffer.js b/node_modules/protobufjs/src/writer_buffer.js new file mode 100644 index 0000000..09a4a91 --- /dev/null +++ b/node_modules/protobufjs/src/writer_buffer.js @@ -0,0 +1,85 @@ +"use strict"; +module.exports = BufferWriter; + +// extends Writer +var Writer = require("./writer"); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = require("./util/minimal"); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); diff --git a/node_modules/protobufjs/tsconfig.json b/node_modules/protobufjs/tsconfig.json new file mode 100644 index 0000000..a0b3639 --- /dev/null +++ b/node_modules/protobufjs/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "ES5", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + } +} \ No newline at end of file diff --git a/node_modules/rxjs/CHANGELOG.md b/node_modules/rxjs/CHANGELOG.md new file mode 100644 index 0000000..8f6c728 --- /dev/null +++ b/node_modules/rxjs/CHANGELOG.md @@ -0,0 +1,2742 @@ +## [7.8.1](https://github.com/reactivex/rxjs/compare/7.8.0...7.8.1) (2023-04-26) + +### Bug Fixes + +- **asapScheduler:** No longer stops after scheduling twice during flush ([#7198](https://github.com/reactivex/rxjs/issues/7198)) ([1b52405](https://github.com/reactivex/rxjs/commit/1b524057b4db157814bfd04ad7d10c999afdccfa)), closes [ReactiveX#7196](https://github.com/ReactiveX/issues/7196) +- **throttle:** properly handle default ThrottleConfig values ([#7176](https://github.com/reactivex/rxjs/issues/7176)) ([ceb821c](https://github.com/reactivex/rxjs/commit/ceb821cfd81ca29b0d764b86a03f1e9f1eaa0999)) + +# [7.8.0](https://github.com/reactivex/rxjs/compare/7.7.0...7.8.0) (2022-12-15) + +### Features + +- **buffer:** `closingNotifier` now supports any `ObservableInput` ([#7073](https://github.com/reactivex/rxjs/issues/7073)) ([61b877a](https://github.com/reactivex/rxjs/commit/61b877a50c2557196a45e12622305c5a84fc3f0a)) +- **delayWhen:** `delayWhen`'s `delayDurationSelector` now supports any `ObservableInput` ([#7049](https://github.com/reactivex/rxjs/issues/7049)) ([dfd95db](https://github.com/reactivex/rxjs/commit/dfd95db952a6772d35d11bdd1974f2c4b4d68b25)) +- **sequenceEqual:** `compareTo` now supports any `ObservableInput` ([#7102](https://github.com/reactivex/rxjs/issues/7102)) ([d501961](https://github.com/reactivex/rxjs/commit/d50196187710c7a0cad50703b2071fc3f2cabd3c)) +- **share:** `ShareConfig` factory properties now supports any `ObservableInput` ([#7093](https://github.com/reactivex/rxjs/issues/7093)) ([cc3995a](https://github.com/reactivex/rxjs/commit/cc3995a6f6baf9456ec11f749fe89bf61b9e2d62)) +- **skipUntil:** `notifier` now supports any `ObservableInput` ([#7091](https://github.com/reactivex/rxjs/issues/7091)) ([60d6c40](https://github.com/reactivex/rxjs/commit/60d6c40fb484903286feca2bbfa9fcb2cde720e2)) +- **window:** `windowBoundaries` now supports any `ObservableInput` ([#7088](https://github.com/reactivex/rxjs/issues/7088)) ([8c4347c](https://github.com/reactivex/rxjs/commit/8c4347c48f2432d7399c911d329fa74e0d6c6e8d)) + +# [7.7.0](https://github.com/reactivex/rxjs/compare/7.6.0...7.7.0) (2022-12-15) + +### Features + +- **distinct:** `flush` argument now supports any `ObservableInput` ([#7081](https://github.com/reactivex/rxjs/issues/7081)) ([74c9ebd](https://github.com/reactivex/rxjs/commit/74c9ebd818113f9f25f1fb2b9fee4a0eac121ae0)) +- **repeatWhen:** `notifier` supports `ObservableInput` ([#7103](https://github.com/reactivex/rxjs/issues/7103)) ([8f1b976](https://github.com/reactivex/rxjs/commit/8f1b976125c55a5e884317c2b463fd019662e6af)) +- **retryWhen:** `notifier` now supports any `ObservableInput` ([#7105](https://github.com/reactivex/rxjs/issues/7105)) ([794f806](https://github.com/reactivex/rxjs/commit/794f8064cf8fe754e9dfebeee0ffef0ac1562252)) +- **sample:** `notifier` now supports any `ObservableInput` ([#7104](https://github.com/reactivex/rxjs/issues/7104)) ([b18c2eb](https://github.com/reactivex/rxjs/commit/b18c2eb2bc8dc1a717c927f998028316eec83937)) + +# [7.6.0](https://github.com/reactivex/rxjs/compare/7.5.7...7.6.0) (2022-12-03) + +### Bug Fixes + +- **schedulers:** no longer cause TypeScript build failures when Node types aren't included ([c1a07b7](https://github.com/reactivex/rxjs/commit/c1a07b71ac050ab36b371ff7f18dc9a924fffc9f)) +- **types:** Improved subscribe and tap type overloads ([#6718](https://github.com/reactivex/rxjs/issues/6718)) ([af1a9f4](https://github.com/reactivex/rxjs/commit/af1a9f446a860883abaa36ace21345dc923e7e53)), closes [#6717](https://github.com/reactivex/rxjs/issues/6717) + +### Features + +- **onErrorResumeNextWith:** renamed `onErrorResumeNext` and exported from the top level. (`onErrorResumeNext` operator is stil available, but deprecated) ([#6755](https://github.com/reactivex/rxjs/issues/6755)) ([51e3b2c](https://github.com/reactivex/rxjs/commit/51e3b2c8ec28b5d30bca4c63ad69ce6942c2cdcc)) + +## [7.5.7](https://github.com/reactivex/rxjs/compare/7.5.6...7.5.7) (2022-09-25) + +### Bug Fixes + +- **schedulers:** improve performance of animationFrameScheduler and asapScheduler ([#7059](https://github.com/reactivex/rxjs/issues/7059)) ([c93aa60](https://github.com/reactivex/rxjs/commit/c93aa60e9f073297d959fa1fff9323e48872d47e)), closes [#7017](https://github.com/reactivex/rxjs/issues/7017), related to [#7018](https://github.com/reactivex/rxjs/issues/7018) and [#6674](https://github.com/reactivex/rxjs/issues/6674) + +### Performance Improvements + +- **animationFrames:** uses fewer Subscription instances ([#7060](https://github.com/reactivex/rxjs/issues/7060)) ([2d57b38](https://github.com/reactivex/rxjs/commit/2d57b38ec9f7ada838ee130ab75cd795b156c182)), closes [#7018](https://github.com/reactivex/rxjs/issues/7018) + +## [7.5.6](https://github.com/reactivex/rxjs/compare/7.5.5...7.5.6) (2022-07-11) + +### Bug Fixes + +- **share:** No longer results in a bad-state observable in an edge case where a synchronous source was shared and refCounted, and the result is subscribed to twice in a row synchronously. ([#7005](https://github.com/reactivex/rxjs/issues/7005)) ([5d4c1d9](https://github.com/reactivex/rxjs/commit/5d4c1d9a37b1347217223adb0d9e166fd85f67a9)) +- **share & connect:** `share` and `connect` no longer bundle scheduling code by default ([#6873](https://github.com/reactivex/rxjs/issues/6873)) ([9948dc2](https://github.com/reactivex/rxjs/commit/9948dc2f5577eaa4013de234f3552508918518c7)), closes [#6872](https://github.com/reactivex/rxjs/issues/6872) +- **exhaustAll:** Result will now complete properly when flattening all synchronous observables. ([#6911](https://github.com/reactivex/rxjs/issues/6911)) ([3c1c6b8](https://github.com/reactivex/rxjs/commit/3c1c6b8303028eebc7af31cfc5e5bad42a5b2da4)), closes [#6910](https://github.com/reactivex/rxjs/issues/6910) +- **TypeScript:** Now compatible with TypeScript 4.6 type checks ([#6895](https://github.com/reactivex/rxjs/issues/6895)) ([fce9aa1](https://github.com/reactivex/rxjs/commit/fce9aa12931796892673581761bba1f7ceafabff)) + +## [7.5.5](https://github.com/reactivex/rxjs/compare/7.5.4...7.5.5) (2022-03-08) + +### Bug Fixes + +- **package:** add types to exports ([#6802](https://github.com/reactivex/rxjs/issues/6802)) ([3750f75](https://github.com/reactivex/rxjs/commit/3750f75104bb82d870c53c0605c942e41245d79c)) +- **package:** add `require` export condition ([#6821](https://github.com/reactivex/rxjs/issues/6821)) ([c8955e4](https://github.com/reactivex/rxjs/commit/c8955e4c6a972135030fdfddc18a7a48337ae9c7)) +- **timeout:** no longer will timeout when receiving the first value synchronously ([#6865](https://github.com/reactivex/rxjs/issues/6865)) ([2330c96](https://github.com/reactivex/rxjs/commit/2330c9660b20f2e0cda0c4eeb36bb582b4a85186)), closes [#6862](https://github.com/reactivex/rxjs/issues/6862) + +### Performance Improvements + +- Don't clone observers unless you have to ([#6842](https://github.com/reactivex/rxjs/issues/6842)) ([3289d20](https://github.com/reactivex/rxjs/commit/3289d20ddc3a84d2aede8e3ab9962a8ef5d43c83)) + +## [7.5.4](https://github.com/reactivex/rxjs/compare/7.5.3...7.5.4) (2022-02-09) + +### Performance Improvements + +- removed code that would `bind` functions passed with observers to `subscribe`. ([#6815](https://github.com/reactivex/rxjs/issues/6815)) ([fb375a0](https://github.com/reactivex/rxjs/commit/fb375a0c5befd6852cd63d3c310448e42fa9580e)), closes [#6783](https://github.com/reactivex/rxjs/issues/6783) + +## [7.5.3](https://github.com/reactivex/rxjs/compare/7.5.2...7.5.3) (2022-02-08) + +### Bug Fixes + +- **subscribe:** allow interop with Monio and other libraries that patch function bind ([0ab91eb](https://github.com/reactivex/rxjs/commit/0ab91eb4c1da914efbf03a2732629914cd3398dc)), closes [#6783](https://github.com/reactivex/rxjs/issues/6783) + +## [7.5.2](https://github.com/reactivex/rxjs/compare/7.5.1...7.5.2) (2022-01-11) + +### Bug Fixes + +- operators that ignore input values now use `unknown` rather than `any`, which should resolve issues with eslint no-unsafe-argument ([#6738](https://github.com/reactivex/rxjs/issues/6738)) ([67cb317](https://github.com/reactivex/rxjs/commit/67cb317a7a6b9fdbd3d2e8fdbc2ac9ac7e57179c)), closes [#6536](https://github.com/reactivex/rxjs/issues/6536) +- **ajax:** crossDomain flag deprecated and properly reported to consumers ([#6710](https://github.com/reactivex/rxjs/issues/6710)) ([7fd0575](https://github.com/reactivex/rxjs/commit/7fd05756c595dddb288b732b00a90fcfb2a9080a)), closes [#6663](https://github.com/reactivex/rxjs/issues/6663) + +## [7.5.1](https://github.com/reactivex/rxjs/compare/7.5.0...7.5.1) (2021-12-28) + +### Bug Fixes + +- export supporting interfaces from top-level `rxjs` site. ([#6733](https://github.com/reactivex/rxjs/issues/6733)) ([299a1e1](https://github.com/reactivex/rxjs/commit/299a1e16f725edfc2e333c430e3a7dfc75dd94e7)) + +# [7.5.0](https://github.com/reactivex/rxjs/compare/7.4.0...7.5.0) (2021-12-27) + +### Bug Fixes + +- **takeWhile:** Now returns proper types when passed a `Boolean` constructor. ([#6633](https://github.com/reactivex/rxjs/issues/6633)) ([081ca2b](https://github.com/reactivex/rxjs/commit/081ca2ba7290aa3084c1477a6d4bcc573bf478f6)) +- **forEach:** properly unsubs after error in next handler ([#6677](https://github.com/reactivex/rxjs/issues/6677)) ([b9ab67d](https://github.com/reactivex/rxjs/commit/b9ab67d21ca9d227fcd1123bf80ab87ca9296af9)), closes [#6676](https://github.com/reactivex/rxjs/issues/6676) +- **WebSocketSubject:** handle slow WebSocket close ([#6708](https://github.com/reactivex/rxjs/issues/6708)) ([8cb201c](https://github.com/reactivex/rxjs/commit/8cb201cd42dd751b4185b94fe2d36c6bfda02fe2)), closes [#4650](https://github.com/reactivex/rxjs/issues/4650) [#3935](https://github.com/reactivex/rxjs/issues/3935) +- RxJS now supports tslib 2.x, rather than just 2.1.x ([#6692](https://github.com/reactivex/rxjs/issues/6692)) ([0b2495f](https://github.com/reactivex/rxjs/commit/0b2495f72e76627fdd19dd7a670dd74847d6449c)), closes [#6689](https://github.com/reactivex/rxjs/issues/6689) +- schedulers will no longer error while rescheduling and unsubscribing during flushes ([e35f589](https://github.com/reactivex/rxjs/commit/e35f589e2ca10ab2d2d69f7e9fe60727edc4c53d)), closes [#6672](https://github.com/reactivex/rxjs/issues/6672) + +### Features + +- **repeat:** now has configurable delay ([#6640](https://github.com/reactivex/rxjs/issues/6640)) ([6b7a534](https://github.com/reactivex/rxjs/commit/6b7a534f579f95f97f47eff74bdea9991ee85712)) + +# [7.4.0](https://github.com/reactivex/rxjs/compare/7.3.1...7.4.0) (2021-10-06) + +### Features + +- Add es2015 entries to the exports declaration to support Angular ([#6614](https://github.com/reactivex/rxjs/issues/6614)) ([268777b](https://github.com/reactivex/rxjs/commit/268777bc3a4fd0cf76882683b51809771741ddc3)), closes [/github.com/ReactiveX/rxjs/pull/6613#discussion_r716958551](https://github.com//github.com/ReactiveX/rxjs/pull/6613/issues/discussion_r716958551) + +## [7.3.1](https://github.com/reactivex/rxjs/compare/7.3.0...7.3.1) (2021-10-01) + +### Bug Fixes + +- **Schedulers:** Throwing a falsy error in a scheduled function no longer results in strange error objects. ([#6594](https://github.com/reactivex/rxjs/issues/6594)) ([c70fcc0](https://github.com/reactivex/rxjs/commit/c70fcc02b4b737709aba559bf36b030a47902ee4)) +- scheduling with Rx-provided schedulers will no longer leak action references ([#6562](https://github.com/reactivex/rxjs/issues/6562)) ([ff5a748](https://github.com/reactivex/rxjs/commit/ff5a748b31ee73a6517e2f4220c920c73fbdd1fc)), closes [#6561](https://github.com/reactivex/rxjs/issues/6561) +- **forkJoin:** now finalizes sources before emitting ([#6546](https://github.com/reactivex/rxjs/issues/6546)) ([c52ff2e](https://github.com/reactivex/rxjs/commit/c52ff2e3aae19cd0877adb63182c03b79427de96)), closes [#4914](https://github.com/reactivex/rxjs/issues/4914) +- **observeOn:** release action references on teardown ([321d205](https://github.com/reactivex/rxjs/commit/321d2052696a7c366786c1ef3be7ad2a98a55f62)) +- **types:** update schedule signature overload ([c61e57c](https://github.com/reactivex/rxjs/commit/c61e57c9c64a1525d034aea641f1b846737e1eee)) + +# [7.3.0](https://github.com/reactivex/rxjs/compare/7.2.0...7.3.0) (2021-07-28) + +### Bug Fixes + +- Expose `Connectable`, the return type of `connectable` ([#6531](https://github.com/reactivex/rxjs/issues/6531)) ([69f5bfa](https://github.com/reactivex/rxjs/commit/69f5bfae0eb2880a3d5cfb34db3a182182b325de)), closes [#6529](https://github.com/reactivex/rxjs/issues/6529) +- **AsyncSubject:** properly emits values during reentrant subscriptions ([#6522](https://github.com/reactivex/rxjs/issues/6522)) ([dd8bdf3](https://github.com/reactivex/rxjs/commit/dd8bdf3b18b596155b66029ef16ebabf989360c5)), closes [#6520](https://github.com/reactivex/rxjs/issues/6520) + +### Features + +- **retry:** Now supports configurable delay as a named argument ([#6421](https://github.com/reactivex/rxjs/issues/6421)) ([5f69795](https://github.com/reactivex/rxjs/commit/5f69795f4be035499cf223bf9a3d7352c4975291)) +- **tap:** Now supports subscribe, unsubscribe, and finalize handlers ([#6527](https://github.com/reactivex/rxjs/issues/6527)) ([eb26cbc](https://github.com/reactivex/rxjs/commit/eb26cbc4488c9953cdde565b598b1dbdeeeee9ea)) + +# [7.2.0](https://github.com/reactivex/rxjs/compare/7.1.0...7.2.0) (2021-07-05) + +### Bug Fixes + +- **debounceTime:** unschedule dangling task on unsubscribe before complete ([#6464](https://github.com/reactivex/rxjs/issues/6464)) ([7ab0a4c](https://github.com/reactivex/rxjs/commit/7ab0a4c649b1b54e763a726c4ffdc183b0b45b23)) +- **fromEvent:** Types now properly infer when resultSelector is provided ([#6447](https://github.com/reactivex/rxjs/issues/6447)) ([39b9d81](https://github.com/reactivex/rxjs/commit/39b9d818ef6ea033dc8e53800e3a220d56c76b4a)) + +### Features + +- Operators are all exported at the top level, from "rxjs". From here on out, we encourage top-level imports with RxJS. Importing from `rxjs/operators` will be deprecated soon. ([#6488](https://github.com/reactivex/rxjs/issues/6488)) ([512adc2](https://github.com/reactivex/rxjs/commit/512adc25f350660113275d8277d16b7f3eec1d49)), closes [#6242](https://github.com/reactivex/rxjs/issues/6242) + +# [7.1.0](https://github.com/reactivex/rxjs/compare/7.0.1...7.1.0) (2021-05-21) + +### Bug Fixes + +- returned operator functions from multicast operators `share`, `publish`, `publishReplay` are now referentially transparent. Meaning if you take the result of calling `publishReplay(3)` and pass it to more than one observable's `pipe` method, it will behave the same in each case, rather than having a cumulative effect, which was a regression introduced sometime in version 6. If you required this broken behavior, there is a workaround posted [here](https://github.com/ReactiveX/rxjs/pull/6410#issuecomment-846087374) ([#6410](https://github.com/reactivex/rxjs/issues/6410)) ([e2f2e51](https://github.com/reactivex/rxjs/commit/e2f2e516514bdeb76229e69c639f10f21bccafad)), closes [/github.com/ReactiveX/rxjs/pull/6410#issuecomment-846087374](https://github.com//github.com/ReactiveX/rxjs/pull/6410/issues/issuecomment-846087374) [#5411](https://github.com/reactivex/rxjs/issues/5411) + +### Features + +- All subjects now have an `observed` property. This will allow users to check whether a subject has current subscribers without us allowing access to the `observers` array, which is going to be made private in future versions. ([#6405](https://github.com/reactivex/rxjs/issues/6405)) ([f47425d](https://github.com/reactivex/rxjs/commit/f47425d349475231c0f3542bb6ecef16a63e933a)) +- **groupBy:** Support named arguments, support ObservableInputs for duration selector ([#5679](https://github.com/reactivex/rxjs/issues/5679)) ([7a99397](https://github.com/reactivex/rxjs/commit/7a9939773802c4f7948c6d868a8f75facdea9f37)) +- **share:** use another observable to control resets ([#6169](https://github.com/reactivex/rxjs/issues/6169)) ([12c3716](https://github.com/reactivex/rxjs/commit/12c3716cecbf01f353c980488bf18845177b37b6)) + +## [7.0.1](https://github.com/reactivex/rxjs/compare/7.0.0...7.0.1) (2021-05-12) + +### Bug Fixes + +- **bindCallback:** resulting function now recreated underlying Subject and is reusable once again. ([#6369](https://github.com/reactivex/rxjs/issues/6369)) ([abf2bc1](https://github.com/reactivex/rxjs/commit/abf2bc13e38406717127159c8c373b910223b562)) +- **retry:** properly handles retry counts smaller than `1`. ([#6359](https://github.com/reactivex/rxjs/issues/6359)) ([e797bd7](https://github.com/reactivex/rxjs/commit/e797bd70b1368e189df00d697504304a3a5ef1a8)) +- **share:** properly closes synchronous "firehose" sources. ([#6370](https://github.com/reactivex/rxjs/issues/6370)) ([2271a91](https://github.com/reactivex/rxjs/commit/2271a9180131a0becdbf789c1429ef741ace4b2f)) +- Observable teardowns now properly called if `useDeprecatedSynchronousErrorHandling` is `true`. ([#6365](https://github.com/reactivex/rxjs/issues/6365)) ([e19e104](https://github.com/reactivex/rxjs/commit/e19e104d011233d83bc10c37f1ee0b3ac6e15612)), closes [#6364](https://github.com/reactivex/rxjs/issues/6364) +- **Subscription:** properly release parent subscriptions when unsubscribed. ([#6352](https://github.com/reactivex/rxjs/issues/6352)) ([88331d2](https://github.com/reactivex/rxjs/commit/88331d2ecdcf0f81a0712b315ed810d4da7d4b97)), closes [#6351](https://github.com/reactivex/rxjs/issues/6351) [#6351](https://github.com/reactivex/rxjs/issues/6351) +- **node**: do not reference DOM-related imports to assist in node usage. ([#6305](https://github.com/reactivex/rxjs/issues/6305)) ([b24818e](https://github.com/reactivex/rxjs/commit/b24818e96775045c7485932bf33349471e8f1363)), closes [#6297](https://github.com/reactivex/rxjs/issues/6297) + +# [7.0.0](https://github.com/reactivex/rxjs/compare/7.0.0-rc.3...7.0.0) (2021-04-29) + +### Bug Fixes + +- VS code will now properly auto-import operators, et al ([#6276](https://github.com/reactivex/rxjs/issues/6276)) ([f43c728](https://github.com/reactivex/rxjs/commit/f43c72815f9ebe5ee3a8ed11513be0f541c9517d)), closes [#6067](https://github.com/reactivex/rxjs/issues/6067) +- **AjaxResponse:** add stricter `type` (`AjaxResponseType`) ([#6279](https://github.com/reactivex/rxjs/issues/6279)) ([839e192](https://github.com/reactivex/rxjs/commit/839e192b7d826d833d7ce941be97c3735bd19c0a)) + +# [7.0.0-rc.3](https://github.com/reactivex/rxjs/compare/7.0.0-rc.2...7.0.0-rc.3) (2021-04-28) + +### Bug Fixes + +- finalize behaves well with useDeprecatedSynchronousErrorHandling ([#6251](https://github.com/reactivex/rxjs/issues/6251)) ([e4bed2a](https://github.com/reactivex/rxjs/commit/e4bed2a2bad994f05a39246707d4f203412cebbd)), closes [#6250](https://github.com/reactivex/rxjs/issues/6250) +- resolve run-time errors when using deprecated sync error handling ([#6272](https://github.com/reactivex/rxjs/issues/6272)) ([35daaf7](https://github.com/reactivex/rxjs/commit/35daaf77d3a9a909a7ec22c362c97ac42a597f79)), closes [#6271](https://github.com/reactivex/rxjs/issues/6271) +- resolve issue that made users unable to assert `instanceof AjaxError`. ([#6275](https://github.com/reactivex/rxjs/issues/6275)) ([a7c2d29](https://github.com/reactivex/rxjs/commit/a7c2d297ad6b2f405ac312b38f6360e9a645d890)) + +### Features + +- add config object to connectable ([#6267](https://github.com/reactivex/rxjs/issues/6267)) ([4d98b40](https://github.com/reactivex/rxjs/commit/4d98b40f969d5f55381f9a178ef3c18e6850cf47)) + +### BREAKING CHANGES + +- Our very new creation function, `connectable`, now takes a configuration object instead of just the `Subject` instance. This was necessary to make sure it covered all use cases for what we were trying to replace in the deprecated multicasting operators. Apologies for the late-in-the-game change, but we know it's not widely used yet (it's new in v7), and we want to get it right. + +# [7.0.0-rc.2](https://github.com/reactivex/rxjs/compare/7.0.0-rc.1...7.0.0-rc.2) (2021-04-20) + +### Bug Fixes + +- **webSocket:** return the correct type for `WebSocketSubject` `multiplex` method([#6232](https://github.com/reactivex/rxjs/issues/6232)) ([33383b8](https://github.com/reactivex/rxjs/commit/33383b884d895fa77866362b8b00fd2e2c3597e6)) + +### Reverts + +- Revert "chore: Add typesVersions to package.json (#6229)" (#6241) ([304f3a7](https://github.com/reactivex/rxjs/commit/304f3a73e67871f9b37f39675e503174d3dcc23a)), closes [#6229](https://github.com/reactivex/rxjs/issues/6229) [#6241](https://github.com/reactivex/rxjs/issues/6241) + +# [7.0.0-rc.1](https://github.com/reactivex/rxjs/compare/7.0.0-rc.0...7.0.0-rc.1) (2021-04-19) + +### Bug Fixes + +- **TypeScript:** Add typesVersions definition to package.json in order to help VS Code find automatic imports. ([#6067](https://github.com/reactivex/rxjs/issues/6067)) ([659a623](https://github.com/reactivex/rxjs/commit/659a623c94bd6b210e9beb6bb6061be540b05538)) + +# [7.0.0-rc.0](https://github.com/reactivex/rxjs/compare/7.0.0-beta.15...7.0.0-rc.0) (2021-04-19) + +### Bug Fixes + +- **symbol:** revert unique symbol in [#5874](https://github.com/reactivex/rxjs/issues/5874) ([#6224](https://github.com/reactivex/rxjs/issues/6224)) ([3c49429](https://github.com/reactivex/rxjs/commit/3c49429fadc31ebaddd143d4412907edc50e32be)), closes [#5919](https://github.com/reactivex/rxjs/issues/5919) [#6178](https://github.com/reactivex/rxjs/issues/6178) [#6175](https://github.com/reactivex/rxjs/issues/6175) +- forkJoin/combineLatest return Observable if passed any ([#6227](https://github.com/reactivex/rxjs/issues/6227)) ([ce0a2fa](https://github.com/reactivex/rxjs/commit/ce0a2fa975e7c08de2bbf893010f2c25c090b1ca)), closes [#6226](https://github.com/reactivex/rxjs/issues/6226) +- **fromEvent:** match targets properly; fix result selector type ([#6208](https://github.com/reactivex/rxjs/issues/6208)) ([8412c73](https://github.com/reactivex/rxjs/commit/8412c739bb47cc45ec3f38327115301b4fcc0118)) +- **merge:** single array is not an array of sources ([#6211](https://github.com/reactivex/rxjs/issues/6211)) ([4e900dc](https://github.com/reactivex/rxjs/commit/4e900dc745b5fbd7659b104c49fb0fce4ae84707)) +- **pipe:** Ensure that `unknown` is inferred for 9+ arguments. ([#6212](https://github.com/reactivex/rxjs/issues/6212)) ([6fa819b](https://github.com/reactivex/rxjs/commit/6fa819beb91ba99dadd6262d6c13f7ddfd9470c5)) + +### Features + +- add (optional) defaultValue configuration to firstValueFrom and lastValueFrom ([#6204](https://github.com/reactivex/rxjs/issues/6204)) ([df51b04](https://github.com/reactivex/rxjs/commit/df51b04d7ec68a72b3a4b0d69c3bb29264c72611)) + +# [7.0.0-beta.15](https://github.com/reactivex/rxjs/compare/7.0.0-beta.14...7.0.0-beta.15) (2021-03-31) + +### Bug Fixes + +- **esm:** duplicate directory in export path ([#6194](https://github.com/reactivex/rxjs/issues/6194)) ([aa41462](https://github.com/reactivex/rxjs/commit/aa4146288ec6542754f41ffd260fa4d6936a4d22)) + +# [7.0.0-beta.14](https://github.com/reactivex/rxjs/compare/7.0.0-beta.13...7.0.0-beta.14) (2021-03-30) + +### Bug Fixes + +- **share:** No longer throws errors for reentrant observables ([#6151](https://github.com/reactivex/rxjs/issues/6151)) ([fc728cd](https://github.com/reactivex/rxjs/commit/fc728cdf2f395620cca347602e66f3d173c057b5)), closes [#6144](https://github.com/reactivex/rxjs/issues/6144) + +### Features + +- **ajax:** Now allows configuration of query string parameters, via a `params` option in the request configuration ([#6174](https://github.com/reactivex/rxjs/issues/6174)) ([980f4d4](https://github.com/reactivex/rxjs/commit/980f4d4bb6a3bc1513a4335ed124f4d11b93d251)) +- **esm:** Added exports within package.json to enable scoped package loading. ([#6192](https://github.com/reactivex/rxjs/issues/6192)) ([33a9f06](https://github.com/reactivex/rxjs/commit/33a9f06f2c59c8aef3bb583bdb7d61d08ab597a0)), closes [sveltejs/kit#612](https://github.com/sveltejs/kit/issues/612) [nodejs/node#27408](https://github.com/nodejs/node/issues/27408) +- **ReadableStreams:** RxJS now supports conversions for ReadableStreams e.g. `from(readableStream)`. ([#6163](https://github.com/reactivex/rxjs/issues/6163)) ([19d6502](https://github.com/reactivex/rxjs/commit/19d650223cf0e1964e893baca19f264154422a7d)) + +# [7.0.0-beta.13](https://github.com/reactivex/rxjs/compare/7.0.0-beta.12...7.0.0-beta.13) (2021-03-15) + +### Bug Fixes + +- **fromEvent:** throw if passed invalid target ([#6136](https://github.com/reactivex/rxjs/issues/6136)) ([317ba0c](https://github.com/reactivex/rxjs/commit/317ba0c9254e447385414e2c57e1d81760f88aa6)), closes [#5823](https://github.com/reactivex/rxjs/issues/5823) +- remove misused type parameter from static pipe ([#6119](https://github.com/reactivex/rxjs/issues/6119)) ([8dc7d17](https://github.com/reactivex/rxjs/commit/8dc7d1793b4067d9eedc42b28d49ace8296672f5)), closes [#5557](https://github.com/reactivex/rxjs/issues/5557) +- **Subscriber:** don't leak destination ([#6116](https://github.com/reactivex/rxjs/issues/6116)) ([5bba36c](https://github.com/reactivex/rxjs/commit/5bba36c6dde5b1b4b7e434104e716b233e5f402c)) +- **combineLatest:** POJO signature should match only ObservableInput values ([#6103](https://github.com/reactivex/rxjs/issues/6103)) ([d633494](https://github.com/reactivex/rxjs/commit/d633494dcdcabecda2c64ee84b8b6ceeaa2cb3d8)) +- **forkJoin:** POJO signature should match only ObservableInput values ([#6095](https://github.com/reactivex/rxjs/issues/6095)) ([566427e](https://github.com/reactivex/rxjs/commit/566427e88e597589f21b8cfb057dd13d5c61e0f2)) +- predicates that return `any` will now behave property with findIndex ([#6097](https://github.com/reactivex/rxjs/issues/6097)) ([c6f73d6](https://github.com/reactivex/rxjs/commit/c6f73d687e6b2142da4cab2a66047cc6dd123bf9)) +- remove misused type parameter from isObservable ([#6083](https://github.com/reactivex/rxjs/issues/6083)) ([f16b634](https://github.com/reactivex/rxjs/commit/f16b6341eef85009fc16de13623dc860d8d87778)) +- unhandled errors in observers correctly scheduled ([#6118](https://github.com/reactivex/rxjs/issues/6118)) ([c02ceb7](https://github.com/reactivex/rxjs/commit/c02ceb75e3de12fedbe270d5d323f508171f9cfd)) +- **defaultIfEmpty:** Allow `undefined` as an argument, require an argument ([4983760](https://github.com/reactivex/rxjs/commit/4983760b9179da27ddfcbf419ac5975cff9447c9)), closes [#6064](https://github.com/reactivex/rxjs/issues/6064) +- **elementAt:** Allow `defaultValue` of `undefined`. ([5bc1b3e](https://github.com/reactivex/rxjs/commit/5bc1b3e22deceb5ea5f1882c0f92f061c1c4792d)) +- **first:** Allow `defaultValue` of `undefined`. ([62a6bbe](https://github.com/reactivex/rxjs/commit/62a6bbe1c3c51468c57e4e8f754c1c09da2db51b)) +- **last:** Allow `defaultValue` of `undefined`. ([ef3e721](https://github.com/reactivex/rxjs/commit/ef3e721f440132cf199f662b6a987349a0a70418)) + +### Features + +- rename and alias `combineLatest` as `combineLatestAll` for consistency ([#6079](https://github.com/reactivex/rxjs/issues/6079)) ([42cee80](https://github.com/reactivex/rxjs/commit/42cee8045594779e8802b370c7244e6bbeeccaa3)), closes [#4590](https://github.com/reactivex/rxjs/issues/4590) + +### BREAKING CHANGES + +- **defaultIfEmpty:** `defaultIfEmpty` requires a value be passed. Will no longer convert `undefined` to `null` for no good reason. + +# [7.0.0-beta.12](https://github.com/reactivex/rxjs/compare/7.0.0-beta.11...7.0.0-beta.12) (2021-02-27) + +5bc8e3361 Fix/6052 ajax responseType should default to "json" (#6056) + +### Bug Fixes + +- **ajax**: `responseType` is now properly defaulted to `"json"` again. ([#6056](https://github.com/reactivex/rxjs/issues/6056)) ([5bc8e3361](https://github.com/reactivex/rxjs/commit/5bc8e3361)) +- Corner case resolved where an error thrown in a completion handler might delay teardown if it happened to be after a completing operator like `take`. ([#6062](https://github.com/reactivex/rxjs/issues/6062)) ([a2b9563](https://github.com/reactivex/rxjs/commit/a2b95631be882d2cf0fd87f43804d1ed699591d7)) +- **AsyncGenerator support**: consumed async generators are now properly finalized. ([#6062](https://github.com/reactivex/rxjs/issues/6062)) ([a2b9563](https://github.com/reactivex/rxjs/commit/a2b95631be882d2cf0fd87f43804d1ed699591d7)), closes [#5998](https://github.com/reactivex/rxjs/issues/5998) +- **throttle:** no longer emits more than necessary in sync/sync trailing case ([#6059](https://github.com/reactivex/rxjs/issues/6059)) ([9da638a](https://github.com/reactivex/rxjs/commit/9da638a70d5abb862439ab4ee6a55368228811b0)), closes [#6058](https://github.com/reactivex/rxjs/issues/6058) + +# [7.0.0-beta.11](https://github.com/reactivex/rxjs/compare/7.0.0-beta.10...7.0.0-beta.11) (2021-02-24) + +### Bug Fixes + +- **ajax:** now errors on forced abort ([#6041](https://github.com/reactivex/rxjs/issues/6041)) ([d950921](https://github.com/reactivex/rxjs/commit/d95092143c1860eef054d27f2a1e50cb98b0ef58)), closes [#4251](https://github.com/reactivex/rxjs/issues/4251) +- **buffer:** closingNotifier completion does not complete resulting observable ([358ae84](https://github.com/reactivex/rxjs/commit/358ae84cb9d59170216e7e0845c192eb3e1dcb51)) +- **buffer:** Remaining buffer will correctly be emitted on source close. ([0c667d5](https://github.com/reactivex/rxjs/commit/0c667d596d4a14002ffe9d4db319ed7cd7442ada)), closes [#3990](https://github.com/reactivex/rxjs/issues/3990) [#6035](https://github.com/reactivex/rxjs/issues/6035) +- **debounceTime:** improves performance on quick succession of emits ([#6049](https://github.com/reactivex/rxjs/issues/6049)) ([9b70861](https://github.com/reactivex/rxjs/commit/9b708613cb7687647dc43c5e15b821e17ccc23ef)) +- **distinctUntilChanged:** Ensure reentrant code is compared properly ([#6014](https://github.com/reactivex/rxjs/issues/6014)) ([0ebcf17](https://github.com/reactivex/rxjs/commit/0ebcf1751a5359072b137ff197789570be4d7ead)) +- **share:** Ensure proper memory clean up ([1aa400a](https://github.com/reactivex/rxjs/commit/1aa400a5214325bc843a74602022a7912da20166)) +- **window:** final window stays open until source complete ([e8b05ef](https://github.com/reactivex/rxjs/commit/e8b05ef090d33af5b883e8020b8b7a3c4c8fa30e)) +- **concat/merge:** operators will finalize inners before moving to the next ([#6010](https://github.com/reactivex/rxjs/issues/6010)) ([5249a23](https://github.com/reactivex/rxjs/commit/5249a23b38bdda4639e9d669afd62a624172f89c)), closes [#3338](https://github.com/reactivex/rxjs/issues/3338) +- predicates that return `any` will now behave property in TS ([#5987](https://github.com/reactivex/rxjs/issues/5987)) ([f5ae97d](https://github.com/reactivex/rxjs/commit/f5ae97d49a35b9f99ac59f79dd244a6d8d6c8a7b)), closes [#5986](https://github.com/reactivex/rxjs/issues/5986) +- `publish` variants returning `ConnectableObservable` not properly utilizing lift ([#6003](https://github.com/reactivex/rxjs/issues/6003)) ([9acb950](https://github.com/reactivex/rxjs/commit/9acb950aec9efda95eb7492bfc47a33b71ef2e55)) +- Resolve issues with deprecated synchronous error handling and chained operators ([#5980](https://github.com/reactivex/rxjs/issues/5980)) ([0ad2802](https://github.com/reactivex/rxjs/commit/0ad2802a5aa9cd19875dc05c1cfb33f0b2f2c153)), closes [#5979](https://github.com/reactivex/rxjs/issues/5979) +- `useDeprecatedSynchronousErrorThrowing` honored for flattened sync sources ([#5984](https://github.com/reactivex/rxjs/issues/5984)) ([abd95ce](https://github.com/reactivex/rxjs/commit/abd95ce1aa81a64de81c074a72570a8f0949cd0d)), closes [#5983](https://github.com/reactivex/rxjs/issues/5983) + +### Features + +- **ajax:** Add option for streaming progress ([#6001](https://github.com/reactivex/rxjs/issues/6001)) ([873e52d](https://github.com/reactivex/rxjs/commit/873e52d0d67b0f8470e6290c6fbc35c571464aaf)) +- **exhaustAll:** renamed `exhaust` to `exhaustAll` ([#5639](https://github.com/reactivex/rxjs/issues/5639)) ([701c7d4](https://github.com/reactivex/rxjs/commit/701c7d48cf1c3e60941692010254d6a27fc70980)) + +### BREAKING CHANGES + +- **window:** The `windowBoundaries` observable no longer completes the result. It was only ever meant to notify of the window boundary. To get the same behavior as the old behavior, you would need to add an `endWith` and a `skipLast(1)` like so: `source$.pipe(window(notifier$.pipe(endWith(true))), skipLast(1))`. +- **buffer:** Final buffered values will now always be emitted. To get the same behavior as the previous release, you can use `endWith` and `skipLast(1)`, like so: `source$.pipe(buffer(notifier$.pipe(endWith(true))), skipLast(1))` +- **buffer:** `closingNotifier` completion no longer completes the result of `buffer`. If that is truly a desired behavior, then you should use `takeUntil`. Something like: `source$.pipe(buffer(notifier$), takeUntil(notifier$.pipe(ignoreElements(), endWith(true))))`, where `notifier$` is multicast, although there are many ways to compose this behavior. + +# [7.0.0-beta.10](https://github.com/reactivex/rxjs/compare/7.0.0-beta.9...7.0.0-beta.10) (2021-01-18) + +### Bug Fixes + +- **combineLatest:** Ensure `EMPTY` is returned if no observables are passed. ([#5963](https://github.com/reactivex/rxjs/issues/5963)) ([157c7e8](https://github.com/reactivex/rxjs/commit/157c7e8068befdfb26a9ba6ca770d38a66966ab5)), closes [#5962](https://github.com/reactivex/rxjs/issues/5962) +- **fromEvent:** fixed HasEventTargetAddRemove to support EventTarget types ([#5945](https://github.com/reactivex/rxjs/issues/5945)) ([5f022d7](https://github.com/reactivex/rxjs/commit/5f022d784570684632e6fd5ae247fc259ee34c4b)) + +### Features + +- **connect:** Adds new `connect` operator. ([9d53af0](https://github.com/reactivex/rxjs/commit/9d53af04103dbbb3bae40a4c511e2eebf117be09)) +- **connectable:** Adds `connectable` creation method ([f968a79](https://github.com/reactivex/rxjs/commit/f968a791c1b48f3100e925d700e8a0ecd69cc7e5)) +- **share:** Make `share` completely configurable. Also adds `SubjectLike`. ([2d600c7](https://github.com/reactivex/rxjs/commit/2d600c75c1065d862a2089dc1cd26007996b1c9d)) +- **TestScheduler:** add `expectObservable(a$).toEqual(b$)`. ([3372c72](https://github.com/reactivex/rxjs/commit/3372c72ed77a96e29a613a620e85f93bcf447920)) + +### Performance Improvements + +- ensure same hidden class for OperatorSubscriber ([#5878](https://github.com/reactivex/rxjs/issues/5878)) ([246b449](https://github.com/reactivex/rxjs/commit/246b44902acde3a80e659f362969e6e2f8b19ef2)) + +### BREAKING CHANGES + +- **share:** The TypeScript type `Subscribable` now only supports what is a valid return for `[Symbol.observable]()`. +- **share:** The TypeScript type `Observer` no longer incorrectly has an optional `closed` property. + +# [7.0.0-beta.9](https://github.com/reactivex/rxjs/compare/7.0.0-beta.8...7.0.0-beta.9) (2020-12-07) + +### Bug Fixes + +- **audit:** don't signal on complete ([54cb428](https://github.com/reactivex/rxjs/commit/54cb42823ceec4db469f6155de67993b67ec85be)) +- **bufferToggle:** don't signal on complete ([65686ff](https://github.com/reactivex/rxjs/commit/65686ffd23f2d5a5145f2b7c33ea739e9bb808cd)) +- **bufferWhen:** don't signal on complete ([a2ba364](https://github.com/reactivex/rxjs/commit/a2ba364ede3c69c7703795a744f57122b49eac40)) +- **debounce:** don't signal on complete ([c919c68](https://github.com/reactivex/rxjs/commit/c919c684ad63724f0b55ccc4561f847773d945c8)) +- **delayWhen:** no longer emits if duration selector is empty ([#5769](https://github.com/reactivex/rxjs/issues/5769)) ([0872341](https://github.com/reactivex/rxjs/commit/087234146760ab2c67a04f9f0b5494a93affadb7)), closes [#3665](https://github.com/reactivex/rxjs/issues/3665) +- **forkJoin:** ensure readonly array argument `forkJoin([a$, b$, c$] as const)` result is correct ([6baec53](https://github.com/reactivex/rxjs/commit/6baec536015253ac96827f2136ede17a324c634e)) +- **iif:** No longer allow accidental undefined arguments ([#5829](https://github.com/reactivex/rxjs/issues/5829)) ([23b98b4](https://github.com/reactivex/rxjs/commit/23b98b4e61c3284c81c07a8d810e8c3ec99ddfec)) +- **sample:** don't signal on complete ([95e0b70](https://github.com/reactivex/rxjs/commit/95e0b703caaf288657c7d722b9823458280be88b)) +- **Symbol.observable:** properly defined as a `unique symbol`. ([#5874](https://github.com/reactivex/rxjs/issues/5874)) ([374138e](https://github.com/reactivex/rxjs/commit/374138e09eb7ceb6f8da556c6c11dea1ba8cdbee)), closes [#5861](https://github.com/reactivex/rxjs/issues/5861) [#4415](https://github.com/reactivex/rxjs/issues/4415) +- **throttle:** don't signal on complete ([4af0227](https://github.com/reactivex/rxjs/commit/4af022753d6dd4e94bcfcf0cc6082bb2312a3f02)) +- **windowToggle:** don't signal on complete ([9cb56c4](https://github.com/reactivex/rxjs/commit/9cb56c45de289ef5b062f33971996bdb8414cf99)), closes [#5838](https://github.com/reactivex/rxjs/issues/5838) +- use empty object type in combineLatest/forkJoin sigs ([#5832](https://github.com/reactivex/rxjs/issues/5832)) ([22aaaa2](https://github.com/reactivex/rxjs/commit/22aaaa2f03dc721f850d9836243773c5310e85e8)) +- **withLatestFrom:** allow synchronous source ([#5828](https://github.com/reactivex/rxjs/issues/5828)) ([adbe65e](https://github.com/reactivex/rxjs/commit/adbe65e659bbf17f6ab20a9b30fcca0e4d76af9a)) + +### Features + +- stopped notification handler ([#5750](https://github.com/reactivex/rxjs/issues/5750)) ([cfa267b](https://github.com/reactivex/rxjs/commit/cfa267bc0916ede09c8b14aedcdb69a791055fb6)) +- support emoji in marble diagrams ([#5907](https://github.com/reactivex/rxjs/issues/5907)) ([1b4608c](https://github.com/reactivex/rxjs/commit/1b4608cea3a9db96d7a629ad5de0e100145c180e)) +- **filter:** improve type inference for filter(Boolean) ([#5831](https://github.com/reactivex/rxjs/issues/5831)) ([d2658fa](https://github.com/reactivex/rxjs/commit/d2658fa32d7a86ac1e0796c452df258fc5470f67)) + +### BREAKING CHANGES + +- **windowToggle:** the observable returned by the windowToggle operator's + closing selector must emit a next notification to close the window. + Complete notifications no longer close the window. +- **bufferToggle:** the observable returned by the bufferToggle operator's + closing selector must emit a next notification to close the buffer. + Complete notifications no longer close the buffer. +- **bufferWhen:** the observable returned by the bufferWhen operator's + closing selector must emit a next notification to close the buffer. + Complete notifications no longer close the buffer. +- **debounce:** the observable returned by the debounce operator's + duration selector must emit a next notification to end the duration. + Complete notifications no longer end the duration. +- **throttle:** the observable returned by the throttle operator's + duration selector must emit a next notification to end the duration. + Complete notifications no longer end the duration. +- **sample:** the sample operator's notifier observable must emit a next notification to effect a sample. Complete notifications no longer effect a sample. +- **audit:** the observable returned by the audit operator's duration selector must emit a next notification to end the duration. Complete notifications no longer end the duration. +- **Symbol.observable:** `rxjs@7` is only compatible with `@types/node@14.14.3` or higher and `symbol-observable@3.0.0` and higher. Older versions of `@types/node` incorrectly defined `Symbol.observable` and will be in conflict with `rxjs` and `symbol-observable@3.0.0`. +- **delayWhen:** `delayWhen` will no longer emit if the duration selector simply completes without a value. Notifiers must notify with a value, not a completion. +- **iif:** `iif` will no longer allow result arguments that are `undefined`. This was a bad call pattern that was likely an error in most cases. If for some reason you are relying on this behavior, simply substitute `EMPTY` in place of the `undefined` argument. This ensures that the behavior was intentional and desired, rather than the result of an accidental `undefined` argument. + +# [7.0.0-beta.8](https://github.com/reactivex/rxjs/compare/7.0.0-beta.7...7.0.0-beta.8) (2020-10-15) + +### Bug Fixes + +- **audit, auditTime:** audit and auditTime emit last value after source completes ([#5799](https://github.com/reactivex/rxjs/issues/5799)) ([643bc85](https://github.com/reactivex/rxjs/commit/643bc85ab17a15a5d96f8bef8f08c3987d16eb40)), closes [#5730](https://github.com/reactivex/rxjs/issues/5730) +- No longer allow invalid "Subscribable" type as valid observable source in `from` and others. ([258dddd](https://github.com/reactivex/rxjs/commit/258dddd8a392456e7d0b5ed9a7e294044f7c2518)), closes [#4532](https://github.com/reactivex/rxjs/issues/4532) +- **bindNodeCallback:** ensure underlying function is not called twice during subscription ([#5780](https://github.com/reactivex/rxjs/issues/5780)) ([74aa4b2](https://github.com/reactivex/rxjs/commit/74aa4b2ea6685f475329a8b8ecbcebed9adae547)) +- **delay:** Now properly handles Date and negative numbers ([#5719](https://github.com/reactivex/rxjs/issues/5719)) ([868c02b](https://github.com/reactivex/rxjs/commit/868c02b47bb6f4ec4cd1d68b5b474731c470f27e)), closes [#5232](https://github.com/reactivex/rxjs/issues/5232) +- **delayWhen:** only deprecates when subscriptionDelay presents ([#5797](https://github.com/reactivex/rxjs/issues/5797)) ([43d1731](https://github.com/reactivex/rxjs/commit/43d17311a521234375146029aa5c4709cb221344)) +- **every:** index properly increments in predicate ([5686f83](https://github.com/reactivex/rxjs/commit/5686f838fdc3da710d3f1eed1a6381791e3cc644)) +- **firstValueFrom:** now unsubscribes from source after first value is received ([#5813](https://github.com/reactivex/rxjs/issues/5813)) ([a321516](https://github.com/reactivex/rxjs/commit/a321516908aa036fb658395a372668a986af2504)), closes [#5811](https://github.com/reactivex/rxjs/issues/5811) +- **from:** objects that are thennable that happen to have a subscribe method will no longer error. ([789d6e3](https://github.com/reactivex/rxjs/commit/789d6e3d851d57ab3b4488381f702120fd079737)) +- **fromEvent:** now properly types JQuery event targets ([b5aa15a](https://github.com/reactivex/rxjs/commit/b5aa15a7f58377310438aa5957e1516749d36219)) +- **mergeScan:** no longer emits state again upon completion. ([#5805](https://github.com/reactivex/rxjs/issues/5805)) ([68c2894](https://github.com/reactivex/rxjs/commit/68c28943b4d2c51068fecbc359a68ca6982307bf)), closes [#5372](https://github.com/reactivex/rxjs/issues/5372) +- **throttle:** now supports synchronous duration selectors ([55e953e](https://github.com/reactivex/rxjs/commit/55e953e1f7b915e6c9072bf14a2febd5b8431393)), closes [#5658](https://github.com/reactivex/rxjs/issues/5658) +- **throttle:** trailing values will now emit after source completes ([d5fd69c](https://github.com/reactivex/rxjs/commit/d5fd69c123d2232335563eea95c69c07576d079d)) +- **timeout:** allows synchronous observable as a source ([84c5c0b](https://github.com/reactivex/rxjs/commit/84c5c0b9d9e0d1791ac2f066c26e462e822d73e1)), closes [#5746](https://github.com/reactivex/rxjs/issues/5746) +- **zip:** zip now accepts an array of arguments like its counterparts ([3123b67](https://github.com/reactivex/rxjs/commit/3123b670cca9b77919845333952ef70275ed6e90)) + +### Code Refactoring + +- **count:** Base off of `reduce`. ([98a6d09](https://github.com/reactivex/rxjs/commit/98a6d0991df2a28366ab8f34098109a67257c235)) +- **pairs:** Based off of `from` and `Object.entries` ([#5775](https://github.com/reactivex/rxjs/issues/5775)) ([d39f830](https://github.com/reactivex/rxjs/commit/d39f8309c33917cb7070c7432fcd382395e4211e)) + +### Features + +- **ajax:** now supports passing custom XSRF cookies in a custom header ([#5702](https://github.com/reactivex/rxjs/issues/5702)) ([1a2c2e4](https://github.com/reactivex/rxjs/commit/1a2c2e49482a460778ea92c7f6a92e58cc3e87bb)), closes [#4003](https://github.com/reactivex/rxjs/issues/4003) +- **switchScan:** add switchScan() operator ([#4442](https://github.com/reactivex/rxjs/issues/4442)) ([73fa910](https://github.com/reactivex/rxjs/commit/73fa910cb62eccbccc4b4249f9b2606095704328)), closes [#2931](https://github.com/reactivex/rxjs/issues/2931) + +### BREAKING CHANGES + +- **mergeScan:** `mergeScan` will no longer emit its inner state again upon completion. +- **pairs:** `pairs` will no longer function in IE without a polyfill for `Object.entries`. `pairs` itself is also deprecated in favor of users just using `from(Object.entries(obj))`. +- **zip:** Zipping a single array will now have a different result. This is an extreme corner-case, because it is very unlikely that anyone would want to zip an array with nothing at all. The workaround would be to wrap the array in another array `zip([[1,2,3]])`. But again, that's pretty weird. +- **count:** No longer passes `source` observable as a third argument to the predicate. That feature was rarely used, and of limited value. The workaround is to simply close over the source inside of the function if you need to access it in there. + +# [7.0.0-beta.7](https://github.com/reactivex/rxjs/compare/7.0.0-beta.5...7.0.0-beta.7) (2020-09-23) + +### Bug Fixes + +- **multicast:** and other publish variants will handle errors thrown in a selector appropriately ([bde8eda](https://github.com/reactivex/rxjs/commit/bde8eda09310463b05c5ec7d8a1dd1bafe9dba6f)) + +### Code Refactoring + +- **tap:** reduce the size of the implementation ([1222d5a](https://github.com/reactivex/rxjs/commit/1222d5a68faa9d3f3c9ad8f8d5db1440971502bd)) +- **Subscriber:** Massively untangle Subscriber and SafeSubscriber ([07902ca](https://github.com/reactivex/rxjs/commit/07902ca99ee828521ce238826f10b55e25fbf554)) + +### BREAKING CHANGES + +- **Subscriber:** `new Subscriber` no longer takes 0-3 arguments. To create a `Subscriber` with 0-3 arguments, use `Subscriber.create`. However, please note that there is little to no reason that you should be creating `Subscriber` references directly, and `Subscriber.create` and `new Subscriber` are both deprecated. + +# [7.0.0-beta.6](https://github.com/reactivex/rxjs/compare/7.0.0-beta.5...7.0.0-beta.6) (2020-09-23) + +### Bug Fixes + +- **AsyncSubject:** fixed reentrancy issue in complete ([9e00f11](https://github.com/reactivex/rxjs/commit/9e00f11e992d223edf1013d0a44c7cad41b72470)), closes [/github.com/ReactiveX/rxjs/pull/5729/files/30d429cf1b791db15c04a61f6a683e189b53fb3e#r492314703](https://github.com//github.com/ReactiveX/rxjs/pull/5729/files/30d429cf1b791db15c04a61f6a683e189b53fb3e/issues/r492314703) +- **delay:** proper handling of absolute time (`Date`) passed as an argument ([8ae89b1](https://github.com/reactivex/rxjs/commit/8ae89b19a095541eb3dfe6e6d9f26367486c435e)) +- **fromEvent:** properly teardown for ArrayLike targets ([066de74](https://github.com/reactivex/rxjs/commit/066de7408810864891b9fd16e05c6c8b4ca88087)) +- **ReplaySubject:** no longer buffers additional values after it's already stopped ([#5696](https://github.com/reactivex/rxjs/issues/5696)) ([a08232b](https://github.com/reactivex/rxjs/commit/a08232be6dcab74e94cfbb17cc5138050bcd6ddb)) +- **scan:** proper indexes when seed is not supplied ([f93fb9c](https://github.com/reactivex/rxjs/commit/f93fb9c1fb7434c97e1d156370756159c5f2b077)), closes [#4348](https://github.com/reactivex/rxjs/issues/4348) [#3879](https://github.com/reactivex/rxjs/issues/3879) +- **windowTime:** Passing no creation interval will now properly open new window when old one closes ([cbd0ac0](https://github.com/reactivex/rxjs/commit/cbd0ac0478730ec10172b57210e7d269d1ce62a2)) + +### Code Refactoring + +- **Massive Size Reduction:** reduced the size of all operator implementations as well as other utilities and types ([#5729](https://github.com/reactivex/rxjs/issues/5729)) ([4d3fc23](https://github.com/reactivex/rxjs/commit/fc41e13a1b9a05fc242c1369b4f597c931bd28b5)) + +### Features + +- **onUnhandledError:** configuration point added for unhandled errors ([#5681](https://github.com/reactivex/rxjs/issues/5681)) ([3485dd5](https://github.com/reactivex/rxjs/commit/3485dd5149b731e1103d2d070e3892735cbacef1)) +- **skipLast:** counts zero or less will mirror the source ([02e113b](https://github.com/reactivex/rxjs/commit/02e113b3345a9efe8f7c29f8b9c1c0d088aaf726)) + +### BREAKING CHANGES + +- **skipLast:** `skipLast` will no longer error when passed a negative number, rather it will simply return the source, as though `0` was passed. +- **map:** `thisArg` will now default to `undefined`. The previous default of `MapSubscriber` never made any sense. This will only affect code that calls map with a `function` and references `this` like so: `source.pipe(map(function () { console.log(this); }))`. There wasn't anything useful about doing this, so the breakage is expected to be very minimal. If anything we're no longer leaking an implementation detail. +- **onUnhandledError:** Errors that occur during setup of an observable subscription after the subscription has emitted an error or completed will now throw in their own call stack. Before it would call `console.warn`. This is potentially breaking in edge cases for node applications, which may be configured to terminate for unhandled exceptions. In the unlikely event this affects you, you can configure the behavior to `console.warn` in the new configuration setting like so: `import { config } from 'rxjs'; config.onUnhandledError = (err) => console.warn(err);` + +# [7.0.0-beta.5](https://github.com/reactivex/rxjs/compare/7.0.0-beta.4...7.0.0-beta.5) (2020-09-03) + +### Bug Fixes + +- **ajax:** Allow XHR to perform body serialization and set content-type where possible ([d8657ed](https://github.com/reactivex/rxjs/commit/d8657ede8d9620ac2a7d61557e1f1d0e89b0b52a)), closes [#2837](https://github.com/reactivex/rxjs/issues/2837) +- **ajax:** Do not mutate headers passed as arguments ([0d66ba4](https://github.com/reactivex/rxjs/commit/0d66ba458f07fba51cfc73440d01ef453c24cda7)), closes [#2801](https://github.com/reactivex/rxjs/issues/2801) +- **bindCallback:** now emits errors that happen after callback ([2bddd31](https://github.com/reactivex/rxjs/commit/2bddd317fad962ad375de4a04dd528b02479ec5b)) +- **bindNodeCallback:** now emits errors that happen after callback ([edc28cf](https://github.com/reactivex/rxjs/commit/edc28cfd13ba3d7fadc24ea3c20ec8ca5a19064d)) +- **buffer:** Ensure notifier is subscribed after source ([#5654](https://github.com/reactivex/rxjs/issues/5654)) ([c088b0e](https://github.com/reactivex/rxjs/commit/c088b0eca904ab835b23df629d472003d6a82561)), closes [#2195](https://github.com/reactivex/rxjs/issues/2195) [#1754](https://github.com/reactivex/rxjs/issues/1754) +- **catchError:** ensure proper handling of async return for synchronous source error handling ([#5627](https://github.com/reactivex/rxjs/issues/5627)) ([1b29d4b](https://github.com/reactivex/rxjs/commit/1b29d4b6d42e3d6b649f9f2c4bb718f343233d83)), closes [#5115](https://github.com/reactivex/rxjs/issues/5115) +- **catchError:** inner synchronous observables will properly terminate ([#5655](https://github.com/reactivex/rxjs/issues/5655)) ([d3fd2fb](https://github.com/reactivex/rxjs/commit/d3fd2fb2bd619b79d0c4afebc3c10299afbca262)) +- **errors:** Custom RxJS errors now all have a call stack ([#5686](https://github.com/reactivex/rxjs/issues/5686)) ([9bb046c](https://github.com/reactivex/rxjs/commit/9bb046c744cc1f9438a805849b655946e5793936)), closes [#4250](https://github.com/reactivex/rxjs/issues/4250) +- **onErrorResumeNext:** observables always finalized before moving to next source ([#5650](https://github.com/reactivex/rxjs/issues/5650)) ([ff68ad2](https://github.com/reactivex/rxjs/commit/ff68ad2caa3d275a23416984fab5570d3fed9458)) +- **package.json:** change homepage setting to official docs site. ([#5669](https://github.com/reactivex/rxjs/issues/5669)) ([e57c402](https://github.com/reactivex/rxjs/commit/e57c402b29288f61fe886b00e51817730bcb320b)) +- **repeat:** Ensure teardown happens between repeated synchronous obs… ([#5620](https://github.com/reactivex/rxjs/issues/5620)) ([0ca8a65](https://github.com/reactivex/rxjs/commit/0ca8a65b73aea93172366ca67207b53e3e3e77a8)) +- **repeatWhen:** Ensure teardown happens between repeat subscriptions ([#5625](https://github.com/reactivex/rxjs/issues/5625)) ([98356f4](https://github.com/reactivex/rxjs/commit/98356f4ebefdba1f5a14edbd96de1592694a01a8)) +- **retry:** Ensure teardown happens before resubscription with synchronous observables ([6f90597](https://github.com/reactivex/rxjs/commit/6f90597e51e038dabd8397b9f066ab4e3d344a5b)), closes [#5620](https://github.com/reactivex/rxjs/issues/5620) +- **retryWhen:** Ensure subscription tears down between retries ([#5623](https://github.com/reactivex/rxjs/issues/5623)) ([6752af7](https://github.com/reactivex/rxjs/commit/6752af7c1839baf3cd7ed9d024499de61a2477e9)) +- **throttleTime:** ensure the spacing between throttles is always at least the throttled amount ([#5687](https://github.com/reactivex/rxjs/issues/5687)) ([ea84fc4](https://github.com/reactivex/rxjs/commit/ea84fc4dce84e32598701f79d9449be00a05352c)), closes [#3712](https://github.com/reactivex/rxjs/issues/3712) [#4864](https://github.com/reactivex/rxjs/issues/4864) [#2727](https://github.com/reactivex/rxjs/issues/2727) [#4727](https://github.com/reactivex/rxjs/issues/4727) [#4429](https://github.com/reactivex/rxjs/issues/4429) +- **zip:** zip operators and functions are now able to zip all iterable sources ([#5688](https://github.com/reactivex/rxjs/issues/5688)) ([02c3a1b](https://github.com/reactivex/rxjs/commit/02c3a1b70c0e96b784a3c5c214c0f89c5ebdd696)), closes [#4304](https://github.com/reactivex/rxjs/issues/4304) +- `switchMap` and `exhaustMap` behave correctly with re-entrant code. ([c289688](https://github.com/reactivex/rxjs/commit/c289688f5e1f33ec21306b4d2f5539dd19f963f2)) +- **webSocket:** close websocket connection attempt on unsubscribe ([e1a671c](https://github.com/reactivex/rxjs/commit/e1a671cbd7f5a6ce547ed9ee6ce98c22264500f4)), closes [#4446](https://github.com/reactivex/rxjs/issues/4446) + +### Code Refactoring + +- **ajax:** Use simple Observable ([17b9add](https://github.com/reactivex/rxjs/commit/17b9add03a90aec6e708a87c0fc387745f0b9df6)) +- **Subscriber:** remove \_unsubscribeAndRecycle ([d879c3f](https://github.com/reactivex/rxjs/commit/d879c3f3ae4b1de5660d1613bb8b300e7194d581)) +- **VirtualTimeScheduler:** remove sortActions from public API ([#5657](https://github.com/reactivex/rxjs/issues/5657)) ([a468f88](https://github.com/reactivex/rxjs/commit/a468f881c8c02195b089889486d1a94fab2771e0)) + +### Features + +- **combineLatest:** add N-args signature for observable inputs ([#5488](https://github.com/reactivex/rxjs/issues/5488)) ([fcc47e7](https://github.com/reactivex/rxjs/commit/fcc47e75a4c811199c5071144172f4d06ffc7c70)) +- **Subscription:** `add` no longer returns unnecessary Subscription reference ([#5656](https://github.com/reactivex/rxjs/issues/5656)) ([4de604e](https://github.com/reactivex/rxjs/commit/4de604ea66261f597af11918aec53cd94590b30f)) +- **Subscription:** `remove` will now remove any teardown by reference ([#5659](https://github.com/reactivex/rxjs/issues/5659)) ([1531152](https://github.com/reactivex/rxjs/commit/15311529fa1b880ed469b6c253cd0be7ff2f98a1)) +- **throwError:** now accepts a factory to create the error ([#5647](https://github.com/reactivex/rxjs/issues/5647)) ([dad270a](https://github.com/reactivex/rxjs/commit/dad270afcf496de74b4392024191715d7dbef4f5)), closes [#5617](https://github.com/reactivex/rxjs/issues/5617) +- **useDeprecatedNextContext:** Puts deprecated next context behavior behind a flag ([dfdef5d](https://github.com/reactivex/rxjs/commit/dfdef5dcaf52363be59359786aef8bc733197b43)) +- support schedulers within run ([#5619](https://github.com/reactivex/rxjs/issues/5619)) ([c63de0d](https://github.com/reactivex/rxjs/commit/c63de0d380a923987aab587720473fad1d205d71)) + +### Performance Improvements + +- **SafeSubscriber:** avoid using `Object.create` ([40a9e77](https://github.com/reactivex/rxjs/commit/40a9e77fe3d75df9161ad0093f54750b70f57245)) + +### BREAKING CHANGES + +- **ajax:** + - `ajax` body serialization will now use default XHR behavior in all cases. If the body is a `Blob`, `ArrayBuffer`, any array buffer view (like a byte sequence, e.g. `Uint8Array`, etc), `FormData`, `URLSearchParams`, `string`, or `ReadableStream`, default handling is use. If the `body` is otherwise `typeof` `"object"`, then it will be converted to JSON via `JSON.stringify`, and the `Content-Type` header will be set to `application/json;charset=utf-8`. All other types will emit an error. + - The `Content-Type` header passed to `ajax` configuration no longer has any effect on the serialization behavior of the AJAX request. + - For TypeScript users, `AjaxRequest` is no longer the type that should be explicitly used to create an `ajax`. It is now `AjaxConfig`, although the two types are compatible, only `AjaxConfig` has `progressSubscriber` and `createXHR`. + +* **zip:** `zip` operators will no longer iterate provided iterables "as needed", instead the iterables will be treated as push-streams just like they would be everywhere else in RxJS. This means that passing an endless iterable will result in the thread locking up, as it will endlessly try to read from that iterable. This puts us in-line with all other Rx implementations. To work around this, it is probably best to use `map` or some combination of `map` and `zip`. For example, `zip(source$, iterator)` could be `source$.pipe(map(value => [value, iterator.next().value]))`. + +* **Subscription:** `add` no longer returns an unnecessary Subscription reference. This was done to prevent confusion caused by a legacy behavior. You can now add and remove functions and Subscriptions as teardowns to and from a `Subscription` using `add` and `remove` directly. Before this, `remove` only accepted subscriptions. + +* **RxJS Error types** Tests that are written with naive expectations against errors may fail now that errors have a proper `stack` property. In some testing frameworks, a deep equality check on two error instances will check the values in `stack`, which could be different. + +* **Undocumented Behaviors/APIs Removed**: + + - `unsubscribe` no longer available via the `this` context of observer functions. To reenable, set `config.useDeprecatedNextContext = true` on the rxjs `config` found at `import { config } from 'rxjs';`. Note that enabling this will result in a performance penalty for all consumer subscriptions. + - Leaked implementation detail `_unsubscribeAndRecycle` of `Subscriber` has been removed. Just use new `Subscription` objects + - Removed an undocumented behavior where passing a negative count argument to `retry` would result in an observable that repeats forever. + - An undocumented behavior where passing a negative count argument to `repeat` would result in an observable that repeats forever. + - The static `sortActions` method on `VirtualTimeScheduler` is no longer publicly exposed by our TS types. + +* **throwError:** In an extreme corner case for usage, `throwError` is no longer able to emit a function as an error directly. If you need to push a function as an error, you will have to use the factory function to return the function like so: `throwError(() => functionToEmit)`, in other words `throwError(() => () => console.log('called later'))`. + +# [7.0.0-beta.4](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.4) (2020-08-02) + +### Bug Fixes + +- **ajax:** Partial observers passed to `progressSubscriber` will no longer error ([25d279f](https://github.com/reactivex/rxjs/commit/25d279f0b45d07f39bfb87b19bc7e2279df8b542)) +- **ajax:** Unparsable responses will no longer prevent full AjaxError from being thrown ([605ee55](https://github.com/reactivex/rxjs/commit/605ee550e5efc266b5dc5d3a9756c7c3b3968a61)) +- **animationFrames:** emit the timestamp from the rAF's callback ([#5438](https://github.com/reactivex/rxjs/issues/5438)) ([c980ae6](https://github.com/reactivex/rxjs/commit/c980ae65ee1b585e8ed66a366eb534ac3e50c205)) +- Ensure unsubscriptions/teardowns on internal subscribers are idempotent ([#5465](https://github.com/reactivex/rxjs/issues/5465)) ([3e39749](https://github.com/reactivex/rxjs/commit/3e39749a58ca663c17f5f0354b0f27532fb6d319)), closes [#5464](https://github.com/reactivex/rxjs/issues/5464) +- **timeout:** defer error creation until timeout occurs ([#5497](https://github.com/reactivex/rxjs/issues/5497)) ([3be9840](https://github.com/reactivex/rxjs/commit/3be98404fafd5a8de758deb4e0d103a7b60aa31e)), closes [#5491](https://github.com/reactivex/rxjs/issues/5491) + +### Code Refactoring + +- **ajax:** Drop support for IE10 and lower ([0eaadd6](https://github.com/reactivex/rxjs/commit/0eaadd60c716050f5e3701d513a028a9cd49085a)) +- **Observable:** Update property and method types ([#5572](https://github.com/reactivex/rxjs/issues/5572)) ([144b626](https://github.com/reactivex/rxjs/commit/144b626c3905640b4adeb2b97e722912eff1b264)) + +### Features + +- **combineLatest:** support for observable dictionaries ([#5022](https://github.com/reactivex/rxjs/issues/5022)) ([#5363](https://github.com/reactivex/rxjs/issues/5363)) ([f5278aa](https://github.com/reactivex/rxjs/commit/f5278aa89ea164caf5cf10e77d7bd00eff26fc0f)) +- **TestScheduler:** add an animate "run mode" helper ([#5607](https://github.com/reactivex/rxjs/issues/5607)) ([edd6731](https://github.com/reactivex/rxjs/commit/edd67313814bfc32e8a5129d8049e4d4678cd35d)) +- **timeout:** One timeout to rule them all ([def1d34](https://github.com/reactivex/rxjs/commit/def1d346b43008bc413a3ac985e1611bbbf62003)) + +### BREAKING CHANGES + +- **ajax:** In an extreme corner-case... If an error occurs, the responseType is `"json"`, we're in IE, and the `responseType` is not valid JSON, the `ajax` observable will no longer emit a syntax error, rather it will emit a full `AjaxError` with more details. +- **ajax:** Ajax implementation drops support for IE10 and lower. This puts us in-line with other implementations and helps clean up code in this area +- **Observable:** `lift` no longer exposed. It was _NEVER_ documented that end users of the library should be creating operators using `lift`. Lift has a [variety of issues](https://github.com/ReactiveX/rxjs/issues/5431) and was always an internal implementation detail of rxjs that might have been used by a few power users in the early days when it had the most value. The value of `lift`, originally, was that subclassed `Observable`s would compose through all operators that implemented lift. The reality is that feature is not widely known, used, or supported, and it was never documented as it was very experimental when it was first added. Until the end of v7, `lift` will remain on Observable. Standard JavaScript users will notice no difference. However, TypeScript users might see complaints about `lift` not being a member of observable. To workaround this issue there are two things you can do: 1. Rewrite your operators as [outlined in the documentation](https://rxjs.dev/guide/operators), such that they return `new Observable`. or 2. cast your observable as `any` and access `lift` that way. Method 1 is recommended if you do not want things to break when we move to version 8. + +# [7.0.0-beta.3](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.3) (2020-07-30) + +### Bug Fixes + +- **perf:** Ensure unsubscriptions/teardowns on internal subscribers are idempotent ([#5465](https://github.com/reactivex/rxjs/issues/5465)) ([3e39749](https://github.com/reactivex/rxjs/commit/3e39749a58ca663c17f5f0354b0f27532fb6d319)), closes [#5464](https://github.com/reactivex/rxjs/issues/5464) +- **timeout:** defer error creation until timeout occurs ([#5497](https://github.com/reactivex/rxjs/issues/5497)) ([3be9840](https://github.com/reactivex/rxjs/commit/3be98404fafd5a8de758deb4e0d103a7b60aa31e)), closes [#5491](https://github.com/reactivex/rxjs/issues/5491) + +### Code Refactoring + +- **perf:** Reduce memory pressure by no longer retaining outer values across the majority of operators. ([#5610](https://github.com/reactivex/rxjs/pull/5610)) ([bff1827](https://github.com/ReactiveX/rxjs/commit/bff18272dca23938a5f5b57cec6eb8d8be5bfddf)) +- **Observable:** Update property and method types ([#5572](https://github.com/reactivex/rxjs/issues/5572)) ([144b626](https://github.com/reactivex/rxjs/commit/144b626c3905640b4adeb2b97e722912eff1b264)) + +### Features + +- **combineLatest:** support for observable dictionaries ([#5022](https://github.com/reactivex/rxjs/issues/5022)) ([#5363](https://github.com/reactivex/rxjs/issues/5363)) ([f5278aa](https://github.com/reactivex/rxjs/commit/f5278aa89ea164caf5cf10e77d7bd00eff26fc0f)) + +### BREAKING CHANGES + +- **Observable:** `lift` no longer exposed. It was _never_ documented that end users of the library should be creating operators using `lift`. Lift has a [variety of issues](https://github.com/ReactiveX/rxjs/issues/5431) and was always an internal implementation detail of rxjs that might have been used by a few power users in the early days when it had the most value. The value of `lift`, originally, was that subclassed `Observable`s would compose through all operators that implemented lift. The reality is that feature is not widely known, used, or supported, and it was never documented as it was very experimental when it was first added. Until the end of v7, `lift` will remain on Observable. Standard JavaScript users will notice no difference. However, TypeScript users might see complaints about `lift` not being a member of observable. To workaround this issue there are two things you can do: 1. Rewrite your operators as [outlined in the documentation](https://rxjs.dev/guide/operators), such that they return `new Observable`. or 2. cast your observable as `any` and access `lift` that way. It is recommended that operators be implemented in terms of functions that return `(source: Observable) => new Observable(...)`, per the documentation/guide. + +# [7.0.0-beta.2](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.2) (2020-07-03) + +### Bug Fixes + +- **dependencies:** Move accidental dependency on `typedoc` to dev-dependencies. ([#5566](https://github.com/reactivex/rxjs/issues/5566)) ([45702bf](https://github.com/ReactiveX/rxjs/commit/45702bf6cd1b4a150f47b2a1d273f1ee31ca2482)) + +# [7.0.0-beta.1](https://github.com/reactivex/rxjs/compare/7.0.0-beta.0...7.0.0-beta.1) (2020-07-02) + +### Bug Fixes + +- **pluck:** operator breaks with null/undefined inputs. ([#5524](https://github.com/reactivex/rxjs/issues/5524)) ([c5f6550](https://github.com/reactivex/rxjs/commit/c5f65508505cf1f90560e6be76425e09c455bec3)) +- **shareReplay:** no longer misses synchronous values from source ([92452cc](https://github.com/reactivex/rxjs/commit/92452cc20021141aa0f047c7e5af569a413143e5)) +- **interop:** chain interop/safe subscriber unsubscriptions correctly ([#5472](https://github.com/reactivex/rxjs/issues/5472)) ([98ad0eb](https://github.com/reactivex/rxjs/commit/98ad0eba6bc079851b44951f3963e8aae0abf861)), closes [#5469](https://github.com/reactivex/rxjs/issues/5469) [#5311](https://github.com/reactivex/rxjs/issues/5311) [#2675](https://github.com/reactivex/rxjs/issues/2675) +- **finalize:** chain subscriptions for interop with finalize ([#5239](https://github.com/reactivex/rxjs/issues/5239)) ([04ba662](https://github.com/reactivex/rxjs/commit/04ba6621fe9e09238e1796217d04107e52dd36d5)), closes [#5237](https://github.com/reactivex/rxjs/issues/5237) [#5237](https://github.com/reactivex/rxjs/issues/5237) +- **animationFrameScheduler:** don't execute rescheduled animation frame and asap actions in flush ([#5399](https://github.com/reactivex/rxjs/issues/5399)) ([33c9c8c](https://github.com/reactivex/rxjs/commit/33c9c8cf7e247d4ad4d7318bfd02e8e5bedb0f40)), closes [#4972](https://github.com/reactivex/rxjs/issues/4972) [#5397](https://github.com/reactivex/rxjs/issues/5397) +- **iterables:** errors thrown from iterables now properly propagated ([#5444](https://github.com/reactivex/rxjs/issues/5444)) ([75d4c2f](https://github.com/reactivex/rxjs/commit/75d4c2f33d2e2121b2a316849044ad17ab28dbaf)) +- **finalize:** callback will be called after the source observable is torn down. ([0d7b7c1](https://github.com/reactivex/rxjs/commit/0d7b7c14e34eed43fb2ad1386281800fa3ae8aec)), closes [#5357](https://github.com/reactivex/rxjs/issues/5357) +- **Notification:** typing improvements ([#5478](https://github.com/reactivex/rxjs/issues/5478)) ([96868ac](https://github.com/reactivex/rxjs/commit/96868ac754c0147a9aa61182185f27224eb7f11a)) +- **TestScheduler:** support empty subscription marbles ([#5502](https://github.com/reactivex/rxjs/issues/5502)) ([e65696e](https://github.com/reactivex/rxjs/commit/e65696e2f7f7338659a873f6653026b33b9011a9)), closes [#5499](https://github.com/reactivex/rxjs/issues/5499) +- **expand:** now works properly with asynchronous schedulers ([294b27e](https://github.com/reactivex/rxjs/commit/294b27eb6a96e8edee3af35e6aaaef50628376e4)) +- **subscribeOn:** allow Infinity as valid delay ([#5500](https://github.com/reactivex/rxjs/issues/5500)) ([cd7d649](https://github.com/reactivex/rxjs/commit/cd7d64901e82fd7fb5e8407f1f30828906fac420)) +- **Subject:** resolve issue where Subject constructor errantly allowed an argument ([#5476](https://github.com/reactivex/rxjs/issues/5476)) ([e1d35dc](https://github.com/reactivex/rxjs/commit/e1d35dc258edea0237ef49a31f7b34c058755969)) +- **Subject:** no default generic ([e678e81](https://github.com/reactivex/rxjs/commit/e678e81ba80f5bcc27b0e956295ce2fc8dfe4576)) +- **defer:** No longer allows `() => undefined` to observableFactory (#5449) ([1ae937a](https://github.com/reactivex/rxjs/commit/1ae937a8e594aef96b93313bb3c68ea910e6f528)), closes [#5449](https://github.com/reactivex/rxjs/issues/5449) +- **single:** Corrected behavior for `single(() => false)` on empty observables. (#5325) ([27931bc](https://github.com/reactivex/rxjs/commit/27931bcfd2aa864e277d3e72128c57e807b28bb0)), closes [#5325](https://github.com/reactivex/rxjs/issues/5325) +- **take/takeLast**: Properly assert number types at runtime (#5326) ([5efc474](https://github.com/reactivex/rxjs/commit/5efc474161c9196dbdf4803a9cc444a547067549)), closes [#5326](https://github.com/reactivex/rxjs/issues/5326) + +### Features + +- **Observable:** Remove async iteration ([#5492](https://github.com/reactivex/rxjs/issues/5492)) ([8f43e71](https://github.com/reactivex/rxjs/commit/8f43e71f5692119e57a7acc5817c146d0b288e8c)) +- **groupBy:** Add typeguards support for groupBy ([#5441](https://github.com/reactivex/rxjs/issues/5441)) ([da382da](https://github.com/reactivex/rxjs/commit/da382da4cdcc6e7ab1ffc6a499f4f7f5ea7de130)) +- **raceWith:** add raceWith, the renamed `race` operator ([#5303](https://github.com/reactivex/rxjs/issues/5303)) ([ca7f370](https://github.com/reactivex/rxjs/commit/ca7f370d8379f22526cfb17d40deff53e1358742)) +- **fetch:** add selector ([#5306](https://github.com/reactivex/rxjs/issues/5306)) ([99b5af1](https://github.com/reactivex/rxjs/commit/99b5af1af5d169d55d454ff8e27d88105cee4b6f)), closes [#4744](https://github.com/reactivex/rxjs/issues/4744) +- **TimestampProvider:** Reduced scheduler footprint for default usage of shareReplay, timeInterval, and timestamp ([#4973](https://github.com/reactivex/rxjs/issues/4973)) ([b2e67e3](https://github.com/reactivex/rxjs/commit/b2e67e3139f0be1fb000ba42bb42c5ba60cc803a)) + +### BREAKING CHANGES + +- `Notification.createNext(undefined)` will no longer return the exact same reference every time. +- Type signatures tightened up around `Notification` and `dematerialize`, may uncover issues with invalid types passed to those operators. +- Experimental support for `for await` as been removed. Use https://github.com/benlesh/rxjs-for-await instead. +- `defer` no longer allows factories to return `void` or `undefined`. All factories passed to defer must return a proper `ObservableInput`, such as `Observable`, `Promise`, et al. To get the same behavior as you may have relied on previously, `return EMPTY` or `return of()` from the factory. +- `single` operator will now throw for scenarios where values coming in are either not present, or do not match the provided predicate. Error types have thrown have also been updated, please check documentation for changes. +- `take` and will now throw runtime error for arguments that are negative or NaN, this includes non-TS calls like `take()`. + +- `takeLast` now has runtime assertions that throw `TypeError`s for invalid arguments. Calling takeLast without arguments or with an argument that is `NaN` will throw a `TypeError` +- `ReplaySubject` no longer schedules emissions when a scheduler is provided. If you need that behavior, + please compose in `observeOn` using `pipe`, for example: `new ReplaySubject(2, 3000).pipe(observeOn(asap))` + +- `timestamp` operator accepts a `TimestampProvider`, which is any object with a `now` method + that returns a number. This means pulling in less code for the use of the `timestamp` operator. This may cause + issues with `TestScheduler` run mode. (Issue here: https://github.com/ReactiveX/rxjs/issues/5553) + +# [7.0.0-beta.0](https://github.com/reactivex/rxjs/compare/7.0.0-alpha.1...7.0.0-beta.0) (2020-04-03) + +### Bug Fixes + +- **mergeMapTo:** remove redundant/unused generic ([#5299](https://github.com/reactivex/rxjs/issues/5299)) ([d67b7da](https://github.com/reactivex/rxjs/commit/d67b7dafbacb3aac8f4dd7f215fe2d2c602f0d36)) +- **ajax:** AjaxTimeoutErrorImpl extends AjaxError ([#5226](https://github.com/reactivex/rxjs/issues/5226)) ([a8da8dc](https://github.com/reactivex/rxjs/commit/a8da8dcc899342d3bb6d2d913247d9e734095287)) +- **delay:** emit complete notification as soon as possible ([63b8797](https://github.com/reactivex/rxjs/commit/63b8797fbeed09eb675ea64b0b83607cef1367a9)), closes [#4249](https://github.com/reactivex/rxjs/issues/4249) +- **endWith:** will properly type N arguments ([#5246](https://github.com/reactivex/rxjs/issues/5246)) ([81ee1f7](https://github.com/reactivex/rxjs/commit/81ee1f72408854f4017615fe7949edf5dd50533b)) +- **fetch:** don't leak event listeners added to passed-in signals ([#5305](https://github.com/reactivex/rxjs/issues/5305)) ([d4d6c47](https://github.com/reactivex/rxjs/commit/d4d6c47d8abccc8cbe17e46192fc1eaa42d2d023)) +- **TestScheduler:** Subclassing TestScheduler needs RunHelpers ([#5138](https://github.com/reactivex/rxjs/issues/5138)) ([927d5d9](https://github.com/reactivex/rxjs/commit/927d5d90ab5f12a79cd50f7290b4f8df1e83ecfc)) +- **pipe:** Special handling for 0-arg case. ([#4936](https://github.com/reactivex/rxjs/issues/4936)) ([290fa51](https://github.com/reactivex/rxjs/commit/290fa51c44881f25f2fe4cf9885028396c7fd74c)) +- **pluck:** fix pluck's catch-all signature for better type safety ([#5192](https://github.com/reactivex/rxjs/issues/5192)) ([e0c5b7c](https://github.com/reactivex/rxjs/commit/e0c5b7c790bb9d99fa8bee26c805b5e70c1e456b)) +- **pluck:** param type now accepts number and symbol ([9697b69](https://github.com/reactivex/rxjs/commit/9697b695c23c3dcb614e6a70be63a94ffcd86ed9)) +- **startWith:** accepts N arguments and returns correct type ([#5247](https://github.com/reactivex/rxjs/issues/5247)) ([150ed8b](https://github.com/reactivex/rxjs/commit/150ed8b75909b0e0bb9dc8928287ebdc47e19c51)) +- **combineLatestWith:** and zipWith infer types from n-arguments ([#5257](https://github.com/reactivex/rxjs/issues/5257)) ([3e282a5](https://github.com/reactivex/rxjs/commit/3e282a58b1baf7aa03b17142f858bca09a542adf)) +- **race:** support N args in static race and ensure observable returned ([#5286](https://github.com/reactivex/rxjs/issues/5286)) ([6d901cb](https://github.com/reactivex/rxjs/commit/6d901cbb0c0f2aa3fc5a02ef895cc9e9a7a09243)) +- **toPromise:** correct toPromise return type ([#5072](https://github.com/reactivex/rxjs/issues/5072)) ([b1c3573](https://github.com/reactivex/rxjs/commit/b1c35738204b5b1a5d325a16e70cdbf25b523976)) +- **fromFetch:** don't reassign closed-over parameter in fromFetch ([#5234](https://github.com/reactivex/rxjs/issues/5234)) ([37d2d99](https://github.com/reactivex/rxjs/commit/37d2d99762264ef5faabc0ce4f56d7aab51806dc)), closes [#5233](https://github.com/reactivex/rxjs/issues/5233) [#5233](https://github.com/reactivex/rxjs/issues/5233) + +### Features + +- add `lastValueFrom` and `firstValueFrom` methods ([#5295](https://github.com/reactivex/rxjs/issues/5295)) ([e69b765](https://github.com/reactivex/rxjs/commit/e69b76584d6872b3c55aa1bdf39c8984e9d9b00e)) +- RxJS now supports first-class interop with AsyncIterables ([4fa9d01](https://github.com/reactivex/rxjs/commit/4fa9d016a83049d014d77b89c56301e42db16b4d)) +- **combineLatestWith:** adds `combineLatestWith` - renamed legacy `combineLatest` operator ([#5251](https://github.com/reactivex/rxjs/issues/5251)) ([6d7b146](https://github.com/reactivex/rxjs/commit/6d7b1469110b405405549c9b6c311d2621738353)) +- **retry:** add config to reset error count on successful emission ([#5280](https://github.com/reactivex/rxjs/issues/5280)) ([ab6e9fc](https://github.com/reactivex/rxjs/commit/ab6e9fc32c19c1f14f8f59459db75312e75b9351)) +- **zipWith:** add `zipWith` which is just a rename of legacy `zip` operator ([#5249](https://github.com/reactivex/rxjs/issues/5249)) ([86b6a27](https://github.com/reactivex/rxjs/commit/86b6a272fd48c4712adba78963e05bb759ecf4f9)) + +### BREAKING CHANGES + +- **startWith:** `startWith` will return incorrect types when called with more than 7 arguments and a scheduler. Passing scheduler to startWith is deprecated +- **toPromise:** toPromise return type now returns `T | undefined` in TypeScript, which is correct, but may break builds. + +# [7.0.0-alpha.1](https://github.com/reactivex/rxjs/compare/7.0.0-alpha.0...7.0.0-alpha.1) (2019-12-27) + +### Bug Fixes + +- chain subscriptions from observables that belong to other instances of RxJS (e.g. in node_modules) ([#5059](https://github.com/reactivex/rxjs/issues/5059)) ([d7f7078](https://github.com/reactivex/rxjs/commit/d7f7078)) +- clear subscription on `shareReplay` completion ([#5044](https://github.com/reactivex/rxjs/issues/5044)) ([35e600f](https://github.com/reactivex/rxjs/commit/35e600f)), closes [#5034](https://github.com/reactivex/rxjs/issues/5034) +- **closure:** Annotate next() for ReplaySubject ([#5088](https://github.com/reactivex/rxjs/issues/5088)) ([8687fbd](https://github.com/reactivex/rxjs/commit/8687fbd)) +- **closure:** static prop frameTimeFactor being collapsed when compiled with closure. ([39872c9](https://github.com/reactivex/rxjs/commit/39872c9)) +- **docs:** remove repetitive op3() in example ([#5043](https://github.com/reactivex/rxjs/issues/5043)) ([e17df33](https://github.com/reactivex/rxjs/commit/e17df33)) +- **filter:** Fix overload order for filter to support inferring the generic type ([#5024](https://github.com/reactivex/rxjs/issues/5024)) ([8255365](https://github.com/reactivex/rxjs/commit/8255365)) +- **fromFetch:** passing already aborted signal to init aborts fetch ([0e4849a](https://github.com/reactivex/rxjs/commit/0e4849a)) + +### Features + +- **concatWith:** adds concatWith ([#4988](https://github.com/reactivex/rxjs/issues/4988)) ([dc89736](https://github.com/reactivex/rxjs/commit/dc89736)) + +# [7.0.0-alpha.0](https://github.com/reactivex/rxjs/compare/6.5.2...7.0.0-alpha.0) (2019-09-18) + +### Bug Fixes + +- missing package.json in rxjs/fetch ([#5001](https://github.com/reactivex/rxjs/issues/5001)) ([f4bee07](https://github.com/reactivex/rxjs/commit/f4bee07)) +- **filter:** Resolve TS build failures for certain situations where Boolean is the predicate ([77c7dfd](https://github.com/reactivex/rxjs/commit/77c7dfd)) +- **pluck:** key union type strictness ([#4585](https://github.com/reactivex/rxjs/issues/4585)) ([bd5ec2d](https://github.com/reactivex/rxjs/commit/bd5ec2d)) +- **race:** ignore latter sources after first complete or error ([#4809](https://github.com/reactivex/rxjs/issues/4809)) ([f31c3df](https://github.com/reactivex/rxjs/commit/f31c3df)), closes [#4808](https://github.com/reactivex/rxjs/issues/4808) +- **scan/reduce:** Typings correct for mixed seed/value types ([#4858](https://github.com/reactivex/rxjs/issues/4858)) ([b89ebe5](https://github.com/reactivex/rxjs/commit/b89ebe5)) +- **scheduled:** import from relative paths ([#4832](https://github.com/reactivex/rxjs/issues/4832)) ([1d37a87](https://github.com/reactivex/rxjs/commit/1d37a87)) +- **TS:** Error impls now properly type `this` ([#4978](https://github.com/reactivex/rxjs/issues/4978)) ([7606dc7](https://github.com/reactivex/rxjs/commit/7606dc7)) +- **TS:** fix type inference for defaultIfEmpty. ([#4833](https://github.com/reactivex/rxjs/issues/4833)) ([9b5ce2f](https://github.com/reactivex/rxjs/commit/9b5ce2f)) +- **types:** add Boolean signature to filter ([#4961](https://github.com/reactivex/rxjs/issues/4961)) ([259853e](https://github.com/reactivex/rxjs/commit/259853e)), closes [#4959](https://github.com/reactivex/rxjs/issues/4959) [/github.com/ReactiveX/rxjs/issues/4959#issuecomment-520629091](https://github.com//github.com/ReactiveX/rxjs/issues/4959/issues/issuecomment-520629091) + +### Features + +- **animationFrames:** Adds an observable of animationFrames ([#5021](https://github.com/reactivex/rxjs/issues/5021)) ([6a4cd68](https://github.com/reactivex/rxjs/commit/6a4cd68)) +- **concat:** can infer N types ([6c0cbc4](https://github.com/reactivex/rxjs/commit/6c0cbc4)) +- **of:** Update of typings ([e8adbb5](https://github.com/reactivex/rxjs/commit/e8adbb5)) +- **rxjs-compat:** removed for v7 ([#4839](https://github.com/reactivex/rxjs/issues/4839)) ([79b1b95](https://github.com/reactivex/rxjs/commit/79b1b95)) +- **TestScheduler:** expose `frameTimeFactor` property ([#4977](https://github.com/reactivex/rxjs/issues/4977)) ([8c32ed0](https://github.com/reactivex/rxjs/commit/8c32ed0)) +- **TS:** Update to TypeScript 3.5.3 ([741a136](https://github.com/reactivex/rxjs/commit/741a136)) + +### BREAKING CHANGES + +- **concat:** Generic signature changed. Recommend not explicitly passing generics, just let inference do its job. If you must, cast with `as`. +- **of:** Generic signature changed, do not specify generics, allow them to be inferred or use `as` +- **of:** Use with more than 9 arguments, where the last argument is a `SchedulerLike` may result in the wrong type which includes the `SchedulerLike`, even though the run time implementation does not support that. Developers should be using `scheduled` instead +- **TS:** RxJS requires TS 3.5 +- **rxjs-compat:** `rxjs/Rx` is no longer a valid import site. +- **rxjs-compat:** `rxjs-compat` is not published for v7 (yet) +- **race:** `race()` will no longer subscribe to subsequent observables if a provided source synchronously errors or completes. This means side effects that might have occurred during subscription in those rare cases will no longer occur. + +## [6.5.3](https://github.com/reactivex/rxjs/compare/6.5.2...6.5.3) (2019-09-03) + +### Bug Fixes + +- **general:** Refactor modules so they don't show side effects in some tools ([#4769](https://github.com/reactivex/rxjs/issues/4769)) ([9829c5e0](https://github.com/reactivex/rxjs/commit/9829c5e0)) +- **defer:** restrict allowed factory types ([#4835](https://github.com/reactivex/rxjs/issues/4835)) ([40a22096](https://github.com/reactivex/rxjs/commit/40a22096)) + +## [6.5.2](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.2) (2019-05-10) + +### Bug Fixes + +- **endWith:** wrap args - they are not observables - in of before concatenating ([#4735](https://github.com/reactivex/rxjs/issues/4735)) ([986be2f](https://github.com/reactivex/rxjs/commit/986be2f)) +- **forkJoin:** test for object literal ([#4741](https://github.com/reactivex/rxjs/issues/4741)) ([c11e1b3](https://github.com/reactivex/rxjs/commit/c11e1b3)), closes [#4737](https://github.com/reactivex/rxjs/issues/4737) [#4737](https://github.com/reactivex/rxjs/issues/4737) +- **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538) +- **of:** remove deprecation comment to prevent false positive warning ([#4724](https://github.com/reactivex/rxjs/issues/4724)) ([da69c16](https://github.com/reactivex/rxjs/commit/da69c16)) +- **pairwise:** make it recursion-proof ([#4743](https://github.com/reactivex/rxjs/issues/4743)) ([21ab261](https://github.com/reactivex/rxjs/commit/21ab261)) +- **scan:** fixed declarations to properly support different return types ([#4598](https://github.com/reactivex/rxjs/issues/4598)) ([126d2b6](https://github.com/reactivex/rxjs/commit/126d2b6)) +- **Subscription:** Return Empty when teardown === null ([#4575](https://github.com/reactivex/rxjs/issues/4575)) ([ffc4e68](https://github.com/reactivex/rxjs/commit/ffc4e68)) +- **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491) +- **umd:** export fetch namespace ([#4738](https://github.com/reactivex/rxjs/issues/4738)) ([7926122](https://github.com/reactivex/rxjs/commit/7926122)) +- **fromFetch:** don't abort if fetch resolves ([#4742](https://github.com/reactivex/rxjs/issues/4742) ([ed8d771](https://github.com/reactivex/rxjs/commit/ed8d771)) + +## [6.5.1](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.1) (2019-04-23) + +### Bug Fixes + +- **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538) +- **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491) + +# [6.5.0](https://github.com/reactivex/rxjs/compare/6.4.0...6.5.0) (2019-04-23) + +### Bug Fixes + +- **docs-app:** remove stopWordFilter from lunr pipeline ([#4536](https://github.com/reactivex/rxjs/issues/4536)) ([9eaebd4](https://github.com/reactivex/rxjs/commit/9eaebd4)) +- **dtslint:** disable tests that break in TS@next ([#4705](https://github.com/reactivex/rxjs/issues/4705)) ([ecc73d2](https://github.com/reactivex/rxjs/commit/ecc73d2)) +- **index:** export NotificationKind ([#4514](https://github.com/reactivex/rxjs/issues/4514)) ([7125355](https://github.com/reactivex/rxjs/commit/7125355)), closes [#4513](https://github.com/reactivex/rxjs/issues/4513) +- **race:** better typings ([#4643](https://github.com/reactivex/rxjs/issues/4643)) ([fb9bc48](https://github.com/reactivex/rxjs/commit/fb9bc48)), closes [#4390](https://github.com/reactivex/rxjs/issues/4390) [#4642](https://github.com/reactivex/rxjs/issues/4642) +- **throwIfEmpty:** ensure result is retry-able ([c4f44b9](https://github.com/reactivex/rxjs/commit/c4f44b9)) +- **types:** Fixed signature for onErrorResumeNext ([#4603](https://github.com/reactivex/rxjs/issues/4603)) ([4dd0be0](https://github.com/reactivex/rxjs/commit/4dd0be0)) + +### Features + +- **combineLatest:** deprecated rest argument and scheduler signatures ([#4641](https://github.com/reactivex/rxjs/issues/4641)) ([6661c79](https://github.com/reactivex/rxjs/commit/6661c79)), closes [#4640](https://github.com/reactivex/rxjs/issues/4640) +- **fromFetch:** We now export a `fromFetch` static observable creation method from `rxjs/fetch`. Mirrors native `fetch` only it's lazy and cancellable via `Observable` interface. ([#4702](https://github.com/reactivex/rxjs/issues/4702)) ([5a1ef86](https://github.com/reactivex/rxjs/commit/5a1ef86)) +- **forkJoin:** accepts a dictionary of sources ([#4640](https://github.com/reactivex/rxjs/issues/4640)) ([b5a2ac9](https://github.com/reactivex/rxjs/commit/b5a2ac9)) +- **partition:** new `partition` observable creation function. Old `partition` operator is deprecated ([#4419](https://github.com/reactivex/rxjs/issues/4419)) ([#4685](https://github.com/reactivex/rxjs/issues/4685)) ([d5d6980](https://github.com/reactivex/rxjs/commit/d5d6980)) +- **scheduled:** Add `scheduled` creation function to use to create scheduled observable of values. Deprecate scheduled versions of `from`, `range`, et al. ([#4595](https://github.com/reactivex/rxjs/issues/4595)) ([f57e1fc](https://github.com/reactivex/rxjs/commit/f57e1fc)) + +### Performance Improvements + +- **Subscription:** improve parent management ([#4526](https://github.com/reactivex/rxjs/issues/4526)) ([06f1a25](https://github.com/reactivex/rxjs/commit/06f1a25)) + +# [6.4.0](https://github.com/reactivex/rxjs/compare/6.3.3...6.4.0) (2019-01-30) + +### Bug Fixes + +- **ajax:** Fix case-insensitive headers in HTTP request ([#4453](https://github.com/reactivex/rxjs/issues/4453)) ([673bf47](https://github.com/reactivex/rxjs/commit/673bf47)) +- **bundle:** closure to not rewrite polyfills for minification ([#4487](https://github.com/reactivex/rxjs/issues/4487)) ([a1fedb9](https://github.com/reactivex/rxjs/commit/a1fedb9)) +- **bundle:** don't export `operators` twice ([#4310](https://github.com/reactivex/rxjs/issues/4310)) ([2399f6e](https://github.com/reactivex/rxjs/commit/2399f6e)) +- **combineLatest:** improve typings for combineLatest ([#4470](https://github.com/reactivex/rxjs/issues/4470)) ([40c3d9f](https://github.com/reactivex/rxjs/commit/40c3d9f)) +- **compat:** remove internal from import locations ([#4498](https://github.com/reactivex/rxjs/issues/4498)) ([a6c0017](https://github.com/reactivex/rxjs/commit/a6c0017)), closes [#4070](https://github.com/reactivex/rxjs/issues/4070) +- **endWith:** ability to endWith different types ([#4183](https://github.com/reactivex/rxjs/issues/4183)) ([#4185](https://github.com/reactivex/rxjs/issues/4185)) ([83533d1](https://github.com/reactivex/rxjs/commit/83533d1)) +- **fromEventPattern:** improve typings for fromEventPattern ([#4496](https://github.com/reactivex/rxjs/issues/4496)) ([037f53d](https://github.com/reactivex/rxjs/commit/037f53d)) +- **Observable:** Fix Observable.subscribe to add operator TeardownLogic to returned Subscription. ([#4434](https://github.com/reactivex/rxjs/issues/4434)) ([f28955f](https://github.com/reactivex/rxjs/commit/f28955f)) +- **subscribe:** Deprecate null starting parameter signatures for subscribe ([#4202](https://github.com/reactivex/rxjs/issues/4202)) ([c85ddf6](https://github.com/reactivex/rxjs/commit/c85ddf6)) +- **combineLatest:** support passing union types ([ffda319](https://github.com/reactivex/rxjs/commit/ffda319)) +- **from:** support passing union types ([eb1d596](https://github.com/reactivex/rxjs/commit/eb1d596)) +- **withLatestFrom:** support passing union types ([1e19a24](https://github.com/reactivex/rxjs/commit/1e19a24)) +- **zip:** support passing union types ([0d87f52](https://github.com/reactivex/rxjs/commit/0d87f52)) +- **multicast:** support returning union types from projection ([e9e9041](https://github.com/reactivex/rxjs/commit/e9e9041)) +- **exhaustMap:** support returning union types from projection ([ff1f5dc](https://github.com/reactivex/rxjs/commit/ff1f5dc)) +- **merge:** support union type inference for merge operators ([c2ac39c](https://github.com/reactivex/rxjs/commit/c2ac39c)) +- **catchError:** support union type returns ([8350622](https://github.com/reactivex/rxjs/commit/8350622)) +- **switchMap:** support union type returns ([32d35fd](https://github.com/reactivex/rxjs/commit/32d35fd)) +- **defer:** support union types passed ([5aea50e](https://github.com/reactivex/rxjs/commit/5aea50e)) +- **race:** Update typings to support proper return types ([#4465](https://github.com/reactivex/rxjs/issues/4465)) ([0042846](https://github.com/reactivex/rxjs/commit/0042846)) +- **VirtualTimeScheduler:** rework flush so it won't lose actions ([#4433](https://github.com/reactivex/rxjs/issues/4433)) ([d068bc9](https://github.com/reactivex/rxjs/commit/d068bc9)) +- **WebSocketSubject:** fix subject failing to close socket ([#4446](https://github.com/reactivex/rxjs/issues/4446)) ([dcfa52b](https://github.com/reactivex/rxjs/commit/dcfa52b)) + +### Features + +- **shareReplay:** Add configuration object for named arguments, and add argument to support unsubscribing from source observable by `refCount` when all resulting subscriptions have unsubscribed. The default behavior is to leave the source subscription running. +- **mergeScan:** Add index to the accumulator function ([#4458](https://github.com/reactivex/rxjs/issues/4458)) ([f5e143d](https://github.com/reactivex/rxjs/commit/f5e143d)), closes [#4441](https://github.com/reactivex/rxjs/issues/4441) +- **range:** accept one argument ([#4360](https://github.com/reactivex/rxjs/issues/4360)) ([a388578](https://github.com/reactivex/rxjs/commit/a388578)) +- **takeWhile:** add an `inclusive` option to the operator which causes to emit final value ([#4115](https://github.com/reactivex/rxjs/issues/4115)) ([6e7f407](https://github.com/reactivex/rxjs/commit/6e7f407)) + +### Performance Improvements + +- **internal:** optimize Subscription#add() for the common case ([#4489](https://github.com/reactivex/rxjs/issues/4489)) ([bdd201c](https://github.com/reactivex/rxjs/commit/bdd201c)) +- **internal:** use strict equality for isObject() ([#4493](https://github.com/reactivex/rxjs/issues/4493)) ([fc84a00](https://github.com/reactivex/rxjs/commit/fc84a00)) +- **Subscription:** use `instanceof` to avoid megamorphic LoadIC ([#4499](https://github.com/reactivex/rxjs/issues/4499)) ([065b4e3](https://github.com/reactivex/rxjs/commit/065b4e3)) + + + +## [6.3.3](https://github.com/reactivex/rxjs/compare/6.3.2...6.3.3) (2018-09-25) + +### Bug Fixes + +- **pipe:** align static pipe to Observable pipe rest parameters overl… ([#4112](https://github.com/reactivex/rxjs/issues/4112)) ([8c607e9](https://github.com/reactivex/rxjs/commit/8c607e9)), closes [#4109](https://github.com/reactivex/rxjs/issues/4109) [#4109](https://github.com/reactivex/rxjs/issues/4109) +- **RxJS:** each instance of RxJS now has a unique Subscriber symbol ([0972c56](https://github.com/reactivex/rxjs/commit/0972c56)) +- **subscribe:** report errors that occur in subscribe after the initial error ([#4089](https://github.com/reactivex/rxjs/issues/4089)) ([9b4b2bc](https://github.com/reactivex/rxjs/commit/9b4b2bc)), closes [#3803](https://github.com/reactivex/rxjs/issues/3803) +- **Subscriber:** Can no longer subscribe to itself in a circular manner ([#4106](https://github.com/reactivex/rxjs/issues/4106)) ([e623ec6](https://github.com/reactivex/rxjs/commit/e623ec6)), closes [#4095](https://github.com/reactivex/rxjs/issues/4095) +- **Subscriber:** use only local Subscriber instances ([50ee0a7](https://github.com/reactivex/rxjs/commit/50ee0a7)) +- **TypeScript:** ensure RxJS builds with TS@next as well ([f03e790](https://github.com/reactivex/rxjs/commit/f03e790)) + + + +## [6.3.2](https://github.com/reactivex/rxjs/compare/6.3.1...6.3.2) (2018-09-04) + +### Bug Fixes + +- **node:** will no longer error mixing RxJS 6.3 and 6.2 ([#4078](https://github.com/reactivex/rxjs/issues/4078)) ([69d9ccf](https://github.com/reactivex/rxjs/commit/69d9ccf)), closes [#4077](https://github.com/reactivex/rxjs/issues/4077) + + + +## [6.3.1](https://github.com/reactivex/rxjs/compare/6.3.0...6.3.1) (2018-08-31) + +### Bug Fixes + +- **mergeMap:** fix nested mergeMaps ([#4072](https://github.com/reactivex/rxjs/issues/4072)) ([0ab701b](https://github.com/reactivex/rxjs/commit/0ab701b)), closes [#4071](https://github.com/reactivex/rxjs/issues/4071) + + + +# [6.3.0](https://github.com/reactivex/rxjs/compare/6.2.2...6.3.0) (2018-08-30) + +### Bug Fixes + +- **find:** unsubscribe from source when found ([#3968](https://github.com/reactivex/rxjs/issues/3968)) ([fd01f7b](https://github.com/reactivex/rxjs/commit/fd01f7b)) +- convert [@internal](https://github.com/internal) comment to JSDoc ([#3932](https://github.com/reactivex/rxjs/issues/3932)) ([f8a9d6e](https://github.com/reactivex/rxjs/commit/f8a9d6e)) +- **AjaxObservable:** notify with error if fails to parse json response ([#3139](https://github.com/reactivex/rxjs/issues/3139)) ([d8231e2](https://github.com/reactivex/rxjs/commit/d8231e2)), closes [#3138](https://github.com/reactivex/rxjs/issues/3138) +- **catchError:** stop listening to a synchronous inner-observable when unsubscribed ([456ef33](https://github.com/reactivex/rxjs/commit/456ef33)) +- **distinctUntilKeyChanged:** improved key typing with keyof T ([#3988](https://github.com/reactivex/rxjs/issues/3988)) ([4ec4ff1](https://github.com/reactivex/rxjs/commit/4ec4ff1)) +- **exhaustMap:** stop listening to a synchronous inner-observable when unsubscribed ([ee1a339](https://github.com/reactivex/rxjs/commit/ee1a339)) +- **find:** add undefined to return type ([#3970](https://github.com/reactivex/rxjs/issues/3970)) ([5a6c90f](https://github.com/reactivex/rxjs/commit/5a6c90f)), closes [#3969](https://github.com/reactivex/rxjs/issues/3969) +- **IE10:** Remove dependency on Object.setPrototypeOf ([#3967](https://github.com/reactivex/rxjs/issues/3967)) ([5c52a73](https://github.com/reactivex/rxjs/commit/5c52a73)), closes [#3966](https://github.com/reactivex/rxjs/issues/3966) +- **mergeAll:** add source subscription to composite before actually subscribing ([#2479](https://github.com/reactivex/rxjs/issues/2479)) ([40852ff](https://github.com/reactivex/rxjs/commit/40852ff)), closes [#2476](https://github.com/reactivex/rxjs/issues/2476) +- **mergeScan:** stop listening to a synchronous inner-observable when unsubscribed ([c4002f3](https://github.com/reactivex/rxjs/commit/c4002f3)) +- **Observable:** forEach will no longer next values after an error ([b4bad1f](https://github.com/reactivex/rxjs/commit/b4bad1f)) +- **Observable:** use more granular Observable exports in compat mode ([#3974](https://github.com/reactivex/rxjs/issues/3974)) ([3f75564](https://github.com/reactivex/rxjs/commit/3f75564)) +- **onErrorResumeNext:** stop listening to a synchronous inner-observable when unsubscribed ([1d14277](https://github.com/reactivex/rxjs/commit/1d14277)) +- **pipe:** replace rest parameters overload ([#3945](https://github.com/reactivex/rxjs/issues/3945)) ([872b0ec](https://github.com/reactivex/rxjs/commit/872b0ec)), closes [#3841](https://github.com/reactivex/rxjs/issues/3841) +- **skipUntil:** stop listening to a synchronous notifier after its first nexted value ([1c257db](https://github.com/reactivex/rxjs/commit/1c257db)) +- **startWith:** allow empty type signature and passing a different type ([b7866a0](https://github.com/reactivex/rxjs/commit/b7866a0)) +- **subscribable:** make subscribe() signature match Observable ([#4050](https://github.com/reactivex/rxjs/issues/4050)) ([865d8d7](https://github.com/reactivex/rxjs/commit/865d8d7)), closes [#3891](https://github.com/reactivex/rxjs/issues/3891) +- **subscriber:** unsubscribe parents on error/complete ([ad8131b](https://github.com/reactivex/rxjs/commit/ad8131b)) +- **switchMap:** stop listening to a synchronous inner-observable when unsubscribed ([260d52a](https://github.com/reactivex/rxjs/commit/260d52a)) +- **takeUntil:** takeUntil should subscribe to the source if notifier sync completes without emitting ([#4039](https://github.com/reactivex/rxjs/issues/4039)) ([21fd0b4](https://github.com/reactivex/rxjs/commit/21fd0b4)), closes [#3504](https://github.com/reactivex/rxjs/issues/3504) +- **testscheduler:** type arguments to Observable creation functions ([#3928](https://github.com/reactivex/rxjs/issues/3928)) ([0e30ef1](https://github.com/reactivex/rxjs/commit/0e30ef1)) + +### Features + +- **delayWhen:** add index to the selector function ([#2473](https://github.com/reactivex/rxjs/issues/2473)) ([0979d31](https://github.com/reactivex/rxjs/commit/0979d31)) +- **forEach:** deprecating passing promise constructor ([5178ab9](https://github.com/reactivex/rxjs/commit/5178ab9)) +- **TestScheduler:** Add subscription schedule to expectObservable ([#3997](https://github.com/reactivex/rxjs/issues/3997)) ([0d20255](https://github.com/reactivex/rxjs/commit/0d20255)) + + + +## [6.2.2](https://github.com/reactivex/rxjs/compare/6.2.1...6.2.2) (2018-07-13) + +### Bug Fixes + +- **first:** improved type guards for TypeScript ([3e12f7a](https://github.com/reactivex/rxjs/commit/3e12f7a)) +- **last:** improved type guards for TypeScript ([3e12f7a](https://github.com/reactivex/rxjs/commit/3e12f7a)) + + + +## [6.2.1](https://github.com/reactivex/rxjs/compare/6.2.0...6.2.1) (2018-06-12) + +### Bug Fixes + +- **ci:** do not trigger postbuild script on PR ([f82c085](https://github.com/reactivex/rxjs/commit/f82c085)) +- **delayWhen:** Emit source value if duration selector completes synchronously ([#3664](https://github.com/reactivex/rxjs/issues/3664)) ([2c43af7](https://github.com/reactivex/rxjs/commit/2c43af7)), closes [#3663](https://github.com/reactivex/rxjs/issues/3663) +- **docs:** fix broken github links ([#3802](https://github.com/reactivex/rxjs/issues/3802)) ([9f9bf9b](https://github.com/reactivex/rxjs/commit/9f9bf9b)) +- **docs:** fix code examples ([#3784](https://github.com/reactivex/rxjs/issues/3784)) ([a95441b](https://github.com/reactivex/rxjs/commit/a95441b)) +- **from:** Objects implementing Symbol.observable take precedence over other types ([80ceea0](https://github.com/reactivex/rxjs/commit/80ceea0)) +- **fromEvent:** Support React Native and node-compatible event sources. ([#3821](https://github.com/reactivex/rxjs/issues/3821)) ([1969f18](https://github.com/reactivex/rxjs/commit/1969f18)) +- **Observable.prototype.pipe:** TS typings now more correct for >8 parameters ([#3789](https://github.com/reactivex/rxjs/issues/3789)) ([ad010ea](https://github.com/reactivex/rxjs/commit/ad010ea)) +- **subscribe:** ignore syncError when deprecated ([#3749](https://github.com/reactivex/rxjs/issues/3749)) ([f94560c](https://github.com/reactivex/rxjs/commit/f94560c)) +- **Symbol.observable:** make observable declaration readonly ([#3697](https://github.com/reactivex/rxjs/issues/3697)) ([#3773](https://github.com/reactivex/rxjs/issues/3773)) ([e1c203f](https://github.com/reactivex/rxjs/commit/e1c203f)) +- **TypeScript:** resolved typings issue for TS 3.0 ([bf2cdeb](https://github.com/reactivex/rxjs/commit/bf2cdeb)) +- **typings:** allow bufferCreationInterval null for bufferTime ([#3734](https://github.com/reactivex/rxjs/issues/3734)) ([0bda9cd](https://github.com/reactivex/rxjs/commit/0bda9cd)), closes [#3728](https://github.com/reactivex/rxjs/issues/3728) + +### Performance Improvements + +- remove comments from js-files ([#3760](https://github.com/reactivex/rxjs/issues/3760)) ([bb2c334](https://github.com/reactivex/rxjs/commit/bb2c334)) + + + +# [6.2.0](https://github.com/ReactiveX/RxJS/compare/6.1.0...6.2.0) (2018-05-22) + +### Bug Fixes + +- **ajax:** Handle timeouts as errors ([#3653](https://github.com/ReactiveX/RxJS/issues/3653)) ([e4128ea](https://github.com/ReactiveX/RxJS/commit/e4128ea)) +- **ajax:** RxJS v6 TimeoutError is missing name property ([576d943](https://github.com/ReactiveX/RxJS/commit/576d943)) +- **isObservable:** Fix throwing error when testing isObservable(null) ([#3688](https://github.com/ReactiveX/RxJS/issues/3688)) ([c9acc61](https://github.com/ReactiveX/RxJS/commit/c9acc61)) +- **range:** Range should be same for every subscriber ([#3707](https://github.com/ReactiveX/RxJS/issues/3707)) ([9642133](https://github.com/ReactiveX/RxJS/commit/9642133)) +- **skipUntil:** fix skipUntil when innerSubscription is null ([#3686](https://github.com/ReactiveX/RxJS/issues/3686)) ([4226432](https://github.com/ReactiveX/RxJS/commit/4226432)) +- **TestScheduler:** restore run changes upon error ([27cb9b6](https://github.com/ReactiveX/RxJS/commit/27cb9b6)) +- **TimeoutError:** Add name to TimeoutError ([44042d0](https://github.com/ReactiveX/RxJS/commit/44042d0)) +- **WebSocketSubject:** Check to see if WebSocket exists in global scope ([#3694](https://github.com/ReactiveX/RxJS/issues/3694)) ([2db0788](https://github.com/ReactiveX/RxJS/commit/2db0788)) + +### Features + +- **endWith:** add new operator endWith ([#3679](https://github.com/ReactiveX/RxJS/issues/3679)) ([537fe7d](https://github.com/ReactiveX/RxJS/commit/537fe7d)) + + + +# [6.1.0](https://github.com/ReactiveX/RxJS/compare/6.0.0...6.1.0) (2018-05-03) + +### Bug Fixes + +- **audit:** will not crash if duration is synchronous ([#3608](https://github.com/ReactiveX/RxJS/issues/3608)) ([76b7e27](https://github.com/ReactiveX/RxJS/commit/76b7e27)), closes [#2743](https://github.com/ReactiveX/RxJS/issues/2743) +- **delay:** fix memory leak ([#3605](https://github.com/ReactiveX/RxJS/issues/3605)) ([96f05b0](https://github.com/ReactiveX/RxJS/commit/96f05b0)) + +### Features + +- **isObservable:** a new method for checking to see if an object is an RxJS Observable ([edb33e5](https://github.com/ReactiveX/RxJS/commit/edb33e5)) + + + +# [6.0.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-uncanny-rc.7...v6.0.0) (2018-04-24) + +### Bug Fixes + +- **websocket:** no longer throws errors in operators applied to it ([#3577](https://github.com/ReactiveX/RxJS/issues/3577)) ([cb38ddf](https://github.com/ReactiveX/RxJS/commit/cb38ddf)) + +### Code Refactoring + +- **webSocket:** rename back to webSocket ala 5.0 ([#3590](https://github.com/ReactiveX/RxJS/issues/3590)) ([d5658fe](https://github.com/ReactiveX/RxJS/commit/d5658fe)) + +### Features + +- **testing:** Add testScheduler.run() helper ([2d5b3b2](https://github.com/ReactiveX/RxJS/commit/2d5b3b2)) +- **testing:** testScheduler.run() supports time progression syntax ([9322b7d](https://github.com/ReactiveX/RxJS/commit/9322b7d)) + +### BREAKING CHANGES + +- **webSocket:** UNBREAKING websocket to be named `webSocket` again, just like it was in 5.0. Now you should import from `rxjs/webSocket` + + + +# [6.0.0-uncanny-rc.7](https://github.com/ReactiveX/RxJS/compare/6.0.0-ucandoit-rc.6...v6.0.0-uncanny-rc.7) (2018-04-13) + +### Bug Fixes + +- **interop:** functions with `[Symbol.observable]` on them will now be accepted in operators like `mergeMap`, `from`, etc ([#3562](https://github.com/ReactiveX/RxJS/issues/3562)) ([c9570df](https://github.com/ReactiveX/RxJS/commit/c9570df)) +- **migrations:** change the version the migration applies to ([#3564](https://github.com/ReactiveX/RxJS/issues/3564)) ([9217a03](https://github.com/ReactiveX/RxJS/commit/9217a03)) +- **rxjs:** no longer requires `dom` lib ([#3566](https://github.com/ReactiveX/RxJS/issues/3566)) ([8b33ee2](https://github.com/ReactiveX/RxJS/commit/8b33ee2)) +- **throttleTime:** emit throttled values when complete if trailing=true ([#3559](https://github.com/ReactiveX/RxJS/issues/3559)) ([3e846f2](https://github.com/ReactiveX/RxJS/commit/3e846f2)), closes [#3351](https://github.com/ReactiveX/RxJS/issues/3351) +- **websocket:** export WebSocketSubject, WebSocketSubjectConfig from rxjs/websocket ([#3557](https://github.com/ReactiveX/RxJS/issues/3557)) ([c365405](https://github.com/ReactiveX/RxJS/commit/c365405)) + + + +# [6.0.0-ucandoit-rc.6](https://github.com/ReactiveX/RxJS/compare/6.0.0-uber-rc.5...v6.0.0-ucandoit-rc.6) (2018-04-13) + +### Bug Fixes + +- **migrations:** make sure collection.json is present ([63e10a8](https://github.com/ReactiveX/RxJS/commit/63e10a8)) + + + +# [6.0.0-uber-rc.5](https://github.com/ReactiveX/RxJS/compare/6.0.0-turbo-rc.4...6.0.0-uber-rc.5) (2018-04-13) + +### Bug Fixes + +- **migrations:** deploy compiled JS rather than just the TS files. ([9aed72f](https://github.com/ReactiveX/RxJS/commit/9aed72f)) + + + +# [6.0.0-turbo-rc.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-terrific-rc.3...6.0.0-turbo-rc.4) (2018-04-12) + +### Bug Fixes + +- **groupBy:** reexporting the GroupedObservable type ([#3556](https://github.com/ReactiveX/RxJS/issues/3556)) ([12d4933](https://github.com/ReactiveX/RxJS/commit/12d4933)), closes [#3551](https://github.com/ReactiveX/RxJS/issues/3551) +- **migrations:** build now properly copies migration into package ([#3555](https://github.com/ReactiveX/RxJS/issues/3555)) ([329a145](https://github.com/ReactiveX/RxJS/commit/329a145)) + + + +# [6.0.0-terrific-rc.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-tenacious-rc.2...v6.0.0-terrific-rc.3) (2018-04-11) + +### Features + +- **schematics:** add migration schematics for schematics users ([20a2f07](https://github.com/ReactiveX/RxJS/commit/20a2f07)) + + + +# [6.0.0-tenacious-rc.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-tactical-rc.1...v6.0.0-tenacious-rc.2) (2018-04-11) + +### Bug Fixes + +- **compat:** fix first & last operators so undefined arguments won't create empty values ([#3542](https://github.com/ReactiveX/RxJS/issues/3542)) ([a327db2](https://github.com/ReactiveX/RxJS/commit/a327db2)) +- **node/TS:** eliminate incompatible types to protected properties ([#3544](https://github.com/ReactiveX/RxJS/issues/3544)) ([21dd3bd](https://github.com/ReactiveX/RxJS/commit/21dd3bd)) + +### BREAKING CHANGES + +- **NodeJS** Dropping support for non-LTS versions of Node. + + + +# [6.0.0-tactical-rc.1](https://github.com/ReactiveX/RxJS/compare/6.0.0-rc.0...6.0.0-tactical-rc.1) (2018-04-07) + +Why "tactical"? Because I _TOTALLY MEANT_ to ruin the release names by publishing an amazingly funny April Fool's joke about smooshMap. So this was "tactical". Super tactical. So very tactical. + +### Bug Fixes + +- **closure-compiler:** adds nocollapse to static members ([#3519](https://github.com/ReactiveX/RxJS/issues/3519)) ([8758a5d](https://github.com/ReactiveX/RxJS/commit/8758a5d)) +- **closure-compiler:** remove internal flag from \_isScalar ([#3520](https://github.com/ReactiveX/RxJS/issues/3520)) ([b3a657d](https://github.com/ReactiveX/RxJS/commit/b3a657d)) +- **closure-compiler:** remove top level throws ([#3518](https://github.com/ReactiveX/RxJS/issues/3518)) ([b069473](https://github.com/ReactiveX/RxJS/commit/b069473)) +- **closure-compiler:** removes bad \[@params](https://github.com/params) comments that caused issues ([#3521](https://github.com/ReactiveX/RxJS/issues/3521)) ([09c874c](https://github.com/ReactiveX/RxJS/commit/09c874c)) +- **compat:** deprecate Observable.if/throw ([#3527](https://github.com/ReactiveX/RxJS/issues/3527)) ([3116275](https://github.com/ReactiveX/RxJS/commit/3116275)) +- **compat:** export TeardownLogic ([#3532](https://github.com/ReactiveX/RxJS/issues/3532)) ([0c76e64](https://github.com/ReactiveX/RxJS/commit/0c76e64)), closes [#3531](https://github.com/ReactiveX/RxJS/issues/3531) +- **compat:** remove observable/scalar deep import as it wasn't previously available ([4566001](https://github.com/ReactiveX/RxJS/commit/4566001)) +- **Scheduler:** export but deprecate ([#3522](https://github.com/ReactiveX/RxJS/issues/3522)) ([a3e1fb8](https://github.com/ReactiveX/RxJS/commit/a3e1fb8)) +- **skipUntil:** properly manages notifier subscription ([889f84a](https://github.com/ReactiveX/RxJS/commit/889f84a)), closes [#1886](https://github.com/ReactiveX/RxJS/issues/1886) +- fix type mismatch in NodeStyleEventEmitter ([#3530](https://github.com/ReactiveX/RxJS/issues/3530)) ([3f51ddd](https://github.com/ReactiveX/RxJS/commit/3f51ddd)) +- **sourcemaps:** fix mappings for source maps so they will work ([#3523](https://github.com/ReactiveX/RxJS/issues/3523)) ([32e7f75](https://github.com/ReactiveX/RxJS/commit/32e7f75)), closes [#3479](https://github.com/ReactiveX/RxJS/issues/3479) + +### Features + +- **compat:** add Observable extension classes with static create() ([ecd7f68](https://github.com/ReactiveX/RxJS/commit/ecd7f68)) +- **compat:** add rxjs/interfaces exports ([ba5c266](https://github.com/ReactiveX/RxJS/commit/ba5c266)) + + + +# [6.0.0-rc.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.4...6.0.0-rc.0) (2018-03-31) + +### Bug Fixes + +- **ajax:** properly encode body with form data that includes URLs ([#3502](https://github.com/ReactiveX/RxJS/issues/3502)) ([4455d21](https://github.com/ReactiveX/RxJS/commit/4455d21)), closes [#2399](https://github.com/ReactiveX/RxJS/issues/2399) +- **bindNodeCallback:** better type inference ([932bb7a](https://github.com/ReactiveX/RxJS/commit/932bb7a)) +- **elementAt:** now allows falsy defaultValues ([13706e7](https://github.com/ReactiveX/RxJS/commit/13706e7)) +- **lint_perf:** fix lint issues with newer perf tests ([1013754](https://github.com/ReactiveX/RxJS/commit/1013754)) +- **throttle:** now properly trailing throttles for individual values ([#3505](https://github.com/ReactiveX/RxJS/issues/3505)) ([3db18d1](https://github.com/ReactiveX/RxJS/commit/3db18d1)), closes [#2864](https://github.com/ReactiveX/RxJS/issues/2864) + +### Features + +- **takeUntil:** no longer subscribes to source if notifier synchronously emits ([#3504](https://github.com/ReactiveX/RxJS/issues/3504)) ([7b8a3e3](https://github.com/ReactiveX/RxJS/commit/7b8a3e3)), closes [#2189](https://github.com/ReactiveX/RxJS/issues/2189) + +### Performance Improvements + +- **pluck,bufferTime,asObservable:** add performance tests for pluck(), bufferTime() and asObservable() operators ([#2491](https://github.com/ReactiveX/RxJS/issues/2491)) ([24506b3](https://github.com/ReactiveX/RxJS/commit/24506b3)) +- **ReplaySubject:** slightly improved performance ([#2677](https://github.com/ReactiveX/RxJS/issues/2677)) ([9fea36d](https://github.com/ReactiveX/RxJS/commit/9fea36d)) + +### BREAKING CHANGES + +- **throttle:** This changes the behavior of throttle, in particular + throttling with both leading and trailing behaviors set to true, to more + closely match the throttling behavior of lodash and other libraries. + Throttling now starts immediately after any emission from the + observable, and values will not be double emitted for both leading and + trailing values + + + +# [6.0.0-beta.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.3...v6.0.0-beta.4) (2018-03-29) + +### Bug Fixes + +- **bindCallback:** add better type overloads ([#3480](https://github.com/ReactiveX/RxJS/issues/3480)) ([037cf34](https://github.com/ReactiveX/RxJS/commit/037cf34)) +- **compat:** add IScheduler to compat/Scheduler ([0a67df6](https://github.com/ReactiveX/RxJS/commit/0a67df6)) + +### Features + +- **compat:** add all utilities to internal-compatibility ([a9ecfe7](https://github.com/ReactiveX/RxJS/commit/a9ecfe7)) +- **websocket:** Add serializer/deserializer config settings ([#3489](https://github.com/ReactiveX/RxJS/issues/3489)) ([8d44124](https://github.com/ReactiveX/RxJS/commit/8d44124)) + +### BREAKING CHANGES + +- **websocket:** WebSocketSubject will now JSON serialize all messages sent over it by default, to return to the old behavior, pass a config setting of `serializer: x => x` like so: `websocket({ url, serializer: x => x })` + + + +# [6.0.0-beta.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.1...6.0.0-beta.3) (2018-03-27) + +### Bug Fixes + +- **build:** update build-optimizer and point to correct sources ([6717a01](https://github.com/ReactiveX/RxJS/commit/6717a01)) +- **node:** Subscriber no longer trampled if from another copy of rxjs ([371b658](https://github.com/ReactiveX/RxJS/commit/371b658)) +- **Observable:** empty ctor returns valid Observable ([#3464](https://github.com/ReactiveX/RxJS/issues/3464)) ([58b8ebc](https://github.com/ReactiveX/RxJS/commit/58b8ebc)) +- **subscribeOn:** add subscribeOn back to the distribution ([d6556f2](https://github.com/ReactiveX/RxJS/commit/d6556f2)) + + + +# [6.0.0-beta.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.1...6.0.0-beta.2) (2018-03-24) + +### Bug Fixes + +- **build:** update build-optimizer and point to correct sources ([6717a01](https://github.com/ReactiveX/RxJS/commit/6717a01)) +- **Observable:** empty ctor returns valid Observable ([#3464](https://github.com/ReactiveX/RxJS/issues/3464)) ([58b8ebc](https://github.com/ReactiveX/RxJS/commit/58b8ebc)) +- **subscribeOn:** add subscribeOn back to the distribution ([d6556f2](https://github.com/ReactiveX/RxJS/commit/d6556f2)) + + + +# [6.0.0-beta.1](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.0...v6.0.0-beta.1) (2018-03-21) + +### Bug Fixes + +- remove duplicate Subscribable interface declaration ([#3450](https://github.com/ReactiveX/RxJS/issues/3450)) ([ac78d89](https://github.com/ReactiveX/RxJS/commit/ac78d89)) +- **compat:** add package.json for internal-compatibility package ([#3455](https://github.com/ReactiveX/RxJS/issues/3455)) ([3b306ed](https://github.com/ReactiveX/RxJS/commit/3b306ed)) +- **config.useDeprecatedSynchronousErrorThrowing:** reentrant error throwing no longer trapped ([#3449](https://github.com/ReactiveX/RxJS/issues/3449)) ([0892a2d](https://github.com/ReactiveX/RxJS/commit/0892a2d)), closes [#3161](https://github.com/ReactiveX/RxJS/issues/3161) + +### Features + +- **compat:** add interfaces export ([d8f8122](https://github.com/ReactiveX/RxJS/commit/d8f8122)) +- **compat:** add rxjs/observable/dom/\* APIs to compatibility package ([d9a618f](https://github.com/ReactiveX/RxJS/commit/d9a618f)) + + + +# [6.0.0-beta.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.3...6.0.0-beta.0) (2018-03-16) + +### Bug Fixes + +- **AjaxObservable:** 1xx,2xx,3xx requests shouldn't error, only 4xx,5xx ([#3438](https://github.com/ReactiveX/RxJS/issues/3438)) ([2128932](https://github.com/ReactiveX/RxJS/commit/2128932)) +- **compat:** adjustments to get rxjs-compat to build correctly ([dea6964](https://github.com/ReactiveX/RxJS/commit/dea6964)) +- **config:** expose configuration via rxjs exports ([#3441](https://github.com/ReactiveX/RxJS/issues/3441)) ([4287424](https://github.com/ReactiveX/RxJS/commit/4287424)) +- **config:** make sure that Promise config is undefined initially ([#3440](https://github.com/ReactiveX/RxJS/issues/3440)) ([469afe8](https://github.com/ReactiveX/RxJS/commit/469afe8)) +- **ESM:** Add [operators|ajax|websocket|testing]/package.json for ESM support, fixes [#3227](https://github.com/ReactiveX/RxJS/issues/3227) ([#3356](https://github.com/ReactiveX/RxJS/issues/3356)) ([725dcb4](https://github.com/ReactiveX/RxJS/commit/725dcb4)) +- **forkJoin:** fix forkJoin typings for forkJoin(Observable[]) ([#3436](https://github.com/ReactiveX/RxJS/issues/3436)) ([17c7f8f](https://github.com/ReactiveX/RxJS/commit/17c7f8f)) +- **fromEvent:** Defines toString to fix Closure compilations ([#3417](https://github.com/ReactiveX/RxJS/issues/3417)) ([1558b43](https://github.com/ReactiveX/RxJS/commit/1558b43)) +- **fromEvent:** pass options in unsubscribe ([f1872b0](https://github.com/ReactiveX/RxJS/commit/f1872b0)), closes [#3349](https://github.com/ReactiveX/RxJS/issues/3349) +- **publishReplay:** type inference improved ([#3437](https://github.com/ReactiveX/RxJS/issues/3437)) ([dd7c9f1](https://github.com/ReactiveX/RxJS/commit/dd7c9f1)), closes [#3260](https://github.com/ReactiveX/RxJS/issues/3260) +- **rxjs:** add exports for symbols/interfaces that were missing ([#3380](https://github.com/ReactiveX/RxJS/issues/3380)) ([1622ee0](https://github.com/ReactiveX/RxJS/commit/1622ee0)) +- **rxjs:** make sure esm imports from index.js by default, not Rx.js ([#3316](https://github.com/ReactiveX/RxJS/issues/3316)) ([c2b00f4](https://github.com/ReactiveX/RxJS/commit/c2b00f4)), closes [#3315](https://github.com/ReactiveX/RxJS/issues/3315) +- **rxjs:** once again exports custom error types ([#3371](https://github.com/ReactiveX/RxJS/issues/3371)) ([4465a9f](https://github.com/ReactiveX/RxJS/commit/4465a9f)) +- **rxjs:** remove types.ts importing from itself. ([#3383](https://github.com/ReactiveX/RxJS/issues/3383)) ([8fd50ad](https://github.com/ReactiveX/RxJS/commit/8fd50ad)) +- **spec:** get tests running using compatibility package ([916e968](https://github.com/ReactiveX/RxJS/commit/916e968)) +- correct internal module paths to be systemjs compatible ([#3412](https://github.com/ReactiveX/RxJS/issues/3412)) ([35abc9d](https://github.com/ReactiveX/RxJS/commit/35abc9d)) +- **Symbol.iterator:** correctly handle case where Symbol constructor itself is not defined ([#3394](https://github.com/ReactiveX/RxJS/issues/3394)) ([6725be1](https://github.com/ReactiveX/RxJS/commit/6725be1)) +- **typings:** fixed some cases where multicast and publish would not return a ConnectableObservable ([#3320](https://github.com/ReactiveX/RxJS/issues/3320)) ([ddffecc](https://github.com/ReactiveX/RxJS/commit/ddffecc)) +- reexport Symbol.observable typings patch ([4c4d7b0](https://github.com/ReactiveX/RxJS/commit/4c4d7b0)) +- remove the root operators.ts because it overshadows operators/package.json ([184b6d4](https://github.com/ReactiveX/RxJS/commit/184b6d4)) + +### Code Refactoring + +- **Observable.if:** remove ts hacks from Observable ([f46f261](https://github.com/ReactiveX/RxJS/commit/f46f261)) +- **Rx.ts:** move Rx.ts to internal ([#3400](https://github.com/ReactiveX/RxJS/issues/3400)) ([7ad2119](https://github.com/ReactiveX/RxJS/commit/7ad2119)) + +### Features + +- **ajax:** default to opting into CORS ([#3442](https://github.com/ReactiveX/RxJS/issues/3442)) ([aa3bf57](https://github.com/ReactiveX/RxJS/commit/aa3bf57)), closes [#3273](https://github.com/ReactiveX/RxJS/issues/3273) +- **bindCallback:** remove result selector ([2535641](https://github.com/ReactiveX/RxJS/commit/2535641)) +- **bindNodeCallback:** remove resultSelector ([26e6e5c](https://github.com/ReactiveX/RxJS/commit/26e6e5c)) +- **compat:** add compatability package definition ([40aca82](https://github.com/ReactiveX/RxJS/commit/40aca82)) +- **compat:** add concat operator to compatibility layer ([6e84e78](https://github.com/ReactiveX/RxJS/commit/6e84e78)) +- **compat:** add legacy reexport compat layer for 'rxjs/Observable' and other top-level symbols ([70e562b](https://github.com/ReactiveX/RxJS/commit/70e562b)) +- **compat:** add Rx.ts to rxjs-compat ([df25de1](https://github.com/ReactiveX/RxJS/commit/df25de1)) +- **compat:** compatibility mode for combineLatest ([fd86df5](https://github.com/ReactiveX/RxJS/commit/fd86df5)) +- **compat:** compatibility mode for merge operator ([ffce980](https://github.com/ReactiveX/RxJS/commit/ffce980)) +- **compat:** compatibility mode for zip operator ([9f131d0](https://github.com/ReactiveX/RxJS/commit/9f131d0)) +- **compat:** make Rx.ts for compatability layer work as the default for rxjs-compat ([d43a4c2](https://github.com/ReactiveX/RxJS/commit/d43a4c2)) +- **compat:** set up correct imports & get build working for rxjs-comapt ([1a0dc97](https://github.com/ReactiveX/RxJS/commit/1a0dc97)) +- **deprecated-error-handling-warning:** add console warning when code sets the flag to bad mode ([49be56a](https://github.com/ReactiveX/RxJS/commit/49be56a)) +- **error-handling:** add deprecated sync error handling behind a flag ([583cd1d](https://github.com/ReactiveX/RxJS/commit/583cd1d)) +- **exhaustMap:** simplify interface ([42589d0](https://github.com/ReactiveX/RxJS/commit/42589d0)) +- **first:** simplify interface ([a011338](https://github.com/ReactiveX/RxJS/commit/a011338)) +- **forkJoin:** simplify interface ([4d2338b](https://github.com/ReactiveX/RxJS/commit/4d2338b)) +- **fromEvent:** remove resultSelector ([197f449](https://github.com/ReactiveX/RxJS/commit/197f449)) +- **fromEvent:** will now emit an array when event emits multiple arguments ([51b37fd](https://github.com/ReactiveX/RxJS/commit/51b37fd)) +- **fromEventPattern:** removed resultSelector ([6b34f9f](https://github.com/ReactiveX/RxJS/commit/6b34f9f)) +- **last:** simplify interface ([3240419](https://github.com/ReactiveX/RxJS/commit/3240419)) +- **mergeMap|concatMap|concatMapTo:** simplified the signatures ([d293245](https://github.com/ReactiveX/RxJS/commit/d293245)) +- **mergeMapTo:** simplify interface ([582c7be](https://github.com/ReactiveX/RxJS/commit/582c7be)) +- **never:** no longer export `never` function ([#3386](https://github.com/ReactiveX/RxJS/issues/3386)) ([53debc8](https://github.com/ReactiveX/RxJS/commit/53debc8)) +- **switchMap|switchMapTo:** simplify interface ([959fb6a](https://github.com/ReactiveX/RxJS/commit/959fb6a)) +- **Symbol.iterator:** no longer polyfilled ([#3389](https://github.com/ReactiveX/RxJS/issues/3389)) ([6319f3c](https://github.com/ReactiveX/RxJS/commit/6319f3c)) +- **Symbol.observable:** is no longer polyfilled ([#3387](https://github.com/ReactiveX/RxJS/issues/3387)) ([4a5aaaf](https://github.com/ReactiveX/RxJS/commit/4a5aaaf)) +- **throwIfEmpty:** adds throwIfEmpty operator ([#3368](https://github.com/ReactiveX/RxJS/issues/3368)) ([9b21458](https://github.com/ReactiveX/RxJS/commit/9b21458)) +- **typings:** updated typings for combineAll, mergeAll, concatAll, switch, exhaust, zipAll ([#3321](https://github.com/ReactiveX/RxJS/issues/3321)) ([f7e4c02](https://github.com/ReactiveX/RxJS/commit/f7e4c02)) +- **umd:** UMD now mirrors export schema for ESM and CJS ([#3426](https://github.com/ReactiveX/RxJS/issues/3426)) ([556c904](https://github.com/ReactiveX/RxJS/commit/556c904)) + +### BREAKING CHANGES + +- **ajax:** will no longer execute a CORS request by default, you must opt-in with the `crossDomain` flag in the config. +- **mergeMap|concatMap|concatMapTo:** mergeMap, concatMap and concatMapTo no longer support a result selector, if you need to use a result selector, use the following pattern: `source.mergeMap(x => of(x + x).pipe(map(y => y + x))` (the pattern would be the same for `concatMap`). +- **never:** no longer exported. Use the `NEVER` constant instead. +- **bindCallback:** removes result selector, use `map` instead: `bindCallback(fn1, fn2)()` becomes `bindCallback(fn1)().pipe(map(fn2))` +- **Rx.ts:** importing from `rxjs/Rx` is no longer available. Upcoming backwards compat solution will allow that +- **Symbol.iterator:** We are no longer polyfilling `Symbol.iterator`. That would be done by a proper polyfilling library +- **Observable.if:** TypeScript users using `Observable.if` will have to cast `Observable` as any to get to `if`. It is a better idea to just use `iif` directly via `import { iif } from 'rxjs';` +- **bindNodeCallback:** resultSelector removed, use `map` instead: `bindNodeCallback(fn1, fn2)()` becomes `bindNodeCallback(fn1)().pipe(map(fn2))` +- **Symbol.observable:** RxJS will no longer be polyfilling Symbol.observable. That should be done by an actual polyfill library. This is to prevent duplication of code, and also to prevent having modules with side-effects in rxjs. +- **fromEvent:** result selector removed, use `map` instead: `fromEvent(target, 'click', fn)` becomes `fromEvent(target, 'click').pipe(map(fn))` +- **last:** no longer accepts `resultSelector` argument. To get this same functionality, use `map`. +- **first:** no longer supports `resultSelector` argument. The same functionality can be achieved by simply mapping either before or after `first` depending on your use case. +- **exhaustMap:** `resultSelector` no longer supported, to get this functionality use: `source.pipe(exhaustMap(x => of(x + x).pipe(map(y => x + y))))` +- **switchMap|switchMapTo:** `switchMap` and `switchMapTo` no longer take `resultSelector` arguments, to get the same functionality use `switchMap` and `map` in combination: `source.pipe(switchMap(x => of(x + x).pipe(y => x + y)))`. +- **mergeMapTo:** `mergeMapTo` no longer accepts a resultSelector, to get this functionality, you'll want to use `mergeMap` and `map` together: `source.pipe(mergeMap(() => inner).pipe(map(y => x + y)))` +- **fromEventPattern:** no longer supports a result selector, use `map` instead: `fromEventPattern(fn1, fn2, fn3)` becomes `fromEventPattern(fn1, fn2).pipe(map(fn3))` + + + +# [6.0.0-alpha.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.3...v6.0.0-alpha.4) (2018-03-13) + +### Bug Fixes + +- **ESM:** Add [operators|ajax|websocket|testing]/package.json for ESM support, fixes [#3227](https://github.com/ReactiveX/RxJS/issues/3227) ([#3356](https://github.com/ReactiveX/RxJS/issues/3356)) ([725dcb4](https://github.com/ReactiveX/RxJS/commit/725dcb4)) +- **fromEvent:** Defines toString to fix Closure compilations ([#3417](https://github.com/ReactiveX/RxJS/issues/3417)) ([1558b43](https://github.com/ReactiveX/RxJS/commit/1558b43)) +- **fromEvent:** pass options in unsubscribe ([f1872b0](https://github.com/ReactiveX/RxJS/commit/f1872b0)), closes [#3349](https://github.com/ReactiveX/RxJS/issues/3349) +- **rxjs:** add exports for symbols/interfaces that were missing ([#3380](https://github.com/ReactiveX/RxJS/issues/3380)) ([1622ee0](https://github.com/ReactiveX/RxJS/commit/1622ee0)) +- **rxjs:** make sure esm imports from index.js by default, not Rx.js ([#3316](https://github.com/ReactiveX/RxJS/issues/3316)) ([c2b00f4](https://github.com/ReactiveX/RxJS/commit/c2b00f4)), closes [#3315](https://github.com/ReactiveX/RxJS/issues/3315) +- **rxjs:** once again exports custom error types ([#3371](https://github.com/ReactiveX/RxJS/issues/3371)) ([4465a9f](https://github.com/ReactiveX/RxJS/commit/4465a9f)) +- **rxjs:** remove types.ts importing from itself. ([#3383](https://github.com/ReactiveX/RxJS/issues/3383)) ([8fd50ad](https://github.com/ReactiveX/RxJS/commit/8fd50ad)) +- correct internal module paths to be systemjs compatible ([#3412](https://github.com/ReactiveX/RxJS/issues/3412)) ([35abc9d](https://github.com/ReactiveX/RxJS/commit/35abc9d)) +- **Symbol.iterator:** correctly handle case where Symbol constructor itself is not defined ([#3394](https://github.com/ReactiveX/RxJS/issues/3394)) ([6725be1](https://github.com/ReactiveX/RxJS/commit/6725be1)) +- **typings:** fixed some cases where multicast and publish would not return a ConnectableObservable ([#3320](https://github.com/ReactiveX/RxJS/issues/3320)) ([ddffecc](https://github.com/ReactiveX/RxJS/commit/ddffecc)) +- reexport Symbol.observable typings patch ([4c4d7b0](https://github.com/ReactiveX/RxJS/commit/4c4d7b0)) +- remove the root operators.ts because it overshadows operators/package.json ([184b6d4](https://github.com/ReactiveX/RxJS/commit/184b6d4)) + +### Code Refactoring + +- **Observable.if:** remove ts hacks from Observable ([f46f261](https://github.com/ReactiveX/RxJS/commit/f46f261)) +- **Rx.ts:** move Rx.ts to internal ([#3400](https://github.com/ReactiveX/RxJS/issues/3400)) ([7ad2119](https://github.com/ReactiveX/RxJS/commit/7ad2119)) + +### Features + +- **bindCallback:** remove result selector ([2535641](https://github.com/ReactiveX/RxJS/commit/2535641)) +- **bindNodeCallback:** remove resultSelector ([26e6e5c](https://github.com/ReactiveX/RxJS/commit/26e6e5c)) +- **exhaustMap:** simplify interface ([42589d0](https://github.com/ReactiveX/RxJS/commit/42589d0)) +- **first:** simplify interface ([a011338](https://github.com/ReactiveX/RxJS/commit/a011338)) +- **forkJoin:** simplify interface ([4d2338b](https://github.com/ReactiveX/RxJS/commit/4d2338b)) +- **fromEvent:** remove resultSelector ([197f449](https://github.com/ReactiveX/RxJS/commit/197f449)) +- **fromEvent:** will now emit an array when event emits multiple arguments ([51b37fd](https://github.com/ReactiveX/RxJS/commit/51b37fd)) +- **fromEventPattern:** removed resultSelector ([6b34f9f](https://github.com/ReactiveX/RxJS/commit/6b34f9f)) +- **last:** simplify interface ([3240419](https://github.com/ReactiveX/RxJS/commit/3240419)) +- **mergeMap|concatMap|concatMapTo:** simplified the signatures ([d293245](https://github.com/ReactiveX/RxJS/commit/d293245)) +- **mergeMapTo:** simplify interface ([582c7be](https://github.com/ReactiveX/RxJS/commit/582c7be)) +- **never:** no longer export `never` function ([#3386](https://github.com/ReactiveX/RxJS/issues/3386)) ([53debc8](https://github.com/ReactiveX/RxJS/commit/53debc8)) +- **switchMap|switchMapTo:** simplify interface ([959fb6a](https://github.com/ReactiveX/RxJS/commit/959fb6a)) +- **Symbol.iterator:** no longer polyfilled ([#3389](https://github.com/ReactiveX/RxJS/issues/3389)) ([6319f3c](https://github.com/ReactiveX/RxJS/commit/6319f3c)) +- **Symbol.observable:** is no longer polyfilled ([#3387](https://github.com/ReactiveX/RxJS/issues/3387)) ([4a5aaaf](https://github.com/ReactiveX/RxJS/commit/4a5aaaf)) +- **throwIfEmpty:** adds throwIfEmpty operator ([#3368](https://github.com/ReactiveX/RxJS/issues/3368)) ([9b21458](https://github.com/ReactiveX/RxJS/commit/9b21458)) +- **typings:** updated typings for combineAll, mergeAll, concatAll, switch, exhaust, zipAll ([#3321](https://github.com/ReactiveX/RxJS/issues/3321)) ([f7e4c02](https://github.com/ReactiveX/RxJS/commit/f7e4c02)) +- **umd:** UMD now mirrors export schema for ESM and CJS ([#3426](https://github.com/ReactiveX/RxJS/issues/3426)) ([556c904](https://github.com/ReactiveX/RxJS/commit/556c904)) + +### BREAKING CHANGES + +- **Symbol.observable:** RxJS will no longer be polyfilling Symbol.observable. That should be done by an actual polyfill library. This is to prevent duplication of code, and also to prevent having modules with side-effects in rxjs. +- **mergeMap|concatMap|concatMapTo:** mergeMap, concatMap and concatMapTo no longer support a result selector, if you need to use a result selector, use the following pattern: `source.mergeMap(x => of(x + x).pipe(map(y => y + x))` (the pattern would be the same for `concatMap`). +- **bindCallback:** removes result selector, use `map` instead: `bindCallback(fn1, fn2)()` becomes `bindCallback(fn1)().pipe(map(fn2))` +- **Rx.ts:** importing from `rxjs/Rx` is no longer available. Upcoming backwards compat solution will allow that +- **Symbol.iterator:** We are no longer polyfilling `Symbol.iterator`. That would be done by a proper polyfilling library +- **Observable.if:** TypeScript users using `Observable.if` will have to cast `Observable` as any to get to `if`. It is a better idea to just use `iif` directly via `import { iif } from 'rxjs';` +- **bindNodeCallback:** resultSelector removed, use `map` instead: `bindNodeCallback(fn1, fn2)()` becomes `bindNodeCallback(fn1)().pipe(map(fn2))` +- **never:** no longer exported. Use the `NEVER` constant instead. +- **fromEvent:** result selector removed, use `map` instead: `fromEvent(target, 'click', fn)` becomes `fromEvent(target, 'click').pipe(map(fn))` +- **last:** no longer accepts `resultSelector` argument. To get this same functionality, use `map`. +- **first:** no longer supports `resultSelector` argument. The same functionality can be achieved by simply mapping either before or after `first` depending on your use case. +- **exhaustMap:** `resultSelector` no longer supported, to get this functionality use: `source.pipe(exhaustMap(x => of(x + x).pipe(map(y => x + y))))` +- **switchMap|switchMapTo:** `switchMap` and `switchMapTo` no longer take `resultSelector` arguments, to get the same functionality use `switchMap` and `map` in combination: `source.pipe(switchMap(x => of(x + x).pipe(y => x + y)))`. +- **mergeMapTo:** `mergeMapTo` no longer accepts a resultSelector, to get this functionality, you'll want to use `mergeMap` and `map` together: `source.pipe(mergeMap(() => inner).pipe(map(y => x + y)))` +- **fromEventPattern:** no longer supports a result selector, use `map` instead: `fromEventPattern(fn1, fn2, fn3)` becomes `fromEventPattern(fn1, fn2).pipe(map(fn3))` + + + +# [6.0.0-alpha.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.2...v6.0.0-alpha.3) (2018-02-06) + +### Bug Fixes + +- **animationFrame.spec:** spec description fix ([#3140](https://github.com/ReactiveX/RxJS/issues/3140)) ([ab6c325](https://github.com/ReactiveX/RxJS/commit/ab6c325)) +- **debounce:** support scalar selectors ([#3236](https://github.com/ReactiveX/RxJS/issues/3236)) ([1548393](https://github.com/ReactiveX/RxJS/commit/1548393)), closes [#3232](https://github.com/ReactiveX/RxJS/issues/3232) +- **forkJoin:** catch and forward selector errors ([#3261](https://github.com/ReactiveX/RxJS/issues/3261)) ([e57bbb7](https://github.com/ReactiveX/RxJS/commit/e57bbb7)), closes [#3216](https://github.com/ReactiveX/RxJS/issues/3216) +- **Observable:** expose pipe rest parameter overload ([#3292](https://github.com/ReactiveX/RxJS/issues/3292)) ([7ff5bc3](https://github.com/ReactiveX/RxJS/commit/7ff5bc3)) +- **onErrorResumeNext:** no longer holds onto subscriptions too long ([abbbdad](https://github.com/ReactiveX/RxJS/commit/abbbdad)), closes [#3178](https://github.com/ReactiveX/RxJS/issues/3178) +- **scheduler:** prevent unwanted clearInterval ([#3226](https://github.com/ReactiveX/RxJS/issues/3226)) ([d7cfb42](https://github.com/ReactiveX/RxJS/commit/d7cfb42)), closes [#3042](https://github.com/ReactiveX/RxJS/issues/3042) +- **timer:** multiple subscriptions to timer(Date) behaves correctly ([aafa7ff](https://github.com/ReactiveX/RxJS/commit/aafa7ff)), closes [#3252](https://github.com/ReactiveX/RxJS/issues/3252) +- **typings:** correct compilation warnings from missing types in tests ([3aad6bc](https://github.com/ReactiveX/RxJS/commit/3aad6bc)) +- **typings:** relax debounce selector type ([c419ab4](https://github.com/ReactiveX/RxJS/commit/c419ab4)), closes [#3164](https://github.com/ReactiveX/RxJS/issues/3164) +- **typings:** relax throttle selector type ([#3205](https://github.com/ReactiveX/RxJS/issues/3205)) ([e83fda7](https://github.com/ReactiveX/RxJS/commit/e83fda7)), closes [#3204](https://github.com/ReactiveX/RxJS/issues/3204) +- **typings:** the return type of factory of defer should be ObservableInput ([#3211](https://github.com/ReactiveX/RxJS/issues/3211)) ([dc41a5e](https://github.com/ReactiveX/RxJS/commit/dc41a5e)) + +### Features + +- **empty:** empty() returns the same instance ([5c7c749](https://github.com/ReactiveX/RxJS/commit/5c7c749)) +- **EMPTY:** observable constant EMPTY now exported ([08fb074](https://github.com/ReactiveX/RxJS/commit/08fb074)) +- **never:** always return the same instance ([#3249](https://github.com/ReactiveX/RxJS/issues/3249)) ([d57fa52](https://github.com/ReactiveX/RxJS/commit/d57fa52)) +- **rxjs:** move rxjs/create into rxjs ([#3299](https://github.com/ReactiveX/RxJS/issues/3299)) ([6711fe2](https://github.com/ReactiveX/RxJS/commit/6711fe2)) +- **throwError:** functional version of throwError ([639236e](https://github.com/ReactiveX/RxJS/commit/639236e)) + +### BREAKING CHANGES + +- **rxjs:** `rxjs/create` items are now exported from `rxjs` +- **throwError:** Observable.throw no longer available in TypeScript without a cast +- **empty:** `empty()` without a scheduler will return the same + instance every time. +- **empty:** In TypeScript, `empty()` no longer accepts a generic + argument, as it returns `Observable` +- **never:** `never()` always returns the same instance +- **never:** TypeScript typing for `never()` is now `Observable` and the function no longer requires a generic type. + + + +# [6.0.0-alpha.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.1...6.0.0-alpha.2) (2018-01-14) + +### Bug Fixes + +- **build:** properly outputs subdirectories like `rxjs/operators` ([34fe560](https://github.com/ReactiveX/RxJS/commit/34fe560)) + + + +# [6.0.0-alpha.1](https://github.com/ReactiveX/RxJS/compare/5.5.3...v6.0.0-alpha.1) (2018-01-12) + +### Bug Fixes + +- Revert "fix(scheduler): prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044))" ([ad5c7c6](https://github.com/ReactiveX/RxJS/commit/ad5c7c6)) +- Revert "fix(scheduler): prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044))" ([64f9285](https://github.com/ReactiveX/RxJS/commit/64f9285)) +- **debounceTime:** synchronous reentrancy of debounceTime no longer swallows the second value ([#3218](https://github.com/ReactiveX/RxJS/issues/3218)) ([598e9ce](https://github.com/ReactiveX/RxJS/commit/598e9ce)), closes [#2748](https://github.com/ReactiveX/RxJS/issues/2748) +- **dependency:** move symbol-observable into devdependency ([4400628](https://github.com/ReactiveX/RxJS/commit/4400628)) +- **IteratorObservable:** get new iterator for each subscription ([#2497](https://github.com/ReactiveX/RxJS/issues/2497)) ([1bd0a58](https://github.com/ReactiveX/RxJS/commit/1bd0a58)), closes [#2496](https://github.com/ReactiveX/RxJS/issues/2496) +- **Observable.toArray:** Fix toArray with multiple subscriptions. ([#3134](https://github.com/ReactiveX/RxJS/issues/3134)) ([3390926](https://github.com/ReactiveX/RxJS/commit/3390926)) +- **SystemJS:** avoid node module resolution of pipeable operators ([#3025](https://github.com/ReactiveX/RxJS/issues/3025)) ([0f3cf71](https://github.com/ReactiveX/RxJS/commit/0f3cf71)), closes [#2971](https://github.com/ReactiveX/RxJS/issues/2971) [#2996](https://github.com/ReactiveX/RxJS/issues/2996) [#3011](https://github.com/ReactiveX/RxJS/issues/3011) +- **tap:** make next optional ([#3073](https://github.com/ReactiveX/RxJS/issues/3073)) ([e659f0c](https://github.com/ReactiveX/RxJS/commit/e659f0c)), closes [#2534](https://github.com/ReactiveX/RxJS/issues/2534) +- **TSC:** Fixing TSC errors. Fixes [#3020](https://github.com/ReactiveX/RxJS/issues/3020) ([01d1575](https://github.com/ReactiveX/RxJS/commit/01d1575)) +- **typings:** the return type of project of mergeScan should be ObservableInput ([23fe17d](https://github.com/ReactiveX/RxJS/commit/23fe17d)) + +### Chores + +- **TypeScript:** Bump up typescript to latest ([#3009](https://github.com/ReactiveX/RxJS/issues/3009)) ([2f395da](https://github.com/ReactiveX/RxJS/commit/2f395da)) + +### Code Refactoring + +- **asap:** Remove setImmediate polyfill ([5eb6af7](https://github.com/ReactiveX/RxJS/commit/5eb6af7)) +- **distinct:** Remove Set polyfill ([68ee499](https://github.com/ReactiveX/RxJS/commit/68ee499)) +- **groupBy:** Remove Map polyfill ([74b5b1a](https://github.com/ReactiveX/RxJS/commit/74b5b1a)) + +### Features + +- **Observable:** unhandled errors are now reported to HostReportErrors ([#3062](https://github.com/ReactiveX/RxJS/issues/3062)) ([cd9626a](https://github.com/ReactiveX/RxJS/commit/cd9626a)) +- **reorganize:** move ./interfaces.ts to internal/types.ts ([cfbfaac](https://github.com/ReactiveX/RxJS/commit/cfbfaac)) +- **reorganize:** internal utils hidden ([70058cd](https://github.com/ReactiveX/RxJS/commit/70058cd)) +- **reorganize:** add `rxjs/create` exports ([c9963bd](https://github.com/ReactiveX/RxJS/commit/c9963bd)) +- **reorganize:** ajax observable creator now exported from `rxjs/ajax` ([e971c93](https://github.com/ReactiveX/RxJS/commit/e971c93)) +- **reorganize:** all patch operators moved to `internal` directory ([7342401](https://github.com/ReactiveX/RxJS/commit/7342401)) +- **reorganize:** export `noop` and `identity` from `rxjs` ([810c4d0](https://github.com/ReactiveX/RxJS/commit/810c4d0)) +- **reorganize:** export `Notification` from `rxjs` ([8809b48](https://github.com/ReactiveX/RxJS/commit/8809b48)) +- **reorganize:** export schedulers from `rxjs` ([abd3b61](https://github.com/ReactiveX/RxJS/commit/abd3b61)) +- **reorganize:** export Subject, ReplaySubject, BehaviorSubject from rxjs ([bd683ca](https://github.com/ReactiveX/RxJS/commit/bd683ca)) +- **reorganize:** export the `pipe` utility function from `rxjs` ([4574310](https://github.com/ReactiveX/RxJS/commit/4574310)) +- **reorganize:** hid testing implementation details ([b981666](https://github.com/ReactiveX/RxJS/commit/b981666)) +- **reorganize:** move observable implementations under internal directory ([2d5c3f8](https://github.com/ReactiveX/RxJS/commit/2d5c3f8)) +- **reorganize:** move operator impls under internal directory ([207976f](https://github.com/ReactiveX/RxJS/commit/207976f)) +- **reorganize:** move top-level impls under internal directory ([c3bb705](https://github.com/ReactiveX/RxJS/commit/c3bb705)) +- **reorganize:** moved symbols to be internal ([80783ab](https://github.com/ReactiveX/RxJS/commit/80783ab)) +- **reorganize:** operators all exported from `rxjs/operators` ([b1f8bfe](https://github.com/ReactiveX/RxJS/commit/b1f8bfe)) +- **reorganize:** websocket subject creator now exported from `rxjs/websocket` ([5ac62c0](https://github.com/ReactiveX/RxJS/commit/5ac62c0)) + +### BREAKING CHANGES + +- **webSocket:** `webSocket` creator function now exported from `rxjs/websocket` as `websocket`. +- **IteratorObservable:** IteratorObservable no longer share iterator between + subscription +- **utils:** Many internal use utilities like `isArray` are now hidden under `rxjs/internal`, they are implementation details and should not be used. +- **testing observables:** `HotObservable` and `ColdObservable`, and other testing support types are no longer exported directly. +- **creation functions:** All create functions such as `of`, `from`, `combineLatest` and `fromEvent` should now be imported from `rxjs/create`. +- **types and interfaces:** Can no longer explicitly import types from `rxjs/interfaces`, import them from `rxjs` instead +- **symbols:** Symbols are no longer exported directly from modules such as `rxjs/symbol/observable` please use `Symbol.observable` and `Symbol.iterator` (polyfills may be required) +- **deep imports:** Can no longer deep import top-level types such as `rxjs/Observable`, `rxjs/Subject`, `rxjs/ReplaySubject`, et al. All imports should be done directly from `rxjs`, for example: `import \{ Observable, Subject \} from 'rxjs';` +- **schedulers:** Scheduler instances have changed names to be suffixed with `Scheduler`, (e.g. `asap` -> `asapScheduler`) +- **operators:** Pipeable operators must now be imported from `rxjs` + like so: `import { map, filter, switchMap } from 'rxjs/operators';`. No deep imports. +- **ajax:** Ajax observable should be imported from `rxjs/ajax`. +- **Observable:** You should no longer deep import custom Observable + implementations such as `ArrayObservable` or `ForkJoinObservable`. +- **\_throw:** `_throw` is now exported as `throwError` +- **if:** `if` is now exported as `iif` +- **operators:** Deep imports to `rxjs/operator/*` will no longer work. Again, pipe operators are still where they were. +- **error handling:** Unhandled errors are no longer caught and rethrown, rather they are caught and scheduled to be thrown, which causes them to be reported to window.onerror or process.on('error'), depending on the environment. Consequently, teardown after a synchronous, unhandled, error will no longer occur, as the teardown would not exist, and producer interference cannot occur +- **distinct:** Using `distinct` requires a `Set` implementation and must be polyfilled in older runtimes +- **asap:** Old runtimes must polyfill Promise in order to use ASAP scheduling. +- **groupBy:** Older runtimes will require Map to be polyfilled to use + `groupBy` +- **TypeScript:** IE10 and lower will need to polyfill `Object.setPrototypeOf` +- **operators removed:** Operator versions of static observable creators such as + `merge`, `concat`, `zip`, `onErrorResumeNext`, and `race` have been + removed. Please use the static versions of those operations. e.g. + `a.pipe(concat(b, c))` becomes `concat(a, b, c)`. + + + +## [5.5.6](https://github.com/ReactiveX/RxJS/compare/5.5.5...v5.5.6) (2017-12-21) + +### Bug Fixes + +- **Observable:** rethrow errors when syncErrorThrowable and inherit it from destination. Fixes [#2813](https://github.com/ReactiveX/RxJS/issues/2813) ([541b49d](https://github.com/ReactiveX/RxJS/commit/541b49d)) + + + +## [5.5.5](https://github.com/ReactiveX/RxJS/compare/5.5.4...v5.5.5) (2017-12-06) + +### Support Added + +- **Bazel:** Add files to support users that want Bazel builds with RxJS ([12dac3b](https://github.com/ReactiveX/rxjs/commit/12dac3b)) + + + +## [5.5.4](https://github.com/ReactiveX/RxJS/compare/5.5.3...v5.5.4) (2017-12-05) + +### Bug Fixes + +- **scheduler:** resolve regression on angular router with zones ([#3158](https://github.com/ReactiveX/RxJS/issues/3158)) ([520b06a](https://github.com/ReactiveX/RxJS/commit/520b06a)) +- **publish:** re-publish after having built with proper version of TypeScript. ([f0ff5bc](https://github.com/ReactiveX/RxJS/commit/f0ff5bc), closes[#3155](https://github.com/ReactiveX/rxjs/issues/3155)) + + + +## [5.5.3](https://github.com/ReactiveX/RxJS/compare/5.5.2...v5.5.3) (2017-12-01) + +### Bug Fixes + +- **concatStatic:** missing exports for mergeStatic and concatStatic ([#2999](https://github.com/ReactiveX/RxJS/issues/2999)) ([cae5f9b](https://github.com/ReactiveX/RxJS/commit/cae5f9b)) +- **scheduler:** prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044)) ([7d722d4](https://github.com/ReactiveX/RxJS/commit/7d722d4)), closes [#3042](https://github.com/ReactiveX/RxJS/issues/3042) +- **SystemJS:** avoid node module resolution of pipeable operators ([#3025](https://github.com/ReactiveX/RxJS/issues/3025)) ([d77e3d7](https://github.com/ReactiveX/RxJS/commit/d77e3d7)), closes [#2971](https://github.com/ReactiveX/RxJS/issues/2971) [#2996](https://github.com/ReactiveX/RxJS/issues/2996) [#3011](https://github.com/ReactiveX/RxJS/issues/3011) +- **typings:** fix subscribe overloads ([#3053](https://github.com/ReactiveX/RxJS/issues/3053)) ([1a9fd42](https://github.com/ReactiveX/RxJS/commit/1a9fd42)), closes [#3052](https://github.com/ReactiveX/RxJS/issues/3052) + + + +## [5.5.2](https://github.com/ReactiveX/RxJS/compare/5.5.1...v5.5.2) (2017-10-25) + +### Bug Fixes + +- **package:** fixed import failures in Webpack ([#2987](https://github.com/ReactiveX/RxJS/issues/2987)) ([e16202d](https://github.com/ReactiveX/RxJS/commit/e16202d)) +- **typings:** improved type inference for arguments to publishReplay ([#2992](https://github.com/ReactiveX/RxJS/issues/2992)) ([0753ff7](https://github.com/ReactiveX/RxJS/commit/0753ff7)), closes [#2991](https://github.com/ReactiveX/RxJS/issues/2991) +- **typings:** ensure TS types for `zip` and `combineLatest` are properly inferred. ([b8e6cf8](https://github.com/ReactiveX/RxJS/commit/b8e6cf8)) +- **typings:** publish variants will properly return ConnectableObservable([#2983](https://github.com/ReactiveX/RxJS/issues/2983)) ([d563bfa](https://github.com/ReactiveX/RxJS/commit/d563bfa)) + + + +## [5.5.1](https://github.com/ReactiveX/RxJS/compare/5.5.0...v5.5.1) (2017-10-24) + +### Bug Fixes + +- **build:** Remove `module` and `es2015` keys to avoid resolution conflicts ([5073139](https:/github.com/ReactiveX/RxJS/commit/5073139)) +- **ajaxobservable:** fix operator import path ([d9b62ed](https://github.com/ReactiveX/RxJS/commit/d9b62ed)) + + + +# [5.5.0](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.7...v5.5.0) (2017-10-18) + +### Bug Fixes + +- **build:** CJS sourceMaps now inlined into sourcesContent ([39b4af5](https://github.com/ReactiveX/RxJS/commit/39b4af5)), closes [#2934](https://github.com/ReactiveX/RxJS/issues/2934) + +### Features + +- **publishReplay:** add selector function to publishReplay ([#2885](https://github.com/ReactiveX/RxJS/issues/2885)) ([e0efd13](https://github.com/ReactiveX/RxJS/commit/e0efd13)) + + + +# [5.5.0-beta.7](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.5...5.5.0-beta.7) (2017-10-13) + +(Due to a publish snafu, there is no 5.5.0-beta.6) (womp womp 👎) + +### Bug Fixes + +- **build:** sourceMaps updated to support CJS properly again ([75f7f11](https://github.com/ReactiveX/RxJS/commit/75f7f11)), closes [#2934](https://github.com/ReactiveX/RxJS/issues/2934) +- **flatMap:** reexport flatMap as alias of mergeMap ([#2920](https://github.com/ReactiveX/RxJS/issues/2920)) ([9922c02](https://github.com/ReactiveX/RxJS/commit/9922c02)) +- **publish:** correct the name and republish to sync packages ([464b115](https://github.com/ReactiveX/RxJS/commit/464b115)) +- **shareReplay:** no longer exporting function unnecessarily ([#2928](https://github.com/ReactiveX/RxJS/issues/2928)) ([e159578](https://github.com/ReactiveX/RxJS/commit/e159578)) +- **shareReplay:** properly uses `lift` ([#2924](https://github.com/ReactiveX/RxJS/issues/2924)) ([3d9cf87](https://github.com/ReactiveX/RxJS/commit/3d9cf87)), closes [#2921](https://github.com/ReactiveX/RxJS/issues/2921) +- **toPromise:** include toPromise in build output ([#2923](https://github.com/ReactiveX/RxJS/issues/2923)) ([f55bfa5](https://github.com/ReactiveX/RxJS/commit/f55bfa5)), closes [#2922](https://github.com/ReactiveX/RxJS/issues/2922) + + + +# [5.5.0-beta.5](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.4...v5.5.0-beta.5) (2017-10-06) + +### Bug Fixes + +- **toPromise:** remove lettable version of toPromise ([031edca](https://github.com/ReactiveX/RxJS/commit/031edca)), closes [#2868](https://github.com/ReactiveX/RxJS/issues/2868) + +### Features + +- **toPromise:** now exists as a permanent method on Observable ([2e49a5c](https://github.com/ReactiveX/RxJS/commit/2e49a5c)) + + + +# [5.5.0-beta.4](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.3...v5.5.0-beta.4) (2017-10-06) + +### Bug Fixes + +- **publish:** fix selector typings ([#2891](https://github.com/ReactiveX/RxJS/issues/2891)) ([9ee234d](https://github.com/ReactiveX/RxJS/commit/9ee234d)), closes [#2889](https://github.com/ReactiveX/RxJS/issues/2889) +- **shareReplay:** properly retains history on subscribe ([#2910](https://github.com/ReactiveX/RxJS/issues/2910)) ([accbcd0](https://github.com/ReactiveX/RxJS/commit/accbcd0)), closes [#2908](https://github.com/ReactiveX/RxJS/issues/2908) +- **subscribeOn:** remove subscribeOn from reexport to support treesha… ([#2899](https://github.com/ReactiveX/RxJS/issues/2899)) ([fb51a02](https://github.com/ReactiveX/RxJS/commit/fb51a02)) + + + +# [5.5.0-beta.3](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.2...v5.5.0-beta.3) (2017-10-03) + +### Bug Fixes + +- **build:** revert to 5.4.x build output for CJS & add configurable support for ESM ([#2878](https://github.com/ReactiveX/RxJS/issues/2878)) ([167456a](https://github.com/ReactiveX/RxJS/commit/167456a)) +- **concatAll:** use higher-order lettable version of concatAll ([60c96ab](https://github.com/ReactiveX/RxJS/commit/60c96ab)) +- **mergeAll:** use higher-order lettable version of mergeAll ([f0b703b](https://github.com/ReactiveX/RxJS/commit/f0b703b)) + + + +# [5.5.0-beta.2](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.1...v5.5.0-beta.2) (2017-09-27) + +### Bug Fixes + +- **build:** make CJS references to import X from '../operators' work correctly with SystemJS ([#2874](https://github.com/ReactiveX/RxJS/issues/2874)) ([3dd4cc4](https://github.com/ReactiveX/RxJS/commit/3dd4cc4)) + + + +# [5.5.0-beta.1](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.0...v5.5.0-beta.1) (2017-09-27) + +### Bug Fixes + +- **package:** published from a Linux machine to prevent a strange issue where + the Observable directory was not showing up when installed on some Linux + environments. +- **build:** fix source maps by adding back sources and fixing path ([#2872](https://github.com/ReactiveX/RxJS/issues/2872)) ([daaf424](https://github.com/ReactiveX/RxJS/commit/daaf424)) +- **package:** remove src directory and fix typings location ([#2866](https://github.com/ReactiveX/RxJS/issues/2866)) ([c57eea7](https://github.com/ReactiveX/RxJS/commit/c57eea7)) + +### Features + +- **global:** export lettables as Rx.operators ([#2862](https://github.com/ReactiveX/RxJS/issues/2862)) ([ba2f586](https://github.com/ReactiveX/RxJS/commit/ba2f586)), closes [#2861](https://github.com/ReactiveX/RxJS/issues/2861) + + + +# [5.5.0-beta.0](https://github.com/ReactiveX/RxJS/compare/5.4.3...5.5.0-beta.0) (2017-09-22) + +**Important! Checkout the explanation of the new [lettable operators features here](doc/lettable-operators.md)** + +### Bug Fixes + +- **package:** correct errors generated during rollup for UMD generation ([#2839](https://github.com/ReactiveX/RxJS/issues/2839)) ([124cc93](https://github.com/ReactiveX/RxJS/commit/124cc93)) +- **partition:** update TypeScript signature to match docs and filter operator ([#2819](https://github.com/ReactiveX/RxJS/issues/2819)) ([755df9b](https://github.com/ReactiveX/RxJS/commit/755df9b)) +- **subscribeToResult:** throw error in subscriber with inner observable ([d7bffa9](https://github.com/ReactiveX/RxJS/commit/d7bffa9)), closes [#2618](https://github.com/ReactiveX/RxJS/issues/2618) + +### Features + +- **ajax:** Include the response on instances of AjaxError ([3f6553c](https://github.com/ReactiveX/RxJS/commit/3f6553c)) +- **audit:** add higher-order lettable version of audit ([e2daefe](https://github.com/ReactiveX/RxJS/commit/e2daefe)) +- **auditTime:** add higher-order lettable version of auditTime ([9e963aa](https://github.com/ReactiveX/RxJS/commit/9e963aa)) +- **buffer:** add higher-order lettable version of buffer ([d8ca9de](https://github.com/ReactiveX/RxJS/commit/d8ca9de)) +- **bufferCount:** add higher-order lettable version of bufferCount ([0ae2ed5](https://github.com/ReactiveX/RxJS/commit/0ae2ed5)) +- **bufferTime:** add higher-order lettable version of bufferTime operator ([0377ca6](https://github.com/ReactiveX/RxJS/commit/0377ca6)) +- **bufferToggle:** add higher-order lettable version of bufferToggle ([ea1c3ee](https://github.com/ReactiveX/RxJS/commit/ea1c3ee)) +- **bufferWhen:** add higher-order lettable version of bufferWhen ([ec3eceb](https://github.com/ReactiveX/RxJS/commit/ec3eceb)) +- **catchError:** add higher-order lettable version of `catch` ([408a2af](https://github.com/ReactiveX/RxJS/commit/408a2af)) +- **combineAll:** add higher-order lettable version of combineAll ([97704b3](https://github.com/ReactiveX/RxJS/commit/97704b3)) +- **combineLatest:** add higher-order lettable version of combineLatest ([b7154f2](https://github.com/ReactiveX/RxJS/commit/b7154f2)) +- **concatMap:** add higher-order lettable version of concatMap ([c4125ff](https://github.com/ReactiveX/RxJS/commit/c4125ff)) +- **concatMapTo:** add higher-order lettable version of concatMapTo ([0a6672e](https://github.com/ReactiveX/RxJS/commit/0a6672e)) +- **count:** add higher-order lettable version of count ([caf713e](https://github.com/ReactiveX/RxJS/commit/caf713e)) +- **debounce:** add higher-order lettable version of debounce ([cb8ce46](https://github.com/ReactiveX/RxJS/commit/cb8ce46)) +- **debounceTime:** add higher-order lettable version of debounceTime ([df0d439](https://github.com/ReactiveX/RxJS/commit/df0d439)) +- **delay:** add higher-order lettable version of delay ([7efb803](https://github.com/ReactiveX/RxJS/commit/7efb803)) +- **delayWhen:** add higher-order lettable version of delayWhen ([cb91c3f](https://github.com/ReactiveX/RxJS/commit/cb91c3f)) +- **dematerialize:** add higher-order lettable version of dematerialize ([b5948f9](https://github.com/ReactiveX/RxJS/commit/b5948f9)) +- **distinct:** add higher-order lettable version of distinct ([0429a69](https://github.com/ReactiveX/RxJS/commit/0429a69)) +- **distinctUntilChanged:** add higher-order lettable version of distinctUntilChanged ([b2725e7](https://github.com/ReactiveX/RxJS/commit/b2725e7)) +- **distinctUntilKeyChanged:** add higher-order lettable version of distinctUntilKeyChanged ([9db141c](https://github.com/ReactiveX/RxJS/commit/9db141c)) +- **elementAt:** add higher-order lettable version of elementAt ([b8e956b](https://github.com/ReactiveX/RxJS/commit/b8e956b)) +- **every:** add higher-order lettable version of every ([13f3503](https://github.com/ReactiveX/RxJS/commit/13f3503)) +- **exhaust:** add higher-order lettable version of exhaust ([b145dca](https://github.com/ReactiveX/RxJS/commit/b145dca)) +- **exhaustMap:** add higher-order lettable exhaustMap ([b134e0c](https://github.com/ReactiveX/RxJS/commit/b134e0c)) +- **expand:** add higher-order lettable expand ([6ec8a19](https://github.com/ReactiveX/RxJS/commit/6ec8a19)) +- **filter:** add higher-order lettable version of filter ([2848556](https://github.com/ReactiveX/RxJS/commit/2848556)) +- **finalize:** add higher-order lettable version of finally, called finalize ([cfeae9f](https://github.com/ReactiveX/RxJS/commit/cfeae9f)) +- **find:** add higher-order lettable version of find ([ff6d5af](https://github.com/ReactiveX/RxJS/commit/ff6d5af)) +- **findIndex:** add higher-order lettable findIndex ([40e680e](https://github.com/ReactiveX/RxJS/commit/40e680e)) +- **first:** add higher-order lettable first ([33eac1e](https://github.com/ReactiveX/RxJS/commit/33eac1e)) +- **groupBy:** add higher-order lettable groupBy ([5281229](https://github.com/ReactiveX/RxJS/commit/5281229)) +- **ignoreElements:** add higher-order lettable version of ignoreElements ([68286d4](https://github.com/ReactiveX/RxJS/commit/68286d4)) +- **isEmpty:** add higher-order lettable version of isEmpty ([aad1833](https://github.com/ReactiveX/RxJS/commit/aad1833)) +- **last:** add higher-order lettable version of last ([bf33b97](https://github.com/ReactiveX/RxJS/commit/bf33b97)) +- **lettables:** add higher-order lettable versions of concat, concatAll, mergeAll ([d7e8be7](https://github.com/ReactiveX/RxJS/commit/d7e8be7)) +- **map:** add higher-order lettable map operator ([ce40b2d](https://github.com/ReactiveX/RxJS/commit/ce40b2d)) +- **mapTo:** add higher-order lettable version of mapTo ([e97530f](https://github.com/ReactiveX/RxJS/commit/e97530f)) +- **materialize:** add higher-order lettable materialize operator ([ce42477](https://github.com/ReactiveX/RxJS/commit/ce42477)) +- **merge:** add higher-order lettable version of merge ([#2809](https://github.com/ReactiveX/RxJS/issues/2809)) ([3136403](https://github.com/ReactiveX/RxJS/commit/3136403)) +- **mergeMap:** add higher-order lettable version of mergeMap ([417efde](https://github.com/ReactiveX/RxJS/commit/417efde)) +- **mergeMapTo:** add higher-order lettable version of mergeMapTo ([653b47a](https://github.com/ReactiveX/RxJS/commit/653b47a)) +- **mergeScan:** add higher-order lettable version of mergeScan ([fde7205](https://github.com/ReactiveX/RxJS/commit/fde7205)) +- **multicast:** add higher-order lettable variant of multicast ([fb6014d](https://github.com/ReactiveX/RxJS/commit/fb6014d)) +- **observeOn:** add higher-order lettable version of observeOn ([feb0f5a](https://github.com/ReactiveX/RxJS/commit/feb0f5a)) +- **onErrorResumeNext:** add higher-order lettable version of onErrorResumeNext ([badec6a](https://github.com/ReactiveX/RxJS/commit/badec6a)) +- **operators:** higher-order lettables of reduce, min, max and defaultIfEmpty added ([9974fc2](https://github.com/ReactiveX/RxJS/commit/9974fc2)) +- **package:** rxjs distribution now supports main, module and es2015 keys in package.json ([988e1af](https://github.com/ReactiveX/RxJS/commit/988e1af)) +- **pairwise:** add higher-order lettable version of pairwise ([bb21a44](https://github.com/ReactiveX/RxJS/commit/bb21a44)) +- **partition:** add higher-order lettable version of partition ([595e588](https://github.com/ReactiveX/RxJS/commit/595e588)) +- **pipe:** add pipe method ot Observable ([9f6312d](https://github.com/ReactiveX/RxJS/commit/9f6312d)) +- **pipe:** add pipe utility function([42f9daf](https://github.com/ReactiveX/RxJS/commit/42f9daf)) +- **pluck:** add higher-order lettable version of pluck ([8ab0914](https://github.com/ReactiveX/RxJS/commit/8ab0914)) +- **publish:** add higher-order lettable variant of publish ([4ccf794](https://github.com/ReactiveX/RxJS/commit/4ccf794)) +- **publishBehavior:** add higher-order lettable version of publishBehavior ([e911aef](https://github.com/ReactiveX/RxJS/commit/e911aef)) +- **publishLast:** add higher-order lettable version of publishLast ([684728c](https://github.com/ReactiveX/RxJS/commit/684728c)) +- **publishReplay:** add higher-order lettable version of publishReplay ([2958917](https://github.com/ReactiveX/RxJS/commit/2958917)) +- **race:** add higher-order lettable version of race ([e646851](https://github.com/ReactiveX/RxJS/commit/e646851)) +- **refCount:** add higher-order lettable version of refCount ([21fba63](https://github.com/ReactiveX/RxJS/commit/21fba63)) +- **repeat:** add higher-order lettable version of repeat ([8473fe5](https://github.com/ReactiveX/RxJS/commit/8473fe5)) +- **repeatWhen:** add higher-order lettable version of repeatWhen ([1d1cecd](https://github.com/ReactiveX/RxJS/commit/1d1cecd)) +- **retry:** add higher-order lettable version of retry ([28e9b13](https://github.com/ReactiveX/RxJS/commit/28e9b13)) +- **retryWhen:** add higher-order lettable version of retryWhen ([1290e3c](https://github.com/ReactiveX/RxJS/commit/1290e3c)) +- **sample:** add higher-order lettable version of sample ([8c73e6e](https://github.com/ReactiveX/RxJS/commit/8c73e6e)) +- **sampleTime:** add higher-order lettable version of sampleTime ([ba6a9ce](https://github.com/ReactiveX/RxJS/commit/ba6a9ce)) +- **scan:** add higher-order lettable version of scan ([2cc5d75](https://github.com/ReactiveX/RxJS/commit/2cc5d75)) +- **sequenceEqual:** add higher-order lettable version of sequenceEqual ([7cd3165](https://github.com/ReactiveX/RxJS/commit/7cd3165)) +- **share:** add higher-order lettable version of share ([f10c42e](https://github.com/ReactiveX/RxJS/commit/f10c42e)) +- **shareReplay:** add higher-order lettable version of shareReplay ([e8be197](https://github.com/ReactiveX/RxJS/commit/e8be197)) +- **single:** add higher-order lettable version of single ([3bc050a](https://github.com/ReactiveX/RxJS/commit/3bc050a)) +- **skip:** add higher-order lettable version of skip ([baed383](https://github.com/ReactiveX/RxJS/commit/baed383)) +- **skipLast:** add higher-order lettable version of skipLast ([6e1ff3c](https://github.com/ReactiveX/RxJS/commit/6e1ff3c)) +- **skipUntil:** add higher-order lettable version of skipUntil ([6cc2cd6](https://github.com/ReactiveX/RxJS/commit/6cc2cd6)) +- **skipWhile:** add higher-order lettable version of skipWhile ([76d8ffa](https://github.com/ReactiveX/RxJS/commit/76d8ffa)) +- **subscribeOn:** add higher-order lettable version of subscribeOn ([866af37](https://github.com/ReactiveX/RxJS/commit/866af37)) +- **switchAll:** add higher-order lettable version of switch ([2f12572](https://github.com/ReactiveX/RxJS/commit/2f12572)) +- **switchMap:** add higher-order lettable version of switchMap ([b6e5b56](https://github.com/ReactiveX/RxJS/commit/b6e5b56)) +- **switchMapTo:** add higher-order lettable version of switchMapTo ([2640184](https://github.com/ReactiveX/RxJS/commit/2640184)) +- **take:** add higher-order lettable version of take ([089a5a6](https://github.com/ReactiveX/RxJS/commit/089a5a6)) +- **takeLast:** add higher-order lettable version of takeLast ([cd7e7dd](https://github.com/ReactiveX/RxJS/commit/cd7e7dd)) +- **takeUntil:** add higher-order lettable version of takeUntil ([bb2ddaa](https://github.com/ReactiveX/RxJS/commit/bb2ddaa)) +- **takeWhile:** add higher-order lettable version of takeWhile ([f86c862](https://github.com/ReactiveX/RxJS/commit/f86c862)) +- **tap:** add higher-order lettable version of do ([f85c60e](https://github.com/ReactiveX/RxJS/commit/f85c60e)) +- **throttle:** add higher-order lettable version of throttle ([e4dd1fd](https://github.com/ReactiveX/RxJS/commit/e4dd1fd)) +- **throttleTime:** add higher-order lettable version of throttleTime ([34a592d](https://github.com/ReactiveX/RxJS/commit/34a592d)) +- **timeInterval:** add higher-order lettable version of timeInterval ([fcad034](https://github.com/ReactiveX/RxJS/commit/fcad034)) +- **timeout:** add higher-order lettable version of timeout ([2546750](https://github.com/ReactiveX/RxJS/commit/2546750)) +- **timeoutWith:** add higher-order lettable version of timeoutWith ([bd7f5ed](https://github.com/ReactiveX/RxJS/commit/bd7f5ed)) +- **timestamp:** add higher-order lettable version of timestamp ([a780bf2](https://github.com/ReactiveX/RxJS/commit/a780bf2)) +- **toArray:** add higher-order lettable version of toArray ([82480cf](https://github.com/ReactiveX/RxJS/commit/82480cf)) +- **toArray:** add higher-order lettable version of toArray ([a03a50c](https://github.com/ReactiveX/RxJS/commit/a03a50c)) +- **toPromise:** add higher-order lettable version of toPromise ([1627da2](https://github.com/ReactiveX/RxJS/commit/1627da2)) +- **window:** add higher-order lettable version of window ([9f6373e](https://github.com/ReactiveX/RxJS/commit/9f6373e)) +- **windowCount:** add higher-order lettable version of windowCount ([2a9e54c](https://github.com/ReactiveX/RxJS/commit/2a9e54c)) +- **windowTime:** add higher-order lettable version of windowTime ([29ffa1b](https://github.com/ReactiveX/RxJS/commit/29ffa1b)) +- **windowToggle:** add higher-order lettable version of windowToggle ([81ec389](https://github.com/ReactiveX/RxJS/commit/81ec389)) +- **windowWhen:** add higher-order lettable version of windowWhen ([0b73208](https://github.com/ReactiveX/RxJS/commit/0b73208)) +- **withLatestFrom:** add higher-order lettable version of withLatestFrom ([509c97c](https://github.com/ReactiveX/RxJS/commit/509c97c)) +- **zip:** add higher-order lettable version of zip ([8a9b9b2](https://github.com/ReactiveX/RxJS/commit/8a9b9b2)) +- **zipAll:** add higher-order lettable version of zipAll ([f6bd51f](https://github.com/ReactiveX/RxJS/commit/f6bd51f)) + + + +## [5.4.3](https://github.com/ReactiveX/RxJS/compare/5.4.2...v5.4.3) (2017-08-10) + +### Bug Fixes + +- **compilation:** compiles under typescript 2.4.2 ([#2780](https://github.com/ReactiveX/RxJS/issues/2780)) ([d2a32f9](https://github.com/ReactiveX/RxJS/commit/d2a32f9)) +- **exports:** add exports for missing static operators: generate, ([08c4196](https://github.com/ReactiveX/RxJS/commit/08c4196)) + + + +## [5.4.2](https://github.com/ReactiveX/RxJS/compare/5.4.1...v5.4.2) (2017-07-05) + +### Bug Fixes + +- **Notification:** Don't reference `this` from static methods. ([9f8e375](https://github.com/ReactiveX/RxJS/commit/9f8e375)) +- **Subject:** lift signature is now appropriate for stricter TypeScript 2.4 checks ([#2722](https://github.com/ReactiveX/RxJS/issues/2722)) ([9804de7](https://github.com/ReactiveX/RxJS/commit/9804de7)) + + + +## [5.4.1](https://github.com/ReactiveX/RxJS/compare/5.4.0...v5.4.1) (2017-06-14) + +### Bug Fixes + +- **ajax:** Only set timeout & responseType if request is asynchronous ([#2486](https://github.com/ReactiveX/RxJS/issues/2486)) ([380fbcf](https://github.com/ReactiveX/RxJS/commit/380fbcf)) +- **audit:** will now properly mirror source if durations are Observable.empty() ([#2595](https://github.com/ReactiveX/RxJS/issues/2595)) ([6ded82e](https://github.com/ReactiveX/RxJS/commit/6ded82e)) +- **elementAt:** will now properly unsubscribe when it completes or errors ([#2501](https://github.com/ReactiveX/RxJS/issues/2501)) ([a400cab](https://github.com/ReactiveX/RxJS/commit/a400cab)) +- **ErrorObservable:** will now propagate errors properly when used in a `catch` after `fromPromise`. ([#2552](https://github.com/ReactiveX/RxJS/issues/2552)) ([cf88a20](https://github.com/ReactiveX/RxJS/commit/cf88a20)) +- **groupBy:** group duration notifiers will now properly unsubscribe and clean up ([#2662](https://github.com/ReactiveX/RxJS/issues/2662)) ([ab92083](https://github.com/ReactiveX/RxJS/commit/ab92083)), closes [#2660](https://github.com/ReactiveX/RxJS/issues/2660) [#2661](https://github.com/ReactiveX/RxJS/issues/2661) +- **Observable:** errors thrown in observer/handlers without an operator applied will no longer be swallowed ([#2626](https://github.com/ReactiveX/RxJS/issues/2626)) ([c250afc](https://github.com/ReactiveX/RxJS/commit/c250afc)), closes [#2565](https://github.com/ReactiveX/RxJS/issues/2565) +- **reduce:** type definitions overloads for TypeScript are now in proper order ([#2523](https://github.com/ReactiveX/RxJS/issues/2523)) ([ccc0647](https://github.com/ReactiveX/RxJS/commit/ccc0647)) +- **Schedulers:** Fix issue where canceling an asap or animationFrame action early could throw ([#2638](https://github.com/ReactiveX/RxJS/issues/2638)) ([fc39043](https://github.com/ReactiveX/RxJS/commit/fc39043)) + + + +# [5.4.0](https://github.com/ReactiveX/RxJS/) (2017-05-09) + +### Features + +- **shareReplay:** adds `shareReplay` variant of `publishReplay` ([#2443](https://github.com/ReactiveX/RxJS/issues/2443)) ([5a2266a](https://github.com/ReactiveX/RxJS/commit/5a2266a)) +- **skipLast:** add skipLast operator ([#2316](https://github.com/ReactiveX/RxJS/issues/2316)) ([4ffbbe5](https://github.com/ReactiveX/RxJS/commit/4ffbbe5)), closes [#1404](https://github.com/ReactiveX/RxJS/issues/1404) +- **TypeScript:** fromPromise accepts PromiseLike object ([#2505](https://github.com/ReactiveX/RxJS/issues/2505)) ([ade1fd5](https://github.com/ReactiveX/RxJS/commit/ade1fd5)) + + + +## [5.3.3](https://github.com/ReactiveX/RxJS/compare/5.3.1...5.3.3) (2017-05-09) + +### Bug Fixes + +- **delayWhen:** correctly handle synchronous duration observable ([#2589](https://github.com/ReactiveX/RxJS/issues/2589)) ([695f280](https://github.com/ReactiveX/RxJS/commit/695f280)), closes [#2587](https://github.com/ReactiveX/RxJS/issues/2587) +- **race:** allow TypeScript support for array of observables other than rest param ([#2548](https://github.com/ReactiveX/RxJS/issues/2548)) ([ace553c](https://github.com/ReactiveX/RxJS/commit/ace553c)) +- **Subscriber:** do not call complete with undefined value param ([#2559](https://github.com/ReactiveX/RxJS/issues/2559)) ([3d63de2](https://github.com/ReactiveX/RxJS/commit/3d63de2)) + +**(NOTE: 5.3.2 was a broken release and was removed)** + + + +## [5.3.1](https://github.com/ReactiveX/RxJS/compare/5.3.0...v5.3.1) (2017-05-02) + +### Bug Fixes + +- **AsyncAction:** rescheduling an action with the same delay before it has executed will now schedule appropriately. ([#2580](https://github.com/ReactiveX/RxJS/issues/2580)) ([281760e](https://github.com/ReactiveX/RxJS/commit/281760e)) +- **closure:** make root.ts work with closure ([#2546](https://github.com/ReactiveX/RxJS/issues/2546)) ([0ecf55d](https://github.com/ReactiveX/RxJS/commit/0ecf55d)) +- **tests:** add missing babel-polyfill to package.json ([b277ce9](https://github.com/ReactiveX/RxJS/commit/b277ce9)), closes [#2261](https://github.com/ReactiveX/RxJS/issues/2261) +- **withLatestFrom:** change from hot to cold observable in marble test ([0c65446](https://github.com/ReactiveX/RxJS/commit/0c65446)), closes [#2526](https://github.com/ReactiveX/RxJS/issues/2526) + + + +# [5.3.0](https://github.com/ReactiveX/RxJS/compare/5.2.0...v5.3.0) (2017-04-03) + +### Bug Fixes + +- **catch:** return type is now the union of input types ([#2478](https://github.com/ReactiveX/RxJS/issues/2478)) ([840def0](https://github.com/ReactiveX/RxJS/commit/840def0)) +- **forEach:** fix a temporal dead zone issue in forEach. ([#2474](https://github.com/ReactiveX/RxJS/issues/2474)) ([e9e9801](https://github.com/ReactiveX/RxJS/commit/e9e9801)) +- **multicast:** Ensure ConnectableObservables returned by multicast are state-isolated. ([aaa9e6b](https://github.com/ReactiveX/RxJS/commit/aaa9e6b)) +- **reduce:** proper TypeScript signature overload ordering ([#2382](https://github.com/ReactiveX/RxJS/issues/2382)) ([f6a4951](https://github.com/ReactiveX/RxJS/commit/f6a4951)), closes [#2338](https://github.com/ReactiveX/RxJS/issues/2338) +- **SafeSubscriber:** SafeSubscriber shouldn't mutate incoming Observers. ([a1778e0](https://github.com/ReactiveX/RxJS/commit/a1778e0)) +- **timeout:** Cancels scheduled timeout, if no longer needed ([3e9d529](https://github.com/ReactiveX/RxJS/commit/3e9d529)), closes [#2134](https://github.com/ReactiveX/RxJS/issues/2134) [#2244](https://github.com/ReactiveX/RxJS/issues/2244) [#2355](https://github.com/ReactiveX/RxJS/issues/2355) [#2347](https://github.com/ReactiveX/RxJS/issues/2347) [#2353](https://github.com/ReactiveX/RxJS/issues/2353) [#2254](https://github.com/ReactiveX/RxJS/issues/2254) [#2372](https://github.com/ReactiveX/RxJS/issues/2372) [#1301](https://github.com/ReactiveX/RxJS/issues/1301) +- **zipAll:** complete when the source is empty ([712fece](https://github.com/ReactiveX/RxJS/commit/712fece)) + +### Features + +- **delayWhen:** add index to the selector function ([5d6291e](https://github.com/ReactiveX/RxJS/commit/5d6291e)) +- **symbol exports:** symbols now also exported without `$$` prefix to work with Babel UMD exporting ([#2435](https://github.com/ReactiveX/RxJS/issues/2435)) ([747bef6](https://github.com/ReactiveX/RxJS/commit/747bef6)), closes [#2415](https://github.com/ReactiveX/RxJS/issues/2415) + +### Performance Improvements + +- **bufferCount:** optimize bufferCount operator ([#2359](https://github.com/ReactiveX/RxJS/issues/2359)) ([28d0883](https://github.com/ReactiveX/RxJS/commit/28d0883)) + +### April Fools + +- **smooth:** `smooth()` was never really a thing. Sorry, folks. :D + + + +# [5.2.0](https://github.com/ReactiveX/RxJS/compare/5.1.1...v5.2.0) (2017-02-21) + +### Bug Fixes + +- **ajax:** will set `withCredentials` after `open` on XHR for IE10 ([#2332](https://github.com/ReactiveX/RxJS/issues/2332)) ([0ab1d3b](https://github.com/ReactiveX/RxJS/commit/0ab1d3b)) +- **bindCallback:** emit undefined when callback is without arguments ([915a2a8](https://github.com/ReactiveX/RxJS/commit/915a2a8)) +- **bindNodeCallback:** emit undefined when callback has no success arguments ([8b81fc6](https://github.com/ReactiveX/RxJS/commit/8b81fc6)), closes [#2254](https://github.com/ReactiveX/RxJS/issues/2254) +- **bindNodeCallback:** errors thrown in callback will be scheduled if a scheduler is provided ([#2344](https://github.com/ReactiveX/RxJS/issues/2344)) ([82ec4f1](https://github.com/ReactiveX/RxJS/commit/82ec4f1)) +- **concat:** will now return Observable when given a single object implementing Symbol.observable ([#2387](https://github.com/ReactiveX/RxJS/issues/2387)) ([f5d035a](https://github.com/ReactiveX/RxJS/commit/f5d035a)) +- **ErrorObservable:** remove type constraint to error value ([2f951cd](https://github.com/ReactiveX/RxJS/commit/2f951cd)), closes [#2395](https://github.com/ReactiveX/RxJS/issues/2395) +- **forkJoin:** add type signature for single observable with selector ([7983b91](https://github.com/ReactiveX/RxJS/commit/7983b91)), closes [#2347](https://github.com/ReactiveX/RxJS/issues/2347) +- **merge:** return Observable when called with single lowerCaseO ([85752eb](https://github.com/ReactiveX/RxJS/commit/85752eb)) +- **mergeAll:** introduce variant support for mergeMap ([656f2b3](https://github.com/ReactiveX/RxJS/commit/656f2b3)), closes [#2372](https://github.com/ReactiveX/RxJS/issues/2372) +- **single:** predicate function receives indices starting at 0 ([#2396](https://github.com/ReactiveX/RxJS/issues/2396)) ([c81882f](https://github.com/ReactiveX/RxJS/commit/c81882f)) +- **subscribeToResult:** accept array-like as result ([14685ba](https://github.com/ReactiveX/RxJS/commit/14685ba)) + +### Features + +- **webSocket:** Add binaryType to config object ([86acbd1](https://github.com/ReactiveX/RxJS/commit/86acbd1)), closes [#2353](https://github.com/ReactiveX/RxJS/issues/2353) +- **windowTime:** maxWindowSize parameter in windowTime operator ([381be3f](https://github.com/ReactiveX/RxJS/commit/381be3f)), closes [#1301](https://github.com/ReactiveX/RxJS/issues/1301) + + + +## [5.1.1](https://github.com/ReactiveX/RxJS/compare/5.1.0...v5.1.1) (2017-02-13) + +### Bug Fixes + +- **bindCallback:** input function context can now be properly set via output function ([#2319](https://github.com/ReactiveX/RxJS/issues/2319)) ([cb91c76](https://github.com/ReactiveX/RxJS/commit/cb91c76)) +- **bindNodeCallback:** input function context can now be properly set via output function ([#2320](https://github.com/ReactiveX/RxJS/issues/2320)) ([3ec315d](https://github.com/ReactiveX/RxJS/commit/3ec315d)) +- **Subscription:** fold ChildSubscription logic into Subscriber to prevent operators from leaking ChildSubscriptions. ([#2360](https://github.com/ReactiveX/RxJS/issues/2360)) ([22e4c17](https://github.com/ReactiveX/RxJS/commit/22e4c17)), closes [#2244](https://github.com/ReactiveX/RxJS/issues/2244) [#2355](https://github.com/ReactiveX/RxJS/issues/2355) + + + +# [5.1.0](https://github.com/ReactiveX/RxJS/compare/5.0.3...v5.1.0) (2017-02-01) + +### Bug Fixes + +- **catch:** update the catch operator to dispose inner subscriptions if the catch subscription is di ([#2271](https://github.com/ReactiveX/RxJS/issues/2271)) ([8a1e089](https://github.com/ReactiveX/RxJS/commit/8a1e089)) +- **combineLatest:** Don't mutate array of observables passed to ([#2276](https://github.com/ReactiveX/RxJS/issues/2276)) ([9b73c46](https://github.com/ReactiveX/RxJS/commit/9b73c46)) +- **ISubscription:** update type definition of ISubscription::closed ([#2249](https://github.com/ReactiveX/RxJS/issues/2249)) ([0c304a2](https://github.com/ReactiveX/RxJS/commit/0c304a2)) +- **Observable:** Ensure the generic type of the Observer passed to Observable's initializer function is the same. ([51a0bc1](https://github.com/ReactiveX/RxJS/commit/51a0bc1)), closes [#2166](https://github.com/ReactiveX/RxJS/issues/2166) +- **Observable:** errors thrown during subscription are now properly sent down error channel ([#2313](https://github.com/ReactiveX/RxJS/issues/2313)) ([d4a9aac](https://github.com/ReactiveX/RxJS/commit/d4a9aac)), closes [#1833](https://github.com/ReactiveX/RxJS/issues/1833) +- **reduce:** index will properly start at 1 if no seed is provided, to match native Array reduce behavior ([30a4ca4](https://github.com/ReactiveX/RxJS/commit/30a4ca4)), closes [#2290](https://github.com/ReactiveX/RxJS/issues/2290) +- **repeatWhen:** resulting observable will wait for the source to complete, even if a hot notifier completes first. ([#2209](https://github.com/ReactiveX/RxJS/issues/2209)) ([c65a098](https://github.com/ReactiveX/RxJS/commit/c65a098)), closes [#2054](https://github.com/ReactiveX/RxJS/issues/2054) +- **Subject:** ensure subject properly throws ObjectUnsubscribedError when unsubscribed then resubscribed to ([#2318](https://github.com/ReactiveX/RxJS/issues/2318)) ([41489eb](https://github.com/ReactiveX/RxJS/commit/41489eb)) +- **TestScheduler:** helper methods return proper types, `HotObservable` and `ColdObservable` instead of Observable ([#2305](https://github.com/ReactiveX/RxJS/issues/2305)) ([758aae9](https://github.com/ReactiveX/RxJS/commit/758aae9)) +- **windowTime:** ensure windows created when only a timespan is passed are closed and cleaned up properly. ([#2278](https://github.com/ReactiveX/RxJS/issues/2278)) ([d4533c4](https://github.com/ReactiveX/RxJS/commit/d4533c4)) + +### Features + +- **fromEventPattern:** support optional removeHandler ([86960c2](https://github.com/ReactiveX/RxJS/commit/86960c2)) +- **fromEventPattern:** support pass signal from addHandler to removeHandler ([01d0622](https://github.com/ReactiveX/RxJS/commit/01d0622)) + + + +## [5.0.3](https://github.com/ReactiveX/RxJS/compare/5.0.2...v5.0.3) (2017-01-05) + +### Bug Fixes + +- **observeOn:** seal memory leak involving old notifications ([9664a38](https://github.com/ReactiveX/RxJS/commit/9664a38)), closes [#2244](https://github.com/ReactiveX/RxJS/issues/2244) +- **Subscription:** `add` will return Subscription that `remove`s itself when unsubscribed ([375d4a5](https://github.com/ReactiveX/RxJS/commit/375d4a5)) +- **TypeScript:** interfaces that accepted `Scheduler` now accept `IScheduler` interface ([a0d28a8](https://github.com/ReactiveX/RxJS/commit/a0d28a8)) + + + +## [5.0.2](https://github.com/ReactiveX/RxJS/compare/5.0.1...v5.0.2) (2016-12-23) + +### Bug Fixes + +- **ajax:** upload progress is now set correctly ([#2200](https://github.com/ReactiveX/RxJS/issues/2200)) ([1a83041](https://github.com/ReactiveX/RxJS/commit/1a83041)) +- **groupBy:** Fix groupBy to dispose of outer subscription. ([#2201](https://github.com/ReactiveX/RxJS/issues/2201)) ([2269618](https://github.com/ReactiveX/RxJS/commit/2269618)) + + + +## [5.0.1](https://github.com/ReactiveX/RxJS/compare/5.0.0...v5.0.1) (2016-12-13) + +### Bug Fixes + +- **TypeScript:** pin to TypeScript 2.0.x, fix errors with Error subclassing ([300504c](https://github.com/ReactiveX/RxJS/commit/300504c)) + + + +# [5.0.0](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.5...v5.0.0) (2016-12-13) + +### Bug Fixes + +- **race:** unsubscribe raced observables with immediate scheduler ([#2158](https://github.com/ReactiveX/RxJS/issues/2158)) ([7dd533b](https://github.com/ReactiveX/RxJS/commit/7dd533b)) +- **SubscribeOnObservable:** Add the source subscription to the action disposable so the source will ([64e3815](https://github.com/ReactiveX/RxJS/commit/64e3815)) + + + +# [5.0.0-rc.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.4...v5.0.0-rc.5) (2016-12-07) + +### Bug Fixes + +- **AjaxObservable:** catch XHR send failures to observer ([#2159](https://github.com/ReactiveX/RxJS/issues/2159)) ([128fb9c](https://github.com/ReactiveX/RxJS/commit/128fb9c)) +- **distinctKey:** Removed accidental leftover reference of `distinctKey` ([9fd8096](https://github.com/ReactiveX/RxJS/commit/9fd8096)), closes [#2161](https://github.com/ReactiveX/RxJS/issues/2161) +- **errors:** Better error message when you return non-observable things, ([#2152](https://github.com/ReactiveX/RxJS/issues/2152)) ([86a909c](https://github.com/ReactiveX/RxJS/commit/86a909c)), closes [#215](https://github.com/ReactiveX/RxJS/issues/215) +- **event:** uses `Object.prototype.toString.call` on objects ([#2143](https://github.com/ReactiveX/RxJS/issues/2143)) ([e036e79](https://github.com/ReactiveX/RxJS/commit/e036e79)) +- **typings:** type guard support for `last`, `first`, `find` and `filter`. ([5f2e849](https://github.com/ReactiveX/RxJS/commit/5f2e849)) + +### Features + +- **timeout:** remove `errorToSend` argument, always throw TimeoutError ([#2172](https://github.com/ReactiveX/RxJS/issues/2172)) ([98ea3d2](https://github.com/ReactiveX/RxJS/commit/98ea3d2)) + +### BREAKING CHANGES + +- timeout: `timeout` no longer accepts the `errorToSend` argument + +related #2141 + + + +# [5.0.0-rc.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.3...v5.0.0-rc.4) (2016-11-19) + +### Bug Fixes + +- **partition:** handles `thisArg` as expected ([#2138](https://github.com/ReactiveX/RxJS/issues/2138)) ([6cf7296](https://github.com/ReactiveX/RxJS/commit/6cf7296)) +- **timeout:** throw traceable TimeoutError ([#2132](https://github.com/ReactiveX/RxJS/issues/2132)) ([9ebc46b](https://github.com/ReactiveX/RxJS/commit/9ebc46b)) + + + +# [5.0.0-rc.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.2...v5.0.0-rc.3) (2016-11-15) + +### Bug Fixes + +- **typings:** You no longer have to install the type definition for chai ([#2112](https://github.com/ReactiveX/rxjs/issues/2112)) + +### Features + +- **filter:** support type guards without casting ([68b7922](https://github.com/ReactiveX/RxJS/commit/68b7922)) +- **find:** support type guards without casting ([9058bf6](https://github.com/ReactiveX/RxJS/commit/9058bf6)) +- **first:** support type guards without casting ([3aa1988](https://github.com/ReactiveX/RxJS/commit/3aa1988)) +- **last:** support type guards without casting ([07ecd5e](https://github.com/ReactiveX/RxJS/commit/07ecd5e)) + + + +# [5.0.0-rc.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.1...v5.0.0-rc.2) (2016-11-05) + +### Bug Fixes + +- **AjaxObservable:** remove needless type param R from AjaxObservable.getJSON() ([#2069](https://github.com/ReactiveX/RxJS/issues/2069)) ([0c3d4a4](https://github.com/ReactiveX/RxJS/commit/0c3d4a4)) +- **bufferCount:** will behave as expected when `startBufferEvery` is less than `bufferSize` ([#2076](https://github.com/ReactiveX/RxJS/issues/2076)) ([d13dbb4](https://github.com/ReactiveX/RxJS/commit/d13dbb4)), closes [#2062](https://github.com/ReactiveX/RxJS/issues/2062) +- **build_docs:** fix doc building ([#1974](https://github.com/ReactiveX/RxJS/issues/1974)) ([1bbbe8b](https://github.com/ReactiveX/RxJS/commit/1bbbe8b)) +- **ErrorObservable:** Add generic error type for ErrorObservable. ([#2071](https://github.com/ReactiveX/RxJS/issues/2071)) ([9df86ba](https://github.com/ReactiveX/RxJS/commit/9df86ba)) +- **first:** will now only emit one value in recursive cases ([#2100](https://github.com/ReactiveX/RxJS/issues/2100)) ([a047e7a](https://github.com/ReactiveX/RxJS/commit/a047e7a)), closes [#2098](https://github.com/ReactiveX/RxJS/issues/2098) +- **fromEvent:** Throw if event target is invalid ([#2107](https://github.com/ReactiveX/RxJS/issues/2107)) ([147ce3e](https://github.com/ReactiveX/RxJS/commit/147ce3e)) +- **IteratorObservable:** clarify the return type of IteratorObservable.create() ([#2070](https://github.com/ReactiveX/RxJS/issues/2070)) ([4f0f865](https://github.com/ReactiveX/RxJS/commit/4f0f865)) +- **IteratorObservable:** Observables `from` generators will now finalize when subscription ends ([22d286a](https://github.com/ReactiveX/RxJS/commit/22d286a)), closes [#1938](https://github.com/ReactiveX/RxJS/issues/1938) +- **multicast:** fix a bug that caused multicast to omit messages after termination ([#2021](https://github.com/ReactiveX/RxJS/issues/2021)) ([44fbc14](https://github.com/ReactiveX/RxJS/commit/44fbc14)) +- **Notification:** `materialize` output will now match Rx4 ([#2106](https://github.com/ReactiveX/RxJS/issues/2106)) ([c83bab9](https://github.com/ReactiveX/RxJS/commit/c83bab9)), closes [#2105](https://github.com/ReactiveX/RxJS/issues/2105) +- **Object.assign:** stop polyfilling Object assign ([#2080](https://github.com/ReactiveX/RxJS/issues/2080)) ([b5f8ab3](https://github.com/ReactiveX/RxJS/commit/b5f8ab3)) +- **Observable/Ajax:** mount properties to origin readystatechange fn ([#2025](https://github.com/ReactiveX/RxJS/issues/2025)) ([76a9abb](https://github.com/ReactiveX/RxJS/commit/76a9abb)) +- **operator/do:** fix typings ([9a40297](https://github.com/ReactiveX/RxJS/commit/9a40297)) +- **reduce/scan:** both scan/reduce operators now accepts `undefined` itself as a valid seed ([#2050](https://github.com/ReactiveX/RxJS/issues/2050)) ([fee7585](https://github.com/ReactiveX/RxJS/commit/fee7585)), closes [#2047](https://github.com/ReactiveX/RxJS/issues/2047) +- **ReplaySubject:** observer now subscribed prior to running subscription function ([#2046](https://github.com/ReactiveX/RxJS/issues/2046)) ([fea08e9](https://github.com/ReactiveX/RxJS/commit/fea08e9)), closes [#2044](https://github.com/ReactiveX/RxJS/issues/2044) +- **sample:** source is now subscribed to before the notifier ([ffe99e8](https://github.com/ReactiveX/RxJS/commit/ffe99e8)), closes [#2075](https://github.com/ReactiveX/RxJS/issues/2075) +- **Symbol.iterator:** will not polyfill Symbol iterator unless Symbol exists ([#2082](https://github.com/ReactiveX/RxJS/issues/2082)) ([1138c99](https://github.com/ReactiveX/RxJS/commit/1138c99)) +- **typings:** fixed Subject.lift to have the same shape as Observable.lift ([b07f597](https://github.com/ReactiveX/RxJS/commit/b07f597)) +- **WebSocketSubject.prototype.multiplex:** no longer nulls out socket after first unsubscribe ([#2039](https://github.com/ReactiveX/RxJS/issues/2039)) ([a5e9cfe](https://github.com/ReactiveX/RxJS/commit/a5e9cfe)), closes [#2037](https://github.com/ReactiveX/RxJS/issues/2037) + +### Features + +- **distinct:** remove `distinctKey`, `distinct` signature change and perf improvements ([#2049](https://github.com/ReactiveX/RxJS/issues/2049)) ([89612b2](https://github.com/ReactiveX/RxJS/commit/89612b2)), closes [#2009](https://github.com/ReactiveX/RxJS/issues/2009) +- **groupBy:** Adds subjectSelector argument to groupBy ([#2023](https://github.com/ReactiveX/RxJS/issues/2023)) ([f94ceb9](https://github.com/ReactiveX/RxJS/commit/f94ceb9)) +- **typescript:** remove dependency to 3rd party es2015 definition ([#2027](https://github.com/ReactiveX/RxJS/issues/2027)) ([4c31974](https://github.com/ReactiveX/RxJS/commit/4c31974)), closes [#2016](https://github.com/ReactiveX/RxJS/issues/2016) + +### BREAKING CHANGES + +- Notification: `Notification.prototype.exception` is now `Notification.prototype.error` to match Rx4 semantics +- Symbol.iterator: RxJS will no longer polyfill `Symbol.iterator` if `Symbol` does not exist. This may break code that inadvertently relies on this behavior +- Object.assign: RxJS will no longer polyfill `Object.assign`. It does + not require `Object.assign` to function, however, your code may be + inadvertently relying on this polyfill. +- AjaxObservable: Observable.ajax.getJSON() now only supports a single type parameter, + `getJSON(url: string, headers?: Object): Observable`. + The extra type parameter it accepted previously was superfluous. +- distinct: `distinctKey` has been removed. Use `distinct` +- distinct: `distinct` operator has changed, first argument is an + optional `keySelector`. The custom `compare` function is no longer + supported. + + + +# [5.0.0-rc.1](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.12...v5.0.0-rc.1) (2016-10-11) + +### Bug Fixes + +- **AjaxObservable:** Fix for [#1921](https://github.com/ReactiveX/RxJS/issues/1921) exposed AjaxObservable unsubscription error calling xhr.abort(). ([4d23f87](https://github.com/ReactiveX/RxJS/commit/4d23f87)) +- **AnonymousSubject:** is now exposed on Rx namespace ([0a6f049](https://github.com/ReactiveX/RxJS/commit/0a6f049)), closes [#2002](https://github.com/ReactiveX/RxJS/issues/2002) +- **bufferTime:** no errors with take after bufferTime with maxBufferSize ([ecec640](https://github.com/ReactiveX/RxJS/commit/ecec640)), closes [#1944](https://github.com/ReactiveX/RxJS/issues/1944) +- **docs:** Fix esdoc for Observable.merge spread argument ([b794e9b](https://github.com/ReactiveX/RxJS/commit/b794e9b)) +- **Observer:** fix Observable#subscribe() signature to suggest correct usable ([459d2a2](https://github.com/ReactiveX/RxJS/commit/459d2a2)) +- **operator:** Fix take to complete when the source is re-entrant. ([86615cb](https://github.com/ReactiveX/RxJS/commit/86615cb)) +- **root:** find global context (window/self/global) in a more safe way ([a098132](https://github.com/ReactiveX/RxJS/commit/a098132)), closes [#1930](https://github.com/ReactiveX/RxJS/issues/1930) +- **schedulers:** Queue, Asap, and AnimationFrame Schedulers should be Async if delay > 0 ([d5c682c](https://github.com/ReactiveX/RxJS/commit/d5c682c)) +- **util/toSubscriber:** Supplies the Subscriber constructor with emptyObserver as destination if no ([8e7e4e3](https://github.com/ReactiveX/RxJS/commit/8e7e4e3)) +- **WebSocketSubject:** ensure all internal state properly reset when socket is nulled out ([62d242e](https://github.com/ReactiveX/RxJS/commit/62d242e)), closes [#1863](https://github.com/ReactiveX/RxJS/issues/1863) + +### Features + +- **cache:** remove `cache` operator ([1b23ace](https://github.com/ReactiveX/RxJS/commit/1b23ace)) +- **ES2015:** stop publishing `rxjs-es`, ES2015 output no longer included in `@reactivex/rxjs` package under `/dist/es6` ([6be9968](https://github.com/ReactiveX/RxJS/commit/6be9968)), closes [#1671](https://github.com/ReactiveX/RxJS/issues/1671) +- **filter:** Observable.filter() can take type guard as the predicate function ([d62fbf0](https://github.com/ReactiveX/RxJS/commit/d62fbf0)) +- **find:** Observable.find() can take type guard as the predicate function ([b952718](https://github.com/ReactiveX/RxJS/commit/b952718)) +- **first:** Observable.first() can take type guard as the predicate function ([f99ca49](https://github.com/ReactiveX/RxJS/commit/f99ca49)) +- **last:** Observable.last() can take type guard as the predicate function ([76a8a57](https://github.com/ReactiveX/RxJS/commit/76a8a57)) +- **operators:** Use lift in the operators that don't currently use lift. ([68af9ef](https://github.com/ReactiveX/RxJS/commit/68af9ef)) +- **TypeScript:** update TypeScript to v2.0 ([3478b0b](https://github.com/ReactiveX/RxJS/commit/3478b0b)) + +### BREAKING CHANGES + +- **cache:** The .cache() operator has been removed, pending further discussion ([1b23ace](https://github.com/ReactiveX/RxJS/commit/1b23ace)) +- ES2015: `rxjs-es` is no longer being published +- ES2015: `@reactivex/rxjs` no longer has `/dist/es6` output + +related #2016 +related #1992 + +- package.json: TypeScript definitions are now for TS 2.0 and higher + +Even if we use getter for class, they are marked with `readonly` properties +in d.ts. + +- operators: Removes MulticastObservable subclass in favor of a MulticastOperator. + + + +# [5.0.0-beta.12](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.11...v5.0.0-beta.12) (2016-09-09) + +### Bug Fixes + +- **ajaxObservable:** remove implicit dependency to map operator patch ([1744ae9](https://github.com/ReactiveX/RxJS/commit/1744ae9)), closes [#1874](https://github.com/ReactiveX/RxJS/issues/1874) +- **AjaxObservable:** return null value from JSON.Parse (#1904) ([6ba374e](https://github.com/ReactiveX/RxJS/commit/6ba374e)) +- **catch:** removed unneeded overload for catch ([dd0e586](https://github.com/ReactiveX/RxJS/commit/dd0e586)) +- **max:** do not return comparer values ([f454e93](https://github.com/ReactiveX/RxJS/commit/f454e93)), closes [#1892](https://github.com/ReactiveX/RxJS/issues/1892) +- **min:** do not return comparer values ([222fd17](https://github.com/ReactiveX/RxJS/commit/222fd17)), closes [#1892](https://github.com/ReactiveX/RxJS/issues/1892) +- **operators:** export reserved name operators on prototype ([34c39dd](https://github.com/ReactiveX/RxJS/commit/34c39dd)), closes [#1924](https://github.com/ReactiveX/RxJS/issues/1924) +- **VirtualTimeScheduler:** remove default maxFrame limit ([1de86f1](https://github.com/ReactiveX/RxJS/commit/1de86f1)), closes [#1889](https://github.com/ReactiveX/RxJS/issues/1889) +- **WebSocketSubject:** pass constructor errors onto observable ([49c7d67](https://github.com/ReactiveX/RxJS/commit/49c7d67)) + +### Features + +- **operator:** Add repeatWhen operator ([c288d88](https://github.com/ReactiveX/RxJS/commit/c288d88)) +- **sequenceEqual:** adds sequenceEqual operator ([3c30293](https://github.com/ReactiveX/RxJS/commit/3c30293)), closes [#1882](https://github.com/ReactiveX/RxJS/issues/1882) + + + +# [5.0.0-beta.11](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.10...v5.0.0-beta.11) (2016-08-09) + +### Bug Fixes + +- **ajaxObservable:** only set default Content-Type header when no body is sent (#1830) ([5a895e8](https://github.com/ReactiveX/RxJS/commit/5a895e8)) +- **AjaxObservable:** drop resultSelector support in ajax method ([7a77437](https://github.com/ReactiveX/RxJS/commit/7a77437)), closes [#1783](https://github.com/ReactiveX/RxJS/issues/1783) +- **AsyncSubject:** do not allow change value after complete ([801f282](https://github.com/ReactiveX/RxJS/commit/801f282)), closes [#1800](https://github.com/ReactiveX/RxJS/issues/1800) +- **BoundNodeCallbackObservable:** cast to `any` to access to private field in `source` ([54f342f](https://github.com/ReactiveX/RxJS/commit/54f342f)) +- **catch:** accept selector returns ObservableInput ([e55c62d](https://github.com/ReactiveX/RxJS/commit/e55c62d)), closes [#1857](https://github.com/ReactiveX/RxJS/issues/1857) +- **combineLatest:** emit unique array instances with the default projection ([2e30fd1](https://github.com/ReactiveX/RxJS/commit/2e30fd1)) +- **Observable.from:** standardise arguments (remove map/context) ([aa30af2](https://github.com/ReactiveX/RxJS/commit/aa30af2)) +- **schedulers:** fix asap and animationFrame schedulers to execute across async boundaries. (#182 ([548ec2a](https://github.com/ReactiveX/RxJS/commit/548ec2a)), closes [(#1820](https://github.com/(/issues/1820) [#1814](https://github.com/ReactiveX/RxJS/issues/1814) +- **subscribeToResult:** update subscription to iterables ([5d6339a](https://github.com/ReactiveX/RxJS/commit/5d6339a)) +- **WebSocketSubject:** prevent early close (#1831) ([848a527](https://github.com/ReactiveX/RxJS/commit/848a527)), closes [(#1831](https://github.com/(/issues/1831) + +### Features + +- **fromEvent:** Pass through event listener options (#1845) ([8f0dc01](https://github.com/ReactiveX/RxJS/commit/8f0dc01)) +- **PairsObservable:** add PairsObservable creation method ([26bafff](https://github.com/ReactiveX/RxJS/commit/26bafff)), closes [#1804](https://github.com/ReactiveX/RxJS/issues/1804) + +### BREAKING CHANGES + +- Observable.from: - Observable.from no longer supports the optional map function and associated context argument. + This change has been reflected in the related constructors and their properties have been standardised. +- AjaxObservable: ajax.\*() method no longer support resultSelector, encourage to use `map` instead + + + +# [5.0.0-beta.10](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.9...v5.0.0-beta.10) (2016-07-06) + +### Bug Fixes + +- **AjaxObservable:** ignore content-type for formdata (#1746) ([43d05e7](https://github.com/ReactiveX/RxJS/commit/43d05e7)) +- **AjaxObservable:** support withCredentials for CORS request ([8084572](https://github.com/ReactiveX/RxJS/commit/8084572)), closes [#1732](https://github.com/ReactiveX/RxJS/issues/1732) [#1711](https://github.com/ReactiveX/RxJS/issues/1711) +- **babel:** fix an issue where babel could not compile `Scheduler.async` (#1807) ([12c5c74](https://github.com/ReactiveX/RxJS/commit/12c5c74)), closes [(#1807](https://github.com/(/issues/1807) [#1806](https://github.com/ReactiveX/RxJS/issues/1806) +- **bufferTime:** handle closing context when synchronously unsubscribed ([4ce4433](https://github.com/ReactiveX/RxJS/commit/4ce4433)), closes [#1763](https://github.com/ReactiveX/RxJS/issues/1763) +- **multicast:** Fixes multicast with selector to create a new source connection per subscriber. ([c3ac852](https://github.com/ReactiveX/RxJS/commit/c3ac852)), closes [(#1774](https://github.com/(/issues/1774) +- **Subject:** allow optional next value in type definition ([3e0c6d9](https://github.com/ReactiveX/RxJS/commit/3e0c6d9)), closes [#1728](https://github.com/ReactiveX/RxJS/issues/1728) +- **WebSocketSubject:** respect WebSocketCtor, support source/destination arguments in constructor. (#179 ([cd8cdd0](https://github.com/ReactiveX/RxJS/commit/cd8cdd0)), closes [#1745](https://github.com/ReactiveX/RxJS/issues/1745) [#1784](https://github.com/ReactiveX/RxJS/issues/1784) + + + +# [5.0.0-beta.9](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.8...v5.0.0-beta.9) (2016-06-14) + +### Bug Fixes + +- **cache:** get correct caching behavior (#1765) ([cb0b806](https://github.com/ReactiveX/RxJS/commit/cb0b806)), closes [#1628](https://github.com/ReactiveX/RxJS/issues/1628) +- **ConnectableObservable:** fix ConnectableObservable connection handling issue ([41ce80c](https://github.com/ReactiveX/RxJS/commit/41ce80c)) +- **typings:** make HotObservable.\_subscribe protected ([1c3d6ea](https://github.com/ReactiveX/RxJS/commit/1c3d6ea)) +- **WebSocketSubject:** WebSocketSubject will now chain operators properly (#1752) ([bf54db4](https://github.com/ReactiveX/RxJS/commit/bf54db4)), closes [#1745](https://github.com/ReactiveX/RxJS/issues/1745) +- **window:** don't track internal window subjects as subscriptions. ([f3357b9](https://github.com/ReactiveX/RxJS/commit/f3357b9)) + +### Performance Improvements + +- **fromEventPattern:** ~3x improvement in speed ([3dc1c00](https://github.com/ReactiveX/RxJS/commit/3dc1c00)) + + + +# [5.0.0-beta.8](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.7...v5.0.0-beta.8) (2016-05-22) + +### Bug Fixes + +- **AnonymousSubject:** allow anonymous observers as destination ([0e2c28b](https://github.com/ReactiveX/RxJS/commit/0e2c28b)) +- **combineLatest:** rxjs/observable/combineLatest is now properly exported ([21fab73](https://github.com/ReactiveX/RxJS/commit/21fab73)), closes [#1722](https://github.com/ReactiveX/RxJS/issues/1722) +- **ConnectableObservable:** fix race conditions in ConnectableObservable and refCount. ([d1412bc](https://github.com/ReactiveX/RxJS/commit/d1412bc)) +- **Rx:** remove kitchenSink and DOM, let Rx export all ([f5090b4](https://github.com/ReactiveX/RxJS/commit/f5090b4)), closes [#1650](https://github.com/ReactiveX/RxJS/issues/1650) +- **ScalarObservable:** set \_isScalar to false when initialized with a scheduler ([5037b3a](https://github.com/ReactiveX/RxJS/commit/5037b3a)) +- **Subject:** correct Subject behaviors to be more like Rx4 ([ba9ef2b](https://github.com/ReactiveX/RxJS/commit/ba9ef2b)) +- **subscriptions:** fixes bug that tracked subscriber subscriptions twice. ([29ff794](https://github.com/ReactiveX/RxJS/commit/29ff794)) + +### Features + +- **bufferTime:** add `maxBufferSize` optional argument ([cf45540](https://github.com/ReactiveX/RxJS/commit/cf45540)), closes [#1295](https://github.com/ReactiveX/RxJS/issues/1295) +- **multicast:** subjectfactory allows selectors ([32fa3a4](https://github.com/ReactiveX/RxJS/commit/32fa3a4)) +- **onErrorResumeNext:** add onErrorResumeNext operator ([51e022b](https://github.com/ReactiveX/RxJS/commit/51e022b)), closes [#1665](https://github.com/ReactiveX/RxJS/issues/1665) +- **publish:** support optional selectors ([0e5991d](https://github.com/ReactiveX/RxJS/commit/0e5991d)), closes [#1629](https://github.com/ReactiveX/RxJS/issues/1629) + +### Performance Improvements + +- **combineLatest:** avoid splice and indexOf ([33599cd](https://github.com/ReactiveX/RxJS/commit/33599cd)) + +### BREAKING CHANGES + +- Subject: Subjects no longer duck-type as Subscriptions +- Subject: Subjects will no longer throw when re-subscribed to if they are not unsubscribed +- Subject: Subjects no longer automatically unsubscribe when completed or errored + BREAKING CHANGE: Minor scheduling changes to groupBy to ensure proper emission ordering +- Rx: `Rx.kitchenSink` and `Rx.DOM` are removed, `Rx` + export everything. + + + +# [5.0.0-beta.7](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.6...v5.0.0-beta.7) (2016-04-27) + +### Bug Fixes + +- **race:** handle observables completes immediately ([abac3d1](https://github.com/ReactiveX/RxJS/commit/abac3d1)), closes [#1615](https://github.com/ReactiveX/RxJS/issues/1615) +- **scan:** accumulator passes current index ([a3ec896](https://github.com/ReactiveX/RxJS/commit/a3ec896)), closes [#1614](https://github.com/ReactiveX/RxJS/issues/1614) + +### Features + +- **Observable.generate:** add generate static creation method ([c03434c](https://github.com/ReactiveX/RxJS/commit/c03434c)) + + + +# [5.0.0-beta.6](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.5...v5.0.0-beta.6) (2016-04-12) + +### Bug Fixes + +- **AjaxObservable:** support json responseType on IE ([bba13d8](https://github.com/ReactiveX/RxJS/commit/bba13d8)), closes [#1381](https://github.com/ReactiveX/RxJS/issues/1381) +- **bufferToggle:** accepts closing selector returns promise ([b1c575c](https://github.com/ReactiveX/RxJS/commit/b1c575c)) +- **bufferToggle:** accepts promise as openings ([3d22c7a](https://github.com/ReactiveX/RxJS/commit/3d22c7a)) +- **bufferToggle:** handle closingSelector completes immediately ([02239fb](https://github.com/ReactiveX/RxJS/commit/02239fb)) +- **typings:** explicitly export typings for arguments to functions that destructure configuration objects ([ef305af](https://github.com/ReactiveX/RxJS/commit/ef305af)) + +### Features + +- **UnsubscriptionError:** add messages from inner errors to output message ([dd01279](https://github.com/ReactiveX/RxJS/commit/dd01279)), closes [#1590](https://github.com/ReactiveX/RxJS/issues/1590) + +### Performance Improvements + +- **DeferSubscriber:** split up 'tryDefer()' into a method to call a factory function. ([566f46b](https://github.com/ReactiveX/RxJS/commit/566f46b)) + + + +# [5.0.0-beta.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.4...v5.0.0-beta.5) (2016-04-05) + +### Bug Fixes + +- **take:** make 'take' unsubscribe when it reaches the total ([9858aa3](https://github.com/ReactiveX/RxJS/commit/9858aa3)) + +### BREAKING CHANGES + +- Operator: `Operator.prototype.call` has been refactored to include both the destination Subscriber, and the source Observable + the Operator is now responsible for describing it's own subscription process. ([26423f4](https://github.com/ReactiveX/rxjs/pull/1570/commits/26423f4)) + + + +# [5.0.0-beta.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.3...v5.0.0-beta.4) (2016-03-29) + +### Bug Fixes + +- **AjaxObservable:** enhance compatibility ([0ac7e1e](https://github.com/ReactiveX/RxJS/commit/0ac7e1e)) +- **Observable.if:** accept promise as source ([147166e](https://github.com/ReactiveX/RxJS/commit/147166e)) +- **mergeMap:** allow concurrent to be set as the second argument for mergeMap and mergeMapTo ([c003468](https://github.com/ReactiveX/RxJS/commit/c003468)) +- **observable:** ensure the subscriber chain is complete before calling this.\_subscribe ([1631224](https://github.com/ReactiveX/RxJS/commit/1631224)) +- **Symbol:** fixed issue where \$\$observable is not defined ([e66b2d8](https://github.com/ReactiveX/RxJS/commit/e66b2d8)) +- **Observable.using:** accepts factory returns promise ([f8d7d1b](https://github.com/ReactiveX/RxJS/commit/f8d7d1b)) +- **windowToggle:** handle closingSelector completes immediately ([c755587](https://github.com/ReactiveX/RxJS/commit/c755587)), closes [#1487](https://github.com/ReactiveX/RxJS/issues/1487) + +### Features + +- **ajax:** add FormData support in AjaxObservable and add percent encoding for parameters ([1f6119c](https://github.com/ReactiveX/RxJS/commit/1f6119c)) +- **Subscription:** `add()` now returns a Subscription reference ([a3f4552](https://github.com/ReactiveX/RxJS/commit/a3f4552)) +- **timestamp:** add timestamp operator ([80b1646](https://github.com/ReactiveX/RxJS/commit/80b1646)), closes [#1515](https://github.com/ReactiveX/RxJS/issues/1515) + +### Performance Improvements + +- **forkJoin:** improve forkJoin perf slightly by removing unnecessary context tracking ([280b985](https://github.com/ReactiveX/RxJS/commit/280b985)) + +### BREAKING CHANGES + +- Observable: `Observable.fromArray` was removed since it's deprecated on RxJS 4. You should use `Observable.from` instead. + + + +# [5.0.0-beta.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.2...v5.0.0-beta.3) (2016-03-21) + +### Bug Fixes + +- **AjaxObservable:** update type definition for AjaxObservable ([3f5c269](https://github.com/ReactiveX/RxJS/commit/3f5c269)), closes [#1382](https://github.com/ReactiveX/RxJS/issues/1382) +- **deferObservable:** accepts factory returns promise ([0cb44e1](https://github.com/ReactiveX/RxJS/commit/0cb44e1)) +- **do:** fix do operator to invoke observer message handlers in the right context. ([67a2f25](https://github.com/ReactiveX/RxJS/commit/67a2f25)) +- **exhaustMap:** remove innersubscription when it completes ([7ca0859](https://github.com/ReactiveX/RxJS/commit/7ca0859)) +- **forEach:** ensure that teardown logic is called when nextHandler throws ([c50f528](https://github.com/ReactiveX/RxJS/commit/c50f528)), closes [#1411](https://github.com/ReactiveX/RxJS/issues/1411) +- **forkJoin:** accepts observables emitting null or undefined ([6279d6b](https://github.com/ReactiveX/RxJS/commit/6279d6b)), closes [#1362](https://github.com/ReactiveX/RxJS/issues/1362) +- **forkJoin:** dispose the inner subscriptions when the outer subscription is disposed ([c7bf30c](https://github.com/ReactiveX/RxJS/commit/c7bf30c)) +- **FutureAction:** add support for periodic scheduling with setInterval instead of setTimeout ([c4f5408](https://github.com/ReactiveX/RxJS/commit/c4f5408)) +- **Observable:** introduce Subscribable interface that will be used instead of Observable in input ([2256e7b](https://github.com/ReactiveX/RxJS/commit/2256e7b)) +- **Observable.prototype.forEach:** removed thisArg to match es-observable spec ([d5f1bcd](https://github.com/ReactiveX/RxJS/commit/d5f1bcd)) +- **package.json:** install typings only after packages are installed ([a48d796](https://github.com/ReactiveX/RxJS/commit/a48d796)) +- **Schedulers:** ensure schedulers can be reused after error in execution ([202b79a](https://github.com/ReactiveX/RxJS/commit/202b79a)) +- **takeLast:** fix takeLast behavior to emit correct order ([73eb658](https://github.com/ReactiveX/RxJS/commit/73eb658)), closes [#1407](https://github.com/ReactiveX/RxJS/issues/1407) +- **typings:** set map function parameter for Observable.from as optional ([efa4dc3](https://github.com/ReactiveX/RxJS/commit/efa4dc3)) + +### Features + +- **AsyncScheduler:** add AsyncScheduler implementation ([4486c1f](https://github.com/ReactiveX/RxJS/commit/4486c1f)) +- **if:** add static Observable.if creation operator. ([f7ff7ec](https://github.com/ReactiveX/RxJS/commit/f7ff7ec)) +- **let:** adds the let operator to Rx.KitchenSink ([dca6504](https://github.com/ReactiveX/RxJS/commit/dca6504)) +- **using:** add static Observable.using creation operator. ([6c76593](https://github.com/ReactiveX/RxJS/commit/6c76593)) + +### BREAKING CHANGES + +- Observable.prototype.forEach: thisArg removed to match es-observable spec + + + +# [5.0.0-beta.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.1...v5.0.0-beta.2) (2016-02-10) + +### Bug Fixes + +- **ajax:** fixes error in Chrome accessing responseText when responseType isn't text. ([f3e2f73](https://github.com/ReactiveX/RxJS/commit/f3e2f73)) +- **benchpress:** fix issues with benchmarks ([16894bb](https://github.com/ReactiveX/RxJS/commit/16894bb)) +- **every:** remove eager predicate calls ([74c2c44](https://github.com/ReactiveX/RxJS/commit/74c2c44)) +- **forkJoin:** fix forkJoin to complete if sources Array is empty. ([412b13b](https://github.com/ReactiveX/RxJS/commit/412b13b)) +- **groupBy:** does not emit on unsubscribed group ([6d08705](https://github.com/ReactiveX/RxJS/commit/6d08705)) +- **groupBy:** fix groupBy to use lift(), supports composability ([815cfae](https://github.com/ReactiveX/RxJS/commit/815cfae)), closes [#1085](https://github.com/ReactiveX/RxJS/issues/1085) +- **merge/concat:** passed scalar observables will now complete properly ([c01b92f](https://github.com/ReactiveX/RxJS/commit/c01b92f)), closes [#1150](https://github.com/ReactiveX/RxJS/issues/1150) +- **MergeMapSubscriber:** clarify type definitions for MergeMapSubscriber's members ([4ee5f02](https://github.com/ReactiveX/RxJS/commit/4ee5f02)) +- **Observable.forEach:** errors thrown in nextHandler reject returned promise ([c5ead88](https://github.com/ReactiveX/RxJS/commit/c5ead88)), closes [#1184](https://github.com/ReactiveX/RxJS/issues/1184) +- **Observer:** fix typing to allow observation via partial observables with PartialObservable and lift ([603c9eb](https://github.com/ReactiveX/RxJS/commit/603c9eb)) +- **windowTime:** does not emit on unsubscribed window ([595f4ef](https://github.com/ReactiveX/RxJS/commit/595f4ef)) + +### Features + +- **cache:** add cache operator ([4308a04](https://github.com/ReactiveX/RxJS/commit/4308a04)) +- **delayWhen:** add delayWhen operator ([17122f9](https://github.com/ReactiveX/RxJS/commit/17122f9)) +- **distinct:** add distinct operator ([94a034d](https://github.com/ReactiveX/RxJS/commit/94a034d)) +- **distinctKey:** add distinctKey operator ([fe4d57f](https://github.com/ReactiveX/RxJS/commit/fe4d57f)) +- **from:** allow Observable.from to handle array-like objects ([7245005](https://github.com/ReactiveX/RxJS/commit/7245005)) +- **MapPolyfill:** implement clear interface ([e3fbd05](https://github.com/ReactiveX/RxJS/commit/e3fbd05)) +- **operator:** adds inspect and inspectTime operators ([54f957b](https://github.com/ReactiveX/RxJS/commit/54f957b)) +- **OuterSubscriber:** notifyNext passes innersubscriber when next emits ([1df8928](https://github.com/ReactiveX/RxJS/commit/1df8928)), closes [#1250](https://github.com/ReactiveX/RxJS/issues/1250) +- **Subject:** implement asObservable ([aca3dd0](https://github.com/ReactiveX/RxJS/commit/aca3dd0)), closes [#1108](https://github.com/ReactiveX/RxJS/issues/1108) +- **takeLast:** adds takeLast operator. ([3583cd3](https://github.com/ReactiveX/RxJS/commit/3583cd3)) + +### Performance Improvements + +- **catch:** remove tryCatch/errorObject for custom tryCatching, 1.3M -> 1.5M ops/sec ([35caf74](https://github.com/ReactiveX/RxJS/commit/35caf74)) +- **combineLatest:** remove tryCatch/errorObject, 156k -> 221k ops/sec ([1c7d639](https://github.com/ReactiveX/RxJS/commit/1c7d639)) +- **count:** remove tryCatch/errorObject for custom tryCatching, 1.84M -> 1.97M ops/sec ([869718d](https://github.com/ReactiveX/RxJS/commit/869718d)) +- **debounce:** remove tryCatch/errorObject for custom tryCatching ([90bf3f1](https://github.com/ReactiveX/RxJS/commit/90bf3f1)) +- **distinct:** increase perf from 60% of Rx4 to 1000% Rx4 ([d026c41](https://github.com/ReactiveX/RxJS/commit/d026c41)) +- **do:** remove tryCatch/errorObject use, 104k -> 263k ops/sec improvement ([ccba39d](https://github.com/ReactiveX/RxJS/commit/ccba39d)) +- **every:** remove tryCatch/errorObject (~1.8x improvement) ([14afeb6](https://github.com/ReactiveX/RxJS/commit/14afeb6)) +- **exhaustMap:** remove tryCatch/errorObject (~10% improvement) ([a55f459](https://github.com/ReactiveX/RxJS/commit/a55f459)) +- **filter:** remove tryCatch/errorObject for 2x perf improvement ([086c4bf](https://github.com/ReactiveX/RxJS/commit/086c4bf)) +- **find:** remove tryCatch/errorObject (~2x improvement) ([aa35b2a](https://github.com/ReactiveX/RxJS/commit/aa35b2a)) +- **first:** remove tryCatch/errorObject for custom tryCatching, 970k ops -> 1.27M ops/sec ([d8c835a](https://github.com/ReactiveX/RxJS/commit/d8c835a)) +- **groupBy:** remove tryCatch/errorObject for custom tryCatching, 38% faster. ([40c43f7](https://github.com/ReactiveX/RxJS/commit/40c43f7)) +- **last:** remove tryCatch/errorObject for custom tryCatching, 960k -> 1.38M ops/sec ([243ace3](https://github.com/ReactiveX/RxJS/commit/243ace3)) +- **map:** 2x increase from removing tryCatch/errorObject ([231f729](https://github.com/ReactiveX/RxJS/commit/231f729)) +- **mergeMap:** extra 1x factor gains from custom tryCatch member function ([c4ce2fb](https://github.com/ReactiveX/RxJS/commit/c4ce2fb)) +- **mergeMapTo:** remove tryCatch/errorObject (~2x improvement) ([42bcced](https://github.com/ReactiveX/RxJS/commit/42bcced)) +- **reduce:** remove tryCatch/errorObject, optimize calls, 2-3x perf improvement ([6186d46](https://github.com/ReactiveX/RxJS/commit/6186d46)) +- **scan:** remove tryCatch/errorObject for custom tryCatcher 1.75x improvement ([338135d](https://github.com/ReactiveX/RxJS/commit/338135d)) +- **single:** remove tryCatch/errorObject (~2.5x improvement) ([2515cfb](https://github.com/ReactiveX/RxJS/commit/2515cfb)) +- **skipWhile:** remove tryCatch/errorObject (~1.6x improvement) ([cf002db](https://github.com/ReactiveX/RxJS/commit/cf002db)) +- **Subscriber:** double performance adding tryOrUnsub to Subscriber ([4e75466](https://github.com/ReactiveX/RxJS/commit/4e75466)) +- **switchMap:** remove tryCatch/errorObject ~20% improvement ([ec0199f](https://github.com/ReactiveX/RxJS/commit/ec0199f)) +- **switchMapTo:** remove tryCatch/errorObject (~2x improvement) ([c8cf72a](https://github.com/ReactiveX/RxJS/commit/c8cf72a)) +- **takeWhile:** remove tryCatch/errorObject (~6x improvement) ([ef6c3c3](https://github.com/ReactiveX/RxJS/commit/ef6c3c3)) +- **withLatestFrom:** remove tryCatch/errorObject, 92k -> 107k (16% improvement) ([e4ccb44](https://github.com/ReactiveX/RxJS/commit/e4ccb44)) +- **zip:** extra 1x-2x factor gains from custom tryCatch member function ([a1b0e52](https://github.com/ReactiveX/RxJS/commit/a1b0e52)) + +### BREAKING CHANGES + +- Subject: Subject.create arguments have been swapped to match Rx 4 signature. `Subject.create(observable, observer)` is now `Subject.create(observer, observable)` +- Observable patching: Patch files for static observable methods such as `of` and `from` can now be found in `rxjs/add/observable/of`, `rxjs/add/observable/from`, etc. +- Observable modules: Observable modules for subclassed Observables like `PromiseObservable`, `ArrayObservable` are now in appropriately named files like `rxjs/observable/PromiseObservable` and `rxjs/observable/ArrayObservable` + as opposed to `rxjs/observable/fromPromise` and `rxjs/observable/fromArray`, since they're not patching, they simply house the Observable implementations. + + + +# [5.0.0-beta.1](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.0...v5.0.0-beta.1) (2016-01-13) + +### Bug Fixes + +- **ajax:** ensure post sending values ([7aae0a3](https://github.com/ReactiveX/RxJS/commit/7aae0a3)) +- **ajax:** ensure that headers are set properly ([1100bdd](https://github.com/ReactiveX/RxJS/commit/1100bdd)) +- **ajax:** ensure XHR props are set after open ([4a6a579](https://github.com/ReactiveX/RxJS/commit/4a6a579)) +- **ajax:** ensure XHR send is being called ([c569e3e](https://github.com/ReactiveX/RxJS/commit/c569e3e)) +- **ajax:** remove unnecessary onAbort handling ([ed8240e](https://github.com/ReactiveX/RxJS/commit/ed8240e)) +- **ajax:** response properly based off responseType ([b2a27a2](https://github.com/ReactiveX/RxJS/commit/b2a27a2)) +- **ajax:** should no longer succeed on 300 status ([4d4fa32](https://github.com/ReactiveX/RxJS/commit/4d4fa32)) +- **animationFrame:** req/cancel animationFrame has to be called within the context of root. ([30a11ee](https://github.com/ReactiveX/RxJS/commit/30a11ee)) +- **debounceTime:** align value emit behavior as same as RxJS4 ([5ee11e0](https://github.com/ReactiveX/RxJS/commit/5ee11e0)), closes [#1081](https://github.com/ReactiveX/RxJS/issues/1081) +- **distinctUntilChanged:** implement optional keySelector ([f6a897c](https://github.com/ReactiveX/RxJS/commit/f6a897c)) +- **fromEvent:** added spread operator for emitters that pass multiple arguments ([3f8eabb](https://github.com/ReactiveX/RxJS/commit/3f8eabb)) +- **fromObservable:** expand compatibility for iterating string source ([8f7924f](https://github.com/ReactiveX/RxJS/commit/8f7924f)), closes [#1147](https://github.com/ReactiveX/RxJS/issues/1147) +- **Immediate:** update setImmediate compatibility on IE ([39e6c0e](https://github.com/ReactiveX/RxJS/commit/39e6c0e)), closes [#1163](https://github.com/ReactiveX/RxJS/issues/1163) +- **inspect:** remove inspect and inspectTime operators ([17341a4](https://github.com/ReactiveX/RxJS/commit/17341a4)) +- **Readme:** update link to bundle on npmcdn ([44a8ca7](https://github.com/ReactiveX/RxJS/commit/44a8ca7)) +- **ReplaySubject:** Fix case-sensitive import. ([de31f32](https://github.com/ReactiveX/RxJS/commit/de31f32)) +- **ScalarObservable:** fix issue where scalar map fired twice ([c18c42e](https://github.com/ReactiveX/RxJS/commit/c18c42e)), closes [#1142](https://github.com/ReactiveX/RxJS/issues/1142) [#1140](https://github.com/ReactiveX/RxJS/issues/1140) +- **scheduling:** Fixes bugs in scheduled actions. ([e050f01](https://github.com/ReactiveX/RxJS/commit/e050f01)) +- **Subscriber:** errors in nextHandler no longer propagate to errorHandler ([f42eed2](https://github.com/ReactiveX/RxJS/commit/f42eed2)), closes [#1135](https://github.com/ReactiveX/RxJS/issues/1135) +- **WebSocketSubject:** ensure error codes passed to WebSocket close method ([3b1655e](https://github.com/ReactiveX/RxJS/commit/3b1655e)) +- **WebSocketSubject:** ensure WebSocketSubject can be resubscribed ([861a0c1](https://github.com/ReactiveX/RxJS/commit/861a0c1)) +- **WebSocketSubject:** resultSelector and protocols specifications work properly ([580f69a](https://github.com/ReactiveX/RxJS/commit/580f69a)) + +### Features + +- **ajax:** add resultSelector and improve perf ([6df755f](https://github.com/ReactiveX/RxJS/commit/6df755f)) +- **ajax:** adds ajax methods from rx-dom. ([2ca4236](https://github.com/ReactiveX/RxJS/commit/2ca4236)) +- **bindNodeCallback:** add Observable.bindNodeCallback ([497bb0d](https://github.com/ReactiveX/RxJS/commit/497bb0d)), closes [#736](https://github.com/ReactiveX/RxJS/issues/736) +- **Observable:** add let to allow fluent style query building ([5a2014c](https://github.com/ReactiveX/RxJS/commit/5a2014c)) +- **Observable:** add pairwise operator ([1432e59](https://github.com/ReactiveX/RxJS/commit/1432e59)) +- **Operator:** Expose the Operator interface to library consumers ([29aa3af](https://github.com/ReactiveX/RxJS/commit/29aa3af)) +- **pluck:** add pluck operator ([8026906](https://github.com/ReactiveX/RxJS/commit/8026906)), closes [#1134](https://github.com/ReactiveX/RxJS/issues/1134) +- **race:** add race operator ([ee3b593](https://github.com/ReactiveX/RxJS/commit/ee3b593)) +- **scheduler:** adds animationFrame scheduler. ([e637b78](https://github.com/ReactiveX/RxJS/commit/e637b78)) +- **WebSocketSubject:** add basic WebSocketSubject implementation ([58cd806](https://github.com/ReactiveX/RxJS/commit/58cd806)) +- **WebSocketSubject.multiplex:** add multiplex operator to WebSocketSubject ([904d617](https://github.com/ReactiveX/RxJS/commit/904d617)) + +### BREAKING CHANGES + +- inspect: `inspect` and `inspectTime` were removed. Use `withLatestFrom` instead. +- Subscriber/Observable: errors thrown in nextHandlers by consumer code will no longer propagate to the errorHandler. + + + +# [5.0.0-beta.0](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.14...v5.0.0-beta.0) (2015-12-15) + +### Bug Fixes + +- **micro-perf:** rename immediate to queue scheduler ([fe56b28](https://github.com/ReactiveX/RxJS/commit/fe56b28)), closes [#1040](https://github.com/ReactiveX/RxJS/issues/1040) +- **micro-perf:** use the current scheduler on current-thread tests ([3dff5eb](https://github.com/ReactiveX/RxJS/commit/3dff5eb)) +- **operators:** emit declarations for patch modules ([676f82d](https://github.com/ReactiveX/RxJS/commit/676f82d)) +- **test:** make explicit unsubscription for observable ([7f67b09](https://github.com/ReactiveX/RxJS/commit/7f67b09)) +- **test:** make explicit unsubscription for observable ([65e65e2](https://github.com/ReactiveX/RxJS/commit/65e65e2)) +- **window:** fix window() to dispose window Subjects ([5168f73](https://github.com/ReactiveX/RxJS/commit/5168f73)) +- **windowCount:** fix windowCount to dispose window Subjects ([f29ee29](https://github.com/ReactiveX/RxJS/commit/f29ee29)) +- **windowTime:** fix windowTime to dispose window Subjects ([b73e260](https://github.com/ReactiveX/RxJS/commit/b73e260)) +- **windowToggle:** fix windowToggle to dispose window Subjects ([15ff3f7](https://github.com/ReactiveX/RxJS/commit/15ff3f7)) +- **windowWhen:** fix windowWhen to dispose window Subjects ([91c1941](https://github.com/ReactiveX/RxJS/commit/91c1941)) + +### Features + +- **inspect:** added inspect operator ([f9944ae](https://github.com/ReactiveX/RxJS/commit/f9944ae)) +- **inspectTime:** add inspectTime operator ([6835dcd](https://github.com/ReactiveX/RxJS/commit/6835dcd)) +- **sample:** readd `sample` operator ([e93bffc](https://github.com/ReactiveX/RxJS/commit/e93bffc)) +- **sampleTime:** reimplement `sampleTime` with RxJS 4 behavior ([6b77e69](https://github.com/ReactiveX/RxJS/commit/6b77e69)) +- **TestScheduler:** add createTime() parser to return number ([cb8cf6b](https://github.com/ReactiveX/RxJS/commit/cb8cf6b)) + +### BREAKING CHANGES + +- sampleTime: `sampleTime` now has the same behavior `sample(number, scheduler)` did in RxJS 4 +- sample: `sample` behavior returned to RxJS 4 behavior +- inspectTime: `sampleTime` is now `inspectTime` +- inspect: RxJS 5 `sample` behavior is now `inspect` +- extended operators: All extended operators are now under the same operator directory as all others. This means that + `import "rxjs/add/operator/extended/min"` is now `import "rxjs/add/operator/min"` + + + +# [5.0.0-alpha.14](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.13...v5.0.0-alpha.14) (2015-12-09) + +### Bug Fixes + +- **every:** handle thisArg for scalar and array observables ([eae4b00](https://github.com/ReactiveX/RxJS/commit/eae4b00)) +- **SymbolShim:** ensure for function even if Symbol already exists ([e942776](https://github.com/ReactiveX/RxJS/commit/e942776)), closes [#999](https://github.com/ReactiveX/RxJS/issues/999) +- **SymbolShim:** Symbol polyfill is a function ([1f57157](https://github.com/ReactiveX/RxJS/commit/1f57157)), closes [#988](https://github.com/ReactiveX/RxJS/issues/988) +- **timeoutWith:** fix to avoid unnecessary inner subscription ([6e63752](https://github.com/ReactiveX/RxJS/commit/6e63752)) + +### Features + +- **count:** remove thisArg ([878a1fd](https://github.com/ReactiveX/RxJS/commit/878a1fd)) +- **distinctUntilChanged:** remove thisArg ([bfc52d6](https://github.com/ReactiveX/RxJS/commit/bfc52d6)) +- **exhaust:** rename switchFirst operators to exhaust ([9b565c9](https://github.com/ReactiveX/RxJS/commit/9b565c9)), closes [#915](https://github.com/ReactiveX/RxJS/issues/915) +- **finally:** remove thisArg ([d4b02fc](https://github.com/ReactiveX/RxJS/commit/d4b02fc)) +- **forEach:** add thisArg ([14ffce6](https://github.com/ReactiveX/RxJS/commit/14ffce6)), closes [#878](https://github.com/ReactiveX/RxJS/issues/878) +- **single:** remove thisArg ([43af805](https://github.com/ReactiveX/RxJS/commit/43af805)) + +### BREAKING CHANGES + +- exhaust: switchFirst is now exhaust +- exhaust: switchFirstMap is now exhaustMap +- forEach: Observable.prototype.forEach argument order changed to accommodate thisArg. Optional PromiseCtor argument moved to third arg from second + + + +# [5.0.0-alpha.13](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.12...v5.0.0-alpha.13) (2015-12-08) + +### Bug Fixes + +- **Observable:** fix circular dependency issue. ([b7672f4](https://github.com/ReactiveX/RxJS/commit/b7672f4)) +- **bufferToggle:** fix unsubscriptions of closing Observable ([439b641](https://github.com/ReactiveX/RxJS/commit/439b641)) +- **expand:** accept scheduler parameter ([79e9084](https://github.com/ReactiveX/RxJS/commit/79e9084)), closes [#841](https://github.com/ReactiveX/RxJS/issues/841) +- **publish:** make script generate correct package names ([10563d3](https://github.com/ReactiveX/RxJS/commit/10563d3)) +- **repeat:** preserve Subscriber chain in repeat() ([d9a7328](https://github.com/ReactiveX/RxJS/commit/d9a7328)) +- **retry:** preserve Subscriber chain in retry() ([b429dac](https://github.com/ReactiveX/RxJS/commit/b429dac)) +- **retryWhen:** preserve Subscriber chain in retryWhen() ([c9cb958](https://github.com/ReactiveX/RxJS/commit/c9cb958)) + +### Features + +- **AsapScheduler:** rename NextTickScheduler to AsapScheduler ([3255fb3](https://github.com/ReactiveX/RxJS/commit/3255fb3)), closes [#838](https://github.com/ReactiveX/RxJS/issues/838) +- **BehaviorSubject:** add getValue method to access value ([33b387b](https://github.com/ReactiveX/RxJS/commit/33b387b)), closes [#758](https://github.com/ReactiveX/RxJS/issues/758) +- **BehaviorSubject:** now throws when getValue is called after unsubscription ([1ddf116](https://github.com/ReactiveX/RxJS/commit/1ddf116)) +- **ObjectUnsubscribedError:** add ObjectUnsubscribed error class ([39836af](https://github.com/ReactiveX/RxJS/commit/39836af)) +- **Observable:** subscribe accepts objects with rxSubscriber symbol ([b7672f4](https://github.com/ReactiveX/RxJS/commit/b7672f4)) +- **QueueScheduler:** rename ImmediateScheduler to QueueScheduler ([66eb537](https://github.com/ReactiveX/RxJS/commit/66eb537)) +- **Rx.Symbol.rxSubscriber:** add rxSubscriber symbol ([d4f1670](https://github.com/ReactiveX/RxJS/commit/d4f1670)) +- **Subject:** add rxSubscriber symbol ([d2e4257](https://github.com/ReactiveX/RxJS/commit/d2e4257)) +- **Subscriber:** add rxSubscriber symbol ([7bda360](https://github.com/ReactiveX/RxJS/commit/7bda360)) +- **switchFirstMap:** rename switchMapFirst to switchFirstMap ([eddd4dc](https://github.com/ReactiveX/RxJS/commit/eddd4dc)) + +### BREAKING CHANGES + +- AsapScheduler: `Rx.Scheduler.nextTick` (Rx 4's "default" scheduler) is now `Rx.Scheduler.asap` +- QueueScheduler: `Rx.Scheduler.immediate` (Rx 4's "currentThread" scheduler) is now `Rx.Scheduler.queue` + related #838 +- switchFirstMap: `switchMapFirst` is now `switchFirstMap` + + + +# [5.0.0-alpha.12](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.10...v5.0.0-alpha.12) (2015-12-04) + +### Bug Fixes + +- **AsyncSubject:** emit value when it's subscribed after complete ([ed0eaf6](https://github.com/ReactiveX/RxJS/commit/ed0eaf6)) +- **bindCallback:** only call function once even while scheduled ([8637d47](https://github.com/ReactiveX/RxJS/commit/8637d47)), closes [#881](https://github.com/ReactiveX/RxJS/issues/881) +- **bufferToggle:** fix disposal of subscriptions when errors occur ([a20325c](https://github.com/ReactiveX/RxJS/commit/a20325c)) +- **catch:** fix catch to dispose old subscriptions ([280f7ed](https://github.com/ReactiveX/RxJS/commit/280f7ed)), closes [#763](https://github.com/ReactiveX/RxJS/issues/763) +- **catch:** fix catch() to preserve Subscriber chain ([e1447ac](https://github.com/ReactiveX/RxJS/commit/e1447ac)) +- **concat:** accept scheduler parameter ([8859702](https://github.com/ReactiveX/RxJS/commit/8859702)) +- **ConnectableObservable:** fix ConnectableObservable connectability and refCounting ([aef9578](https://github.com/ReactiveX/RxJS/commit/aef9578)), closes [#678](https://github.com/ReactiveX/RxJS/issues/678) +- **debounce:** Fix debounce to unsubscribe duration Observables ([dea7847](https://github.com/ReactiveX/RxJS/commit/dea7847)) +- **expand:** fix expand's concurrency behavior ([01f86e5](https://github.com/ReactiveX/RxJS/commit/01f86e5)) +- **expand:** terminate recursive call when destination completes ([3b8cf94](https://github.com/ReactiveX/RxJS/commit/3b8cf94)) +- **Observable:** Subjects no longer wrapped in Subscriber ([5cb0f2b](https://github.com/ReactiveX/RxJS/commit/5cb0f2b)), closes [#825](https://github.com/ReactiveX/RxJS/issues/825) [#748](https://github.com/ReactiveX/RxJS/issues/748) +- **Observer:** anonymous observers now allow missing handlers ([a11c763](https://github.com/ReactiveX/RxJS/commit/a11c763)), closes [#723](https://github.com/ReactiveX/RxJS/issues/723) +- **operators:** Remove shareReplay and shareBehavior ([536a6a6](https://github.com/ReactiveX/RxJS/commit/536a6a6)), closes [#710](https://github.com/ReactiveX/RxJS/issues/710) +- **publish:** copy readme and license, remove scripts ([439a2f3](https://github.com/ReactiveX/RxJS/commit/439a2f3)), closes [#845](https://github.com/ReactiveX/RxJS/issues/845) +- **throttleTime:** fix and rename throttleTime operator ([3b0c1f3](https://github.com/ReactiveX/RxJS/commit/3b0c1f3)) +- **TimerObservable:** accepts absolute date for dueTime ([e284fb8](https://github.com/ReactiveX/RxJS/commit/e284fb8)), closes [#648](https://github.com/ReactiveX/RxJS/issues/648) + +### Features + +- **AsyncSubject:** add AsyncSubject ([34c05fe](https://github.com/ReactiveX/RxJS/commit/34c05fe)) +- **bindCallback:** remove thisArg ([feea9a1](https://github.com/ReactiveX/RxJS/commit/feea9a1)) +- **bindCallback:** rename fromCallback to bindCallback ([305d66d](https://github.com/ReactiveX/RxJS/commit/305d66d)), closes [#876](https://github.com/ReactiveX/RxJS/issues/876) +- **callback:** Add Observable.fromCallback ([9f751e7](https://github.com/ReactiveX/RxJS/commit/9f751e7)) +- **combineLatest:** accept array of observable as parameter ([2edd92c](https://github.com/ReactiveX/RxJS/commit/2edd92c)), closes [#594](https://github.com/ReactiveX/RxJS/issues/594) +- **forkJoin:** accept array of observable as parameter ([d45f672](https://github.com/ReactiveX/RxJS/commit/d45f672)) +- **mergeScan:** support concurrency parameter for mergeScan ([fe0eb37](https://github.com/ReactiveX/RxJS/commit/fe0eb37)), closes [#868](https://github.com/ReactiveX/RxJS/issues/868) +- **usage:** add auto-patching operators ([1ab3508](https://github.com/ReactiveX/RxJS/commit/1ab3508)), closes [#860](https://github.com/ReactiveX/RxJS/issues/860) +- **skipWhile:** add skipWhile operator ([a2244e0](https://github.com/ReactiveX/RxJS/commit/a2244e0)) +- **switchFirst:** add switchFirst and switchMapFirst ([71e3dd1](https://github.com/ReactiveX/RxJS/commit/71e3dd1)) +- **publishLast:** add publishLast operator ([9bef228](https://github.com/ReactiveX/RxJS/commit/9bef228)), closes [#883](https://github.com/ReactiveX/RxJS/issues/883) +- **takeWhile:** add takeWhile operator ([48e53ea](https://github.com/ReactiveX/RxJS/commit/48e53ea)), closes [#695](https://github.com/ReactiveX/RxJS/issues/695) +- **takeWhile:** remove thisArg ([b5219a4](https://github.com/ReactiveX/RxJS/commit/b5219a4)) +- **throttle:** add throttle operator with durationSelector ([c3bf3e7](https://github.com/ReactiveX/RxJS/commit/c3bf3e7)), closes [#496](https://github.com/ReactiveX/RxJS/issues/496) + +### Performance Improvements + +- **ReplaySubject:** fix memory leak of growing buffer ([0a73b4d](https://github.com/ReactiveX/RxJS/commit/0a73b4d)), closes [#578](https://github.com/ReactiveX/RxJS/issues/578) + + + +# [5.0.0-alpha.11](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.10...v5.0.0-alpha.11) (2015-12-01) + +### Bug Fixes + +- **catch:** fix catch to dispose old subscriptions ([280f7ed](https://github.com/ReactiveX/RxJS/commit/280f7ed)), closes [#763](https://github.com/ReactiveX/RxJS/issues/763) +- **concat:** accept scheduler parameter ([8859702](https://github.com/ReactiveX/RxJS/commit/8859702)) +- **ConnectableObservable:** fix ConnectableObservable connectability and refCounting ([aef9578](https://github.com/ReactiveX/RxJS/commit/aef9578)), closes [#678](https://github.com/ReactiveX/RxJS/issues/678) +- **debounce:** Fix debounce to unsubscribe duration Observables ([dea7847](https://github.com/ReactiveX/RxJS/commit/dea7847)) +- **expand:** fix expand's concurrency behavior ([01f86e5](https://github.com/ReactiveX/RxJS/commit/01f86e5)) +- **expand:** terminate recursive call when destination completes ([3b8cf94](https://github.com/ReactiveX/RxJS/commit/3b8cf94)) +- **Observer:** anonymous observers now allow missing handlers ([a11c763](https://github.com/ReactiveX/RxJS/commit/a11c763)), closes [#723](https://github.com/ReactiveX/RxJS/issues/723) +- **operators:** Remove shareReplay and shareBehavior ([536a6a6](https://github.com/ReactiveX/RxJS/commit/536a6a6)), closes [#710](https://github.com/ReactiveX/RxJS/issues/710) +- **test:** make explicit unsubscription for observable ([505f5b7](https://github.com/ReactiveX/RxJS/commit/505f5b7)) +- **throttleTime:** fix and rename throttleTime operator ([3b0c1f3](https://github.com/ReactiveX/RxJS/commit/3b0c1f3)) +- **TimerObservable:** accepts absolute date for dueTime ([e284fb8](https://github.com/ReactiveX/RxJS/commit/e284fb8)), closes [#648](https://github.com/ReactiveX/RxJS/issues/648) + +### Features + +- **callback:** Add Observable.fromCallback ([9f751e7](https://github.com/ReactiveX/RxJS/commit/9f751e7)) +- **combineLatest:** accept array of observable as parameter ([2edd92c](https://github.com/ReactiveX/RxJS/commit/2edd92c)), closes [#594](https://github.com/ReactiveX/RxJS/issues/594) +- **forkJoin:** accept array of observable as parameter ([d45f672](https://github.com/ReactiveX/RxJS/commit/d45f672)) +- **operator:** add skipWhile operator ([a2244e0](https://github.com/ReactiveX/RxJS/commit/a2244e0)) +- **operator:** add switchFirst and switchMapFirst ([71e3dd1](https://github.com/ReactiveX/RxJS/commit/71e3dd1)) +- **takeWhile:** add takeWhile operator ([48e53ea](https://github.com/ReactiveX/RxJS/commit/48e53ea)), closes [#695](https://github.com/ReactiveX/RxJS/issues/695) +- **throttle:** add throttle operator with durationSelector ([c3bf3e7](https://github.com/ReactiveX/RxJS/commit/c3bf3e7)), closes [#496](https://github.com/ReactiveX/RxJS/issues/496) + +### Performance Improvements + +- **ReplaySubject:** fix memory leak of growing buffer ([0a73b4d](https://github.com/ReactiveX/RxJS/commit/0a73b4d)), closes [#578](https://github.com/ReactiveX/RxJS/issues/578) + + + +# [5.0.0-alpha.10](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.9...v5.0.0-alpha.10) (2015-11-10) + +### Bug Fixes + +- **Immediate:** set immediate should no longer throw in Chrome ([a3de7d9](https://github.com/ReactiveX/RxJS/commit/a3de7d9)), closes [#690](https://github.com/ReactiveX/RxJS/issues/690) + + + +# [5.0.0-alpha.9](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.8...v5.0.0-alpha.9) (2015-11-10) + +### Bug Fixes + +- **util:** incorrect Symbol.iterator for es6-shim ([15bf32c](https://github.com/ReactiveX/RxJS/commit/15bf32c)) + +### Features + +- **forkJoin:** accept promise, resultselector as parameter of forkJoin ([190f349](https://github.com/ReactiveX/RxJS/commit/190f349)), closes [#507](https://github.com/ReactiveX/RxJS/issues/507) + + + +# [5.0.0-alpha.8](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.7...v5.0.0-alpha.8) (2015-11-06) + +### Bug Fixes + +- **concat:** handle a given scheduler correctly ([8745216](https://github.com/ReactiveX/RxJS/commit/8745216)) +- **package.json:** loosen the engines/npm semver range to prevent false warnings ([df791c6](https://github.com/ReactiveX/RxJS/commit/df791c6)) +- **skipUntil:** unsubscribe source when it completes ([8a4162b](https://github.com/ReactiveX/RxJS/commit/8a4162b)), closes [#577](https://github.com/ReactiveX/RxJS/issues/577) +- **take:** deal with total <= 0 and add tests ([c5cc06f](https://github.com/ReactiveX/RxJS/commit/c5cc06f)) +- **windowWhen:** fix windowWhen with regard to unsubscriptions ([8174947](https://github.com/ReactiveX/RxJS/commit/8174947)) + +### Features + +- **mergeScan:** add new mergeScan operator. ([0ebb5bd](https://github.com/ReactiveX/RxJS/commit/0ebb5bd)) +- **multicast:** support both Subject and subjectFactory arguments ([f779027](https://github.com/ReactiveX/RxJS/commit/f779027)) + +### BREAKING CHANGES + +- **publish:** reverted to RxJS 4 behavior +- **publishBehavior:** reverted to RxJS 4 behavior +- **publishReplay:** reverted to RxJS 4 behavior +- **shareBehavior:** removed +- **shareReplay:** removed + + + +# [5.0.0-alpha.7](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.6...v5.0.0-alpha.7) (2015-10-27) + +### Bug Fixes + +- **NextTickAction:** fix unsubscription behavior ([3d8264c](https://github.com/ReactiveX/RxJS/commit/3d8264c)), closes [#582](https://github.com/ReactiveX/RxJS/issues/582) +- **buffer:** cleanup notifier subscription when unsubscribed ([1b30aa9](https://github.com/ReactiveX/RxJS/commit/1b30aa9)) +- **delay:** accepts absolute time delay ([b109100](https://github.com/ReactiveX/RxJS/commit/b109100)) +- **mergeMapTo:** mergeMapTo result should complete ([6f9859e](https://github.com/ReactiveX/RxJS/commit/6f9859e)) +- **operator:** update type definitions for union types ([9d90c75](https://github.com/ReactiveX/RxJS/commit/9d90c75)), closes [#581](https://github.com/ReactiveX/RxJS/issues/581) +- **repeat:** fix inner subscription semantics for repeat ([f67a596](https://github.com/ReactiveX/RxJS/commit/f67a596)), closes [#554](https://github.com/ReactiveX/RxJS/issues/554) +- **switchMapTo:** reimplement switchMapTo to pass tests ([d4789cd](https://github.com/ReactiveX/RxJS/commit/d4789cd)) +- **takeUntil:** unsubscribe notifier when it completes ([9415196](https://github.com/ReactiveX/RxJS/commit/9415196)) + +### Features + +- **operator:** add max operator ([7fda036](https://github.com/ReactiveX/RxJS/commit/7fda036)) +- **operator:** add min operator ([79cb6cf](https://github.com/ReactiveX/RxJS/commit/79cb6cf)) +- **shareBehavior:** add shareBehavior and its tests ([97ff1ec](https://github.com/ReactiveX/RxJS/commit/97ff1ec)) + + + +# [5.0.0-alpha.6](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.5...v5.0.0-alpha.6) (2015-10-17) + +### Bug Fixes + +- **retryWhen:** fix internal unsubscriptions ([5aff5e8](https://github.com/ReactiveX/RxJS/commit/5aff5e8)) +- **scan:** scan now behaves like RxJS 4 scan ([27f9c09](https://github.com/ReactiveX/RxJS/commit/27f9c09)) + + + +# [5.0.0-alpha.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.4...v5.0.0-alpha.5) (2015-10-16) + +### Bug Fixes + +- **bufferToggle:** fix bugs in order to pass tests ([949fa31](https://github.com/ReactiveX/RxJS/commit/949fa31)) +- **mergeAll:** fix mergeAll micro performance tests to use mapTo instead of map. ([616e86e](https://github.com/ReactiveX/RxJS/commit/616e86e)) +- **package:** correct typings path ([a501b06](https://github.com/ReactiveX/RxJS/commit/a501b06)) +- **repeat:** add additional resubscription behavior ([4f9f33b](https://github.com/ReactiveX/RxJS/commit/4f9f33b)), closes [#516](https://github.com/ReactiveX/RxJS/issues/516) +- **retry:** fix internal unsubscriptions for retry ([cc92f45](https://github.com/ReactiveX/RxJS/commit/cc92f45)), closes [#546](https://github.com/ReactiveX/RxJS/issues/546) +- **windowToggle:** fix window closing and unsubscription semantics ([0cb21e6](https://github.com/ReactiveX/RxJS/commit/0cb21e6)) + + + +# [5.0.0-alpha.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.3...5.0.0-alpha.4) (2015-10-15) + +### Bug Fixes + +- **Subject:** fix missing unsubscribe call ([9dd27d6](https://github.com/ReactiveX/RxJS/commit/9dd27d6)) +- **Subscriber:** avoid implicit any ([08faaa9](https://github.com/ReactiveX/RxJS/commit/08faaa9)) +- **bufferWhen:** onComplete of closings determine buffers ([5d28a38](https://github.com/ReactiveX/RxJS/commit/5d28a38)) +- **fromEvent:** make selector argument optional in fromEvent static method ([71d90b4](https://github.com/ReactiveX/RxJS/commit/71d90b4)) +- **skipUntil:** update skipUntil behavior with error, completion ([6f0d98f](https://github.com/ReactiveX/RxJS/commit/6f0d98f)), closes [#518](https://github.com/ReactiveX/RxJS/issues/518) +- **windowCount:** fix windowCount window opening times ([908ae56](https://github.com/ReactiveX/RxJS/commit/908ae56)), closes [#273](https://github.com/ReactiveX/RxJS/issues/273) + +### Features + +- **operator:** add debounce operator ([a1e652f](https://github.com/ReactiveX/RxJS/commit/a1e652f)), closes [#493](https://github.com/ReactiveX/RxJS/issues/493) +- **operator:** add debounceTime operator ([dd2ba40](https://github.com/ReactiveX/RxJS/commit/dd2ba40)) + +### Performance Improvements + +- **ScalarObservable:** add fast-path for mapping scalar observables ([7b0d3dc](https://github.com/ReactiveX/RxJS/commit/7b0d3dc)) +- **count:** fast-path for counting over scalars ([c35a120](https://github.com/ReactiveX/RxJS/commit/c35a120)) +- **filter:** add fast-path for filtering scalar observables ([e2e8954](https://github.com/ReactiveX/RxJS/commit/e2e8954)) +- **reduce:** add fast-path for reducing over scalar observables ([4c65136](https://github.com/ReactiveX/RxJS/commit/4c65136)) +- **scan:** fast-path for scanning scalars ([0201b92](https://github.com/ReactiveX/RxJS/commit/0201b92)) +- **skip:** fast-path for skip over scalar observable ([9b49936](https://github.com/ReactiveX/RxJS/commit/9b49936)) +- **take:** add fast-path for take over scalars ([33053b1](https://github.com/ReactiveX/RxJS/commit/33053b1)) + + + +# [5.0.0-alpha.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.2...5.0.0-alpha.3) (2015-10-13) + +### Bug Fixes + +- **Observable:** fix type signature of some static operators ([e5364de](https://github.com/ReactiveX/RxJS/commit/e5364de)) +- **Subject.create:** ensure operator property not required for Observable subscription ([2259de2](https://github.com/ReactiveX/RxJS/commit/2259de2)), closes [#483](https://github.com/ReactiveX/RxJS/issues/483) +- **TestScheduler:** stop sorting actual results ([51db0b8](https://github.com/ReactiveX/RxJS/commit/51db0b8)), closes [#422](https://github.com/ReactiveX/RxJS/issues/422) +- **benchpress:** update benchpress dependencies and config ([8513eaa](https://github.com/ReactiveX/RxJS/commit/8513eaa)), closes [#348](https://github.com/ReactiveX/RxJS/issues/348) +- **buffer:** change behavior of buffer to more closely match RxJS 4 ([b66592d](https://github.com/ReactiveX/RxJS/commit/b66592d)) +- **combineLatest:** fix type signature ([a3e6deb](https://github.com/ReactiveX/RxJS/commit/a3e6deb)) +- **defer:** fix type signature ([11327b9](https://github.com/ReactiveX/RxJS/commit/11327b9)) +- **empty:** fix type signature ([893cb7e](https://github.com/ReactiveX/RxJS/commit/893cb7e)) +- **fromPromise:** fix type signature ([17415fa](https://github.com/ReactiveX/RxJS/commit/17415fa)) +- **groupBy:** durationSelector cannot keep source alive ([57e4207](https://github.com/ReactiveX/RxJS/commit/57e4207)) +- **groupBy:** fix bugs related to group resets ([23a7574](https://github.com/ReactiveX/RxJS/commit/23a7574)) +- **groupBy:** fix bugs with groupBy ([86992c6](https://github.com/ReactiveX/RxJS/commit/86992c6)) +- **interval:** fix signature type ([9c238c0](https://github.com/ReactiveX/RxJS/commit/9c238c0)) +- **operator:** startWith operator accepts scheduler, multiple values ([d1d339a](https://github.com/ReactiveX/RxJS/commit/d1d339a)) +- **operators:** reorder signature of resultSelectors ([fc1724d](https://github.com/ReactiveX/RxJS/commit/fc1724d)) +- **range:** fix type signature ([9237d0b](https://github.com/ReactiveX/RxJS/commit/9237d0b)) +- **timeout:** fix absolute timeout behavior ([8ec06cf](https://github.com/ReactiveX/RxJS/commit/8ec06cf)) +- **timeout:** update behavior of timeout, timeoutWith ([16bd691](https://github.com/ReactiveX/RxJS/commit/16bd691)) +- **timer:** fix type signature ([fffb96c](https://github.com/ReactiveX/RxJS/commit/fffb96c)) +- **window:** handle closingNotifier errors/completes ([42beff1](https://github.com/ReactiveX/RxJS/commit/42beff1)) + +### Features + +- **TestScheduler:** support unsubscription marbles ([ffb0bb9](https://github.com/ReactiveX/RxJS/commit/ffb0bb9)) +- **count:** add predicate support in count() ([42d1add](https://github.com/ReactiveX/RxJS/commit/42d1add)), closes [#425](https://github.com/ReactiveX/RxJS/issues/425) +- **dematerialize:** add dematerialize operator ([0a8b074](https://github.com/ReactiveX/RxJS/commit/0a8b074)), closes [#475](https://github.com/ReactiveX/RxJS/issues/475) +- **do:** do will now handle an observer as an argument ([c1a4994](https://github.com/ReactiveX/RxJS/commit/c1a4994)), closes [#476](https://github.com/ReactiveX/RxJS/issues/476) +- **first:** add resultSelector ([3c20fcc](https://github.com/ReactiveX/RxJS/commit/3c20fcc)), closes [#417](https://github.com/ReactiveX/RxJS/issues/417) +- **last:** add resultSelector argument ([5a4896c](https://github.com/ReactiveX/RxJS/commit/5a4896c)), closes [#418](https://github.com/ReactiveX/RxJS/issues/418) +- **operator:** add every operator ([d11f32e](https://github.com/ReactiveX/RxJS/commit/d11f32e)) +- **operator:** add timeInterval operator ([6cc0615](https://github.com/ReactiveX/RxJS/commit/6cc0615)) +- **share:** add the share operator ([c36f2be](https://github.com/ReactiveX/RxJS/commit/c36f2be)), closes [#439](https://github.com/ReactiveX/RxJS/issues/439) +- **shareReplay:** add the shareReplay() operator ([65c84ea](https://github.com/ReactiveX/RxJS/commit/65c84ea)) + +### Performance Improvements + +- **ReplaySubject:** remove unnecessary computation ([488ac2e](https://github.com/ReactiveX/RxJS/commit/488ac2e)) + +### BREAKING CHANGES + +- **operators with resultSelectors** (mergeMap, concatMap, switchMap, etc): + The function signature of resultSelectors used to be (innerValue, + outerValue, innerIndex, outerIndex) but this commits changes it to + be (outerValue, innerValue, outerIndex, innerIndex), to match + signatures in RxJS 4. + + + +# [5.0.0-alpha.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.1...5.0.0-alpha.2) (2015-09-30) + +### Bug Fixes + +- **concat:** let observable concat instead of merge ([c17e832](https://github.com/ReactiveX/RxJS/commit/c17e832)) + +### Features + +- **operator:** add find, findIndex operator ([7c6cc9d](https://github.com/ReactiveX/RxJS/commit/7c6cc9d)) +- **operator:** add first operator ([274c233](https://github.com/ReactiveX/RxJS/commit/274c233)) +- **operator:** add ignoreElements operator ([fe1a952](https://github.com/ReactiveX/RxJS/commit/fe1a952)) +- **zip:** zip now supports never-ending iterables ([a5684ba](https://github.com/ReactiveX/RxJS/commit/a5684ba)), closes [#397](https://github.com/ReactiveX/RxJS/issues/397) + + + +# [5.0.0-alpha.1](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.3...5.0.0-alpha.1) (2015-09-23) + +### Bug Fixes + +- **Promises:** escape promise error trap ([c69088a](https://github.com/ReactiveX/RxJS/commit/c69088a)) +- **TestScheduler:** ensure TestScheduler subscribes to expectations before hot subjects ([b9b2ba5](https://github.com/ReactiveX/RxJS/commit/b9b2ba5)) +- **TestScheduler:** properly schedule actions added dynamically ([069ede4](https://github.com/ReactiveX/RxJS/commit/069ede4)) +- **buffer:** do not emit empty buffer when completes ([252fccb](https://github.com/ReactiveX/RxJS/commit/252fccb)) +- **bufferTime:** inner intervals will now clean up properly ([4ef41b0](https://github.com/ReactiveX/RxJS/commit/4ef41b0)) +- **expand:** Fix expand to stay open until the source Observable completes. ([20ef785](https://github.com/ReactiveX/RxJS/commit/20ef785)) +- **expand:** fix expand operator to match Rx3 ([67f9623](https://github.com/ReactiveX/RxJS/commit/67f9623)) +- **last:** emit value matches with predicate instead of result of predicate ([0f635ee](https://github.com/ReactiveX/RxJS/commit/0f635ee)) +- **merge:** fix issues with async in merge ([7a15304](https://github.com/ReactiveX/RxJS/commit/7a15304)) +- **mergeAll:** merge all will properly handle async observables ([43b63cc](https://github.com/ReactiveX/RxJS/commit/43b63cc)) +- **package:** specify supported npm version ([f72e622](https://github.com/ReactiveX/RxJS/commit/f72e622)) +- **switchAll:** switch all will properly handle async observables ([c2e2d29](https://github.com/ReactiveX/RxJS/commit/c2e2d29)) +- **switchAll/switchLatest:** inner subscriptions should now properly unsub ([38a45f8](https://github.com/ReactiveX/RxJS/commit/38a45f8)), closes [#302](https://github.com/ReactiveX/RxJS/issues/302) + +### Features + +- **combineLatest:** supports promises, iterables, lowercase-o observables and Observables ([ce76e4e](https://github.com/ReactiveX/RxJS/commit/ce76e4e)) +- **config:** add global configuration of Promise capability ([e7eb5d7](https://github.com/ReactiveX/RxJS/commit/e7eb5d7)), closes [#115](https://github.com/ReactiveX/RxJS/issues/115) +- **expand:** now handles promises, iterables and lowercase-o observables ([c5239e9](https://github.com/ReactiveX/RxJS/commit/c5239e9)) +- **mergeAll:** now supports promises, iterables and lowercase-o observables ([4c16aa6](https://github.com/ReactiveX/RxJS/commit/4c16aa6)) +- **operator:** add elementAt operator ([cd562c4](https://github.com/ReactiveX/RxJS/commit/cd562c4)) +- **operator:** add isEmpty operator ([80f72c5](https://github.com/ReactiveX/RxJS/commit/80f72c5)) +- **operator:** add last operator ([d841b11](https://github.com/ReactiveX/RxJS/commit/d841b11)), closes [#304](https://github.com/ReactiveX/RxJS/issues/304) [#306](https://github.com/ReactiveX/RxJS/issues/306) +- **operator:** add single operator ([49484a2](https://github.com/ReactiveX/RxJS/commit/49484a2)) +- **switch:** add promise, iterable and array support ([24fdd34](https://github.com/ReactiveX/RxJS/commit/24fdd34)) +- **withLatestFrom:** default array output, handle other types ([cb393dc](https://github.com/ReactiveX/RxJS/commit/cb393dc)) +- **zip:** supports promises, iterables and lowercase-o observables ([d332a0e](https://github.com/ReactiveX/RxJS/commit/d332a0e)) + + + +# [0.0.0-prealpha.3](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.2...0.0.0-prealpha.3) (2015-09-11) + +### Bug Fixes + +- **root:** use self as the root object when available ([0428a85](https://github.com/ReactiveX/RxJS/commit/0428a85)) + + + +# [0.0.0-prealpha.2](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.1...0.0.0-prealpha.2) (2015-09-11) + +### Bug Fixes + +- **bufferCount:** set default value for skip argument, do not emit empty buffer at the end ([2c1a9dc](https://github.com/ReactiveX/RxJS/commit/2c1a9dc)) +- **windowCount:** set default value for skip argument, do not emit empty buffer at the end ([a513dbb](https://github.com/ReactiveX/RxJS/commit/a513dbb)) + +### Features + +- **Observable:** add static create method ([e0d27ba](https://github.com/ReactiveX/RxJS/commit/e0d27ba)), closes [#255](https://github.com/ReactiveX/RxJS/issues/255) +- **TestScheduler:** add TestScheduler ([b23daf1](https://github.com/ReactiveX/RxJS/commit/b23daf1)), closes [#270](https://github.com/ReactiveX/RxJS/issues/270) +- **VirtualTimeScheduler:** add VirtualTimeScheduler ([96f9386](https://github.com/ReactiveX/RxJS/commit/96f9386)), closes [#269](https://github.com/ReactiveX/RxJS/issues/269) +- **operator:** add sample and sampleTime ([9e62789](https://github.com/ReactiveX/RxJS/commit/9e62789)), closes [#178](https://github.com/ReactiveX/RxJS/issues/178) + + + +# [0.0.0-prealpha.1](https://github.com/ReactiveX/RxJS/compare/0441dea...0.0.0-prealpha.1) (2015-09-02) + +### Bug Fixes + +- **combineLatest:** check for limits higher than total observable count ([81e5dfb](https://github.com/ReactiveX/RxJS/commit/81e5dfb)) +- **rx:** add hack to export global until better global build exists ([1a543b0](https://github.com/ReactiveX/RxJS/commit/1a543b0)) +- **subscription-ref:** add setter for isDisposed ([6fe5427](https://github.com/ReactiveX/RxJS/commit/6fe5427)) +- **take:** complete on limit reached ([801a711](https://github.com/ReactiveX/RxJS/commit/801a711)) + +### Features + +- **benchpress:** add benchpress config and flatmap spec ([0441dea](https://github.com/ReactiveX/RxJS/commit/0441dea)) +- **catch:** add catch operator, related to #141, closes #130 ([94b4c01](https://github.com/ReactiveX/RxJS/commit/94b4c01)), closes [#130](https://github.com/ReactiveX/RxJS/issues/130) +- **from:** let from handle any "observablesque" ([526d4c3](https://github.com/ReactiveX/RxJS/commit/526d4c3)), closes [#156](https://github.com/ReactiveX/RxJS/issues/156) [#236](https://github.com/ReactiveX/RxJS/issues/236) +- **index:** add index module which requires commonjs build ([379d2d1](https://github.com/ReactiveX/RxJS/commit/379d2d1)), closes [#117](https://github.com/ReactiveX/RxJS/issues/117) +- **observable:** add Observable.all (forkJoin) ([44a4ee1](https://github.com/ReactiveX/RxJS/commit/44a4ee1)) +- **operator:** Add count operator. ([30dd894](https://github.com/ReactiveX/RxJS/commit/30dd894)) +- **operator:** Add distinctUntilChanged and distinctUntilKeyChanged ([f9ba4da](https://github.com/ReactiveX/RxJS/commit/f9ba4da)) +- **operator:** Add do operator. ([7d9b52b](https://github.com/ReactiveX/RxJS/commit/7d9b52b)) +- **operator:** Add expand operator. ([47b178b](https://github.com/ReactiveX/RxJS/commit/47b178b)) +- **operator:** Add minimal delay operator. ([7851885](https://github.com/ReactiveX/RxJS/commit/7851885)) +- **operator:** add buffer operators: buffer, bufferWhen, bufferTime, bufferCount, and bufferTog ([9f8347f](https://github.com/ReactiveX/RxJS/commit/9f8347f)), closes [#207](https://github.com/ReactiveX/RxJS/issues/207) +- **operator:** add debounce ([f03adaf](https://github.com/ReactiveX/RxJS/commit/f03adaf)), closes [#193](https://github.com/ReactiveX/RxJS/issues/193) +- **operator:** add defaultIfEmpty ([c80688b](https://github.com/ReactiveX/RxJS/commit/c80688b)) +- **operator:** add finally ([526e4c9](https://github.com/ReactiveX/RxJS/commit/526e4c9)) +- **operator:** add fromEventPattern creator function ([1095d4c](https://github.com/ReactiveX/RxJS/commit/1095d4c)) +- **operator:** add groupBy ([1e13aea](https://github.com/ReactiveX/RxJS/commit/1e13aea)), closes [#165](https://github.com/ReactiveX/RxJS/issues/165) +- **operator:** add materialize. closes #132 ([6d9f6ae](https://github.com/ReactiveX/RxJS/commit/6d9f6ae)), closes [#132](https://github.com/ReactiveX/RxJS/issues/132) +- **operator:** add publishBehavior operator and spec ([249ab8d](https://github.com/ReactiveX/RxJS/commit/249ab8d)) +- **operator:** add publishReplay operator and spec ([a0c47d6](https://github.com/ReactiveX/RxJS/commit/a0c47d6)) +- **operator:** add retry ([4451db5](https://github.com/ReactiveX/RxJS/commit/4451db5)) +- **operator:** add retryWhen operator. closes #129 ([65eb50e](https://github.com/ReactiveX/RxJS/commit/65eb50e)), closes [#129](https://github.com/ReactiveX/RxJS/issues/129) +- **operator:** add skipUntil ([ef2620e](https://github.com/ReactiveX/RxJS/commit/ef2620e)), closes [#180](https://github.com/ReactiveX/RxJS/issues/180) +- **operator:** add throttle ([1d735b9](https://github.com/ReactiveX/RxJS/commit/1d735b9)), closes [#191](https://github.com/ReactiveX/RxJS/issues/191) +- **operator:** add timeout and timeoutWith ([bb440ad](https://github.com/ReactiveX/RxJS/commit/bb440ad)), closes [#244](https://github.com/ReactiveX/RxJS/issues/244) +- **operator:** add toPromise operator. closes #159 ([361a53b](https://github.com/ReactiveX/RxJS/commit/361a53b)), closes [#159](https://github.com/ReactiveX/RxJS/issues/159) +- **operator:** add window operators: window, windowWhen, windowTime, windowCount, windowToggle ([9f5d510](https://github.com/ReactiveX/RxJS/commit/9f5d510)), closes [#195](https://github.com/ReactiveX/RxJS/issues/195) +- **operator:** add withLatestFrom ([322218a](https://github.com/ReactiveX/RxJS/commit/322218a)), closes [#209](https://github.com/ReactiveX/RxJS/issues/209) +- **operator:** implement startWith(). ([1f36d99](https://github.com/ReactiveX/RxJS/commit/1f36d99)) diff --git a/node_modules/rxjs/CODE_OF_CONDUCT.md b/node_modules/rxjs/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..dec600c --- /dev/null +++ b/node_modules/rxjs/CODE_OF_CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting Ben Lesh (ben@benlesh.com), Tracy Lee (tracy@thisdot.co) or OJ Kwon (kwon.ohjoong@gmail.com). All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org diff --git a/node_modules/rxjs/LICENSE.txt b/node_modules/rxjs/LICENSE.txt new file mode 100644 index 0000000..031ce38 --- /dev/null +++ b/node_modules/rxjs/LICENSE.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/node_modules/rxjs/README.md b/node_modules/rxjs/README.md new file mode 100644 index 0000000..910eef7 --- /dev/null +++ b/node_modules/rxjs/README.md @@ -0,0 +1,107 @@ +# RxJS Logo RxJS: Reactive Extensions For JavaScript + +![CI](https://github.com/reactivex/rxjs/workflows/CI/badge.svg) +[![npm version](https://badge.fury.io/js/rxjs.svg)](http://badge.fury.io/js/rxjs) +[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +# The Roadmap from RxJS 7 to 8 + +Curious what's next for RxJS? Follow along with [Issue 6367](https://github.com/ReactiveX/rxjs/issues/6367). + +# RxJS 7 + +### FOR 6.X PLEASE GO TO [THE 6.x BRANCH](https://github.com/ReactiveX/rxjs/tree/6.x) + +Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface. + +[Apache 2.0 License](LICENSE.txt) + +- [Code of Conduct](CODE_OF_CONDUCT.md) +- [Contribution Guidelines](CONTRIBUTING.md) +- [Maintainer Guidelines](docs_app/content/maintainer-guidelines.md) +- [API Documentation](https://rxjs.dev/) + +## Versions In This Repository + +- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current work, which is against v7 of RxJS right now +- [6.x](https://github.com/ReactiveX/rxjs/tree/6.x) - This is the branch for version 6.X + +Most PRs should be made to **master**. + +## Important + +By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity. + +## Installation and Usage + +### ES6 via npm + +```shell +npm install rxjs +``` + +It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. +If you're using RxJS version 7.2 or above, you can pull in any operator you need from the same spot, `'rxjs'`. + +```ts +import { range, filter, map } from 'rxjs'; + +range(1, 200) + .pipe( + filter(x => x % 2 === 1), + map(x => x + x) + ) + .subscribe(x => console.log(x)); +``` + +If you're using RxJS version below 7.2, you can pull in any operator you need from one spot, under `'rxjs/operators'`. + +```ts +import { range } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; + +range(1, 200) + .pipe( + filter(x => x % 2 === 1), + map(x => x + x) + ) + .subscribe(x => console.log(x)); +``` + +### CDN + +For CDN, you can use [unpkg](https://unpkg.com/): + +[https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js](https://unpkg.com/rxjs@%5E7/dist/bundles/rxjs.umd.min.js) + +The global namespace for rxjs is `rxjs`: + +```js +const { range } = rxjs; +const { filter, map } = rxjs.operators; + +range(1, 200) + .pipe( + filter(x => x % 2 === 1), + map(x => x + x) + ) + .subscribe(x => console.log(x)); +``` + +## Goals + +- Smaller overall bundles sizes +- Provide better performance than preceding versions of RxJS +- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable +- Provide more modular file structure in a variety of formats +- Provide more debuggable call stacks than preceding versions of RxJS + +## Building/Testing + +- `npm run compile` build everything +- `npm test` run tests +- `npm run dtslint` run dtslint tests + +## Adding documentation + +We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app). diff --git a/node_modules/rxjs/ajax/package.json b/node_modules/rxjs/ajax/package.json new file mode 100644 index 0000000..9f0a79a --- /dev/null +++ b/node_modules/rxjs/ajax/package.json @@ -0,0 +1,8 @@ +{ + "name": "rxjs/ajax", + "types": "../dist/types/ajax/index.d.ts", + "main": "../dist/cjs/ajax/index.js", + "module": "../dist/esm5/ajax/index.js", + "es2015": "../dist/esm/ajax/index.js", + "sideEffects": false +} diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.js b/node_modules/rxjs/dist/bundles/rxjs.umd.js new file mode 100644 index 0000000..9f356f1 --- /dev/null +++ b/node_modules/rxjs/dist/bundles/rxjs.umd.js @@ -0,0 +1,6842 @@ +/** + @license + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + **/ +/** + @license + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + **/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define('rxjs', ['exports'], factory) : + (factory((global.rxjs = {}))); +}(this, (function (exports) { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + } + + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + } + + function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + } + + function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + } + + function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + } + + function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + } + + function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + } + + function isFunction(value) { + return typeof value === 'function'; + } + + function createErrorClass(createImpl) { + var _super = function (instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; + } + + var UnsubscriptionError = createErrorClass(function (_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors + ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + }; + }); + + function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } + } + + var Subscription = (function () { + function Subscription(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription.prototype.unsubscribe = function () { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } + catch (e) { + errors = e instanceof UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer(finalizer); + } + catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } + else { + errors.push(err); + } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); + } + finally { if (e_2) throw e_2.error; } + } + } + if (errors) { + throw new UnsubscriptionError(errors); + } + } + }; + Subscription.prototype.add = function (teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } + else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription.prototype._hasParent = function (parent) { + var _parentage = this._parentage; + return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + }; + Subscription.prototype._addParent = function (parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription.prototype._removeParent = function (parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } + else if (Array.isArray(_parentage)) { + arrRemove(_parentage, parent); + } + }; + Subscription.prototype.remove = function (teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + }; + Subscription.EMPTY = (function () { + var empty = new Subscription(); + empty.closed = true; + return empty; + })(); + return Subscription; + }()); + var EMPTY_SUBSCRIPTION = Subscription.EMPTY; + function isSubscription(value) { + return (value instanceof Subscription || + (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); + } + function execFinalizer(finalizer) { + if (isFunction(finalizer)) { + finalizer(); + } + else { + finalizer.unsubscribe(); + } + } + + var config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, + }; + + var timeoutProvider = { + setTimeout: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearTimeout: function (handle) { + var delegate = timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined, + }; + + function reportUnhandledError(err) { + timeoutProvider.setTimeout(function () { + var onUnhandledError = config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } + else { + throw err; + } + }); + } + + function noop() { } + + var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); + function errorNotification(error) { + return createNotification('E', undefined, error); + } + function nextNotification(value) { + return createNotification('N', value, undefined); + } + function createNotification(kind, value, error) { + return { + kind: kind, + value: value, + error: error, + }; + } + + var context = null; + function errorContext(cb) { + if (config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } + else { + cb(); + } + } + function captureError(err) { + if (config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } + } + + var Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (isSubscription(destination)) { + destination.add(_this); + } + } + else { + _this.destination = EMPTY_OBSERVER; + } + return _this; + } + Subscriber.create = function (next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber.prototype.next = function (value) { + if (this.isStopped) { + handleStoppedNotification(nextNotification(value), this); + } + else { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (this.isStopped) { + handleStoppedNotification(errorNotification(err), this); + } + else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (this.isStopped) { + handleStoppedNotification(COMPLETE_NOTIFICATION, this); + } + else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + try { + this.destination.error(err); + } + finally { + this.unsubscribe(); + } + }; + Subscriber.prototype._complete = function () { + try { + this.destination.complete(); + } + finally { + this.unsubscribe(); + } + }; + return Subscriber; + }(Subscription)); + var _bind = Function.prototype.bind; + function bind(fn, thisArg) { + return _bind.call(fn, thisArg); + } + var ConsumerObserver = (function () { + function ConsumerObserver(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver.prototype.next = function (value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + ConsumerObserver.prototype.error = function (err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } + catch (error) { + handleUnhandledError(error); + } + } + else { + handleUnhandledError(err); + } + }; + ConsumerObserver.prototype.complete = function () { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + return ConsumerObserver; + }()); + var SafeSubscriber = (function (_super) { + __extends(SafeSubscriber, _super); + function SafeSubscriber(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var partialObserver; + if (isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), + error: error !== null && error !== void 0 ? error : undefined, + complete: complete !== null && complete !== void 0 ? complete : undefined, + }; + } + else { + var context_1; + if (_this && config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function () { return _this.unsubscribe(); }; + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context_1), + error: observerOrNext.error && bind(observerOrNext.error, context_1), + complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), + }; + } + else { + partialObserver = observerOrNext; + } + } + _this.destination = new ConsumerObserver(partialObserver); + return _this; + } + return SafeSubscriber; + }(Subscriber)); + function handleUnhandledError(error) { + if (config.useDeprecatedSynchronousErrorHandling) { + captureError(error); + } + else { + reportUnhandledError(error); + } + } + function defaultErrorHandler(err) { + throw err; + } + function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config.onStoppedNotification; + onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); + } + var EMPTY_OBSERVER = { + closed: true, + next: noop, + error: defaultErrorHandler, + complete: noop, + }; + + var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); + + function identity(x) { + return x; + } + + function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); + } + function pipeFromArray(fns) { + if (fns.length === 0) { + return identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; + } + + var Observable = (function () { + function Observable(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable$$1 = new Observable(); + observable$$1.source = this; + observable$$1.operator = operator; + return observable$$1; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); + errorContext(function () { + var _a = _this, operator = _a.operator, source = _a.source; + subscriber.add(operator + ? + operator.call(subscriber, source) + : source + ? + _this._subscribe(subscriber) + : + _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + sink.error(err); + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscriber = new SafeSubscriber({ + next: function (value) { + try { + next(value); + } + catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + _this.subscribe(subscriber); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + }; + Observable.prototype[observable] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipeFromArray(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; + }()); + function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; + } + function isObserver(value) { + return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); + } + function isSubscriber(value) { + return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); + } + + function hasLift(source) { + return isFunction(source === null || source === void 0 ? void 0 : source.lift); + } + function operate(init) { + return function (source) { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } + catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; + } + + function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); + } + var OperatorSubscriber = (function (_super) { + __extends(OperatorSubscriber, _super); + function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; + _this._next = onNext + ? function (value) { + try { + onNext(value); + } + catch (err) { + destination.error(err); + } + } + : _super.prototype._next; + _this._error = onError + ? function (err) { + try { + onError(err); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._error; + _this._complete = onComplete + ? function () { + try { + onComplete(); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._complete; + return _this; + } + OperatorSubscriber.prototype.unsubscribe = function () { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + }; + return OperatorSubscriber; + }(Subscriber)); + + function refCount() { + return operate(function (source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); + } + + var ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype._teardown = function () { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable.prototype.connect = function () { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () { + _this._teardown(); + subject_1.complete(); + }, function (err) { + _this._teardown(); + subject_1.error(err); + }, function () { return _this._teardown(); }))); + if (connection.closed) { + this._connection = null; + connection = Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return refCount()(this); + }; + return ConnectableObservable; + }(Observable)); + + var performanceTimestampProvider = { + now: function () { + return (performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, + }; + + var animationFrameProvider = { + schedule: function (callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function (timestamp) { + cancel = undefined; + callback(timestamp); + }); + return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); + }, + requestAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + cancelAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + delegate: undefined, + }; + + function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + } + function animationFramesFactory(timestampProvider) { + return new Observable(function (subscriber) { + var provider = timestampProvider || performanceTimestampProvider; + var start = provider.now(); + var id = 0; + var run = function () { + if (!subscriber.closed) { + id = animationFrameProvider.requestAnimationFrame(function (timestamp) { + id = 0; + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + run(); + return function () { + if (id) { + animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); + } + var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + + var ObjectUnsubscribedError = createErrorClass(function (_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + }; + }); + + var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype._throwIfClosed = function () { + if (this.closed) { + throw new ObjectUnsubscribedError(); + } + }; + Subject.prototype.next = function (value) { + var _this = this; + errorContext(function () { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { + var observer = _c.value; + observer.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + }); + }; + Subject.prototype.error = function (err) { + var _this = this; + errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject.prototype.complete = function () { + var _this = this; + errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject.prototype, "observed", { + get: function () { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject.prototype._trySubscribe = function (subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject.prototype._innerSubscribe = function (subscriber) { + var _this = this; + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + if (hasError || isStopped) { + return EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription(function () { + _this.currentObservers = null; + arrRemove(observers, subscriber); + }); + }; + Subject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped) { + subscriber.complete(); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; + }(Observable)); + var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject.prototype.error = function (err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject.prototype.complete = function () { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject; + }(Subject)); + + var BehaviorSubject = (function (_super) { + __extends(BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject.prototype._subscribe = function (subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject.prototype.getValue = function () { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, (this._value = value)); + }; + return BehaviorSubject; + }(Subject)); + + var dateTimestampProvider = { + now: function () { + return (dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, + }; + + var ReplaySubject = (function (_super) { + __extends(ReplaySubject, _super); + function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { _bufferSize = Infinity; } + if (_windowTime === void 0) { _windowTime = Infinity; } + if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject.prototype.next = function (value) { + var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject.prototype._trimBuffer = function () { + var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject; + }(Subject)); + + var AsyncSubject = (function (_super) { + __extends(AsyncSubject, _super); + function AsyncSubject() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject.prototype.next = function (value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject.prototype.complete = function () { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject; + }(Subject)); + + var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; + }(Subscription)); + + var intervalProvider = { + setInterval: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearInterval: function (handle) { + var delegate = intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined, + }; + + var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { + if (delay === void 0) { delay = 0; } + return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + intervalProvider.clearInterval(id); + } + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype.unsubscribe = function () { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction; + }(Action)); + + var nextHandle = 1; + var resolved; + var activeHandles = {}; + function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; + } + var Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, + }; + + var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate; + var immediateProvider = { + setImmediate: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); + }, + clearImmediate: function (handle) { + var delegate = immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined, + }; + + var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + }; + return AsapAction; + }(AsyncAction)); + + var Scheduler = (function () { + function Scheduler(schedulerActionCtor, now) { + if (now === void 0) { now = Scheduler.now; } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + Scheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler.now = dateTimestampProvider.now; + return Scheduler; + }()); + + var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler.now; } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift())); + this._active = false; + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; + }(Scheduler)); + + var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; + }(AsyncScheduler)); + + var asapScheduler = new AsapScheduler(AsapAction); + var asap = asapScheduler; + + var asyncScheduler = new AsyncScheduler(AsyncAction); + var async = asyncScheduler; + + var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.flush(this); + return 0; + }; + return QueueAction; + }(AsyncAction)); + + var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; + }(AsyncScheduler)); + + var queueScheduler = new QueueScheduler(QueueAction); + var queue = queueScheduler; + + var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; + }(AsyncAction)); + + var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; + }(AsyncScheduler)); + + var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); + var animationFrame = animationFrameScheduler; + + var VirtualTimeScheduler = (function (_super) { + __extends(VirtualTimeScheduler, _super); + function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } + if (maxFrames === void 0) { maxFrames = Infinity; } + var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler.prototype.flush = function () { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; + }(AsyncScheduler)); + var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = (scheduler.index += 1); } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } + else { + return Subscription.EMPTY; + } + }; + VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return 1; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; + }(AsyncAction)); + + var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); }); + function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; + } + function emptyScheduled(scheduler) { + return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); + } + + function isScheduler(value) { + return value && isFunction(value.schedule); + } + + function last(arr) { + return arr[arr.length - 1]; + } + function popResultSelector(args) { + return isFunction(last(args)) ? args.pop() : undefined; + } + function popScheduler(args) { + return isScheduler(last(args)) ? args.pop() : undefined; + } + function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; + } + + var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); + + function isPromise(value) { + return isFunction(value === null || value === void 0 ? void 0 : value.then); + } + + function isInteropObservable(input) { + return isFunction(input[observable]); + } + + function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + } + + function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + } + + function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; + } + var iterator = getSymbolIterator(); + + function isIterable(input) { + return isFunction(input === null || input === void 0 ? void 0 : input[iterator]); + } + + function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + return [4, __await(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) return [3, 5]; + return [4, __await(void 0)]; + case 4: return [2, _b.sent()]; + case 5: return [4, __await(value)]; + case 6: return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: return [2]; + } + }); + }); + } + function isReadableStreamLike(obj) { + return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + } + + function innerFrom(input) { + if (input instanceof Observable) { + return input; + } + if (input != null) { + if (isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw createInvalidObservableTypeError(input); + } + function fromInteropObservable(obj) { + return new Observable(function (subscriber) { + var obs = obj[observable](); + if (isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); + } + function fromArrayLike(array) { + return new Observable(function (subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); + } + function fromPromise(promise) { + return new Observable(function (subscriber) { + promise + .then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, reportUnhandledError); + }); + } + function fromIterable(iterable) { + return new Observable(function (subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }); + } + function fromAsyncIterable(asyncIterable) { + return new Observable(function (subscriber) { + process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); + }); + } + function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); + } + function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function () { + var value, e_2_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: return [3, 1]; + case 4: return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [3, 10]; + case 9: + if (e_2) throw e_2.error; + return [7]; + case 10: return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); + } + + function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { + if (delay === void 0) { delay = 0; } + if (repeat === void 0) { repeat = false; } + var scheduleSubscription = scheduler.schedule(function () { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } + else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } + } + + function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + }); + } + + function subscribeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return operate(function (source, subscriber) { + subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); + }); + } + + function scheduleObservable(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); + } + + function schedulePromise(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); + } + + function scheduleArray(input, scheduler) { + return new Observable(function (subscriber) { + var i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } + else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); + } + + function scheduleIterable(input, scheduler) { + return new Observable(function (subscriber) { + var iterator$$1; + executeSchedule(subscriber, scheduler, function () { + iterator$$1 = input[iterator](); + executeSchedule(subscriber, scheduler, function () { + var _a; + var value; + var done; + try { + (_a = iterator$$1.next(), value = _a.value, done = _a.done); + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + } + }, 0, true); + }); + return function () { return isFunction(iterator$$1 === null || iterator$$1 === void 0 ? void 0 : iterator$$1.return) && iterator$$1.return(); }; + }); + } + + function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable(function (subscriber) { + executeSchedule(subscriber, scheduler, function () { + var iterator = input[Symbol.asyncIterator](); + executeSchedule(subscriber, scheduler, function () { + iterator.next().then(function (result) { + if (result.done) { + subscriber.complete(); + } + else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); + } + + function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); + } + + function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable(input)) { + return scheduleObservable(input, scheduler); + } + if (isArrayLike(input)) { + return scheduleArray(input, scheduler); + } + if (isPromise(input)) { + return schedulePromise(input, scheduler); + } + if (isAsyncIterable(input)) { + return scheduleAsyncIterable(input, scheduler); + } + if (isIterable(input)) { + return scheduleIterable(input, scheduler); + } + if (isReadableStreamLike(input)) { + return scheduleReadableStreamLike(input, scheduler); + } + } + throw createInvalidObservableTypeError(input); + } + + function from(input, scheduler) { + return scheduler ? scheduled(input, scheduler) : innerFrom(input); + } + + function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + return from(args, scheduler); + } + + function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; + var init = function (subscriber) { return subscriber.error(errorFactory()); }; + return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); + } + + (function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; + })(exports.NotificationKind || (exports.NotificationKind = {})); + var Notification = (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + Notification.prototype.observe = function (observer) { + return observeNotification(this, observer); + }; + Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification.prototype.accept = function (nextOrObserver, error, complete) { + var _a; + return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) + ? this.observe(nextOrObserver) + : this.do(nextOrObserver, error, complete); + }; + Notification.prototype.toObservable = function () { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + var result = kind === 'N' + ? + of(value) + : + kind === 'E' + ? + throwError(function () { return error; }) + : + kind === 'C' + ? + EMPTY + : + 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification.createNext = function (value) { + return new Notification('N', value); + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + return Notification; + }()); + function observeNotification(notification, observer) { + var _a, _b, _c; + var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + if (typeof kind !== 'string') { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); + } + + function isObservable(obj) { + return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); + } + + var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; + }; }); + + function lastValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function (value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function () { + if (_hasValue) { + resolve(_value); + } + else if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + }); + } + + function firstValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var subscriber = new SafeSubscriber({ + next: function (value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function () { + if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); + } + + var ArgumentOutOfRangeError = createErrorClass(function (_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + }; + }); + + var NotFoundError = createErrorClass(function (_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; + }; + }); + + var SequenceError = createErrorClass(function (_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = 'SequenceError'; + this.message = message; + }; + }); + + function isValidDate(value) { + return value instanceof Date && !isNaN(value); + } + + var TimeoutError = createErrorClass(function (_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { info = null; } + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + }; + }); + function timeout(config, schedulerArg) { + var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return operate(function (source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function (delay) { + timerSubscription = executeSchedule(subscriber, scheduler, function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom(_with({ + meta: meta, + lastValue: lastValue, + seen: seen, + })).subscribe(subscriber); + } + catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, undefined, undefined, function () { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + }); + } + function timeoutErrorFactory(info) { + throw new TimeoutError(info); + } + + function map(project, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); + } + + var isArray = Array.isArray; + function callOrApply(fn, args) { + return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); + } + function mapOneOrManyArgs(fn) { + return map(function (args) { return callOrApply(fn, args); }); + } + + function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + .apply(this, args) + .pipe(mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc) + .apply(this, args) + .pipe(subscribeOn(scheduler), observeOn(scheduler)); + }; + } + return function () { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var subject = new AsyncSubject(); + var uninitialized = true; + return new Observable(function (subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ + function () { + var results = []; + for (var _i = 0; _i < arguments.length; _i++) { + results[_i] = arguments[_i]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + }, + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; + } + + function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); + } + + function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); + } + + var isArray$1 = Array.isArray; + var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; + function argsArgArrayOrObject(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray$1(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function (key) { return first_1[key]; }), + keys: keys, + }; + } + } + return { args: args, keys: null }; + } + function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; + } + + function createObject(keys, values) { + return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); + } + + function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var resultSelector = popResultSelector(args); + var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from([], scheduler); + } + var result = new Observable(combineLatestInit(observables, scheduler, keys + ? + function (values) { return createObject(keys, values); } + : + identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + } + function combineLatestInit(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { valueTransform = identity; } + return function (subscriber) { + maybeSchedule(scheduler, function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule(scheduler, function () { + var source = from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function () { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; + } + function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule(subscription, scheduler, execute); + } + else { + execute(); + } + } + + function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function () { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var doInnerSub = function (value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } + else { + subscriber.next(innerValue); + } + }, function () { + innerComplete = true; + }, undefined, function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); + } + else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } + catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + })); + return function () { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; + } + + function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction(resultSelector)) { + return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent); + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); }); + } + + function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return mergeMap(identity, concurrent); + } + + function concatAll() { + return mergeAll(1); + } + + function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return concatAll()(from(args, popScheduler(args))); + } + + function defer(observableFactory) { + return new Observable(function (subscriber) { + innerFrom(observableFactory()).subscribe(subscriber); + }); + } + + var DEFAULT_CONFIG = { + connector: function () { return new Subject(); }, + resetOnDisconnect: true, + }; + function connectable(source, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable(function (subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function () { + if (!connection || connection.closed) { + connection = defer(function () { return source; }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function () { return (subject = connector()); }); + } + } + return connection; + }; + return result; + } + + function forkJoin() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var result = new Observable(function (subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function (sourceIndex) { + var hasValue = false; + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, function () { return remainingCompletions--; }, undefined, function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; + } + + var nodeEventEmitterMethods = ['addListener', 'removeListener']; + var eventTargetMethods = ['addEventListener', 'removeEventListener']; + var jqueryMethods = ['on', 'off']; + function fromEvent(target, eventName, options, resultSelector) { + if (isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); + } + var _a = __read(isEventTarget(target) + ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) + : + isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike(target)) { + return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new Observable(function (subscriber) { + var handler = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add(handler); + return function () { return remove(handler); }; + }); + } + function toCommonHandlerRegistry(target, eventName) { + return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; + } + function isNodeStyleEventEmitter(target) { + return isFunction(target.addListener) && isFunction(target.removeListener); + } + function isJQueryStyleEventEmitter(target) { + return isFunction(target.on) && isFunction(target.off); + } + function isEventTarget(target) { + return isFunction(target.addEventListener) && isFunction(target.removeEventListener); + } + + function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); + } + return new Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; + }); + } + + function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler); + } + else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity; + scheduler = resultSelectorOrScheduler; + } + else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = initialState; + _a.label = 1; + case 1: + if (!(!condition || condition(state))) return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: return [2]; + } + }); + } + return defer((scheduler + ? + function () { return scheduleIterable(gen(), scheduler); } + : + gen)); + } + + function iif(condition, trueResult, falseResult) { + return defer(function () { return (condition() ? trueResult : falseResult); }); + } + + function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + if (scheduler === void 0) { scheduler = async; } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } + else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable(function (subscriber) { + var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } + else { + subscriber.complete(); + } + } + }, due); + }); + } + + function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = asyncScheduler; } + if (period < 0) { + period = 0; + } + return timer(period, period, scheduler); + } + + function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var concurrent = popNumber(args, Infinity); + var sources = args; + return !sources.length + ? + EMPTY + : sources.length === 1 + ? + innerFrom(sources[0]) + : + mergeAll(concurrent)(from(sources, scheduler)); + } + + var NEVER = new Observable(noop); + function never() { + return NEVER; + } + + var isArray$2 = Array.isArray; + function argsOrArgArray(args) { + return args.length === 1 && isArray$2(args[0]) ? args[0] : args; + } + + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray(sources); + return new Observable(function (subscriber) { + var sourceIndex = 0; + var subscribeNext = function () { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom(nextSources[sourceIndex++]); + } + catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } + else { + subscriber.complete(); + } + }; + subscribeNext(); + }); + } + + function pairs(obj, scheduler) { + return from(Object.entries(obj), scheduler); + } + + function not(pred, thisArg) { + return function (value, index) { return !pred.call(thisArg, value, index); }; + } + + function filter(predicate, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + }); + } + + function partition(source, predicate, thisArg) { + return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; + } + + function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray(sources); + return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); + } + function raceInit(sources) { + return function (subscriber) { + var subscriptions = []; + var _loop_1 = function (i) { + subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; + } + + function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return EMPTY; + } + var end = count + start; + return new Observable(scheduler + ? + function (subscriber) { + var n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } + else { + subscriber.complete(); + } + }); + } + : + function (subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); + } + + function using(resourceFactory, observableFactory) { + return new Observable(function (subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom(result) : EMPTY; + source.subscribe(subscriber); + return function () { + if (resource) { + resource.unsubscribe(); + } + }; + }); + } + + function zip() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + var sources = argsOrArgArray(args); + return sources.length + ? new Observable(function (subscriber) { + var buffers = sources.map(function () { return []; }); + var completed = sources.map(function () { return false; }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { + buffers[sourceIndex].push(value); + if (buffers.every(function (buffer) { return buffer.length; })) { + var result = buffers.map(function (buffer) { return buffer.shift(); }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); + if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { + subscriber.complete(); + } + } + }, function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) + : EMPTY; + } + + function audit(durationSelector) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function () { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); + } + }, function () { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); + } + + function auditTime(duration, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return audit(function () { return timer(duration, scheduler); }); + } + + function buffer(closingNotifier) { + return operate(function (source, subscriber) { + var currentBuffer = []; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop)); + return function () { + currentBuffer = null; + }; + }); + } + + function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { startBufferEvery = null; } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return operate(function (source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + if (toEmit) { + try { + for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + } + finally { if (e_2) throw e_2.error; } + } + } + }, function () { + var e_3, _a; + try { + for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + } + finally { if (e_3) throw e_3.error; } + } + subscriber.complete(); + }, undefined, function () { + buffers = null; + })); + }); + } + + function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return operate(function (source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function (record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function () { + if (bufferRecords) { + var subs = new Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer: buffer, + subs: subs, + }; + bufferRecords.push(record_1); + executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } + else { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, undefined, function () { return (bufferRecords = null); }); + source.subscribe(bufferTimeSubscriber); + }); + } + + function bufferToggle(openings, closingSelector) { + return operate(function (source, subscriber) { + var buffers = []; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription(); + var emitBuffer = function () { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); + } + + function bufferWhen(closingSelector) { + return operate(function (source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); + }; + openBuffer(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, undefined, function () { return (buffer = closingSubscriber = null); })); + }); + } + + function catchError(selector) { + return operate(function (source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + handledResult = innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); + } + + function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function (source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var i = index++; + state = hasState + ? + accumulator(state, value, i) + : + ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && + (function () { + hasState && subscriber.next(state); + subscriber.complete(); + }))); + }; + } + + function reduce(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + } + + var arrReducer = function (arr, value) { return (arr.push(value), arr); }; + function toArray() { + return operate(function (source, subscriber) { + reduce(arrReducer, [])(source).subscribe(subscriber); + }); + } + + function joinAllInternals(joinFn, project) { + return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity); + } + + function combineLatestAll(project) { + return joinAllInternals(combineLatest, project); + } + + var combineAll = combineLatestAll; + + function combineLatest$1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + return resultSelector + ? pipe(combineLatest$1.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) + : operate(function (source, subscriber) { + combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); + }); + } + + function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest$1.apply(void 0, __spreadArray([], __read(otherSources))); + } + + function concatMap(project, resultSelector) { + return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); + } + + function concatMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; }); + } + + function concat$1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + return operate(function (source, subscriber) { + concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); + } + + function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat$1.apply(void 0, __spreadArray([], __read(otherSources))); + } + + function fromSubscribable(subscribable) { + return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); + } + + var DEFAULT_CONFIG$1 = { + connector: function () { return new Subject(); }, + }; + function connect(selector, config) { + if (config === void 0) { config = DEFAULT_CONFIG$1; } + var connector = config.connector; + return operate(function (source, subscriber) { + var subject = connector(); + innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); + } + + function count(predicate) { + return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); + } + + function debounce(durationSelector) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); + innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = durationSubscriber = null; + })); + }); + } + + function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return operate(function (source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function () { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = activeTask = null; + })); + }); + } + + function defaultIfEmpty(defaultValue) { + return operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); + } + + function take(count) { + return count <= 0 + ? + function () { return EMPTY; } + : operate(function (source, subscriber) { + var seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); + } + + function ignoreElements() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, noop)); + }); + } + + function mapTo(value) { + return map(function () { return value; }); + } + + function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function (source) { + return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); }); + } + + function delay(due, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + var duration = timer(due, scheduler); + return delayWhen(function () { return duration; }); + } + + function dematerialize() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); + }); + } + + function distinct(keySelector, flushes) { + return operate(function (source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); + }); + } + + function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { keySelector = identity; } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return operate(function (source, subscriber) { + var previousKey; + var first = true; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); + } + function defaultCompare(a, b) { + return a === b; + } + + function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); + } + + function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + return operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + }); + } + function defaultErrorFactory() { + return new EmptyError(); + } + + function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); })); + }; + } + + function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); }; + } + + function every(predicate, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + + function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function (source) { + return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + }; + } + return operate(function (source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) { + if (!innerSub) { + innerSub = createOperatorSubscriber(subscriber, undefined, function () { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function () { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + + function exhaustAll() { + return exhaustMap(identity); + } + + var exhaust = exhaustAll; + + function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { concurrent = Infinity; } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return operate(function (source, subscriber) { + return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); + }); + } + + function finalize(callback) { + return operate(function (source, subscriber) { + try { + source.subscribe(subscriber); + } + finally { + subscriber.add(callback); + } + }); + } + + function find(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'value')); + } + function createFind(predicate, thisArg, emit) { + var findIndex = emit === 'index'; + return function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + })); + }; + } + + function findIndex(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'index')); + } + + function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + }; + } + + function groupBy(keySelector, elementOrOptions, duration, connector) { + return operate(function (source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === 'function') { + element = elementOrOptions; + } + else { + (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } + var groups = new Map(); + var notify = function (cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, (group_1 = connector ? connector() : new Subject())); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = createOperatorSubscriber(group_1, function () { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, undefined, undefined, function () { return groups.delete(key_1); }); + groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } + catch (err) { + handleError(err); + } + }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable(function (groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function () { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); + } + + function isEmpty() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function () { + subscriber.next(false); + subscriber.complete(); + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + + function takeLast(count) { + return count <= 0 + ? function () { return EMPTY; } + : operate(function (source, subscriber) { + var buffer = []; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function () { + var e_1, _a; + try { + for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }, undefined, function () { + buffer = null; + })); + }); + } + + function last$1(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + }; + } + + function materialize() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + subscriber.next(Notification.createNext(value)); + }, function () { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, function (err) { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + })); + }); + } + + function max(comparer) { + return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); + } + + var flatMap = mergeMap; + + function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction(resultSelector)) { + return mergeMap(function () { return innerObservable; }, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap(function () { return innerObservable; }, concurrent); + } + + function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return operate(function (source, subscriber) { + var state = seed; + return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { + state = value; + }, false, undefined, function () { return (state = null); }); + }); + } + + function merge$1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var concurrent = popNumber(args, Infinity); + args = argsOrArgArray(args); + return operate(function (source, subscriber) { + mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); + } + + function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge$1.apply(void 0, __spreadArray([], __read(otherSources))); + } + + function min(comparer) { + return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); + } + + function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; + if (isFunction(selector)) { + return connect(selector, { + connector: subjectFactory, + }); + } + return function (source) { return new ConnectableObservable(source, subjectFactory); }; + } + + function onErrorResumeNextWith() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray(sources); + return function (source) { return onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); }; + } + var onErrorResumeNext$1 = onErrorResumeNextWith; + + function pairwise() { + return operate(function (source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); + } + + function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map(function (x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } + else { + return undefined; + } + } + return currentProp; + }); + } + + function publish(selector) { + return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); }; + } + + function publishBehavior(initialValue) { + return function (source) { + var subject = new BehaviorSubject(initialValue); + return new ConnectableObservable(source, function () { return subject; }); + }; + } + + function publishLast() { + return function (source) { + var subject = new AsyncSubject(); + return new ConnectableObservable(source, function () { return subject; }); + }; + } + + function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; + } + + function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length + ? identity + : operate(function (source, subscriber) { + raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); + } + + function repeat(countOrConfig) { + var _a; + var count = Infinity; + var delay; + if (countOrConfig != null) { + if (typeof countOrConfig === 'object') { + (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); + } + else { + count = countOrConfig; + } + } + return count <= 0 + ? function () { return EMPTY; } + : operate(function (source, subscriber) { + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); + var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } + else { + syncUnsub = true; + } + } + else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); + } + + function repeatWhen(notifier) { + return operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var getCompletionSubject = function () { + if (!completions$) { + completions$ = new Subject(); + innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () { + if (innerSub) { + subscribeForRepeatWhen(); + } + else { + syncResub = true; + } + }, function () { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function () { + isMainComplete = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); + } + + function retry(configOrCount) { + if (configOrCount === void 0) { configOrCount = Infinity; } + var config; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } + else { + config = { + count: configOrCount, + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 + ? identity + : operate(function (source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, undefined, function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function () { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + resub_1(); + } + } + else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); + } + + function retryWhen(notifier) { + return operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function () { + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + if (!errors$) { + errors$ = new Subject(); + innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () { + return innerSub ? subscribeForRetryWhen() : (syncResub = true); + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); + } + + function sample(notifier) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + })); + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop)); + }); + } + + function sampleTime(period, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return sample(interval(period, scheduler)); + } + + function scan(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); + } + + function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + return operate(function (source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function (isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function (selfState, otherState) { + var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } + else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function () { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); + } + function createState() { + return { + buffer: [], + complete: false, + }; + } + + function share(options) { + if (options === void 0) { options = {}; } + var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function (wrapperSource) { + var connection; + var resetConnection; + var subject; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function () { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + var reset = function () { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function () { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return operate(function (source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + subscriber.add(function () { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && + refCount > 0) { + connection = new SafeSubscriber({ + next: function (value) { return dest.next(value); }, + error: function (err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function () { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; + } + function handleReset(reset, on) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + var onSubscriber = new SafeSubscriber({ + next: function () { + onSubscriber.unsubscribe(); + reset(); + }, + }); + return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); + } + + function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b, _c; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); + } + else { + bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); + } + return share({ + connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); + } + + function single(predicate) { + return operate(function (source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError('Too many matching values')); + hasValue = true; + singleValue = value; + } + }, function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } + else { + subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); + } + })); + }); + } + + function skip(count) { + return filter(function (_, index) { return count <= index; }); + } + + function skipLast(skipCount) { + return skipCount <= 0 + ? + identity + : operate(function (source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } + else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function () { + ring = null; + }; + }); + } + + function skipUntil(notifier) { + return operate(function (source, subscriber) { + var taking = false; + var skipSubscriber = createOperatorSubscriber(subscriber, function () { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop); + innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + }); + } + + function skipWhile(predicate) { + return operate(function (source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + }); + } + + function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = popScheduler(values); + return operate(function (source, subscriber) { + (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); + }); + } + + function switchMap(project, resultSelector) { + return operate(function (source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { + innerSubscriber = null; + checkComplete(); + }))); + }, function () { + isComplete = true; + checkComplete(); + })); + }); + } + + function switchAll() { + return switchMap(identity); + } + + function switchMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; }); + } + + function switchScan(accumulator, seed) { + return operate(function (source, subscriber) { + var state = seed; + switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); + return function () { + state = null; + }; + }); + } + + function takeUntil(notifier) { + return operate(function (source, subscriber) { + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); + !subscriber.closed && source.subscribe(subscriber); + }); + } + + function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { inclusive = false; } + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); + } + + function tap(observerOrNext, error, complete) { + var tapObserver = isFunction(observerOrNext) || error || complete + ? + { next: observerOrNext, error: error, complete: complete } + : observerOrNext; + return tapObserver + ? operate(function (source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); + subscriber.next(value); + }, function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + subscriber.complete(); + }, function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); + subscriber.error(err); + }, function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) + : + identity; + } + + function throttle(durationSelector, config) { + return operate(function (source, subscriber) { + var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function () { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function () { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function (value) { + return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + }; + var send = function () { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function () { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); + } + + function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + var duration$ = timer(duration, scheduler); + return throttle(function () { return duration$; }, config); + } + + function timeInterval(scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return operate(function (source, subscriber) { + var last = scheduler.now(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var now = scheduler.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); + } + var TimeInterval = (function () { + function TimeInterval(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval; + }()); + + function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; + if (isValidDate(due)) { + first = due; + } + else if (typeof due === 'number') { + each = due; + } + if (withObservable) { + _with = function () { return withObservable; }; + } + else { + throw new TypeError('No observable provided to switch to'); + } + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return timeout({ + first: first, + each: each, + scheduler: scheduler, + with: _with, + }); + } + + function timestamp(timestampProvider) { + if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; } + return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); + } + + function window(windowBoundaries) { + return operate(function (source, subscriber) { + var windowSubject = new Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function (err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, noop, errorHandler)); + return function () { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); + } + + function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { startWindowEvery = 0; } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return operate(function (source, subscriber) { + var windows = [new Subject()]; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + } + finally { if (e_1) throw e_1.error; } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function () { + windows = null; + })); + }); + } + + function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return operate(function (source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function (record) { + var window = record.window, subs = record.subs; + window.complete(); + subs.unsubscribe(); + arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function () { + if (windowRecords) { + var subs = new Subscription(); + subscriber.add(subs); + var window_1 = new Subject(); + var record_1 = { + window: window_1, + subs: subs, + seen: 0, + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } + else { + restartOnClose = true; + } + startWindow(); + var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var terminate = function (cb) { + loop(function (_a) { + var window = _a.window; + return cb(window); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + return function () { + windowRecords = null; + }; + }); + } + + function windowToggle(openings, closingSelector) { + return operate(function (source, subscriber) { + var windows = []; + var handleError = function (err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { + var window = new Subject(); + windows.push(window); + var closingSubscription = new Subscription(); + var closeWindow = function () { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } + catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); + } + + function windowWhen(closingSelector) { + return operate(function (source, subscriber) { + var window; + var closingSubscriber; + var handleError = function (err) { + window.error(err); + subscriber.error(err); + }; + var openWindow = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window === null || window === void 0 ? void 0 : window.complete(); + window = new Subject(); + subscriber.next(window.asObservable()); + var closingNotifier; + try { + closingNotifier = innerFrom(closingSelector()); + } + catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + openWindow(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { + window.complete(); + subscriber.complete(); + }, handleError, function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window = null; + })); + }); + } + + function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = popResultSelector(inputs); + return operate(function (source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function () { return false; }); + var ready = false; + var _loop_1 = function (i) { + innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && (hasValue = null); + } + }, noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); + } + })); + }); + } + + function zipAll(project) { + return joinAllInternals(zip, project); + } + + function zip$1() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return operate(function (source, subscriber) { + zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); + } + + function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip$1.apply(void 0, __spreadArray([], __read(otherInputs))); + } + + function partition$1(predicate, thisArg) { + return function (source) { + return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; + }; + } + + function race$1() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args)))); + } + + + + var _operators = /*#__PURE__*/Object.freeze({ + audit: audit, + auditTime: auditTime, + buffer: buffer, + bufferCount: bufferCount, + bufferTime: bufferTime, + bufferToggle: bufferToggle, + bufferWhen: bufferWhen, + catchError: catchError, + combineAll: combineAll, + combineLatestAll: combineLatestAll, + combineLatest: combineLatest$1, + combineLatestWith: combineLatestWith, + concat: concat$1, + concatAll: concatAll, + concatMap: concatMap, + concatMapTo: concatMapTo, + concatWith: concatWith, + connect: connect, + count: count, + debounce: debounce, + debounceTime: debounceTime, + defaultIfEmpty: defaultIfEmpty, + delay: delay, + delayWhen: delayWhen, + dematerialize: dematerialize, + distinct: distinct, + distinctUntilChanged: distinctUntilChanged, + distinctUntilKeyChanged: distinctUntilKeyChanged, + elementAt: elementAt, + endWith: endWith, + every: every, + exhaust: exhaust, + exhaustAll: exhaustAll, + exhaustMap: exhaustMap, + expand: expand, + filter: filter, + finalize: finalize, + find: find, + findIndex: findIndex, + first: first, + groupBy: groupBy, + ignoreElements: ignoreElements, + isEmpty: isEmpty, + last: last$1, + map: map, + mapTo: mapTo, + materialize: materialize, + max: max, + merge: merge$1, + mergeAll: mergeAll, + flatMap: flatMap, + mergeMap: mergeMap, + mergeMapTo: mergeMapTo, + mergeScan: mergeScan, + mergeWith: mergeWith, + min: min, + multicast: multicast, + observeOn: observeOn, + onErrorResumeNext: onErrorResumeNext$1, + pairwise: pairwise, + partition: partition$1, + pluck: pluck, + publish: publish, + publishBehavior: publishBehavior, + publishLast: publishLast, + publishReplay: publishReplay, + race: race$1, + raceWith: raceWith, + reduce: reduce, + repeat: repeat, + repeatWhen: repeatWhen, + retry: retry, + retryWhen: retryWhen, + refCount: refCount, + sample: sample, + sampleTime: sampleTime, + scan: scan, + sequenceEqual: sequenceEqual, + share: share, + shareReplay: shareReplay, + single: single, + skip: skip, + skipLast: skipLast, + skipUntil: skipUntil, + skipWhile: skipWhile, + startWith: startWith, + subscribeOn: subscribeOn, + switchAll: switchAll, + switchMap: switchMap, + switchMapTo: switchMapTo, + switchScan: switchScan, + take: take, + takeLast: takeLast, + takeUntil: takeUntil, + takeWhile: takeWhile, + tap: tap, + throttle: throttle, + throttleTime: throttleTime, + throwIfEmpty: throwIfEmpty, + timeInterval: timeInterval, + timeout: timeout, + timeoutWith: timeoutWith, + timestamp: timestamp, + toArray: toArray, + window: window, + windowCount: windowCount, + windowTime: windowTime, + windowToggle: windowToggle, + windowWhen: windowWhen, + withLatestFrom: withLatestFrom, + zip: zip$1, + zipAll: zipAll, + zipWith: zipWith + }); + + var SubscriptionLog = (function () { + function SubscriptionLog(subscribedFrame, unsubscribedFrame) { + if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } + this.subscribedFrame = subscribedFrame; + this.unsubscribedFrame = unsubscribedFrame; + } + return SubscriptionLog; + }()); + + var SubscriptionLoggable = (function () { + function SubscriptionLoggable() { + this.subscriptions = []; + } + SubscriptionLoggable.prototype.logSubscribedFrame = function () { + this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); + return this.subscriptions.length - 1; + }; + SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { + var subscriptionLogs = this.subscriptions; + var oldSubscriptionLog = subscriptionLogs[index]; + subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); + }; + return SubscriptionLoggable; + }()); + + function applyMixins(derivedCtor, baseCtors) { + for (var i = 0, len = baseCtors.length; i < len; i++) { + var baseCtor = baseCtors[i]; + var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); + for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { + var name_1 = propertyKeys[j]; + derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; + } + } + } + + var ColdObservable = (function (_super) { + __extends(ColdObservable, _super); + function ColdObservable(messages, scheduler) { + var _this = _super.call(this, function (subscriber) { + var observable = this; + var index = observable.logSubscribedFrame(); + var subscription = new Subscription(); + subscription.add(new Subscription(function () { + observable.logUnsubscribedFrame(index); + })); + observable.scheduleMessages(subscriber); + return subscription; + }) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + ColdObservable.prototype.scheduleMessages = function (subscriber) { + var messagesLength = this.messages.length; + for (var i = 0; i < messagesLength; i++) { + var message = this.messages[i]; + subscriber.add(this.scheduler.schedule(function (state) { + var _a = state, notification = _a.message.notification, destination = _a.subscriber; + observeNotification(notification, destination); + }, message.frame, { message: message, subscriber: subscriber })); + } + }; + return ColdObservable; + }(Observable)); + applyMixins(ColdObservable, [SubscriptionLoggable]); + + var HotObservable = (function (_super) { + __extends(HotObservable, _super); + function HotObservable(messages, scheduler) { + var _this = _super.call(this) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + HotObservable.prototype._subscribe = function (subscriber) { + var subject = this; + var index = subject.logSubscribedFrame(); + var subscription = new Subscription(); + subscription.add(new Subscription(function () { + subject.logUnsubscribedFrame(index); + })); + subscription.add(_super.prototype._subscribe.call(this, subscriber)); + return subscription; + }; + HotObservable.prototype.setup = function () { + var subject = this; + var messagesLength = subject.messages.length; + var _loop_1 = function (i) { + (function () { + var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; + subject.scheduler.schedule(function () { + observeNotification(notification, subject); + }, frame); + })(); + }; + for (var i = 0; i < messagesLength; i++) { + _loop_1(i); + } + }; + return HotObservable; + }(Subject)); + applyMixins(HotObservable, [SubscriptionLoggable]); + + var defaultMaxFrame = 750; + var TestScheduler = (function (_super) { + __extends(TestScheduler, _super); + function TestScheduler(assertDeepEqual) { + var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this; + _this.assertDeepEqual = assertDeepEqual; + _this.hotObservables = []; + _this.coldObservables = []; + _this.flushTests = []; + _this.runMode = false; + return _this; + } + TestScheduler.prototype.createTime = function (marbles) { + var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + if (indexOf === -1) { + throw new Error('marble diagram for time should have a completion marker "|"'); + } + return indexOf * TestScheduler.frameTimeFactor; + }; + TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + if (marbles.indexOf('^') !== -1) { + throw new Error('cold observable cannot have subscription offset "^"'); + } + if (marbles.indexOf('!') !== -1) { + throw new Error('cold observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var cold = new ColdObservable(messages, this); + this.coldObservables.push(cold); + return cold; + }; + TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + if (marbles.indexOf('!') !== -1) { + throw new Error('hot observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var subject = new HotObservable(messages, this); + this.hotObservables.push(subject); + return subject; + }; + TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + var _this = this; + var messages = []; + observable.subscribe({ + next: function (value) { + messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); + }, + error: function (error) { + messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); + }, + complete: function () { + messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); + }, + }); + return messages; + }; + TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + var _this = this; + if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + var actual = []; + var flushTest = { actual: actual, ready: false }; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); + var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; + var subscription; + this.schedule(function () { + subscription = observable.subscribe({ + next: function (x) { + var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + actual.push({ frame: _this.frame, notification: nextNotification(value) }); + }, + error: function (error) { + actual.push({ frame: _this.frame, notification: errorNotification(error) }); + }, + complete: function () { + actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + if (unsubscriptionFrame !== Infinity) { + this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + } + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marbles, values, errorValue) { + flushTest.ready = true; + flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + }, + toEqual: function (other) { + flushTest.ready = true; + flushTest.expected = []; + _this.schedule(function () { + subscription = other.subscribe({ + next: function (x) { + var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); + }, + error: function (error) { + flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); + }, + complete: function () { + flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + }, + }; + }; + TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + var flushTest = { actual: actualSubscriptionLogs, ready: false }; + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marblesOrMarblesArray) { + var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + flushTest.ready = true; + flushTest.expected = marblesArray + .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) + .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); + }, + }; + }; + TestScheduler.prototype.flush = function () { + var _this = this; + var hotObservables = this.hotObservables; + while (hotObservables.length > 0) { + hotObservables.shift().setup(); + } + _super.prototype.flush.call(this); + this.flushTests = this.flushTests.filter(function (test) { + if (test.ready) { + _this.assertDeepEqual(test.actual, test.expected); + return false; + } + return true; + }); + }; + TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { + var _this = this; + if (runMode === void 0) { runMode = false; } + if (typeof marbles !== 'string') { + return new SubscriptionLog(Infinity); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var groupStart = -1; + var subscriptionFrame = Infinity; + var unsubscriptionFrame = Infinity; + var frame = 0; + var _loop_1 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '^': + if (subscriptionFrame !== Infinity) { + throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + } + subscriptionFrame = groupStart > -1 ? groupStart : frame; + advanceFrameBy(1); + break; + case '!': + if (unsubscriptionFrame !== Infinity) { + throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + } + unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_1.frameTimeFactor); + break; + } + } + } + throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + } + frame = nextFrame; + out_i_1 = i; + }; + var this_1 = this, out_i_1; + for (var i = 0; i < len; i++) { + _loop_1(i); + i = out_i_1; + } + if (unsubscriptionFrame < 0) { + return new SubscriptionLog(subscriptionFrame); + } + else { + return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } + }; + TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { + var _this = this; + if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } + if (runMode === void 0) { runMode = false; } + if (marbles.indexOf('!') !== -1) { + throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var testMessages = []; + var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; + var getValue = typeof values !== 'object' + ? function (x) { return x; } + : function (x) { + if (materializeInnerObservables && values[x] instanceof ColdObservable) { + return values[x].messages; + } + return values[x]; + }; + var groupStart = -1; + var _loop_2 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var notification = void 0; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '|': + notification = COMPLETE_NOTIFICATION; + advanceFrameBy(1); + break; + case '^': + advanceFrameBy(1); + break; + case '#': + notification = errorNotification(errorValue || 'error'); + advanceFrameBy(1); + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_2.frameTimeFactor); + break; + } + } + } + notification = nextNotification(getValue(c)); + advanceFrameBy(1); + break; + } + if (notification) { + testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + } + frame = nextFrame; + out_i_2 = i; + }; + var this_2 = this, out_i_2; + for (var i = 0; i < len; i++) { + _loop_2(i); + i = out_i_2; + } + return testMessages; + }; + TestScheduler.prototype.createAnimator = function () { + var _this = this; + if (!this.runMode) { + throw new Error('animate() must only be used in run mode'); + } + var lastHandle = 0; + var map; + var delegate = { + requestAnimationFrame: function (callback) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + var handle = ++lastHandle; + map.set(handle, callback); + return handle; + }, + cancelAnimationFrame: function (handle) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + map.delete(handle); + }, + }; + var animate = function (marbles) { + var e_1, _a; + if (map) { + throw new Error('animate() must not be called more than once within run()'); + } + if (/[|#]/.test(marbles)) { + throw new Error('animate() must not complete or error'); + } + map = new Map(); + var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + try { + for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + var message = messages_1_1.value; + _this.schedule(function () { + var e_2, _a; + var now = _this.now(); + var callbacks = Array.from(map.values()); + map.clear(); + try { + for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + var callback = callbacks_1_1.value; + callback(now); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + } + finally { if (e_2) throw e_2.error; } + } + }, message.frame); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + return { animate: animate, delegate: delegate }; + }; + TestScheduler.prototype.createDelegates = function () { + var _this = this; + var lastHandle = 0; + var scheduleLookup = new Map(); + var run = function () { + var now = _this.now(); + var scheduledRecords = Array.from(scheduleLookup.values()); + var scheduledRecordsDue = scheduledRecords.filter(function (_a) { + var due = _a.due; + return due <= now; + }); + var dueImmediates = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'immediate'; + }); + if (dueImmediates.length > 0) { + var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + var dueIntervals = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'interval'; + }); + if (dueIntervals.length > 0) { + var firstDueInterval = dueIntervals[0]; + var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + firstDueInterval.due = now + duration; + firstDueInterval.subscription = _this.schedule(run, duration); + handler(); + return; + } + var dueTimeouts = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'timeout'; + }); + if (dueTimeouts.length > 0) { + var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + throw new Error('Expected a due immediate or interval'); + }; + var immediate = { + setImmediate: function (handler) { + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now(), + duration: 0, + handle: handle, + handler: handler, + subscription: _this.schedule(run, 0), + type: 'immediate', + }); + return handle; + }, + clearImmediate: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var interval = { + setInterval: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'interval', + }); + return handle; + }, + clearInterval: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var timeout = { + setTimeout: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'timeout', + }); + return handle; + }, + clearTimeout: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + return { immediate: immediate, interval: interval, timeout: timeout }; + }; + TestScheduler.prototype.run = function (callback) { + var prevFrameTimeFactor = TestScheduler.frameTimeFactor; + var prevMaxFrames = this.maxFrames; + TestScheduler.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = true; + var animator = this.createAnimator(); + var delegates = this.createDelegates(); + animationFrameProvider.delegate = animator.delegate; + dateTimestampProvider.delegate = this; + immediateProvider.delegate = delegates.immediate; + intervalProvider.delegate = delegates.interval; + timeoutProvider.delegate = delegates.timeout; + performanceTimestampProvider.delegate = this; + var helpers = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: animator.animate, + }; + try { + var ret = callback(helpers); + this.flush(); + return ret; + } + finally { + TestScheduler.frameTimeFactor = prevFrameTimeFactor; + this.maxFrames = prevMaxFrames; + this.runMode = false; + animationFrameProvider.delegate = undefined; + dateTimestampProvider.delegate = undefined; + immediateProvider.delegate = undefined; + intervalProvider.delegate = undefined; + timeoutProvider.delegate = undefined; + performanceTimestampProvider.delegate = undefined; + } + }; + TestScheduler.frameTimeFactor = 10; + return TestScheduler; + }(VirtualTimeScheduler)); + + + + var _testing = /*#__PURE__*/Object.freeze({ + TestScheduler: TestScheduler + }); + + function getXHRResponse(xhr) { + switch (xhr.responseType) { + case 'json': { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return JSON.parse(ieXHR.responseText); + } + } + case 'document': + return xhr.responseXML; + case 'text': + default: { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return ieXHR.responseText; + } + } + } + } + + var AjaxResponse = (function () { + function AjaxResponse(originalEvent, xhr, request, type) { + if (type === void 0) { type = 'download_load'; } + this.originalEvent = originalEvent; + this.xhr = xhr; + this.request = request; + this.type = type; + var status = xhr.status, responseType = xhr.responseType; + this.status = status !== null && status !== void 0 ? status : 0; + this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; + var allHeaders = xhr.getAllResponseHeaders(); + this.responseHeaders = allHeaders + ? + allHeaders.split('\n').reduce(function (headers, line) { + var index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) + : {}; + this.response = getXHRResponse(xhr); + var loaded = originalEvent.loaded, total = originalEvent.total; + this.loaded = loaded; + this.total = total; + } + return AjaxResponse; + }()); + + var AjaxError = createErrorClass(function (_super) { + return function AjaxErrorImpl(message, xhr, request) { + this.message = message; + this.name = 'AjaxError'; + this.xhr = xhr; + this.request = request; + this.status = xhr.status; + this.responseType = xhr.responseType; + var response; + try { + response = getXHRResponse(xhr); + } + catch (err) { + response = xhr.responseText; + } + this.response = response; + }; + }); + var AjaxTimeoutError = (function () { + function AjaxTimeoutErrorImpl(xhr, request) { + AjaxError.call(this, 'ajax timeout', xhr, request); + this.name = 'AjaxTimeoutError'; + return this; + } + AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); + return AjaxTimeoutErrorImpl; + })(); + + function ajaxGet(url, headers) { + return ajax({ method: 'GET', url: url, headers: headers }); + } + function ajaxPost(url, body, headers) { + return ajax({ method: 'POST', url: url, body: body, headers: headers }); + } + function ajaxDelete(url, headers) { + return ajax({ method: 'DELETE', url: url, headers: headers }); + } + function ajaxPut(url, body, headers) { + return ajax({ method: 'PUT', url: url, body: body, headers: headers }); + } + function ajaxPatch(url, body, headers) { + return ajax({ method: 'PATCH', url: url, body: body, headers: headers }); + } + var mapResponse = map(function (x) { return x.response; }); + function ajaxGetJSON(url, headers) { + return mapResponse(ajax({ + method: 'GET', + url: url, + headers: headers, + })); + } + var ajax = (function () { + var create = function (urlOrConfig) { + var config = typeof urlOrConfig === 'string' + ? { + url: urlOrConfig, + } + : urlOrConfig; + return fromAjax(config); + }; + create.get = ajaxGet; + create.post = ajaxPost; + create.delete = ajaxDelete; + create.put = ajaxPut; + create.patch = ajaxPatch; + create.getJSON = ajaxGetJSON; + return create; + })(); + var UPLOAD = 'upload'; + var DOWNLOAD = 'download'; + var LOADSTART = 'loadstart'; + var PROGRESS = 'progress'; + var LOAD = 'load'; + function fromAjax(init) { + return new Observable(function (destination) { + var _a, _b; + var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); + var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; + var url = config.url; + if (!url) { + throw new TypeError('url is required'); + } + if (queryParams) { + var searchParams_1; + if (url.includes('?')) { + var parts = url.split('?'); + if (2 < parts.length) { + throw new TypeError('invalid url'); + } + searchParams_1 = new URLSearchParams(parts[1]); + new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); + url = parts[0] + '?' + searchParams_1; + } + else { + searchParams_1 = new URLSearchParams(queryParams); + url = url + '?' + searchParams_1; + } + } + var headers = {}; + if (configuredHeaders) { + for (var key in configuredHeaders) { + if (configuredHeaders.hasOwnProperty(key)) { + headers[key.toLowerCase()] = configuredHeaders[key]; + } + } + } + var crossDomain = config.crossDomain; + if (!crossDomain && !('x-requested-with' in headers)) { + headers['x-requested-with'] = 'XMLHttpRequest'; + } + var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; + if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { + var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; + if (xsrfCookie) { + headers[xsrfHeaderName] = xsrfCookie; + } + } + var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); + var _request = __assign(__assign({}, config), { url: url, + headers: headers, + body: body }); + var xhr; + xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); + { + var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; + var addErrorEvent = function (type, errorFactory) { + xhr.addEventListener(type, function () { + var _a; + var error = errorFactory(); + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); + destination.error(error); + }); + }; + addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); }); + addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); }); + var createResponse_1 = function (direction, event) { + return new AjaxResponse(event, xhr, _request, direction + "_" + event.type); + }; + var addProgressEvent_1 = function (target, type, direction) { + target.addEventListener(type, function (event) { + destination.next(createResponse_1(direction, event)); + }); + }; + if (includeUploadProgress) { + [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); + } + if (progressSubscriber_1) { + [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); + } + if (includeDownloadProgress) { + [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); + } + var emitError_1 = function (status) { + var msg = 'ajax error' + (status ? ' ' + status : ''); + destination.error(new AjaxError(msg, xhr, _request)); + }; + xhr.addEventListener('error', function (e) { + var _a; + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); + emitError_1(); + }); + xhr.addEventListener(LOAD, function (event) { + var _a, _b; + var status = xhr.status; + if (status < 400) { + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); + var response = void 0; + try { + response = createResponse_1(DOWNLOAD, event); + } + catch (err) { + destination.error(err); + return; + } + destination.next(response); + destination.complete(); + } + else { + (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); + emitError_1(status); + } + }); + } + var user = _request.user, method = _request.method, async = _request.async; + if (user) { + xhr.open(method, url, async, user, _request.password); + } + else { + xhr.open(method, url, async); + } + if (async) { + xhr.timeout = _request.timeout; + xhr.responseType = _request.responseType; + } + if ('withCredentials' in xhr) { + xhr.withCredentials = _request.withCredentials; + } + for (var key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + if (body) { + xhr.send(body); + } + else { + xhr.send(); + } + return function () { + if (xhr && xhr.readyState !== 4) { + xhr.abort(); + } + }; + }); + } + function extractContentTypeAndMaybeSerializeBody(body, headers) { + var _a; + if (!body || + typeof body === 'string' || + isFormData(body) || + isURLSearchParams(body) || + isArrayBuffer(body) || + isFile(body) || + isBlob(body) || + isReadableStream(body)) { + return body; + } + if (isArrayBufferView(body)) { + return body.buffer; + } + if (typeof body === 'object') { + headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; + return JSON.stringify(body); + } + throw new TypeError('Unknown body type'); + } + var _toString = Object.prototype.toString; + function toStringCheck(obj, name) { + return _toString.call(obj) === "[object " + name + "]"; + } + function isArrayBuffer(body) { + return toStringCheck(body, 'ArrayBuffer'); + } + function isFile(body) { + return toStringCheck(body, 'File'); + } + function isBlob(body) { + return toStringCheck(body, 'Blob'); + } + function isArrayBufferView(body) { + return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); + } + function isFormData(body) { + return typeof FormData !== 'undefined' && body instanceof FormData; + } + function isURLSearchParams(body) { + return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; + } + function isReadableStream(body) { + return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; + } + + + + var _ajax = /*#__PURE__*/Object.freeze({ + ajax: ajax, + AjaxError: AjaxError, + AjaxTimeoutError: AjaxTimeoutError, + AjaxResponse: AjaxResponse + }); + + var DEFAULT_WEBSOCKET_CONFIG = { + url: '', + deserializer: function (e) { return JSON.parse(e.data); }, + serializer: function (value) { return JSON.stringify(value); }, + }; + var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; + var WebSocketSubject = (function (_super) { + __extends(WebSocketSubject, _super); + function WebSocketSubject(urlConfigOrSource, destination) { + var _this = _super.call(this) || this; + _this._socket = null; + if (urlConfigOrSource instanceof Observable) { + _this.destination = destination; + _this.source = urlConfigOrSource; + } + else { + var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + _this._output = new Subject(); + if (typeof urlConfigOrSource === 'string') { + config.url = urlConfigOrSource; + } + else { + for (var key in urlConfigOrSource) { + if (urlConfigOrSource.hasOwnProperty(key)) { + config[key] = urlConfigOrSource[key]; + } + } + } + if (!config.WebSocketCtor && WebSocket) { + config.WebSocketCtor = WebSocket; + } + else if (!config.WebSocketCtor) { + throw new Error('no WebSocket constructor can be found'); + } + _this.destination = new ReplaySubject(); + } + return _this; + } + WebSocketSubject.prototype.lift = function (operator) { + var sock = new WebSocketSubject(this._config, this.destination); + sock.operator = operator; + sock.source = this; + return sock; + }; + WebSocketSubject.prototype._resetState = function () { + this._socket = null; + if (!this.source) { + this.destination = new ReplaySubject(); + } + this._output = new Subject(); + }; + WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + var self = this; + return new Observable(function (observer) { + try { + self.next(subMsg()); + } + catch (err) { + observer.error(err); + } + var subscription = self.subscribe({ + next: function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } + catch (err) { + observer.error(err); + } + }, + error: function (err) { return observer.error(err); }, + complete: function () { return observer.complete(); }, + }); + return function () { + try { + self.next(unsubMsg()); + } + catch (err) { + observer.error(err); + } + subscription.unsubscribe(); + }; + }); + }; + WebSocketSubject.prototype._connectSocket = function () { + var _this = this; + var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var observer = this._output; + var socket = null; + try { + socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + this._socket = socket; + if (binaryType) { + this._socket.binaryType = binaryType; + } + } + catch (e) { + observer.error(e); + return; + } + var subscription = new Subscription(function () { + _this._socket = null; + if (socket && socket.readyState === 1) { + socket.close(); + } + }); + socket.onopen = function (evt) { + var _socket = _this._socket; + if (!_socket) { + socket.close(); + _this._resetState(); + return; + } + var openObserver = _this._config.openObserver; + if (openObserver) { + openObserver.next(evt); + } + var queue = _this.destination; + _this.destination = Subscriber.create(function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } + catch (e) { + _this.destination.error(e); + } + } + }, function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + if (err && err.code) { + socket.close(err.code, err.reason); + } + else { + observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); + } + _this._resetState(); + }, function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); + }); + if (queue && queue instanceof ReplaySubject) { + subscription.add(queue.subscribe(_this.destination)); + } + }; + socket.onerror = function (e) { + _this._resetState(); + observer.error(e); + }; + socket.onclose = function (e) { + if (socket === _this._socket) { + _this._resetState(); + } + var closeObserver = _this._config.closeObserver; + if (closeObserver) { + closeObserver.next(e); + } + if (e.wasClean) { + observer.complete(); + } + else { + observer.error(e); + } + }; + socket.onmessage = function (e) { + try { + var deserializer = _this._config.deserializer; + observer.next(deserializer(e)); + } + catch (err) { + observer.error(err); + } + }; + }; + WebSocketSubject.prototype._subscribe = function (subscriber) { + var _this = this; + var source = this.source; + if (source) { + return source.subscribe(subscriber); + } + if (!this._socket) { + this._connectSocket(); + } + this._output.subscribe(subscriber); + subscriber.add(function () { + var _socket = _this._socket; + if (_this._output.observers.length === 0) { + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + _this._resetState(); + } + }); + return subscriber; + }; + WebSocketSubject.prototype.unsubscribe = function () { + var _socket = this._socket; + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + _super.prototype.unsubscribe.call(this); + }; + return WebSocketSubject; + }(AnonymousSubject)); + + function webSocket(urlConfigOrSource) { + return new WebSocketSubject(urlConfigOrSource); + } + + + + var _webSocket = /*#__PURE__*/Object.freeze({ + webSocket: webSocket, + WebSocketSubject: WebSocketSubject + }); + + function fromFetch(input, initWithSelector) { + if (initWithSelector === void 0) { initWithSelector = {}; } + var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + return new Observable(function (subscriber) { + var controller = new AbortController(); + var signal = controller.signal; + var abortable = true; + var outerSignal = init.signal; + if (outerSignal) { + if (outerSignal.aborted) { + controller.abort(); + } + else { + var outerSignalHandler_1 = function () { + if (!signal.aborted) { + controller.abort(); + } + }; + outerSignal.addEventListener('abort', outerSignalHandler_1); + subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + } + } + var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var handleError = function (err) { + abortable = false; + subscriber.error(err); + }; + fetch(input, perSubscriberInit) + .then(function (response) { + if (selector) { + innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () { + abortable = false; + subscriber.complete(); + }, handleError)); + } + else { + abortable = false; + subscriber.next(response); + subscriber.complete(); + } + }) + .catch(handleError); + return function () { + if (abortable) { + controller.abort(); + } + }; + }); + } + + + + var _fetch = /*#__PURE__*/Object.freeze({ + fromFetch: fromFetch + }); + + var operators = _operators; + var testing = _testing; + var ajax$1 = _ajax; + var webSocket$1 = _webSocket; + var fetch$1 = _fetch; + + exports.operators = operators; + exports.testing = testing; + exports.ajax = ajax$1; + exports.webSocket = webSocket$1; + exports.fetch = fetch$1; + exports.Observable = Observable; + exports.ConnectableObservable = ConnectableObservable; + exports.observable = observable; + exports.animationFrames = animationFrames; + exports.Subject = Subject; + exports.BehaviorSubject = BehaviorSubject; + exports.ReplaySubject = ReplaySubject; + exports.AsyncSubject = AsyncSubject; + exports.asap = asap; + exports.asapScheduler = asapScheduler; + exports.async = async; + exports.asyncScheduler = asyncScheduler; + exports.queue = queue; + exports.queueScheduler = queueScheduler; + exports.animationFrame = animationFrame; + exports.animationFrameScheduler = animationFrameScheduler; + exports.VirtualTimeScheduler = VirtualTimeScheduler; + exports.VirtualAction = VirtualAction; + exports.Scheduler = Scheduler; + exports.Subscription = Subscription; + exports.Subscriber = Subscriber; + exports.Notification = Notification; + exports.pipe = pipe; + exports.noop = noop; + exports.identity = identity; + exports.isObservable = isObservable; + exports.lastValueFrom = lastValueFrom; + exports.firstValueFrom = firstValueFrom; + exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError; + exports.EmptyError = EmptyError; + exports.NotFoundError = NotFoundError; + exports.ObjectUnsubscribedError = ObjectUnsubscribedError; + exports.SequenceError = SequenceError; + exports.TimeoutError = TimeoutError; + exports.UnsubscriptionError = UnsubscriptionError; + exports.bindCallback = bindCallback; + exports.bindNodeCallback = bindNodeCallback; + exports.combineLatest = combineLatest; + exports.concat = concat; + exports.connectable = connectable; + exports.defer = defer; + exports.empty = empty; + exports.forkJoin = forkJoin; + exports.from = from; + exports.fromEvent = fromEvent; + exports.fromEventPattern = fromEventPattern; + exports.generate = generate; + exports.iif = iif; + exports.interval = interval; + exports.merge = merge; + exports.never = never; + exports.of = of; + exports.onErrorResumeNext = onErrorResumeNext; + exports.pairs = pairs; + exports.partition = partition; + exports.race = race; + exports.range = range; + exports.throwError = throwError; + exports.timer = timer; + exports.using = using; + exports.zip = zip; + exports.scheduled = scheduled; + exports.EMPTY = EMPTY; + exports.NEVER = NEVER; + exports.config = config; + exports.audit = audit; + exports.auditTime = auditTime; + exports.buffer = buffer; + exports.bufferCount = bufferCount; + exports.bufferTime = bufferTime; + exports.bufferToggle = bufferToggle; + exports.bufferWhen = bufferWhen; + exports.catchError = catchError; + exports.combineAll = combineAll; + exports.combineLatestAll = combineLatestAll; + exports.combineLatestWith = combineLatestWith; + exports.concatAll = concatAll; + exports.concatMap = concatMap; + exports.concatMapTo = concatMapTo; + exports.concatWith = concatWith; + exports.connect = connect; + exports.count = count; + exports.debounce = debounce; + exports.debounceTime = debounceTime; + exports.defaultIfEmpty = defaultIfEmpty; + exports.delay = delay; + exports.delayWhen = delayWhen; + exports.dematerialize = dematerialize; + exports.distinct = distinct; + exports.distinctUntilChanged = distinctUntilChanged; + exports.distinctUntilKeyChanged = distinctUntilKeyChanged; + exports.elementAt = elementAt; + exports.endWith = endWith; + exports.every = every; + exports.exhaust = exhaust; + exports.exhaustAll = exhaustAll; + exports.exhaustMap = exhaustMap; + exports.expand = expand; + exports.filter = filter; + exports.finalize = finalize; + exports.find = find; + exports.findIndex = findIndex; + exports.first = first; + exports.groupBy = groupBy; + exports.ignoreElements = ignoreElements; + exports.isEmpty = isEmpty; + exports.last = last$1; + exports.map = map; + exports.mapTo = mapTo; + exports.materialize = materialize; + exports.max = max; + exports.mergeAll = mergeAll; + exports.flatMap = flatMap; + exports.mergeMap = mergeMap; + exports.mergeMapTo = mergeMapTo; + exports.mergeScan = mergeScan; + exports.mergeWith = mergeWith; + exports.min = min; + exports.multicast = multicast; + exports.observeOn = observeOn; + exports.onErrorResumeNextWith = onErrorResumeNextWith; + exports.pairwise = pairwise; + exports.pluck = pluck; + exports.publish = publish; + exports.publishBehavior = publishBehavior; + exports.publishLast = publishLast; + exports.publishReplay = publishReplay; + exports.raceWith = raceWith; + exports.reduce = reduce; + exports.repeat = repeat; + exports.repeatWhen = repeatWhen; + exports.retry = retry; + exports.retryWhen = retryWhen; + exports.refCount = refCount; + exports.sample = sample; + exports.sampleTime = sampleTime; + exports.scan = scan; + exports.sequenceEqual = sequenceEqual; + exports.share = share; + exports.shareReplay = shareReplay; + exports.single = single; + exports.skip = skip; + exports.skipLast = skipLast; + exports.skipUntil = skipUntil; + exports.skipWhile = skipWhile; + exports.startWith = startWith; + exports.subscribeOn = subscribeOn; + exports.switchAll = switchAll; + exports.switchMap = switchMap; + exports.switchMapTo = switchMapTo; + exports.switchScan = switchScan; + exports.take = take; + exports.takeLast = takeLast; + exports.takeUntil = takeUntil; + exports.takeWhile = takeWhile; + exports.tap = tap; + exports.throttle = throttle; + exports.throttleTime = throttleTime; + exports.throwIfEmpty = throwIfEmpty; + exports.timeInterval = timeInterval; + exports.timeout = timeout; + exports.timeoutWith = timeoutWith; + exports.timestamp = timestamp; + exports.toArray = toArray; + exports.window = window; + exports.windowCount = windowCount; + exports.windowTime = windowTime; + exports.windowToggle = windowToggle; + exports.windowWhen = windowWhen; + exports.withLatestFrom = withLatestFrom; + exports.zipAll = zipAll; + exports.zipWith = zipWith; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +//# sourceMappingURL=rxjs.umd.js.map + diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.js.map b/node_modules/rxjs/dist/bundles/rxjs.umd.js.map new file mode 100644 index 0000000..ff1dfef --- /dev/null +++ b/node_modules/rxjs/dist/bundles/rxjs.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"umd.js","sources":["../cjs/tslib/tslib.es6.js","../cjs/dist/esm5_for_rollup/internal/util/isFunction.js","../cjs/dist/esm5_for_rollup/internal/util/createErrorClass.js","../cjs/dist/esm5_for_rollup/internal/util/UnsubscriptionError.js","../cjs/dist/esm5_for_rollup/internal/util/arrRemove.js","../cjs/dist/esm5_for_rollup/internal/Subscription.js","../cjs/dist/esm5_for_rollup/internal/config.js","../cjs/dist/esm5_for_rollup/internal/scheduler/timeoutProvider.js","../cjs/dist/esm5_for_rollup/internal/util/reportUnhandledError.js","../cjs/dist/esm5_for_rollup/internal/util/noop.js","../cjs/dist/esm5_for_rollup/internal/NotificationFactories.js","../cjs/dist/esm5_for_rollup/internal/util/errorContext.js","../cjs/dist/esm5_for_rollup/internal/Subscriber.js","../cjs/dist/esm5_for_rollup/internal/symbol/observable.js","../cjs/dist/esm5_for_rollup/internal/util/identity.js","../cjs/dist/esm5_for_rollup/internal/util/pipe.js","../cjs/dist/esm5_for_rollup/internal/Observable.js","../cjs/dist/esm5_for_rollup/internal/util/lift.js","../cjs/dist/esm5_for_rollup/internal/operators/OperatorSubscriber.js","../cjs/dist/esm5_for_rollup/internal/operators/refCount.js","../cjs/dist/esm5_for_rollup/internal/observable/ConnectableObservable.js","../cjs/dist/esm5_for_rollup/internal/scheduler/performanceTimestampProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/animationFrameProvider.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/animationFrames.js","../cjs/dist/esm5_for_rollup/internal/util/ObjectUnsubscribedError.js","../cjs/dist/esm5_for_rollup/internal/Subject.js","../cjs/dist/esm5_for_rollup/internal/BehaviorSubject.js","../cjs/dist/esm5_for_rollup/internal/scheduler/dateTimestampProvider.js","../cjs/dist/esm5_for_rollup/internal/ReplaySubject.js","../cjs/dist/esm5_for_rollup/internal/AsyncSubject.js","../cjs/dist/esm5_for_rollup/internal/scheduler/Action.js","../cjs/dist/esm5_for_rollup/internal/scheduler/intervalProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsyncAction.js","../cjs/dist/esm5_for_rollup/internal/util/Immediate.js","../cjs/dist/esm5_for_rollup/internal/scheduler/immediateProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsapAction.js","../cjs/dist/esm5_for_rollup/internal/Scheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsyncScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsapScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/asap.js","../cjs/dist/esm5_for_rollup/internal/scheduler/async.js","../cjs/dist/esm5_for_rollup/internal/scheduler/QueueAction.js","../cjs/dist/esm5_for_rollup/internal/scheduler/QueueScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/queue.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AnimationFrameAction.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AnimationFrameScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/animationFrame.js","../cjs/dist/esm5_for_rollup/internal/scheduler/VirtualTimeScheduler.js","../cjs/dist/esm5_for_rollup/internal/observable/empty.js","../cjs/dist/esm5_for_rollup/internal/util/isScheduler.js","../cjs/dist/esm5_for_rollup/internal/util/args.js","../cjs/dist/esm5_for_rollup/internal/util/isArrayLike.js","../cjs/dist/esm5_for_rollup/internal/util/isPromise.js","../cjs/dist/esm5_for_rollup/internal/util/isInteropObservable.js","../cjs/dist/esm5_for_rollup/internal/util/isAsyncIterable.js","../cjs/dist/esm5_for_rollup/internal/util/throwUnobservableError.js","../cjs/dist/esm5_for_rollup/internal/symbol/iterator.js","../cjs/dist/esm5_for_rollup/internal/util/isIterable.js","../cjs/dist/esm5_for_rollup/internal/util/isReadableStreamLike.js","../cjs/dist/esm5_for_rollup/internal/observable/innerFrom.js","../cjs/dist/esm5_for_rollup/internal/util/executeSchedule.js","../cjs/dist/esm5_for_rollup/internal/operators/observeOn.js","../cjs/dist/esm5_for_rollup/internal/operators/subscribeOn.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleObservable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/schedulePromise.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleArray.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleIterable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleAsyncIterable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleReadableStreamLike.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduled.js","../cjs/dist/esm5_for_rollup/internal/observable/from.js","../cjs/dist/esm5_for_rollup/internal/observable/of.js","../cjs/dist/esm5_for_rollup/internal/observable/throwError.js","../cjs/dist/esm5_for_rollup/internal/Notification.js","../cjs/dist/esm5_for_rollup/internal/util/isObservable.js","../cjs/dist/esm5_for_rollup/internal/util/EmptyError.js","../cjs/dist/esm5_for_rollup/internal/lastValueFrom.js","../cjs/dist/esm5_for_rollup/internal/firstValueFrom.js","../cjs/dist/esm5_for_rollup/internal/util/ArgumentOutOfRangeError.js","../cjs/dist/esm5_for_rollup/internal/util/NotFoundError.js","../cjs/dist/esm5_for_rollup/internal/util/SequenceError.js","../cjs/dist/esm5_for_rollup/internal/util/isDate.js","../cjs/dist/esm5_for_rollup/internal/operators/timeout.js","../cjs/dist/esm5_for_rollup/internal/operators/map.js","../cjs/dist/esm5_for_rollup/internal/util/mapOneOrManyArgs.js","../cjs/dist/esm5_for_rollup/internal/observable/bindCallbackInternals.js","../cjs/dist/esm5_for_rollup/internal/observable/bindCallback.js","../cjs/dist/esm5_for_rollup/internal/observable/bindNodeCallback.js","../cjs/dist/esm5_for_rollup/internal/util/argsArgArrayOrObject.js","../cjs/dist/esm5_for_rollup/internal/util/createObject.js","../cjs/dist/esm5_for_rollup/internal/observable/combineLatest.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeMap.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeAll.js","../cjs/dist/esm5_for_rollup/internal/operators/concatAll.js","../cjs/dist/esm5_for_rollup/internal/observable/concat.js","../cjs/dist/esm5_for_rollup/internal/observable/defer.js","../cjs/dist/esm5_for_rollup/internal/observable/connectable.js","../cjs/dist/esm5_for_rollup/internal/observable/forkJoin.js","../cjs/dist/esm5_for_rollup/internal/observable/fromEvent.js","../cjs/dist/esm5_for_rollup/internal/observable/fromEventPattern.js","../cjs/dist/esm5_for_rollup/internal/observable/generate.js","../cjs/dist/esm5_for_rollup/internal/observable/iif.js","../cjs/dist/esm5_for_rollup/internal/observable/timer.js","../cjs/dist/esm5_for_rollup/internal/observable/interval.js","../cjs/dist/esm5_for_rollup/internal/observable/merge.js","../cjs/dist/esm5_for_rollup/internal/observable/never.js","../cjs/dist/esm5_for_rollup/internal/util/argsOrArgArray.js","../cjs/dist/esm5_for_rollup/internal/observable/onErrorResumeNext.js","../cjs/dist/esm5_for_rollup/internal/observable/pairs.js","../cjs/dist/esm5_for_rollup/internal/util/not.js","../cjs/dist/esm5_for_rollup/internal/operators/filter.js","../cjs/dist/esm5_for_rollup/internal/observable/partition.js","../cjs/dist/esm5_for_rollup/internal/observable/race.js","../cjs/dist/esm5_for_rollup/internal/observable/range.js","../cjs/dist/esm5_for_rollup/internal/observable/using.js","../cjs/dist/esm5_for_rollup/internal/observable/zip.js","../cjs/dist/esm5_for_rollup/internal/operators/audit.js","../cjs/dist/esm5_for_rollup/internal/operators/auditTime.js","../cjs/dist/esm5_for_rollup/internal/operators/buffer.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferCount.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferTime.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferToggle.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/catchError.js","../cjs/dist/esm5_for_rollup/internal/operators/scanInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/reduce.js","../cjs/dist/esm5_for_rollup/internal/operators/toArray.js","../cjs/dist/esm5_for_rollup/internal/operators/joinAllInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatestAll.js","../cjs/dist/esm5_for_rollup/internal/operators/combineAll.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatest.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatestWith.js","../cjs/dist/esm5_for_rollup/internal/operators/concatMap.js","../cjs/dist/esm5_for_rollup/internal/operators/concatMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/concat.js","../cjs/dist/esm5_for_rollup/internal/operators/concatWith.js","../cjs/dist/esm5_for_rollup/internal/observable/fromSubscribable.js","../cjs/dist/esm5_for_rollup/internal/operators/connect.js","../cjs/dist/esm5_for_rollup/internal/operators/count.js","../cjs/dist/esm5_for_rollup/internal/operators/debounce.js","../cjs/dist/esm5_for_rollup/internal/operators/debounceTime.js","../cjs/dist/esm5_for_rollup/internal/operators/defaultIfEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/take.js","../cjs/dist/esm5_for_rollup/internal/operators/ignoreElements.js","../cjs/dist/esm5_for_rollup/internal/operators/mapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/delayWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/delay.js","../cjs/dist/esm5_for_rollup/internal/operators/dematerialize.js","../cjs/dist/esm5_for_rollup/internal/operators/distinct.js","../cjs/dist/esm5_for_rollup/internal/operators/distinctUntilChanged.js","../cjs/dist/esm5_for_rollup/internal/operators/distinctUntilKeyChanged.js","../cjs/dist/esm5_for_rollup/internal/operators/throwIfEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/elementAt.js","../cjs/dist/esm5_for_rollup/internal/operators/endWith.js","../cjs/dist/esm5_for_rollup/internal/operators/every.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaustMap.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaustAll.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaust.js","../cjs/dist/esm5_for_rollup/internal/operators/expand.js","../cjs/dist/esm5_for_rollup/internal/operators/finalize.js","../cjs/dist/esm5_for_rollup/internal/operators/find.js","../cjs/dist/esm5_for_rollup/internal/operators/findIndex.js","../cjs/dist/esm5_for_rollup/internal/operators/first.js","../cjs/dist/esm5_for_rollup/internal/operators/groupBy.js","../cjs/dist/esm5_for_rollup/internal/operators/isEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/takeLast.js","../cjs/dist/esm5_for_rollup/internal/operators/last.js","../cjs/dist/esm5_for_rollup/internal/operators/materialize.js","../cjs/dist/esm5_for_rollup/internal/operators/max.js","../cjs/dist/esm5_for_rollup/internal/operators/flatMap.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeScan.js","../cjs/dist/esm5_for_rollup/internal/operators/merge.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeWith.js","../cjs/dist/esm5_for_rollup/internal/operators/min.js","../cjs/dist/esm5_for_rollup/internal/operators/multicast.js","../cjs/dist/esm5_for_rollup/internal/operators/onErrorResumeNextWith.js","../cjs/dist/esm5_for_rollup/internal/operators/pairwise.js","../cjs/dist/esm5_for_rollup/internal/operators/pluck.js","../cjs/dist/esm5_for_rollup/internal/operators/publish.js","../cjs/dist/esm5_for_rollup/internal/operators/publishBehavior.js","../cjs/dist/esm5_for_rollup/internal/operators/publishLast.js","../cjs/dist/esm5_for_rollup/internal/operators/publishReplay.js","../cjs/dist/esm5_for_rollup/internal/operators/raceWith.js","../cjs/dist/esm5_for_rollup/internal/operators/repeat.js","../cjs/dist/esm5_for_rollup/internal/operators/repeatWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/retry.js","../cjs/dist/esm5_for_rollup/internal/operators/retryWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/sample.js","../cjs/dist/esm5_for_rollup/internal/operators/sampleTime.js","../cjs/dist/esm5_for_rollup/internal/operators/scan.js","../cjs/dist/esm5_for_rollup/internal/operators/sequenceEqual.js","../cjs/dist/esm5_for_rollup/internal/operators/share.js","../cjs/dist/esm5_for_rollup/internal/operators/shareReplay.js","../cjs/dist/esm5_for_rollup/internal/operators/single.js","../cjs/dist/esm5_for_rollup/internal/operators/skip.js","../cjs/dist/esm5_for_rollup/internal/operators/skipLast.js","../cjs/dist/esm5_for_rollup/internal/operators/skipUntil.js","../cjs/dist/esm5_for_rollup/internal/operators/skipWhile.js","../cjs/dist/esm5_for_rollup/internal/operators/startWith.js","../cjs/dist/esm5_for_rollup/internal/operators/switchMap.js","../cjs/dist/esm5_for_rollup/internal/operators/switchAll.js","../cjs/dist/esm5_for_rollup/internal/operators/switchMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/switchScan.js","../cjs/dist/esm5_for_rollup/internal/operators/takeUntil.js","../cjs/dist/esm5_for_rollup/internal/operators/takeWhile.js","../cjs/dist/esm5_for_rollup/internal/operators/tap.js","../cjs/dist/esm5_for_rollup/internal/operators/throttle.js","../cjs/dist/esm5_for_rollup/internal/operators/throttleTime.js","../cjs/dist/esm5_for_rollup/internal/operators/timeInterval.js","../cjs/dist/esm5_for_rollup/internal/operators/timeoutWith.js","../cjs/dist/esm5_for_rollup/internal/operators/timestamp.js","../cjs/dist/esm5_for_rollup/internal/operators/window.js","../cjs/dist/esm5_for_rollup/internal/operators/windowCount.js","../cjs/dist/esm5_for_rollup/internal/operators/windowTime.js","../cjs/dist/esm5_for_rollup/internal/operators/windowToggle.js","../cjs/dist/esm5_for_rollup/internal/operators/windowWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/withLatestFrom.js","../cjs/dist/esm5_for_rollup/internal/operators/zipAll.js","../cjs/dist/esm5_for_rollup/internal/operators/zip.js","../cjs/dist/esm5_for_rollup/internal/operators/zipWith.js","../cjs/dist/esm5_for_rollup/internal/operators/partition.js","../cjs/dist/esm5_for_rollup/internal/operators/race.js","../cjs/dist/esm5_for_rollup/internal/testing/SubscriptionLog.js","../cjs/dist/esm5_for_rollup/internal/testing/SubscriptionLoggable.js","../cjs/dist/esm5_for_rollup/internal/util/applyMixins.js","../cjs/dist/esm5_for_rollup/internal/testing/ColdObservable.js","../cjs/dist/esm5_for_rollup/internal/testing/HotObservable.js","../cjs/dist/esm5_for_rollup/internal/testing/TestScheduler.js","../cjs/dist/esm5_for_rollup/internal/ajax/getXHRResponse.js","../cjs/dist/esm5_for_rollup/internal/ajax/AjaxResponse.js","../cjs/dist/esm5_for_rollup/internal/ajax/errors.js","../cjs/dist/esm5_for_rollup/internal/ajax/ajax.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/WebSocketSubject.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/webSocket.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/fetch.js","../cjs/dist/esm5_for_rollup/internal/umd.js"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind: kind,\n value: value,\n error: error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate(function (source, subscriber) {\n var connection = null;\n source._refCount++;\n var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n var sharedConnection = source._connection;\n var conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n//# sourceMappingURL=refCount.js.map","import { __extends } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nvar ConnectableObservable = (function (_super) {\n __extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._subject = null;\n _this._refCount = 0;\n _this._connection = null;\n if (hasLift(source)) {\n _this.lift = source.lift;\n }\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype._teardown = function () {\n this._refCount = 0;\n var _connection = this._connection;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n };\n ConnectableObservable.prototype.connect = function () {\n var _this = this;\n var connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n var subject_1 = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () {\n _this._teardown();\n subject_1.complete();\n }, function (err) {\n _this._teardown();\n subject_1.error(err);\n }, function () { return _this._teardown(); })));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\n//# sourceMappingURL=ConnectableObservable.js.map","export var performanceTimestampProvider = {\n now: function () {\n return (performanceTimestampProvider.delegate || performance).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=performanceTimestampProvider.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Subscription } from '../Subscription';\nexport var animationFrameProvider = {\n schedule: function (callback) {\n var request = requestAnimationFrame;\n var cancel = cancelAnimationFrame;\n var delegate = animationFrameProvider.delegate;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n var handle = request(function (timestamp) {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); });\n },\n requestAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n cancelAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n delegate: undefined,\n};\n//# sourceMappingURL=animationFrameProvider.js.map","import { Observable } from '../../Observable';\nimport { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../../scheduler/animationFrameProvider';\nexport function animationFrames(timestampProvider) {\n return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;\n}\nfunction animationFramesFactory(timestampProvider) {\n return new Observable(function (subscriber) {\n var provider = timestampProvider || performanceTimestampProvider;\n var start = provider.now();\n var id = 0;\n var run = function () {\n if (!subscriber.closed) {\n id = animationFrameProvider.requestAnimationFrame(function (timestamp) {\n id = 0;\n var now = provider.now();\n subscriber.next({\n timestamp: timestampProvider ? now : timestamp,\n elapsed: now - start,\n });\n run();\n });\n }\n };\n run();\n return function () {\n if (id) {\n animationFrameProvider.cancelAnimationFrame(id);\n }\n };\n });\n}\nvar DEFAULT_ANIMATION_FRAMES = animationFramesFactory();\n//# sourceMappingURL=animationFrames.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n if (_bufferSize === void 0) { _bufferSize = Infinity; }\n if (_windowTime === void 0) { _windowTime = Infinity; }\n if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n var _this = _super.call(this) || this;\n _this._bufferSize = _bufferSize;\n _this._windowTime = _windowTime;\n _this._timestampProvider = _timestampProvider;\n _this._buffer = [];\n _this._infiniteTimeWindow = true;\n _this._infiniteTimeWindow = _windowTime === Infinity;\n _this._bufferSize = Math.max(1, _bufferSize);\n _this._windowTime = Math.max(1, _windowTime);\n return _this;\n }\n ReplaySubject.prototype.next = function (value) {\n var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n var subscription = this._innerSubscribe(subscriber);\n var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n var copy = _buffer.slice();\n for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n };\n ReplaySubject.prototype._trimBuffer = function () {\n var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n var now = _timestampProvider.now();\n var last = 0;\n for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar AsyncSubject = (function (_super) {\n __extends(AsyncSubject, _super);\n function AsyncSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._value = null;\n _this._hasValue = false;\n _this._isComplete = false;\n return _this;\n }\n AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped || _isComplete) {\n _hasValue && subscriber.next(_value);\n subscriber.complete();\n }\n };\n AsyncSubject.prototype.next = function (value) {\n if (!this.isStopped) {\n this._value = value;\n this._hasValue = true;\n }\n };\n AsyncSubject.prototype.complete = function () {\n var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;\n if (!_isComplete) {\n this._isComplete = true;\n _hasValue && _super.prototype.next.call(this, _value);\n _super.prototype.complete.call(this);\n }\n };\n return AsyncSubject;\n}(Subject));\nexport { AsyncSubject };\n//# sourceMappingURL=AsyncSubject.js.map","import { __extends } from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var intervalProvider = {\n setInterval: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = intervalProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearInterval: function (handle) {\n var delegate = intervalProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { __extends } from \"tslib\";\nimport { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {\n if (delay === void 0) { delay = 0; }\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, _delay) {\n var errored = false;\n var errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype.unsubscribe = function () {\n if (!this.closed) {\n var _a = this, id = _a.id, scheduler = _a.scheduler;\n var actions = scheduler.actions;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n _super.prototype.unsubscribe.call(this);\n }\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map","var nextHandle = 1;\nvar resolved;\nvar activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport var Immediate = {\n setImmediate: function (cb) {\n var handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(function () { return findAndClearHandle(handle) && cb(); });\n return handle;\n },\n clearImmediate: function (handle) {\n findAndClearHandle(handle);\n },\n};\nexport var TestTools = {\n pending: function () {\n return Object.keys(activeHandles).length;\n }\n};\n//# sourceMappingURL=Immediate.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Immediate } from '../util/Immediate';\nvar setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;\nexport var immediateProvider = {\n setImmediate: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));\n },\n clearImmediate: function (handle) {\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=immediateProvider.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nvar AsapAction = (function (_super) {\n __extends(AsapAction, _super);\n function AsapAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n };\n AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n return undefined;\n };\n return AsapAction;\n}(AsyncAction));\nexport { AsapAction };\n//# sourceMappingURL=AsapAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar Scheduler = (function () {\n function Scheduler(schedulerActionCtor, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n };\n Scheduler.now = dateTimestampProvider.now;\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map","import { __extends } from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n var _this = _super.call(this, SchedulerAction, now) || this;\n _this.actions = [];\n _this._active = false;\n return _this;\n }\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this._active) {\n actions.push(action);\n return;\n }\n var error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AsapScheduler = (function (_super) {\n __extends(AsapScheduler, _super);\n function AsapScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AsapScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId = this._scheduled;\n this._scheduled = undefined;\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsapScheduler;\n}(AsyncScheduler));\nexport { AsapScheduler };\n//# sourceMappingURL=AsapScheduler.js.map","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport var asapScheduler = new AsapScheduler(AsapAction);\nexport var asap = asapScheduler;\n//# sourceMappingURL=asap.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = (function (_super) {\n __extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.flush(this);\n return 0;\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = (function (_super) {\n __extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queueScheduler = new QueueScheduler(QueueAction);\nexport var queue = queueScheduler;\n//# sourceMappingURL=queue.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nvar AnimationFrameAction = (function (_super) {\n __extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = (function (_super) {\n __extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId = this._scheduled;\n this._scheduled = undefined;\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport var animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = (function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {\n if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; }\n if (maxFrames === void 0) { maxFrames = Infinity; }\n var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error;\n var action;\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n }\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\nvar VirtualAction = (function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) { index = (scheduler.index += 1); }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return 1;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return -1;\n }\n }\n else if (a.delay > b.delay) {\n return 1;\n }\n else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };\n var init = function (subscriber) { return subscriber.error(errorFactory()); };\n return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);\n}\n//# sourceMappingURL=throwError.js.map","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind;\n(function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n return observeNotification(this, observer);\n };\n Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n var _a;\n return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n ? this.observe(nextOrObserver)\n : this.do(nextOrObserver, error, complete);\n };\n Notification.prototype.toObservable = function () {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n var result = kind === 'N'\n ?\n of(value)\n :\n kind === 'E'\n ?\n throwError(function () { return error; })\n :\n kind === 'C'\n ?\n EMPTY\n :\n 0;\n if (!result) {\n throw new TypeError(\"Unexpected notification kind \" + kind);\n }\n return result;\n };\n Notification.createNext = function (value) {\n return new Notification('N', value);\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n return Notification;\n}());\nexport { Notification };\nexport function observeNotification(notification, observer) {\n var _a, _b, _c;\n var _d = notification, kind = _d.kind, value = _d.value, error = _d.error;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n//# sourceMappingURL=Notification.js.map","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n//# sourceMappingURL=isObservable.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n}; });\n//# sourceMappingURL=EmptyError.js.map","import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var _hasValue = false;\n var _value;\n source.subscribe({\n next: function (value) {\n _value = value;\n _hasValue = true;\n },\n error: reject,\n complete: function () {\n if (_hasValue) {\n resolve(_value);\n }\n else if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n });\n}\n//# sourceMappingURL=lastValueFrom.js.map","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: function () {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=firstValueFrom.js.map","import { createErrorClass } from './createErrorClass';\nexport var ArgumentOutOfRangeError = createErrorClass(function (_super) {\n return function ArgumentOutOfRangeErrorImpl() {\n _super(this);\n this.name = 'ArgumentOutOfRangeError';\n this.message = 'argument out of range';\n };\n});\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map","import { createErrorClass } from './createErrorClass';\nexport var NotFoundError = createErrorClass(function (_super) {\n return function NotFoundErrorImpl(message) {\n _super(this);\n this.name = 'NotFoundError';\n this.message = message;\n };\n});\n//# sourceMappingURL=NotFoundError.js.map","import { createErrorClass } from './createErrorClass';\nexport var SequenceError = createErrorClass(function (_super) {\n return function SequenceErrorImpl(message) {\n _super(this);\n this.name = 'SequenceError';\n this.message = message;\n };\n});\n//# sourceMappingURL=SequenceError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport var TimeoutError = createErrorClass(function (_super) {\n return function TimeoutErrorImpl(info) {\n if (info === void 0) { info = null; }\n _super(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n this.info = info;\n };\n});\nexport function timeout(config, schedulerArg) {\n var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d;\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return operate(function (source, subscriber) {\n var originalSourceSubscription;\n var timerSubscription;\n var lastValue = null;\n var seen = 0;\n var startTimer = function (delay) {\n timerSubscription = executeSchedule(subscriber, scheduler, function () {\n try {\n originalSourceSubscription.unsubscribe();\n innerFrom(_with({\n meta: meta,\n lastValue: lastValue,\n seen: seen,\n })).subscribe(subscriber);\n }\n catch (err) {\n subscriber.error(err);\n }\n }, delay);\n };\n originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n seen++;\n subscriber.next((lastValue = value));\n each > 0 && startTimer(each);\n }, undefined, undefined, function () {\n if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n }\n lastValue = null;\n }));\n !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each);\n });\n}\nfunction timeoutErrorFactory(info) {\n throw new TimeoutError(info);\n}\n//# sourceMappingURL=timeout.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { Observable } from '../Observable';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { observeOn } from '../operators/observeOn';\nimport { AsyncSubject } from '../AsyncSubject';\nexport function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler)\n .apply(this, args)\n .pipe(mapOneOrManyArgs(resultSelector));\n };\n }\n }\n if (scheduler) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc)\n .apply(this, args)\n .pipe(subscribeOn(scheduler), observeOn(scheduler));\n };\n }\n return function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var subject = new AsyncSubject();\n var uninitialized = true;\n return new Observable(function (subscriber) {\n var subs = subject.subscribe(subscriber);\n if (uninitialized) {\n uninitialized = false;\n var isAsync_1 = false;\n var isComplete_1 = false;\n callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [\n function () {\n var results = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n results[_i] = arguments[_i];\n }\n if (isNodeStyle) {\n var err = results.shift();\n if (err != null) {\n subject.error(err);\n return;\n }\n }\n subject.next(1 < results.length ? results : results[0]);\n isComplete_1 = true;\n if (isAsync_1) {\n subject.complete();\n }\n },\n ]));\n if (isComplete_1) {\n subject.complete();\n }\n isAsync_1 = true;\n }\n return subs;\n });\n };\n}\n//# sourceMappingURL=bindCallbackInternals.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindCallback.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindNodeCallback.js.map","var isArray = Array.isArray;\nvar getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n var first_1 = args[0];\n if (isArray(first_1)) {\n return { args: first_1, keys: null };\n }\n if (isPOJO(first_1)) {\n var keys = getKeys(first_1);\n return {\n args: keys.map(function (key) { return first_1[key]; }),\n keys: keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","export function createObject(keys, values) {\n return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});\n}\n//# sourceMappingURL=createObject.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n var buffer = [];\n var active = 0;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n var doInnerSub = function (value) {\n expand && subscriber.next(value);\n active++;\n var innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, function () {\n innerComplete = true;\n }, undefined, function () {\n if (innerComplete) {\n try {\n active--;\n var _loop_1 = function () {\n var bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n }\n else {\n doInnerSub(bufferedValue);\n }\n };\n while (buffer.length && active < concurrent) {\n _loop_1();\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n isComplete = true;\n checkComplete();\n }));\n return function () {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map","import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { defer } from './defer';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n resetOnDisconnect: true,\n};\nexport function connectable(source, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connection = null;\n var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;\n var subject = connector();\n var result = new Observable(function (subscriber) {\n return subject.subscribe(subscriber);\n });\n result.connect = function () {\n if (!connection || connection.closed) {\n connection = defer(function () { return source; }).subscribe(subject);\n if (resetOnDisconnect) {\n connection.add(function () { return (subject = connector()); });\n }\n }\n return connection;\n };\n return result;\n}\n//# sourceMappingURL=connectable.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys;\n var result = new Observable(function (subscriber) {\n var length = sources.length;\n if (!length) {\n subscriber.complete();\n return;\n }\n var values = new Array(length);\n var remainingCompletions = length;\n var remainingEmissions = length;\n var _loop_1 = function (sourceIndex) {\n var hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, function () { return remainingCompletions--; }, undefined, function () {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n };\n for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n//# sourceMappingURL=forkJoin.js.map","import { __read } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nvar nodeEventEmitterMethods = ['addListener', 'removeListener'];\nvar eventTargetMethods = ['addEventListener', 'removeEventListener'];\nvar jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n var _a = __read(isEventTarget(target)\n ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [], 2), add = _a[0], remove = _a[1];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return subscriber.next(1 < args.length ? args : args[0]);\n };\n add(handler);\n return function () { return remove(handler); };\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue = addHandler(handler);\n return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map","import { __generator } from \"tslib\";\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nimport { defer } from './defer';\nimport { scheduleIterable } from '../scheduled/scheduleIterable';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {\n var _a, _b;\n var resultSelector;\n var initialState;\n if (arguments.length === 1) {\n (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler);\n }\n else {\n initialState = initialStateOrOptions;\n if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {\n resultSelector = identity;\n scheduler = resultSelectorOrScheduler;\n }\n else {\n resultSelector = resultSelectorOrScheduler;\n }\n }\n function gen() {\n var state;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n state = initialState;\n _a.label = 1;\n case 1:\n if (!(!condition || condition(state))) return [3, 4];\n return [4, resultSelector(state)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n state = iterate(state);\n return [3, 1];\n case 4: return [2];\n }\n });\n }\n return defer((scheduler\n ?\n function () { return scheduleIterable(gen(), scheduler); }\n :\n gen));\n}\n//# sourceMappingURL=generate.js.map","import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n return defer(function () { return (condition() ? trueResult : falseResult); });\n}\n//# sourceMappingURL=iif.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime, intervalOrScheduler, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(function (subscriber) {\n var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n var n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period, scheduler) {\n if (period === void 0) { period = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n//# sourceMappingURL=interval.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n var sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = new Observable(noop);\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map","var isArray = Array.isArray;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n//# sourceMappingURL=argsOrArgArray.js.map","import { Observable } from '../Observable';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from './innerFrom';\nexport function onErrorResumeNext() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return new Observable(function (subscriber) {\n var sourceIndex = 0;\n var subscribeNext = function () {\n if (sourceIndex < nextSources.length) {\n var nextSource = void 0;\n try {\n nextSource = innerFrom(nextSources[sourceIndex++]);\n }\n catch (err) {\n subscribeNext();\n return;\n }\n var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);\n nextSource.subscribe(innerSubscriber);\n innerSubscriber.add(subscribeNext);\n }\n else {\n subscriber.complete();\n }\n };\n subscribeNext();\n });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","import { from } from './from';\nexport function pairs(obj, scheduler) {\n return from(Object.entries(obj), scheduler);\n}\n//# sourceMappingURL=pairs.js.map","export function not(pred, thisArg) {\n return function (value, index) { return !pred.call(thisArg, value, index); };\n}\n//# sourceMappingURL=not.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { not } from '../util/not';\nimport { filter } from '../operators/filter';\nimport { innerFrom } from './innerFrom';\nexport function partition(source, predicate, thisArg) {\n return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];\n}\n//# sourceMappingURL=partition.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return function (subscriber) {\n var subscriptions = [];\n var _loop_1 = function (i) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (subscriptions) {\n for (var s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n };\n for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n _loop_1(i);\n }\n };\n}\n//# sourceMappingURL=race.js.map","import { Observable } from '../Observable';\nimport { EMPTY } from './empty';\nexport function range(start, count, scheduler) {\n if (count == null) {\n count = start;\n start = 0;\n }\n if (count <= 0) {\n return EMPTY;\n }\n var end = count + start;\n return new Observable(scheduler\n ?\n function (subscriber) {\n var n = start;\n return scheduler.schedule(function () {\n if (n < end) {\n subscriber.next(n++);\n this.schedule();\n }\n else {\n subscriber.complete();\n }\n });\n }\n :\n function (subscriber) {\n var n = start;\n while (n < end && !subscriber.closed) {\n subscriber.next(n++);\n }\n subscriber.complete();\n });\n}\n//# sourceMappingURL=range.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n return new Observable(function (subscriber) {\n var resource = resourceFactory();\n var result = observableFactory(resource);\n var source = result ? innerFrom(result) : EMPTY;\n source.subscribe(subscriber);\n return function () {\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n}\n//# sourceMappingURL=using.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { EMPTY } from './empty';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { popResultSelector } from '../util/args';\nexport function zip() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var sources = argsOrArgArray(args);\n return sources.length\n ? new Observable(function (subscriber) {\n var buffers = sources.map(function () { return []; });\n var completed = sources.map(function () { return false; });\n subscriber.add(function () {\n buffers = completed = null;\n });\n var _loop_1 = function (sourceIndex) {\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffers[sourceIndex].push(value);\n if (buffers.every(function (buffer) { return buffer.length; })) {\n var result = buffers.map(function (buffer) { return buffer.shift(); });\n subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);\n if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {\n subscriber.complete();\n }\n }\n }, function () {\n completed[sourceIndex] = true;\n !buffers[sourceIndex].length && subscriber.complete();\n }));\n };\n for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n return function () {\n buffers = completed = null;\n };\n })\n : EMPTY;\n}\n//# sourceMappingURL=zip.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var isComplete = false;\n var endDuration = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n var cleanupDuration = function () {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, function () {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return audit(function () { return timer(duration, scheduler); });\n}\n//# sourceMappingURL=auditTime.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function buffer(closingNotifier) {\n return operate(function (source, subscriber) {\n var currentBuffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () {\n subscriber.next(currentBuffer);\n subscriber.complete();\n }));\n innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () {\n var b = currentBuffer;\n currentBuffer = [];\n subscriber.next(b);\n }, noop));\n return function () {\n currentBuffer = null;\n };\n });\n}\n//# sourceMappingURL=buffer.js.map","import { __values } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) { startBufferEvery = null; }\n startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;\n return operate(function (source, subscriber) {\n var buffers = [];\n var count = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a, e_2, _b;\n var toEmit = null;\n if (count++ % startBufferEvery === 0) {\n buffers.push([]);\n }\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n if (bufferSize <= buffer.length) {\n toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : [];\n toEmit.push(buffer);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (toEmit) {\n try {\n for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) {\n var buffer = toEmit_1_1.value;\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }, function () {\n var e_3, _a;\n try {\n for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) {\n var buffer = buffers_2_1.value;\n subscriber.next(buffer);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffers = null;\n }));\n });\n}\n//# sourceMappingURL=bufferCount.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { asyncScheduler } from '../scheduler/async';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function bufferTime(bufferTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxBufferSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var bufferRecords = [];\n var restartOnEmit = false;\n var emit = function (record) {\n var buffer = record.buffer, subs = record.subs;\n subs.unsubscribe();\n arrRemove(bufferRecords, record);\n subscriber.next(buffer);\n restartOnEmit && startBuffer();\n };\n var startBuffer = function () {\n if (bufferRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var buffer = [];\n var record_1 = {\n buffer: buffer,\n subs: subs,\n };\n bufferRecords.push(record_1);\n executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan);\n }\n };\n if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);\n }\n else {\n restartOnEmit = true;\n }\n startBuffer();\n var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var recordsCopy = bufferRecords.slice();\n try {\n for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) {\n var record = recordsCopy_1_1.value;\n var buffer = record.buffer;\n buffer.push(value);\n maxBufferSize <= buffer.length && emit(record);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) {\n subscriber.next(bufferRecords.shift().buffer);\n }\n bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe();\n subscriber.complete();\n subscriber.unsubscribe();\n }, undefined, function () { return (bufferRecords = null); });\n source.subscribe(bufferTimeSubscriber);\n });\n}\n//# sourceMappingURL=bufferTime.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var buffers = [];\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var buffer = [];\n buffers.push(buffer);\n var closingSubscription = new Subscription();\n var emitBuffer = function () {\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n closingSubscription.unsubscribe();\n };\n closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (buffers.length > 0) {\n subscriber.next(buffers.shift());\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=bufferToggle.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function bufferWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var buffer = null;\n var closingSubscriber = null;\n var openBuffer = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n var b = buffer;\n buffer = [];\n b && subscriber.next(b);\n innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));\n };\n openBuffer();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {\n buffer && subscriber.next(buffer);\n subscriber.complete();\n }, undefined, function () { return (buffer = closingSubscriber = null); }));\n });\n}\n//# sourceMappingURL=bufferWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate(function (source, subscriber) {\n var innerSub = null;\n var syncUnsub = false;\n var handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return function (source, subscriber) {\n var hasState = hasSeed;\n var state = seed;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (function () {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { scanInternals } from './scanInternals';\nimport { operate } from '../util/lift';\nexport function reduce(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true));\n}\n//# sourceMappingURL=reduce.js.map","import { reduce } from './reduce';\nimport { operate } from '../util/lift';\nvar arrReducer = function (arr, value) { return (arr.push(value), arr); };\nexport function toArray() {\n return operate(function (source, subscriber) {\n reduce(arrReducer, [])(source).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=toArray.js.map","import { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { mergeMap } from './mergeMap';\nimport { toArray } from './toArray';\nexport function joinAllInternals(joinFn, project) {\n return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity);\n}\n//# sourceMappingURL=joinAllInternals.js.map","import { combineLatest } from '../observable/combineLatest';\nimport { joinAllInternals } from './joinAllInternals';\nexport function combineLatestAll(project) {\n return joinAllInternals(combineLatest, project);\n}\n//# sourceMappingURL=combineLatestAll.js.map","import { combineLatestAll } from './combineLatestAll';\nexport var combineAll = combineLatestAll;\n//# sourceMappingURL=combineAll.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n return resultSelector\n ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector))\n : operate(function (source, subscriber) {\n combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber);\n });\n}\n//# sourceMappingURL=combineLatest.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatest } from './combineLatest';\nexport function combineLatestWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=combineLatestWith.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","import { concatMap } from './concatMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=concatMapTo.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { concatAll } from './concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return operate(function (source, subscriber) {\n concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=concat.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from './concat';\nexport function concatWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return concat.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=concatWith.js.map","import { Observable } from '../Observable';\nexport function fromSubscribable(subscribable) {\n return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); });\n}\n//# sourceMappingURL=fromSubscribable.js.map","import { Subject } from '../Subject';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { fromSubscribable } from '../observable/fromSubscribable';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n};\nexport function connect(selector, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connector = config.connector;\n return operate(function (source, subscriber) {\n var subject = connector();\n innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);\n subscriber.add(source.subscribe(subject));\n });\n}\n//# sourceMappingURL=connect.js.map","import { reduce } from './reduce';\nexport function count(predicate) {\n return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);\n}\n//# sourceMappingURL=count.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var emit = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var activeTask = null;\n var lastValue = null;\n var lastTime = null;\n var emit = function () {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n var targetTime = lastTime + dueTime;\n var now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = activeTask = null;\n }));\n });\n}\n//# sourceMappingURL=debounceTime.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(function () { return value; });\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n };\n }\n return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration = timer(due, scheduler);\n return delayWhen(function () { return duration; });\n}\n//# sourceMappingURL=delay.js.map","import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); }));\n });\n}\n//# sourceMappingURL=dematerialize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function distinct(keySelector, flushes) {\n return operate(function (source, subscriber) {\n var distinctKeys = new Set();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var key = keySelector ? keySelector(value) : value;\n if (!distinctKeys.has(key)) {\n distinctKeys.add(key);\n subscriber.next(value);\n }\n }));\n flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop));\n });\n}\n//# sourceMappingURL=distinct.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector) {\n if (keySelector === void 0) { keySelector = identity; }\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate(function (source, subscriber) {\n var previousKey;\n var first = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory) {\n if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); }));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n if (index < 0) {\n throw new ArgumentOutOfRangeError();\n }\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));\n };\n}\n//# sourceMappingURL=elementAt.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); };\n}\n//# sourceMappingURL=endWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function every(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!predicate.call(thisArg, value, index++, source)) {\n subscriber.next(false);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=every.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return function (source) {\n return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));\n };\n }\n return operate(function (source, subscriber) {\n var index = 0;\n var innerSub = null;\n var isComplete = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, function () {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n }, function () {\n isComplete = true;\n !innerSub && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=exhaustMap.js.map","import { exhaustMap } from './exhaustMap';\nimport { identity } from '../util/identity';\nexport function exhaustAll() {\n return exhaustMap(identity);\n}\n//# sourceMappingURL=exhaustAll.js.map","import { exhaustAll } from './exhaustAll';\nexport var exhaust = exhaustAll;\n//# sourceMappingURL=exhaust.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function expand(project, concurrent, scheduler) {\n if (concurrent === void 0) { concurrent = Infinity; }\n concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;\n return operate(function (source, subscriber) {\n return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler);\n });\n}\n//# sourceMappingURL=expand.js.map","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate(function (source, subscriber) {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n//# sourceMappingURL=finalize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function find(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'value'));\n}\nexport function createFind(predicate, thisArg, emit) {\n var findIndex = emit === 'index';\n return function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n if (predicate.call(thisArg, value, i, source)) {\n subscriber.next(findIndex ? i : value);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(findIndex ? -1 : undefined);\n subscriber.complete();\n }));\n };\n}\n//# sourceMappingURL=find.js.map","import { operate } from '../util/lift';\nimport { createFind } from './find';\nexport function findIndex(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'index'));\n}\n//# sourceMappingURL=findIndex.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=first.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n return operate(function (source, subscriber) {\n var element;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions;\n }\n else {\n (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector);\n }\n var groups = new Map();\n var notify = function (cb) {\n groups.forEach(cb);\n cb(subscriber);\n };\n var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); };\n var activeGroups = 0;\n var teardownAttempted = false;\n var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) {\n try {\n var key_1 = keySelector(value);\n var group_1 = groups.get(key_1);\n if (!group_1) {\n groups.set(key_1, (group_1 = connector ? connector() : new Subject()));\n var grouped = createGroupedObservable(key_1, group_1);\n subscriber.next(grouped);\n if (duration) {\n var durationSubscriber_1 = createOperatorSubscriber(group_1, function () {\n group_1.complete();\n durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe();\n }, undefined, undefined, function () { return groups.delete(key_1); });\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1));\n }\n }\n group_1.next(element ? element(value) : value);\n }\n catch (err) {\n handleError(err);\n }\n }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () {\n teardownAttempted = true;\n return activeGroups === 0;\n });\n source.subscribe(groupBySourceSubscriber);\n function createGroupedObservable(key, groupSubject) {\n var result = new Observable(function (groupSubscriber) {\n activeGroups++;\n var innerSub = groupSubject.subscribe(groupSubscriber);\n return function () {\n innerSub.unsubscribe();\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n//# sourceMappingURL=groupBy.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function isEmpty() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function () {\n subscriber.next(false);\n subscriber.complete();\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=isEmpty.js.map","import { __values } from \"tslib\";\nimport { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, function () {\n var e_1, _a;\n try {\n for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {\n var value = buffer_1_1.value;\n subscriber.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffer = null;\n }));\n });\n}\n//# sourceMappingURL=takeLast.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=last.js.map","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(Notification.createNext(value));\n }, function () {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n }, function (err) {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=materialize.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function max(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });\n}\n//# sourceMappingURL=max.js.map","import { mergeMap } from './mergeMap';\nexport var flatMap = mergeMap;\n//# sourceMappingURL=flatMap.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap(function () { return innerObservable; }, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function mergeScan(accumulator, seed, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return operate(function (source, subscriber) {\n var state = seed;\n return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) {\n state = value;\n }, false, undefined, function () { return (state = null); });\n });\n}\n//# sourceMappingURL=mergeScan.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mergeAll } from './mergeAll';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n args = argsOrArgArray(args);\n return operate(function (source, subscriber) {\n mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=merge.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { merge } from './merge';\nexport function mergeWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return merge.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=mergeWith.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function min(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });\n}\n//# sourceMappingURL=min.js.map","import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { isFunction } from '../util/isFunction';\nimport { connect } from './connect';\nexport function multicast(subjectOrSubjectFactory, selector) {\n var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; };\n if (isFunction(selector)) {\n return connect(selector, {\n connector: subjectFactory,\n });\n }\n return function (source) { return new ConnectableObservable(source, subjectFactory); };\n}\n//# sourceMappingURL=multicast.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext';\nexport function onErrorResumeNextWith() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); };\n}\nexport var onErrorResumeNext = onErrorResumeNextWith;\n//# sourceMappingURL=onErrorResumeNextWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n return operate(function (source, subscriber) {\n var prev;\n var hasPrev = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n }));\n });\n}\n//# sourceMappingURL=pairwise.js.map","import { map } from './map';\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map(function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n });\n}\n//# sourceMappingURL=pluck.js.map","import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { connect } from './connect';\nexport function publish(selector) {\n return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); };\n}\n//# sourceMappingURL=publish.js.map","import { BehaviorSubject } from '../BehaviorSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishBehavior(initialValue) {\n return function (source) {\n var subject = new BehaviorSubject(initialValue);\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishBehavior.js.map","import { AsyncSubject } from '../AsyncSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishLast() {\n return function (source) {\n var subject = new AsyncSubject();\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishLast.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nimport { isFunction } from '../util/isFunction';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) {\n if (selectorOrScheduler && !isFunction(selectorOrScheduler)) {\n timestampProvider = selectorOrScheduler;\n }\n var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;\n return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); };\n}\n//# sourceMappingURL=publishReplay.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { raceInit } from '../observable/race';\nimport { operate } from '../util/lift';\nimport { identity } from '../util/identity';\nexport function raceWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return !otherSources.length\n ? identity\n : operate(function (source, subscriber) {\n raceInit(__spreadArray([source], __read(otherSources)))(subscriber);\n });\n}\n//# sourceMappingURL=raceWith.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n var _a;\n var count = Infinity;\n var delay;\n if (countOrConfig != null) {\n if (typeof countOrConfig === 'object') {\n (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay);\n }\n else {\n count = countOrConfig;\n }\n }\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var soFar = 0;\n var sourceSub;\n var resubscribe = function () {\n sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n sourceSub = null;\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n subscribeToSource();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n subscribeToSource();\n }\n };\n var subscribeToSource = function () {\n var syncUnsub = false;\n sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n if (++soFar < count) {\n if (sourceSub) {\n resubscribe();\n }\n else {\n syncUnsub = true;\n }\n }\n else {\n subscriber.complete();\n }\n }));\n if (syncUnsub) {\n resubscribe();\n }\n };\n subscribeToSource();\n });\n}\n//# sourceMappingURL=repeat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var completions$;\n var isNotifierComplete = false;\n var isMainComplete = false;\n var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); };\n var getCompletionSubject = function () {\n if (!completions$) {\n completions$ = new Subject();\n innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () {\n if (innerSub) {\n subscribeForRepeatWhen();\n }\n else {\n syncResub = true;\n }\n }, function () {\n isNotifierComplete = true;\n checkComplete();\n }));\n }\n return completions$;\n };\n var subscribeForRepeatWhen = function () {\n isMainComplete = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n isMainComplete = true;\n !checkComplete() && getCompletionSubject().next();\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRepeatWhen();\n }\n };\n subscribeForRepeatWhen();\n });\n}\n//# sourceMappingURL=repeatWhen.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\nexport function retry(configOrCount) {\n if (configOrCount === void 0) { configOrCount = Infinity; }\n var config;\n if (configOrCount && typeof configOrCount === 'object') {\n config = configOrCount;\n }\n else {\n config = {\n count: configOrCount,\n };\n }\n var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;\n return count <= 0\n ? identity\n : operate(function (source, subscriber) {\n var soFar = 0;\n var innerSub;\n var subscribeForRetry = function () {\n var syncUnsub = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (resetOnSuccess) {\n soFar = 0;\n }\n subscriber.next(value);\n }, undefined, function (err) {\n if (soFar++ < count) {\n var resub_1 = function () {\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n else {\n syncUnsub = true;\n }\n };\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n resub_1();\n }, function () {\n subscriber.complete();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n resub_1();\n }\n }\n else {\n subscriber.error(err);\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n };\n subscribeForRetry();\n });\n}\n//# sourceMappingURL=retry.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var errors$;\n var subscribeForRetryWhen = function () {\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n if (!errors$) {\n errors$ = new Subject();\n innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () {\n return innerSub ? subscribeForRetryWhen() : (syncResub = true);\n }));\n }\n if (errors$) {\n errors$.next(err);\n }\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRetryWhen();\n }\n };\n subscribeForRetryWhen();\n });\n}\n//# sourceMappingURL=retryWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function sample(notifier) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n }));\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () {\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n }, noop));\n });\n}\n//# sourceMappingURL=sample.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { sample } from './sample';\nimport { interval } from '../observable/interval';\nexport function sampleTime(period, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return sample(interval(period, scheduler));\n}\n//# sourceMappingURL=sampleTime.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function sequenceEqual(compareTo, comparator) {\n if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }\n return operate(function (source, subscriber) {\n var aState = createState();\n var bState = createState();\n var emit = function (isEqual) {\n subscriber.next(isEqual);\n subscriber.complete();\n };\n var createSubscriber = function (selfState, otherState) {\n var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) {\n var buffer = otherState.buffer, complete = otherState.complete;\n if (buffer.length === 0) {\n complete ? emit(false) : selfState.buffer.push(a);\n }\n else {\n !comparator(a, buffer.shift()) && emit(false);\n }\n }, function () {\n selfState.complete = true;\n var complete = otherState.complete, buffer = otherState.buffer;\n complete && emit(buffer.length === 0);\n sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe();\n });\n return sequenceEqualSubscriber;\n };\n source.subscribe(createSubscriber(aState, bState));\n innerFrom(compareTo).subscribe(createSubscriber(bState, aState));\n });\n}\nfunction createState() {\n return {\n buffer: [],\n complete: false,\n };\n}\n//# sourceMappingURL=sequenceEqual.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options) {\n if (options === void 0) { options = {}; }\n var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;\n return function (wrapperSource) {\n var connection;\n var resetConnection;\n var subject;\n var refCount = 0;\n var hasCompleted = false;\n var hasErrored = false;\n var cancelReset = function () {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n var reset = function () {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n var resetAndUnsubscribe = function () {\n var conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate(function (source, subscriber) {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n var dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(function () {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: function (value) { return dest.next(value); },\n error: function (err) {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: function () {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n var onSubscriber = new SafeSubscriber({\n next: function () {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var _a, _b, _c;\n var bufferSize;\n var refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler);\n }\n else {\n bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n }\n return share({\n connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); },\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n//# sourceMappingURL=shareReplay.js.map","import { EmptyError } from '../util/EmptyError';\nimport { SequenceError } from '../util/SequenceError';\nimport { NotFoundError } from '../util/NotFoundError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function single(predicate) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var singleValue;\n var seenValue = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n seenValue = true;\n if (!predicate || predicate(value, index++, source)) {\n hasValue && subscriber.error(new SequenceError('Too many matching values'));\n hasValue = true;\n singleValue = value;\n }\n }, function () {\n if (hasValue) {\n subscriber.next(singleValue);\n subscriber.complete();\n }\n else {\n subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError());\n }\n }));\n });\n}\n//# sourceMappingURL=single.js.map","import { filter } from './filter';\nexport function skip(count) {\n return filter(function (_, index) { return count <= index; });\n}\n//# sourceMappingURL=skip.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipLast(skipCount) {\n return skipCount <= 0\n ?\n identity\n : operate(function (source, subscriber) {\n var ring = new Array(skipCount);\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var valueIndex = seen++;\n if (valueIndex < skipCount) {\n ring[valueIndex] = value;\n }\n else {\n var index = valueIndex % skipCount;\n var oldValue = ring[index];\n ring[index] = value;\n subscriber.next(oldValue);\n }\n }));\n return function () {\n ring = null;\n };\n });\n}\n//# sourceMappingURL=skipLast.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function skipUntil(notifier) {\n return operate(function (source, subscriber) {\n var taking = false;\n var skipSubscriber = createOperatorSubscriber(subscriber, function () {\n skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();\n taking = true;\n }, noop);\n innerFrom(notifier).subscribe(skipSubscriber);\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate(function (source, subscriber) {\n var taking = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipWhile.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n var scheduler = popScheduler(values);\n return operate(function (source, subscriber) {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate(function (source, subscriber) {\n var innerSubscriber = null;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n var innerIndex = 0;\n var outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () {\n innerSubscriber = null;\n checkComplete();\n })));\n }, function () {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map","import { switchMap } from './switchMap';\nimport { isFunction } from '../util/isFunction';\nexport function switchMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map","import { switchMap } from './switchMap';\nimport { operate } from '../util/lift';\nexport function switchScan(accumulator, seed) {\n return operate(function (source, subscriber) {\n var state = seed;\n switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber);\n return function () {\n state = null;\n };\n });\n}\n//# sourceMappingURL=switchScan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate(function (source, subscriber) {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n var tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error: error, complete: complete }\n : observerOrNext;\n return tapObserver\n ? operate(function (source, subscriber) {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n var isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, function () {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, function (err) {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, function () {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate(function (source, subscriber) {\n var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c;\n var hasValue = false;\n var sendValue = null;\n var throttled = null;\n var isComplete = false;\n var endThrottling = function () {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n var cleanupThrottling = function () {\n throttled = null;\n isComplete && subscriber.complete();\n };\n var startThrottle = function (value) {\n return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n };\n var send = function () {\n if (hasValue) {\n hasValue = false;\n var value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, function () {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=throttle.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration$ = timer(duration, scheduler);\n return throttle(function () { return duration$; }, config);\n}\n//# sourceMappingURL=throttleTime.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function timeInterval(scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var last = scheduler.now();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var now = scheduler.now();\n var interval = now - last;\n last = now;\n subscriber.next(new TimeInterval(value, interval));\n }));\n });\n}\nvar TimeInterval = (function () {\n function TimeInterval(value, interval) {\n this.value = value;\n this.interval = interval;\n }\n return TimeInterval;\n}());\nexport { TimeInterval };\n//# sourceMappingURL=timeInterval.js.map","import { async } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { timeout } from './timeout';\nexport function timeoutWith(due, withObservable, scheduler) {\n var first;\n var each;\n var _with;\n scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;\n if (isValidDate(due)) {\n first = due;\n }\n else if (typeof due === 'number') {\n each = due;\n }\n if (withObservable) {\n _with = function () { return withObservable; };\n }\n else {\n throw new TypeError('No observable provided to switch to');\n }\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return timeout({\n first: first,\n each: each,\n scheduler: scheduler,\n with: _with,\n });\n}\n//# sourceMappingURL=timeoutWith.js.map","import { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { map } from './map';\nexport function timestamp(timestampProvider) {\n if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; }\n return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); });\n}\n//# sourceMappingURL=timestamp.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function window(windowBoundaries) {\n return operate(function (source, subscriber) {\n var windowSubject = new Subject();\n subscriber.next(windowSubject.asObservable());\n var errorHandler = function (err) {\n windowSubject.error(err);\n subscriber.error(err);\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () {\n windowSubject.complete();\n subscriber.complete();\n }, errorHandler));\n innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () {\n windowSubject.complete();\n subscriber.next((windowSubject = new Subject()));\n }, noop, errorHandler));\n return function () {\n windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe();\n windowSubject = null;\n };\n });\n}\n//# sourceMappingURL=window.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function windowCount(windowSize, startWindowEvery) {\n if (startWindowEvery === void 0) { startWindowEvery = 0; }\n var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;\n return operate(function (source, subscriber) {\n var windows = [new Subject()];\n var starts = [];\n var count = 0;\n subscriber.next(windows[0].asObservable());\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) {\n var window_1 = windows_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var c = count - windowSize + 1;\n if (c >= 0 && c % startEvery === 0) {\n windows.shift().complete();\n }\n if (++count % startEvery === 0) {\n var window_2 = new Subject();\n windows.push(window_2);\n subscriber.next(window_2.asObservable());\n }\n }, function () {\n while (windows.length > 0) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, function (err) {\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n }, function () {\n starts = null;\n windows = null;\n }));\n });\n}\n//# sourceMappingURL=windowCount.js.map","import { Subject } from '../Subject';\nimport { asyncScheduler } from '../scheduler/async';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function windowTime(windowTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxWindowSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var windowRecords = [];\n var restartOnClose = false;\n var closeWindow = function (record) {\n var window = record.window, subs = record.subs;\n window.complete();\n subs.unsubscribe();\n arrRemove(windowRecords, record);\n restartOnClose && startWindow();\n };\n var startWindow = function () {\n if (windowRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var window_1 = new Subject();\n var record_1 = {\n window: window_1,\n subs: subs,\n seen: 0,\n };\n windowRecords.push(record_1);\n subscriber.next(window_1.asObservable());\n executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan);\n }\n };\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true);\n }\n else {\n restartOnClose = true;\n }\n startWindow();\n var loop = function (cb) { return windowRecords.slice().forEach(cb); };\n var terminate = function (cb) {\n loop(function (_a) {\n var window = _a.window;\n return cb(window);\n });\n cb(subscriber);\n subscriber.unsubscribe();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n loop(function (record) {\n record.window.next(value);\n maxWindowSize <= ++record.seen && closeWindow(record);\n });\n }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); }));\n return function () {\n windowRecords = null;\n };\n });\n}\n//# sourceMappingURL=windowTime.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function windowToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var windows = [];\n var handleError = function (err) {\n while (0 < windows.length) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n };\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var window = new Subject();\n windows.push(window);\n var closingSubscription = new Subscription();\n var closeWindow = function () {\n arrRemove(windows, window);\n window.complete();\n closingSubscription.unsubscribe();\n };\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector(openValue));\n }\n catch (err) {\n handleError(err);\n return;\n }\n subscriber.next(window.asObservable());\n closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var windowsCopy = windows.slice();\n try {\n for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) {\n var window_1 = windowsCopy_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (0 < windows.length) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, handleError, function () {\n while (0 < windows.length) {\n windows.shift().unsubscribe();\n }\n }));\n });\n}\n//# sourceMappingURL=windowToggle.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function windowWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var window;\n var closingSubscriber;\n var handleError = function (err) {\n window.error(err);\n subscriber.error(err);\n };\n var openWindow = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window === null || window === void 0 ? void 0 : window.complete();\n window = new Subject();\n subscriber.next(window.asObservable());\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector());\n }\n catch (err) {\n handleError(err);\n return;\n }\n closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));\n };\n openWindow();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () {\n window.complete();\n subscriber.complete();\n }, handleError, function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window = null;\n }));\n });\n}\n//# sourceMappingURL=windowWhen.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom() {\n var inputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputs[_i] = arguments[_i];\n }\n var project = popResultSelector(inputs);\n return operate(function (source, subscriber) {\n var len = inputs.length;\n var otherValues = new Array(len);\n var hasValue = inputs.map(function () { return false; });\n var ready = false;\n var _loop_1 = function (i) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (ready) {\n var values = __spreadArray([value], __read(otherValues));\n subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values);\n }\n }));\n });\n}\n//# sourceMappingURL=withLatestFrom.js.map","import { zip } from '../observable/zip';\nimport { joinAllInternals } from './joinAllInternals';\nexport function zipAll(project) {\n return joinAllInternals(zip, project);\n}\n//# sourceMappingURL=zipAll.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip as zipStatic } from '../observable/zip';\nimport { operate } from '../util/lift';\nexport function zip() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return operate(function (source, subscriber) {\n zipStatic.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=zip.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip } from './zip';\nexport function zipWith() {\n var otherInputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherInputs[_i] = arguments[_i];\n }\n return zip.apply(void 0, __spreadArray([], __read(otherInputs)));\n}\n//# sourceMappingURL=zipWith.js.map","import { not } from '../util/not';\nimport { filter } from './filter';\nexport function partition(predicate, thisArg) {\n return function (source) {\n return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)];\n };\n}\n//# sourceMappingURL=partition.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { raceWith } from './raceWith';\nexport function race() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args))));\n}\n//# sourceMappingURL=race.js.map","var SubscriptionLog = (function () {\n function SubscriptionLog(subscribedFrame, unsubscribedFrame) {\n if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; }\n this.subscribedFrame = subscribedFrame;\n this.unsubscribedFrame = unsubscribedFrame;\n }\n return SubscriptionLog;\n}());\nexport { SubscriptionLog };\n//# sourceMappingURL=SubscriptionLog.js.map","import { SubscriptionLog } from './SubscriptionLog';\nvar SubscriptionLoggable = (function () {\n function SubscriptionLoggable() {\n this.subscriptions = [];\n }\n SubscriptionLoggable.prototype.logSubscribedFrame = function () {\n this.subscriptions.push(new SubscriptionLog(this.scheduler.now()));\n return this.subscriptions.length - 1;\n };\n SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) {\n var subscriptionLogs = this.subscriptions;\n var oldSubscriptionLog = subscriptionLogs[index];\n subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now());\n };\n return SubscriptionLoggable;\n}());\nexport { SubscriptionLoggable };\n//# sourceMappingURL=SubscriptionLoggable.js.map","export function applyMixins(derivedCtor, baseCtors) {\n for (var i = 0, len = baseCtors.length; i < len; i++) {\n var baseCtor = baseCtors[i];\n var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype);\n for (var j = 0, len2 = propertyKeys.length; j < len2; j++) {\n var name_1 = propertyKeys[j];\n derivedCtor.prototype[name_1] = baseCtor.prototype[name_1];\n }\n }\n}\n//# sourceMappingURL=applyMixins.js.map","import { __extends } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { SubscriptionLoggable } from './SubscriptionLoggable';\nimport { applyMixins } from '../util/applyMixins';\nimport { observeNotification } from '../Notification';\nvar ColdObservable = (function (_super) {\n __extends(ColdObservable, _super);\n function ColdObservable(messages, scheduler) {\n var _this = _super.call(this, function (subscriber) {\n var observable = this;\n var index = observable.logSubscribedFrame();\n var subscription = new Subscription();\n subscription.add(new Subscription(function () {\n observable.logUnsubscribedFrame(index);\n }));\n observable.scheduleMessages(subscriber);\n return subscription;\n }) || this;\n _this.messages = messages;\n _this.subscriptions = [];\n _this.scheduler = scheduler;\n return _this;\n }\n ColdObservable.prototype.scheduleMessages = function (subscriber) {\n var messagesLength = this.messages.length;\n for (var i = 0; i < messagesLength; i++) {\n var message = this.messages[i];\n subscriber.add(this.scheduler.schedule(function (state) {\n var _a = state, notification = _a.message.notification, destination = _a.subscriber;\n observeNotification(notification, destination);\n }, message.frame, { message: message, subscriber: subscriber }));\n }\n };\n return ColdObservable;\n}(Observable));\nexport { ColdObservable };\napplyMixins(ColdObservable, [SubscriptionLoggable]);\n//# sourceMappingURL=ColdObservable.js.map","import { __extends } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { SubscriptionLoggable } from './SubscriptionLoggable';\nimport { applyMixins } from '../util/applyMixins';\nimport { observeNotification } from '../Notification';\nvar HotObservable = (function (_super) {\n __extends(HotObservable, _super);\n function HotObservable(messages, scheduler) {\n var _this = _super.call(this) || this;\n _this.messages = messages;\n _this.subscriptions = [];\n _this.scheduler = scheduler;\n return _this;\n }\n HotObservable.prototype._subscribe = function (subscriber) {\n var subject = this;\n var index = subject.logSubscribedFrame();\n var subscription = new Subscription();\n subscription.add(new Subscription(function () {\n subject.logUnsubscribedFrame(index);\n }));\n subscription.add(_super.prototype._subscribe.call(this, subscriber));\n return subscription;\n };\n HotObservable.prototype.setup = function () {\n var subject = this;\n var messagesLength = subject.messages.length;\n var _loop_1 = function (i) {\n (function () {\n var _a = subject.messages[i], notification = _a.notification, frame = _a.frame;\n subject.scheduler.schedule(function () {\n observeNotification(notification, subject);\n }, frame);\n })();\n };\n for (var i = 0; i < messagesLength; i++) {\n _loop_1(i);\n }\n };\n return HotObservable;\n}(Subject));\nexport { HotObservable };\napplyMixins(HotObservable, [SubscriptionLoggable]);\n//# sourceMappingURL=HotObservable.js.map","import { __extends, __read, __spreadArray, __values } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { ColdObservable } from './ColdObservable';\nimport { HotObservable } from './HotObservable';\nimport { SubscriptionLog } from './SubscriptionLog';\nimport { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler';\nimport { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories';\nimport { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../scheduler/animationFrameProvider';\nimport { immediateProvider } from '../scheduler/immediateProvider';\nimport { intervalProvider } from '../scheduler/intervalProvider';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nvar defaultMaxFrame = 750;\nvar TestScheduler = (function (_super) {\n __extends(TestScheduler, _super);\n function TestScheduler(assertDeepEqual) {\n var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this;\n _this.assertDeepEqual = assertDeepEqual;\n _this.hotObservables = [];\n _this.coldObservables = [];\n _this.flushTests = [];\n _this.runMode = false;\n return _this;\n }\n TestScheduler.prototype.createTime = function (marbles) {\n var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|');\n if (indexOf === -1) {\n throw new Error('marble diagram for time should have a completion marker \"|\"');\n }\n return indexOf * TestScheduler.frameTimeFactor;\n };\n TestScheduler.prototype.createColdObservable = function (marbles, values, error) {\n if (marbles.indexOf('^') !== -1) {\n throw new Error('cold observable cannot have subscription offset \"^\"');\n }\n if (marbles.indexOf('!') !== -1) {\n throw new Error('cold observable cannot have unsubscription marker \"!\"');\n }\n var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode);\n var cold = new ColdObservable(messages, this);\n this.coldObservables.push(cold);\n return cold;\n };\n TestScheduler.prototype.createHotObservable = function (marbles, values, error) {\n if (marbles.indexOf('!') !== -1) {\n throw new Error('hot observable cannot have unsubscription marker \"!\"');\n }\n var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode);\n var subject = new HotObservable(messages, this);\n this.hotObservables.push(subject);\n return subject;\n };\n TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) {\n var _this = this;\n var messages = [];\n observable.subscribe({\n next: function (value) {\n messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) });\n },\n error: function (error) {\n messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) });\n },\n complete: function () {\n messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION });\n },\n });\n return messages;\n };\n TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) {\n var _this = this;\n if (subscriptionMarbles === void 0) { subscriptionMarbles = null; }\n var actual = [];\n var flushTest = { actual: actual, ready: false };\n var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode);\n var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame;\n var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame;\n var subscription;\n this.schedule(function () {\n subscription = observable.subscribe({\n next: function (x) {\n var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x;\n actual.push({ frame: _this.frame, notification: nextNotification(value) });\n },\n error: function (error) {\n actual.push({ frame: _this.frame, notification: errorNotification(error) });\n },\n complete: function () {\n actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION });\n },\n });\n }, subscriptionFrame);\n if (unsubscriptionFrame !== Infinity) {\n this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame);\n }\n this.flushTests.push(flushTest);\n var runMode = this.runMode;\n return {\n toBe: function (marbles, values, errorValue) {\n flushTest.ready = true;\n flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode);\n },\n toEqual: function (other) {\n flushTest.ready = true;\n flushTest.expected = [];\n _this.schedule(function () {\n subscription = other.subscribe({\n next: function (x) {\n var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x;\n flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) });\n },\n error: function (error) {\n flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) });\n },\n complete: function () {\n flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION });\n },\n });\n }, subscriptionFrame);\n },\n };\n };\n TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) {\n var flushTest = { actual: actualSubscriptionLogs, ready: false };\n this.flushTests.push(flushTest);\n var runMode = this.runMode;\n return {\n toBe: function (marblesOrMarblesArray) {\n var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray;\n flushTest.ready = true;\n flushTest.expected = marblesArray\n .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); })\n .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; });\n },\n };\n };\n TestScheduler.prototype.flush = function () {\n var _this = this;\n var hotObservables = this.hotObservables;\n while (hotObservables.length > 0) {\n hotObservables.shift().setup();\n }\n _super.prototype.flush.call(this);\n this.flushTests = this.flushTests.filter(function (test) {\n if (test.ready) {\n _this.assertDeepEqual(test.actual, test.expected);\n return false;\n }\n return true;\n });\n };\n TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) {\n var _this = this;\n if (runMode === void 0) { runMode = false; }\n if (typeof marbles !== 'string') {\n return new SubscriptionLog(Infinity);\n }\n var characters = __spreadArray([], __read(marbles));\n var len = characters.length;\n var groupStart = -1;\n var subscriptionFrame = Infinity;\n var unsubscriptionFrame = Infinity;\n var frame = 0;\n var _loop_1 = function (i) {\n var nextFrame = frame;\n var advanceFrameBy = function (count) {\n nextFrame += count * _this.frameTimeFactor;\n };\n var c = characters[i];\n switch (c) {\n case ' ':\n if (!runMode) {\n advanceFrameBy(1);\n }\n break;\n case '-':\n advanceFrameBy(1);\n break;\n case '(':\n groupStart = frame;\n advanceFrameBy(1);\n break;\n case ')':\n groupStart = -1;\n advanceFrameBy(1);\n break;\n case '^':\n if (subscriptionFrame !== Infinity) {\n throw new Error(\"found a second subscription point '^' in a \" + 'subscription marble diagram. There can only be one.');\n }\n subscriptionFrame = groupStart > -1 ? groupStart : frame;\n advanceFrameBy(1);\n break;\n case '!':\n if (unsubscriptionFrame !== Infinity) {\n throw new Error(\"found a second unsubscription point '!' in a \" + 'subscription marble diagram. There can only be one.');\n }\n unsubscriptionFrame = groupStart > -1 ? groupStart : frame;\n break;\n default:\n if (runMode && c.match(/^[0-9]$/)) {\n if (i === 0 || characters[i - 1] === ' ') {\n var buffer = characters.slice(i).join('');\n var match = buffer.match(/^([0-9]+(?:\\.[0-9]+)?)(ms|s|m) /);\n if (match) {\n i += match[0].length - 1;\n var duration = parseFloat(match[1]);\n var unit = match[2];\n var durationInMs = void 0;\n switch (unit) {\n case 'ms':\n durationInMs = duration;\n break;\n case 's':\n durationInMs = duration * 1000;\n break;\n case 'm':\n durationInMs = duration * 1000 * 60;\n break;\n default:\n break;\n }\n advanceFrameBy(durationInMs / this_1.frameTimeFactor);\n break;\n }\n }\n }\n throw new Error(\"there can only be '^' and '!' markers in a \" + \"subscription marble diagram. Found instead '\" + c + \"'.\");\n }\n frame = nextFrame;\n out_i_1 = i;\n };\n var this_1 = this, out_i_1;\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n i = out_i_1;\n }\n if (unsubscriptionFrame < 0) {\n return new SubscriptionLog(subscriptionFrame);\n }\n else {\n return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame);\n }\n };\n TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) {\n var _this = this;\n if (materializeInnerObservables === void 0) { materializeInnerObservables = false; }\n if (runMode === void 0) { runMode = false; }\n if (marbles.indexOf('!') !== -1) {\n throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker \"!\"');\n }\n var characters = __spreadArray([], __read(marbles));\n var len = characters.length;\n var testMessages = [];\n var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^');\n var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor;\n var getValue = typeof values !== 'object'\n ? function (x) { return x; }\n : function (x) {\n if (materializeInnerObservables && values[x] instanceof ColdObservable) {\n return values[x].messages;\n }\n return values[x];\n };\n var groupStart = -1;\n var _loop_2 = function (i) {\n var nextFrame = frame;\n var advanceFrameBy = function (count) {\n nextFrame += count * _this.frameTimeFactor;\n };\n var notification = void 0;\n var c = characters[i];\n switch (c) {\n case ' ':\n if (!runMode) {\n advanceFrameBy(1);\n }\n break;\n case '-':\n advanceFrameBy(1);\n break;\n case '(':\n groupStart = frame;\n advanceFrameBy(1);\n break;\n case ')':\n groupStart = -1;\n advanceFrameBy(1);\n break;\n case '|':\n notification = COMPLETE_NOTIFICATION;\n advanceFrameBy(1);\n break;\n case '^':\n advanceFrameBy(1);\n break;\n case '#':\n notification = errorNotification(errorValue || 'error');\n advanceFrameBy(1);\n break;\n default:\n if (runMode && c.match(/^[0-9]$/)) {\n if (i === 0 || characters[i - 1] === ' ') {\n var buffer = characters.slice(i).join('');\n var match = buffer.match(/^([0-9]+(?:\\.[0-9]+)?)(ms|s|m) /);\n if (match) {\n i += match[0].length - 1;\n var duration = parseFloat(match[1]);\n var unit = match[2];\n var durationInMs = void 0;\n switch (unit) {\n case 'ms':\n durationInMs = duration;\n break;\n case 's':\n durationInMs = duration * 1000;\n break;\n case 'm':\n durationInMs = duration * 1000 * 60;\n break;\n default:\n break;\n }\n advanceFrameBy(durationInMs / this_2.frameTimeFactor);\n break;\n }\n }\n }\n notification = nextNotification(getValue(c));\n advanceFrameBy(1);\n break;\n }\n if (notification) {\n testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification });\n }\n frame = nextFrame;\n out_i_2 = i;\n };\n var this_2 = this, out_i_2;\n for (var i = 0; i < len; i++) {\n _loop_2(i);\n i = out_i_2;\n }\n return testMessages;\n };\n TestScheduler.prototype.createAnimator = function () {\n var _this = this;\n if (!this.runMode) {\n throw new Error('animate() must only be used in run mode');\n }\n var lastHandle = 0;\n var map;\n var delegate = {\n requestAnimationFrame: function (callback) {\n if (!map) {\n throw new Error('animate() was not called within run()');\n }\n var handle = ++lastHandle;\n map.set(handle, callback);\n return handle;\n },\n cancelAnimationFrame: function (handle) {\n if (!map) {\n throw new Error('animate() was not called within run()');\n }\n map.delete(handle);\n },\n };\n var animate = function (marbles) {\n var e_1, _a;\n if (map) {\n throw new Error('animate() must not be called more than once within run()');\n }\n if (/[|#]/.test(marbles)) {\n throw new Error('animate() must not complete or error');\n }\n map = new Map();\n var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true);\n try {\n for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) {\n var message = messages_1_1.value;\n _this.schedule(function () {\n var e_2, _a;\n var now = _this.now();\n var callbacks = Array.from(map.values());\n map.clear();\n try {\n for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) {\n var callback = callbacks_1_1.value;\n callback(now);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }, message.frame);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n return { animate: animate, delegate: delegate };\n };\n TestScheduler.prototype.createDelegates = function () {\n var _this = this;\n var lastHandle = 0;\n var scheduleLookup = new Map();\n var run = function () {\n var now = _this.now();\n var scheduledRecords = Array.from(scheduleLookup.values());\n var scheduledRecordsDue = scheduledRecords.filter(function (_a) {\n var due = _a.due;\n return due <= now;\n });\n var dueImmediates = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'immediate';\n });\n if (dueImmediates.length > 0) {\n var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler;\n scheduleLookup.delete(handle);\n handler();\n return;\n }\n var dueIntervals = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'interval';\n });\n if (dueIntervals.length > 0) {\n var firstDueInterval = dueIntervals[0];\n var duration = firstDueInterval.duration, handler = firstDueInterval.handler;\n firstDueInterval.due = now + duration;\n firstDueInterval.subscription = _this.schedule(run, duration);\n handler();\n return;\n }\n var dueTimeouts = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'timeout';\n });\n if (dueTimeouts.length > 0) {\n var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler;\n scheduleLookup.delete(handle);\n handler();\n return;\n }\n throw new Error('Expected a due immediate or interval');\n };\n var immediate = {\n setImmediate: function (handler) {\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now(),\n duration: 0,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, 0),\n type: 'immediate',\n });\n return handle;\n },\n clearImmediate: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n var interval = {\n setInterval: function (handler, duration) {\n if (duration === void 0) { duration = 0; }\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now() + duration,\n duration: duration,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, duration),\n type: 'interval',\n });\n return handle;\n },\n clearInterval: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n var timeout = {\n setTimeout: function (handler, duration) {\n if (duration === void 0) { duration = 0; }\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now() + duration,\n duration: duration,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, duration),\n type: 'timeout',\n });\n return handle;\n },\n clearTimeout: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n return { immediate: immediate, interval: interval, timeout: timeout };\n };\n TestScheduler.prototype.run = function (callback) {\n var prevFrameTimeFactor = TestScheduler.frameTimeFactor;\n var prevMaxFrames = this.maxFrames;\n TestScheduler.frameTimeFactor = 1;\n this.maxFrames = Infinity;\n this.runMode = true;\n var animator = this.createAnimator();\n var delegates = this.createDelegates();\n animationFrameProvider.delegate = animator.delegate;\n dateTimestampProvider.delegate = this;\n immediateProvider.delegate = delegates.immediate;\n intervalProvider.delegate = delegates.interval;\n timeoutProvider.delegate = delegates.timeout;\n performanceTimestampProvider.delegate = this;\n var helpers = {\n cold: this.createColdObservable.bind(this),\n hot: this.createHotObservable.bind(this),\n flush: this.flush.bind(this),\n time: this.createTime.bind(this),\n expectObservable: this.expectObservable.bind(this),\n expectSubscriptions: this.expectSubscriptions.bind(this),\n animate: animator.animate,\n };\n try {\n var ret = callback(helpers);\n this.flush();\n return ret;\n }\n finally {\n TestScheduler.frameTimeFactor = prevFrameTimeFactor;\n this.maxFrames = prevMaxFrames;\n this.runMode = false;\n animationFrameProvider.delegate = undefined;\n dateTimestampProvider.delegate = undefined;\n immediateProvider.delegate = undefined;\n intervalProvider.delegate = undefined;\n timeoutProvider.delegate = undefined;\n performanceTimestampProvider.delegate = undefined;\n }\n };\n TestScheduler.frameTimeFactor = 10;\n return TestScheduler;\n}(VirtualTimeScheduler));\nexport { TestScheduler };\n//# sourceMappingURL=TestScheduler.js.map","export function getXHRResponse(xhr) {\n switch (xhr.responseType) {\n case 'json': {\n if ('response' in xhr) {\n return xhr.response;\n }\n else {\n var ieXHR = xhr;\n return JSON.parse(ieXHR.responseText);\n }\n }\n case 'document':\n return xhr.responseXML;\n case 'text':\n default: {\n if ('response' in xhr) {\n return xhr.response;\n }\n else {\n var ieXHR = xhr;\n return ieXHR.responseText;\n }\n }\n }\n}\n//# sourceMappingURL=getXHRResponse.js.map","import { getXHRResponse } from './getXHRResponse';\nvar AjaxResponse = (function () {\n function AjaxResponse(originalEvent, xhr, request, type) {\n if (type === void 0) { type = 'download_load'; }\n this.originalEvent = originalEvent;\n this.xhr = xhr;\n this.request = request;\n this.type = type;\n var status = xhr.status, responseType = xhr.responseType;\n this.status = status !== null && status !== void 0 ? status : 0;\n this.responseType = responseType !== null && responseType !== void 0 ? responseType : '';\n var allHeaders = xhr.getAllResponseHeaders();\n this.responseHeaders = allHeaders\n ?\n allHeaders.split('\\n').reduce(function (headers, line) {\n var index = line.indexOf(': ');\n headers[line.slice(0, index)] = line.slice(index + 2);\n return headers;\n }, {})\n : {};\n this.response = getXHRResponse(xhr);\n var loaded = originalEvent.loaded, total = originalEvent.total;\n this.loaded = loaded;\n this.total = total;\n }\n return AjaxResponse;\n}());\nexport { AjaxResponse };\n//# sourceMappingURL=AjaxResponse.js.map","import { getXHRResponse } from './getXHRResponse';\nimport { createErrorClass } from '../util/createErrorClass';\nexport var AjaxError = createErrorClass(function (_super) {\n return function AjaxErrorImpl(message, xhr, request) {\n this.message = message;\n this.name = 'AjaxError';\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType;\n var response;\n try {\n response = getXHRResponse(xhr);\n }\n catch (err) {\n response = xhr.responseText;\n }\n this.response = response;\n };\n});\nexport var AjaxTimeoutError = (function () {\n function AjaxTimeoutErrorImpl(xhr, request) {\n AjaxError.call(this, 'ajax timeout', xhr, request);\n this.name = 'AjaxTimeoutError';\n return this;\n }\n AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype);\n return AjaxTimeoutErrorImpl;\n})();\n//# sourceMappingURL=errors.js.map","import { __assign } from \"tslib\";\nimport { map } from '../operators/map';\nimport { Observable } from '../Observable';\nimport { AjaxResponse } from './AjaxResponse';\nimport { AjaxTimeoutError, AjaxError } from './errors';\nfunction ajaxGet(url, headers) {\n return ajax({ method: 'GET', url: url, headers: headers });\n}\nfunction ajaxPost(url, body, headers) {\n return ajax({ method: 'POST', url: url, body: body, headers: headers });\n}\nfunction ajaxDelete(url, headers) {\n return ajax({ method: 'DELETE', url: url, headers: headers });\n}\nfunction ajaxPut(url, body, headers) {\n return ajax({ method: 'PUT', url: url, body: body, headers: headers });\n}\nfunction ajaxPatch(url, body, headers) {\n return ajax({ method: 'PATCH', url: url, body: body, headers: headers });\n}\nvar mapResponse = map(function (x) { return x.response; });\nfunction ajaxGetJSON(url, headers) {\n return mapResponse(ajax({\n method: 'GET',\n url: url,\n headers: headers,\n }));\n}\nexport var ajax = (function () {\n var create = function (urlOrConfig) {\n var config = typeof urlOrConfig === 'string'\n ? {\n url: urlOrConfig,\n }\n : urlOrConfig;\n return fromAjax(config);\n };\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n return create;\n})();\nvar UPLOAD = 'upload';\nvar DOWNLOAD = 'download';\nvar LOADSTART = 'loadstart';\nvar PROGRESS = 'progress';\nvar LOAD = 'load';\nexport function fromAjax(init) {\n return new Observable(function (destination) {\n var _a, _b;\n var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init);\n var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers;\n var url = config.url;\n if (!url) {\n throw new TypeError('url is required');\n }\n if (queryParams) {\n var searchParams_1;\n if (url.includes('?')) {\n var parts = url.split('?');\n if (2 < parts.length) {\n throw new TypeError('invalid url');\n }\n searchParams_1 = new URLSearchParams(parts[1]);\n new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); });\n url = parts[0] + '?' + searchParams_1;\n }\n else {\n searchParams_1 = new URLSearchParams(queryParams);\n url = url + '?' + searchParams_1;\n }\n }\n var headers = {};\n if (configuredHeaders) {\n for (var key in configuredHeaders) {\n if (configuredHeaders.hasOwnProperty(key)) {\n headers[key.toLowerCase()] = configuredHeaders[key];\n }\n }\n }\n var crossDomain = config.crossDomain;\n if (!crossDomain && !('x-requested-with' in headers)) {\n headers['x-requested-with'] = 'XMLHttpRequest';\n }\n var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName;\n if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) {\n var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + xsrfCookieName + \")=([^;]*)\"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';\n if (xsrfCookie) {\n headers[xsrfHeaderName] = xsrfCookie;\n }\n }\n var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers);\n var _request = __assign(__assign({}, config), { url: url,\n headers: headers,\n body: body });\n var xhr;\n xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest();\n {\n var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d;\n var addErrorEvent = function (type, errorFactory) {\n xhr.addEventListener(type, function () {\n var _a;\n var error = errorFactory();\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error);\n destination.error(error);\n });\n };\n addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); });\n addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); });\n var createResponse_1 = function (direction, event) {\n return new AjaxResponse(event, xhr, _request, direction + \"_\" + event.type);\n };\n var addProgressEvent_1 = function (target, type, direction) {\n target.addEventListener(type, function (event) {\n destination.next(createResponse_1(direction, event));\n });\n };\n if (includeUploadProgress) {\n [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); });\n }\n if (progressSubscriber_1) {\n [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); });\n }\n if (includeDownloadProgress) {\n [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); });\n }\n var emitError_1 = function (status) {\n var msg = 'ajax error' + (status ? ' ' + status : '');\n destination.error(new AjaxError(msg, xhr, _request));\n };\n xhr.addEventListener('error', function (e) {\n var _a;\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e);\n emitError_1();\n });\n xhr.addEventListener(LOAD, function (event) {\n var _a, _b;\n var status = xhr.status;\n if (status < 400) {\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1);\n var response = void 0;\n try {\n response = createResponse_1(DOWNLOAD, event);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n destination.next(response);\n destination.complete();\n }\n else {\n (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event);\n emitError_1(status);\n }\n });\n }\n var user = _request.user, method = _request.method, async = _request.async;\n if (user) {\n xhr.open(method, url, async, user, _request.password);\n }\n else {\n xhr.open(method, url, async);\n }\n if (async) {\n xhr.timeout = _request.timeout;\n xhr.responseType = _request.responseType;\n }\n if ('withCredentials' in xhr) {\n xhr.withCredentials = _request.withCredentials;\n }\n for (var key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n if (body) {\n xhr.send(body);\n }\n else {\n xhr.send();\n }\n return function () {\n if (xhr && xhr.readyState !== 4) {\n xhr.abort();\n }\n };\n });\n}\nfunction extractContentTypeAndMaybeSerializeBody(body, headers) {\n var _a;\n if (!body ||\n typeof body === 'string' ||\n isFormData(body) ||\n isURLSearchParams(body) ||\n isArrayBuffer(body) ||\n isFile(body) ||\n isBlob(body) ||\n isReadableStream(body)) {\n return body;\n }\n if (isArrayBufferView(body)) {\n return body.buffer;\n }\n if (typeof body === 'object') {\n headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8';\n return JSON.stringify(body);\n }\n throw new TypeError('Unknown body type');\n}\nvar _toString = Object.prototype.toString;\nfunction toStringCheck(obj, name) {\n return _toString.call(obj) === \"[object \" + name + \"]\";\n}\nfunction isArrayBuffer(body) {\n return toStringCheck(body, 'ArrayBuffer');\n}\nfunction isFile(body) {\n return toStringCheck(body, 'File');\n}\nfunction isBlob(body) {\n return toStringCheck(body, 'Blob');\n}\nfunction isArrayBufferView(body) {\n return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body);\n}\nfunction isFormData(body) {\n return typeof FormData !== 'undefined' && body instanceof FormData;\n}\nfunction isURLSearchParams(body) {\n return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams;\n}\nfunction isReadableStream(body) {\n return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream;\n}\n//# sourceMappingURL=ajax.js.map","import { __assign, __extends } from \"tslib\";\nimport { Subject, AnonymousSubject } from '../../Subject';\nimport { Subscriber } from '../../Subscriber';\nimport { Observable } from '../../Observable';\nimport { Subscription } from '../../Subscription';\nimport { ReplaySubject } from '../../ReplaySubject';\nvar DEFAULT_WEBSOCKET_CONFIG = {\n url: '',\n deserializer: function (e) { return JSON.parse(e.data); },\n serializer: function (value) { return JSON.stringify(value); },\n};\nvar WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';\nvar WebSocketSubject = (function (_super) {\n __extends(WebSocketSubject, _super);\n function WebSocketSubject(urlConfigOrSource, destination) {\n var _this = _super.call(this) || this;\n _this._socket = null;\n if (urlConfigOrSource instanceof Observable) {\n _this.destination = destination;\n _this.source = urlConfigOrSource;\n }\n else {\n var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG));\n _this._output = new Subject();\n if (typeof urlConfigOrSource === 'string') {\n config.url = urlConfigOrSource;\n }\n else {\n for (var key in urlConfigOrSource) {\n if (urlConfigOrSource.hasOwnProperty(key)) {\n config[key] = urlConfigOrSource[key];\n }\n }\n }\n if (!config.WebSocketCtor && WebSocket) {\n config.WebSocketCtor = WebSocket;\n }\n else if (!config.WebSocketCtor) {\n throw new Error('no WebSocket constructor can be found');\n }\n _this.destination = new ReplaySubject();\n }\n return _this;\n }\n WebSocketSubject.prototype.lift = function (operator) {\n var sock = new WebSocketSubject(this._config, this.destination);\n sock.operator = operator;\n sock.source = this;\n return sock;\n };\n WebSocketSubject.prototype._resetState = function () {\n this._socket = null;\n if (!this.source) {\n this.destination = new ReplaySubject();\n }\n this._output = new Subject();\n };\n WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {\n var self = this;\n return new Observable(function (observer) {\n try {\n self.next(subMsg());\n }\n catch (err) {\n observer.error(err);\n }\n var subscription = self.subscribe({\n next: function (x) {\n try {\n if (messageFilter(x)) {\n observer.next(x);\n }\n }\n catch (err) {\n observer.error(err);\n }\n },\n error: function (err) { return observer.error(err); },\n complete: function () { return observer.complete(); },\n });\n return function () {\n try {\n self.next(unsubMsg());\n }\n catch (err) {\n observer.error(err);\n }\n subscription.unsubscribe();\n };\n });\n };\n WebSocketSubject.prototype._connectSocket = function () {\n var _this = this;\n var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;\n var observer = this._output;\n var socket = null;\n try {\n socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url);\n this._socket = socket;\n if (binaryType) {\n this._socket.binaryType = binaryType;\n }\n }\n catch (e) {\n observer.error(e);\n return;\n }\n var subscription = new Subscription(function () {\n _this._socket = null;\n if (socket && socket.readyState === 1) {\n socket.close();\n }\n });\n socket.onopen = function (evt) {\n var _socket = _this._socket;\n if (!_socket) {\n socket.close();\n _this._resetState();\n return;\n }\n var openObserver = _this._config.openObserver;\n if (openObserver) {\n openObserver.next(evt);\n }\n var queue = _this.destination;\n _this.destination = Subscriber.create(function (x) {\n if (socket.readyState === 1) {\n try {\n var serializer = _this._config.serializer;\n socket.send(serializer(x));\n }\n catch (e) {\n _this.destination.error(e);\n }\n }\n }, function (err) {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n if (err && err.code) {\n socket.close(err.code, err.reason);\n }\n else {\n observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));\n }\n _this._resetState();\n }, function () {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n socket.close();\n _this._resetState();\n });\n if (queue && queue instanceof ReplaySubject) {\n subscription.add(queue.subscribe(_this.destination));\n }\n };\n socket.onerror = function (e) {\n _this._resetState();\n observer.error(e);\n };\n socket.onclose = function (e) {\n if (socket === _this._socket) {\n _this._resetState();\n }\n var closeObserver = _this._config.closeObserver;\n if (closeObserver) {\n closeObserver.next(e);\n }\n if (e.wasClean) {\n observer.complete();\n }\n else {\n observer.error(e);\n }\n };\n socket.onmessage = function (e) {\n try {\n var deserializer = _this._config.deserializer;\n observer.next(deserializer(e));\n }\n catch (err) {\n observer.error(err);\n }\n };\n };\n WebSocketSubject.prototype._subscribe = function (subscriber) {\n var _this = this;\n var source = this.source;\n if (source) {\n return source.subscribe(subscriber);\n }\n if (!this._socket) {\n this._connectSocket();\n }\n this._output.subscribe(subscriber);\n subscriber.add(function () {\n var _socket = _this._socket;\n if (_this._output.observers.length === 0) {\n if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {\n _socket.close();\n }\n _this._resetState();\n }\n });\n return subscriber;\n };\n WebSocketSubject.prototype.unsubscribe = function () {\n var _socket = this._socket;\n if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {\n _socket.close();\n }\n this._resetState();\n _super.prototype.unsubscribe.call(this);\n };\n return WebSocketSubject;\n}(AnonymousSubject));\nexport { WebSocketSubject };\n//# sourceMappingURL=WebSocketSubject.js.map","import { WebSocketSubject } from './WebSocketSubject';\nexport function webSocket(urlConfigOrSource) {\n return new WebSocketSubject(urlConfigOrSource);\n}\n//# sourceMappingURL=webSocket.js.map","import { __assign, __rest } from \"tslib\";\nimport { createOperatorSubscriber } from '../../operators/OperatorSubscriber';\nimport { Observable } from '../../Observable';\nimport { innerFrom } from '../../observable/innerFrom';\nexport function fromFetch(input, initWithSelector) {\n if (initWithSelector === void 0) { initWithSelector = {}; }\n var selector = initWithSelector.selector, init = __rest(initWithSelector, [\"selector\"]);\n return new Observable(function (subscriber) {\n var controller = new AbortController();\n var signal = controller.signal;\n var abortable = true;\n var outerSignal = init.signal;\n if (outerSignal) {\n if (outerSignal.aborted) {\n controller.abort();\n }\n else {\n var outerSignalHandler_1 = function () {\n if (!signal.aborted) {\n controller.abort();\n }\n };\n outerSignal.addEventListener('abort', outerSignalHandler_1);\n subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); });\n }\n }\n var perSubscriberInit = __assign(__assign({}, init), { signal: signal });\n var handleError = function (err) {\n abortable = false;\n subscriber.error(err);\n };\n fetch(input, perSubscriberInit)\n .then(function (response) {\n if (selector) {\n innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n abortable = false;\n subscriber.complete();\n }, handleError));\n }\n else {\n abortable = false;\n subscriber.next(response);\n subscriber.complete();\n }\n })\n .catch(handleError);\n return function () {\n if (abortable) {\n controller.abort();\n }\n };\n });\n}\n//# sourceMappingURL=fetch.js.map","export * from '../index';\nimport * as _operators from '../operators/index';\nexport var operators = _operators;\nimport * as _testing from '../testing/index';\nexport var testing = _testing;\nimport * as _ajax from '../ajax/index';\nexport var ajax = _ajax;\nimport * as _webSocket from '../webSocket/index';\nexport var webSocket = _webSocket;\nimport * as _fetch from '../fetch/index';\nexport var fetch = _fetch;\n//# sourceMappingURL=umd.js.map"],"names":["observable","Symbol_observable","higherOrderRefCount","Symbol_iterator","iterator","NotificationKind","isArray","asyncScheduler","combineLatest","concat","DEFAULT_CONFIG","last","merge","oERNCreate","onErrorResumeNext","zip","zipStatic","partition","race","ajax","webSocket","fetch"],"mappings":";;;;;;IAAA;IACA;;IAEA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CA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_modules/rxjs/dist/bundles/rxjs.umd.min.js @@ -0,0 +1,195 @@ +/** + @license + Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt + **/ +/** + @license + Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt + **/ +/* + ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. +*****************************************************************************/ +(function(g,y){"object"===typeof exports&&"undefined"!==typeof module?y(exports):"function"===typeof define&&define.amd?define("rxjs",["exports"],y):y(g.rxjs={})})(this,function(g){function y(b,a){function c(){this.constructor=b}if("function"!==typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ta(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function Zd(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b, +d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);ea.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c}function $d(b,a,c,d){function e(a){return a instanceof c?a:new c(function(b){b(a)})}return new (c||(c=Promise))(function(c,h){function f(a){try{z(d.next(a))}catch(v){h(v)}}function k(a){try{z(d["throw"](a))}catch(v){h(v)}}function z(a){a.done?c(a.value): +e(a.value).then(f,k)}z((d=d.apply(b,a||[])).next())})}function Ua(b,a){function c(a){return function(b){return d([a,b])}}function d(c){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,h&&(l=c[0]&2?h["return"]:c[0]?h["throw"]||((l=h["return"])&&l.call(h),0):h.next)&&!(l=l.call(h,c[1])).done)return l;if(h=0,l)c=[c[0]&2,l.value];switch(c[0]){case 0:case 1:l=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;h=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop(); +continue;default:if(!(l=e.trys,l=0l[0]&&c[1]=b.length&&(b=void 0);return{value:b&&b[d++],done:!b}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.");}function w(b,a){var c="function"===typeof Symbol&&b[Symbol.iterator];if(!c)return b;b= +c.call(b);var d,e=[],f;try{for(;(void 0===a||0=b._refCount||0<--b._refCount)c=null;else{var d=b._connection,f=c;c=null;!d||f&&d!==f||d.unsubscribe();a.unsubscribe()}});b.subscribe(d);d.closed||(c=b.connect())})}function Mb(b){return new r(function(a){var c=b||Da,d=c.now(),e=0,f=function(){a.closed||(e=N.requestAnimationFrame(function(h){e=0;var l=c.now();a.next({timestamp:b?l:h,elapsed:l-d});f()}))};f();return function(){e&&N.cancelAnimationFrame(e)}})}function Nb(b){return b in +$a?(delete $a[b],!0):!1}function de(b){return new r(function(a){return b.schedule(function(){return a.complete()})})}function Ea(b){return b&&t(b.schedule)}function oa(b){return t(b[b.length-1])?b.pop():void 0}function O(b){return Ea(b[b.length-1])?b.pop():void 0}function Ob(b){return Symbol.asyncIterator&&t(null===b||void 0===b?void 0:b[Symbol.asyncIterator])}function Pb(b){return new TypeError("You provided "+(null!==b&&"object"===typeof b?"an invalid object":"'"+b+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")} +function Qb(b){return t(null===b||void 0===b?void 0:b[ab])}function Rb(b){return ae(this,arguments,function(){var a,c,d,e;return Ua(this,function(f){switch(f.label){case 0:a=b.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,ca(a.read())];case 3:return c=f.sent(),d=c.value,(e=c.done)?[4,ca(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,ca(d)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})} +function q(b){if(b instanceof r)return b;if(null!=b){if(t(b[pa]))return ee(b);if(bb(b))return fe(b);if(t(null===b||void 0===b?void 0:b.then))return ge(b);if(Ob(b))return Sb(b);if(Qb(b))return he(b);if(t(null===b||void 0===b?void 0:b.getReader))return Sb(Rb(b))}throw Pb(b);}function ee(b){return new r(function(a){var c=b[pa]();if(t(c.subscribe))return c.subscribe(a);throw new TypeError("Provided object does not correctly implement Symbol.observable");})}function fe(b){return new r(function(a){for(var c= +0;ce&&(e=0);var h=0;return c.schedule(function(){a.closed||(a.next(h++),0<=d?this.schedule(void 0,d):a.complete())},e)})}function ec(b,a){void 0===b&&(b=0);void 0===a&&(a=I);0>b&&(b=0);return Y(b,b,a)}function Z(b){return 1===b.length&&we(b[0])?b[0]:b}function fc(){for(var b=[],a=0;a=b?function(){return L}:n(function(a,c){var d=0;a.subscribe(m(c,function(a){++d<=b&&(c.next(a),b<=d&&c.complete())}))})} +function ob(){return n(function(b,a){b.subscribe(m(a,C))})}function pb(b){return Q(function(){return b})}function Ma(b,a){return a?function(c){return ta(a.pipe(ga(1),ob()),c.pipe(Ma(b)))}:H(function(a,d){return q(b(a,d)).pipe(ga(1),pb(a))})}function xc(b,a){void 0===a&&(a=I);var c=Y(b,a);return Ma(function(){return c})}function yc(){return n(function(b,a){b.subscribe(m(a,function(c){return Fa(c,a)}))})}function zc(b,a){return n(function(c,d){var e=new Set;c.subscribe(m(d,function(a){var c=b?b(a): +a;e.has(c)||(e.add(c),d.next(a))}));a&&q(a).subscribe(m(d,function(){return e.clear()},C))})}function qb(b,a){void 0===a&&(a=E);b=null!==b&&void 0!==b?b:De;return n(function(c,d){var e,f=!0;c.subscribe(m(d,function(c){var h=a(c);if(f||!b(e,h))f=!1,e=h,d.next(c)}))})}function De(b,a){return b===a}function Ac(b,a){return qb(function(c,d){return a?a(c[b],d[b]):c[b]===d[b]})}function va(b){void 0===b&&(b=Ee);return n(function(a,c){var d=!1;a.subscribe(m(c,function(a){d=!0;c.next(a)},function(){return d? +c.complete():c.error(b())}))})}function Ee(){return new aa}function Bc(b,a){if(0>b)throw new rb;var c=2<=arguments.length;return function(d){return d.pipe(K(function(a,c){return c===b}),ga(1),c?ua(a):va(function(){return new rb}))}}function Cc(){for(var b=[],a=0;a(a||0)?Infinity:a;return n(function(d,e){return gb(d,e,b,a,void 0,!0,c)})}function Fc(b){return n(function(a, +c){try{a.subscribe(c)}finally{c.add(b)}})}function Gc(b,a){return n(Hc(b,a,"value"))}function Hc(b,a,c){var d="index"===c;return function(c,f){var e=0;c.subscribe(m(f,function(h){var l=e++;b.call(a,h,l,c)&&(f.next(d?l:h),f.complete())},function(){f.next(d?-1:void 0);f.complete()}))}}function Ic(b,a){return n(Hc(b,a,"index"))}function Jc(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?K(function(a,c){return b(a,c,d)}):E,ga(1),c?ua(a):va(function(){return new aa}))}}function Kc(b, +a,c,d){return n(function(e,f){function h(a,c){var b=new r(function(a){v++;var b=c.subscribe(a);return function(){b.unsubscribe();0===--v&&n&&Va.unsubscribe()}});b.key=a;return b}var l;a&&"function"!==typeof a?(c=a.duration,l=a.element,d=a.connector):l=a;var k=new Map,g=function(a){k.forEach(a);a(f)},p=function(a){return g(function(c){return c.error(a)})},v=0,n=!1,Va=new Ya(f,function(a){try{var e=b(a),g=k.get(e);if(!g){k.set(e,g=d?d():new A);var z=h(e,g);f.next(z);if(c){var v=m(g,function(){g.complete(); +null===v||void 0===v?void 0:v.unsubscribe()},void 0,void 0,function(){return k.delete(e)});Va.add(q(c(z)).subscribe(v))}}g.next(l?l(a):a)}catch(xe){p(xe)}},function(){return g(function(a){return a.complete()})},p,function(){return k.clear()},function(){n=!0;return 0===v});e.subscribe(Va)})}function Lc(){return n(function(b,a){b.subscribe(m(a,function(){a.next(!1);a.complete()},function(){a.next(!0);a.complete()}))})}function sb(b){return 0>=b?function(){return L}:n(function(a,c){var d=[];a.subscribe(m(c, +function(a){d.push(a);bc?a:c})}function Pc(b,a,c){void 0===c&&(c=Infinity);if(t(a))return H(function(){return b},a,c);"number"===typeof a&&(c=a);return H(function(){return b},c)}function Qc(b,a,c){void 0===c&&(c=Infinity);return n(function(d,e){var f=a;return gb(d,e,function(a,c){return b(f,a,c)},c,function(a){f=a},!1,void 0, +function(){return f=null})})}function Rc(){for(var b=[],a=0;ab(a,c)?a:c}:function(a,c){return a=c?function(){return L}:n(function(a,b){var e=0,f,k=function(){null===f||void 0===f?void 0:f.unsubscribe();f=null;if(null!=d){var a="number"===typeof d?Y(d):q(d(e)),c=m(b,function(){c.unsubscribe();g()});a.subscribe(c)}else g()},g=function(){var d=!1;f=a.subscribe(m(b,void 0,function(){++e= +c?E:n(function(a,b){var f=0,h,g=function(){var l=!1;h=a.subscribe(m(b,function(a){e&&(f=0);b.next(a)},void 0,function(a){if(f++=b?E:n(function(a,c){var d= +Array(b),e=0;a.subscribe(m(c,function(a){var f=e++;if(fe){null===(b=null===r||void 0===r?void 0:r.complete)||void 0===b?void 0:b.call(r);b=void 0;try{b=new yb(c,u,q,Od+"_"+c.type)}catch(ye){a.error(ye);return}a.next(b);a.complete()}else null===(d=null===r||void 0===r?void 0:r.error)||void 0===d?void 0:d.call(r,c),x(e)});e=q.user;d=q.method;h=q.async; +e?u.open(d,k,h,e,q.password):u.open(d,k,h);h&&(u.timeout=q.timeout,u.responseType=q.responseType);"withCredentials"in u&&(u.withCredentials=q.withCredentials);for(p in f)f.hasOwnProperty(p)&&u.setRequestHeader(p,f[p]);c?u.send(c):u.send();return function(){u&&4!==u.readyState&&u.abort()}})}function Oe(b,a){var c;if(!b||"string"===typeof b||"undefined"!==typeof FormData&&b instanceof FormData||"undefined"!==typeof URLSearchParams&&b instanceof URLSearchParams||Bb(b,"ArrayBuffer")||Bb(b,"File")||Bb(b, +"Blob")||"undefined"!==typeof ReadableStream&&b instanceof ReadableStream)return b;if("undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView(b))return b.buffer;if("object"===typeof b)return a["content-type"]=null!==(c=a["content-type"])&&void 0!==c?c:"application/json;charset\x3dutf-8",JSON.stringify(b);throw new TypeError("Unknown body type");}function Bb(b,a){return Qe.call(b)==="[object "+a+"]"}var Ta=function(b,a){Ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__= +b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};return Ta(b,a)},T=function(){T=Object.assign||function(b){for(var a,c=1,d=arguments.length;ca&&hb.index?1:-1:a.delay>b.delay?1:-1};return a}(ya),L=new r(function(b){return b.complete()}), +bb=function(b){return b&&"number"===typeof b.length&&"function"!==typeof b},ab;ab="function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";(function(b){b.NEXT="N";b.ERROR="E";b.COMPLETE="C"})(g.NotificationKind||(g.NotificationKind={}));var Pa=function(){function b(a,b,d){this.kind=a;this.value=b;this.error=d;this.hasValue="N"===a}b.prototype.observe=function(a){return Fa(this,a)};b.prototype.do=function(a,b,d){var c=this.kind,f=this.value,h=this.error;return"N"===c?null===a||void 0=== +a?void 0:a(f):"E"===c?null===b||void 0===b?void 0:b(h):null===d||void 0===d?void 0:d()};b.prototype.accept=function(a,b,d){return t(null===a||void 0===a?void 0:a.next)?this.observe(a):this.do(a,b,d)};b.prototype.toObservable=function(){var a=this.kind,b=this.value,d=this.error,b="N"===a?cb(b):"E"===a?Wb(function(){return d}):"C"===a?L:0;if(!b)throw new TypeError("Unexpected notification kind "+a);return b};b.createNext=function(a){return new b("N",a)};b.createError=function(a){return new b("E",void 0, +a)};b.createComplete=function(){return b.completeNotification};b.completeNotification=new b("C");return b}(),aa=R(function(b){return function(){b(this);this.name="EmptyError";this.message="no elements in sequence"}}),rb=R(function(b){return function(){b(this);this.name="ArgumentOutOfRangeError";this.message="argument out of range"}}),ld=R(function(b){return function(a){b(this);this.name="NotFoundError";this.message=a}}),kd=R(function(b){return function(a){b(this);this.name="SequenceError";this.message= +a}}),Xb=R(function(b){return function(a){void 0===a&&(a=null);b(this);this.message="Timeout has occurred";this.name="TimeoutError";this.info=a}}),le=Array.isArray,me=Array.isArray,ne=Object.getPrototypeOf,oe=Object.prototype,pe=Object.keys,$e={connector:function(){return new A},resetOnDisconnect:!0},te=["addListener","removeListener"],re=["addEventListener","removeEventListener"],ve=["on","off"],Vd=new r(C),we=Array.isArray,Ae=function(b,a){return b.push(a),b},Ce={connector:function(){return new A}}, +Fe=function(){return function(b,a){this.value=b;this.interval=a}}(),af=Object.freeze({audit:kb,auditTime:ic,buffer:jc,bufferCount:kc,bufferTime:lc,bufferToggle:mc,bufferWhen:nc,catchError:lb,combineAll:Ja,combineLatestAll:Ja,combineLatest:nb,combineLatestWith:qc,concat:sc,concatAll:Ha,concatMap:Ka,concatMapTo:rc,concatWith:tc,connect:La,count:uc,debounce:vc,debounceTime:wc,defaultIfEmpty:ua,delay:xc,delayWhen:Ma,dematerialize:yc,distinct:zc,distinctUntilChanged:qb,distinctUntilKeyChanged:Ac,elementAt:Bc, +endWith:Cc,every:Dc,exhaust:Oa,exhaustAll:Oa,exhaustMap:Na,expand:Ec,filter:K,finalize:Fc,find:Gc,findIndex:Ic,first:Jc,groupBy:Kc,ignoreElements:ob,isEmpty:Lc,last:Mc,map:Q,mapTo:pb,materialize:Nc,max:Oc,merge:Rc,mergeAll:sa,flatMap:H,mergeMap:H,mergeMapTo:Pc,mergeScan:Qc,mergeWith:Sc,min:Tc,multicast:Qa,observeOn:qa,onErrorResumeNext:Uc,pairwise:Vc,partition:function(b,a){return function(c){return[K(b,a)(c),K(gc(b,a))(c)]}},pluck:Wc,publish:Xc,publishBehavior:Yc,publishLast:$c,publishReplay:ad, +race:function(){for(var b=[],a=0;ak?new Aa(l):new Aa(l,k)};a.parseMarbles=function(a, +b,e,f,g){var c=this;void 0===f&&(f=!1);void 0===g&&(g=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');var d=x([],w(a)),h=d.length,p=[];a=g?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^");var m=-1===a?0:a*-this.frameTimeFactor,n="object"!==typeof b?function(a){return a}:function(a){return f&&b[a]instanceof Hb?b[a].messages:b[a]},q=-1;a=function(a){var b=m,f=function(a){b+=a*c.frameTimeFactor},h=void 0,k=d[a];switch(k){case " ":g||f(1); +break;case "-":f(1);break;case "(":q=m;f(1);break;case ")":q=-1;f(1);break;case "|":h=xa;f(1);break;case "^":f(1);break;case "#":h=J("E",void 0,e||"error");f(1);break;default:if(g&&k.match(/^[0-9]$/)&&(0===a||" "===d[a-1])){var l=d.slice(a).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(l){a+=l[0].length-1;var k=parseFloat(l[1]),v=void 0;switch(l[2]){case "ms":v=k;break;case "s":v=1E3*k;break;case "m":v=6E4*k}f(v/r.frameTimeFactor);break}}h=J("N",n(k),void 0);f(1)}h&&p.push({frame:-1=a)return L;var d=a+b;return new r(c?function(a){var e=b;return c.schedule(function(){e< +d?(a.next(e++),this.schedule()):a.complete()})}:function(a){for(var c=b;c= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnonymousSubject = exports.Subject = void 0; +var Observable_1 = require("./Observable"); +var Subscription_1 = require("./Subscription"); +var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); +var arrRemove_1 = require("./util/arrRemove"); +var errorContext_1 = require("./util/errorContext"); +var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype._throwIfClosed = function () { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject.prototype.next = function (value) { + var _this = this; + errorContext_1.errorContext(function () { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { + var observer = _c.value; + observer.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + }); + }; + Subject.prototype.error = function (err) { + var _this = this; + errorContext_1.errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject.prototype.complete = function () { + var _this = this; + errorContext_1.errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject.prototype, "observed", { + get: function () { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject.prototype._trySubscribe = function (subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject.prototype._innerSubscribe = function (subscriber) { + var _this = this; + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + if (hasError || isStopped) { + return Subscription_1.EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription_1.Subscription(function () { + _this.currentObservers = null; + arrRemove_1.arrRemove(observers, subscriber); + }); + }; + Subject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped) { + subscriber.complete(); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(Observable_1.Observable)); +exports.Subject = Subject; +var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject.prototype.error = function (err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject.prototype.complete = function () { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject; +}(Subject)); +exports.AnonymousSubject = AnonymousSubject; +//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subject.js.map b/node_modules/rxjs/dist/cjs/internal/Subject.js.map new file mode 100644 index 0000000..474ff61 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/Subject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C,+CAAkE;AAElE,0EAAyE;AACzE,8CAA6C;AAC7C,oDAAmD;AASnD;IAAgC,2BAAa;IAwB3C;QAAA,YAEE,iBAAO,SACR;QA1BD,YAAM,GAAG,KAAK,CAAC;QAEP,sBAAgB,GAAyB,IAAI,CAAC;QAGtD,eAAS,GAAkB,EAAE,CAAC;QAE9B,eAAS,GAAG,KAAK,CAAC;QAElB,cAAQ,GAAG,KAAK,CAAC;QAEjB,iBAAW,GAAQ,IAAI,CAAC;;IAexB,CAAC;IAGD,sBAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,QAAe,CAAC;QACnC,OAAO,OAAc,CAAC;IACxB,CAAC;IAGS,gCAAc,GAAxB;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAI,iDAAuB,EAAE,CAAC;SACrC;IACH,CAAC;IAED,sBAAI,GAAJ,UAAK,KAAQ;QAAb,iBAYC;QAXC,2BAAY,CAAC;;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,KAAI,CAAC,gBAAgB,EAAE;oBAC1B,KAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,SAAS,CAAC,CAAC;iBACpD;;oBACD,K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AAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;IAxHM,cAAM,GAA4B,UAAI,WAAwB,EAAE,MAAqB;QAC1F,OAAO,IAAI,gBAAgB,CAAI,WAAW,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC;IAuHJ,cAAC;CAAA,AA7ID,CAAgC,uBAAU,GA6IzC;AA7IY,0BAAO;AAkJpB;IAAyC,oCAAU;IACjD,0BAES,WAAyB,EAChC,MAAsB;QAHxB,YAKE,iBAAO,SAER;QALQ,iBAAW,GAAX,WAAW,CAAc;QAIhC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACvB,CAAC;IAED,+BAAI,GAAJ,UAAK,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,mCAAQ,GAAR;;QACE,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,iCAAkB,CAAC;IAClE,CAAC;IACH,uBAAC;AAAD,CAAC,AA1BD,CAAyC,OAAO,GA0B/C;AA1BY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscriber.js b/node_modules/rxjs/dist/cjs/internal/Subscriber.js new file mode 100644 index 0000000..743e9c8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/Subscriber.js @@ -0,0 +1,201 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EMPTY_OBSERVER = exports.SafeSubscriber = exports.Subscriber = void 0; +var isFunction_1 = require("./util/isFunction"); +var Subscription_1 = require("./Subscription"); +var config_1 = require("./config"); +var reportUnhandledError_1 = require("./util/reportUnhandledError"); +var noop_1 = require("./util/noop"); +var NotificationFactories_1 = require("./NotificationFactories"); +var timeoutProvider_1 = require("./scheduler/timeoutProvider"); +var errorContext_1 = require("./util/errorContext"); +var Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } + else { + _this.destination = exports.EMPTY_OBSERVER; + } + return _this; + } + Subscriber.create = function (next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber.prototype.next = function (value) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); + } + else { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); + } + else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } + else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + try { + this.destination.error(err); + } + finally { + this.unsubscribe(); + } + }; + Subscriber.prototype._complete = function () { + try { + this.destination.complete(); + } + finally { + this.unsubscribe(); + } + }; + return Subscriber; +}(Subscription_1.Subscription)); +exports.Subscriber = Subscriber; +var _bind = Function.prototype.bind; +function bind(fn, thisArg) { + return _bind.call(fn, thisArg); +} +var ConsumerObserver = (function () { + function ConsumerObserver(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver.prototype.next = function (value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + ConsumerObserver.prototype.error = function (err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } + catch (error) { + handleUnhandledError(error); + } + } + else { + handleUnhandledError(err); + } + }; + ConsumerObserver.prototype.complete = function () { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + return ConsumerObserver; +}()); +var SafeSubscriber = (function (_super) { + __extends(SafeSubscriber, _super); + function SafeSubscriber(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var partialObserver; + if (isFunction_1.isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), + error: error !== null && error !== void 0 ? error : undefined, + complete: complete !== null && complete !== void 0 ? complete : undefined, + }; + } + else { + var context_1; + if (_this && config_1.config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function () { return _this.unsubscribe(); }; + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context_1), + error: observerOrNext.error && bind(observerOrNext.error, context_1), + complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), + }; + } + else { + partialObserver = observerOrNext; + } + } + _this.destination = new ConsumerObserver(partialObserver); + return _this; + } + return SafeSubscriber; +}(Subscriber)); +exports.SafeSubscriber = SafeSubscriber; +function handleUnhandledError(error) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(error); + } + else { + reportUnhandledError_1.reportUnhandledError(error); + } +} +function defaultErrorHandler(err) { + throw err; +} +function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config_1.config.onStoppedNotification; + onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); +} +exports.EMPTY_OBSERVER = { + closed: true, + next: noop_1.noop, + error: defaultErrorHandler, + complete: noop_1.noop, +}; +//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map b/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map new file mode 100644 index 0000000..6a7e157 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,+CAA8D;AAC9D,mCAAkC;AAClC,oEAAmE;AACnE,oCAAmC;AACnC,iEAAqG;AACrG,+DAA8D;AAC9D,oDAAmD;AAYnD;IAAmC,8BAAY;IA6B7C,oBAAY,WAA6C;QAAzD,YACE,iBAAO,SAWR;QApBS,eAAS,GAAY,KAAK,CAAC;QAUnC,IAAI,WAAW,EAAE;YACf,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAG/B,IAAI,6BAAc,CAAC,WAAW,CAAC,EAAE;gBAC/B,WAAW,CAAC,GAAG,CAAC,KAAI,CAAC,CAAC;aACvB;SACF;aAAM;YACL,KAAI,CAAC,WAAW,GAAG,sBAAc,CAAC;SACnC;;IACH,CAAC;IAzBM,iBAAM,GAAb,UAAiB,IAAsB,EAAE,KAAyB,EAAE,QAAqB;QACvF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,CAA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I,eAAM,CAAC,qCAAqC,EAAE;QAChD,2BAAY,CAAC,KAAK,CAAC,CAAC;KACrB;SAAM;QAGL,2CAAoB,CAAC,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAQD,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,GAAG,CAAC;AACZ,CAAC;AAOD,SAAS,yBAAyB,CAAC,YAAyC,EAAE,UAA2B;IAC/F,IAAA,qBAAqB,GAAK,eAAM,sBAAX,CAAY;IACzC,qBAAqB,IAAI,iCAAe,CAAC,UAAU,CAAC,cAAM,OAAA,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC7G,CAAC;AAOY,QAAA,cAAc,GAA+C;IACxE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,WAAI;IACV,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,WAAI;CACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscription.js b/node_modules/rxjs/dist/cjs/internal/Subscription.js new file mode 100644 index 0000000..9ee9ac0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/Subscription.js @@ -0,0 +1,178 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isSubscription = exports.EMPTY_SUBSCRIPTION = exports.Subscription = void 0; +var isFunction_1 = require("./util/isFunction"); +var UnsubscriptionError_1 = require("./util/UnsubscriptionError"); +var arrRemove_1 = require("./util/arrRemove"); +var Subscription = (function () { + function Subscription(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription.prototype.unsubscribe = function () { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction_1.isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } + catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer(finalizer); + } + catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } + else { + errors.push(err); + } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); + } + finally { if (e_2) throw e_2.error; } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + } + }; + Subscription.prototype.add = function (teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } + else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription.prototype._hasParent = function (parent) { + var _parentage = this._parentage; + return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + }; + Subscription.prototype._addParent = function (parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription.prototype._removeParent = function (parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } + else if (Array.isArray(_parentage)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription.prototype.remove = function (teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove_1.arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + }; + Subscription.EMPTY = (function () { + var empty = new Subscription(); + empty.closed = true; + return empty; + })(); + return Subscription; +}()); +exports.Subscription = Subscription; +exports.EMPTY_SUBSCRIPTION = Subscription.EMPTY; +function isSubscription(value) { + return (value instanceof Subscription || + (value && 'closed' in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe))); +} +exports.isSubscription = isSubscription; +function execFinalizer(finalizer) { + if (isFunction_1.isFunction(finalizer)) { + finalizer(); + } + else { + finalizer.unsubscribe(); + } +} +//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscription.js.map b/node_modules/rxjs/dist/cjs/internal/Subscription.js.map new file mode 100644 index 0000000..6662476 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/Subscription.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAC/C,kEAAiE;AAEjE,8CAA6C;AAc7C;IAyBE,sBAAoB,eAA4B;QAA5B,oBAAe,GAAf,eAAe,CAAa;QAdzC,WAAM,GAAG,KAAK,CAAC;QAEd,eAAU,GAAyC,IAAI,CAAC;QAMxD,gBAAW,GAA0C,IAAI,CAAC;IAMf,CAAC;IAQpD,kCAAW,GAAX;;QACE,IAAI,MAAyB,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAGX,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;YAC5B,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;;wBAC7B,KAAqB,IAAA,eAAA,SAAA,UAAU,CAAA,sCAAA,8DAAE;4BAA5B,IAAM,QAAM,uBAAA;4BACf,QAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;yBACrB;;;;;;;;;iBACF;qBAAM;oBACL,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACzB;aACF;YAEO,IAAiB,gBAAgB,GAAK,IAAI,gBAAT,CAAU;YACnD,IAAI,uBAAU,CAAC,gBAAgB,CAAC,EAAE;gBAChC,IAAI;oBACF,gBAAgB,EAAE,CAAC;iBACpB;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,GAAG,CAAC,YAAY,yCAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC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LD,IAqLC;AArLY,oCAAY;AAuLZ,QAAA,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,SAAgB,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,uBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AALD,wCAKC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,uBAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js new file mode 100644 index 0000000..7a2c3f7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AjaxResponse = void 0; +var getXHRResponse_1 = require("./getXHRResponse"); +var AjaxResponse = (function () { + function AjaxResponse(originalEvent, xhr, request, type) { + if (type === void 0) { type = 'download_load'; } + this.originalEvent = originalEvent; + this.xhr = xhr; + this.request = request; + this.type = type; + var status = xhr.status, responseType = xhr.responseType; + this.status = status !== null && status !== void 0 ? status : 0; + this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; + var allHeaders = xhr.getAllResponseHeaders(); + this.responseHeaders = allHeaders + ? + allHeaders.split('\n').reduce(function (headers, line) { + var index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) + : {}; + this.response = getXHRResponse_1.getXHRResponse(xhr); + var loaded = originalEvent.loaded, total = originalEvent.total; + this.loaded = loaded; + this.total = total; + } + return AjaxResponse; +}()); +exports.AjaxResponse = AjaxResponse; +//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map new file mode 100644 index 0000000..52cadde --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAgBlD;IA+CE,sBAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,IAAwC;QAAxC,qBAAA,EAAA,sBAAwC;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAEhD,IAAA,MAAM,GAAmB,GAAG,OAAtB,EAAE,YAAY,GAAK,GAAG,aAAR,CAAS;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,IAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,OAA+B,EAAE,IAAI;oBAIlE,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,+BAAc,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAA,MAAM,GAAY,aAAa,OAAzB,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACH,mBAAC;AAAD,CAAC,AA1GD,IA0GC;AA1GY,oCAAY"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js new file mode 100644 index 0000000..9c46066 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js @@ -0,0 +1,253 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromAjax = exports.ajax = void 0; +var map_1 = require("../operators/map"); +var Observable_1 = require("../Observable"); +var AjaxResponse_1 = require("./AjaxResponse"); +var errors_1 = require("./errors"); +function ajaxGet(url, headers) { + return exports.ajax({ method: 'GET', url: url, headers: headers }); +} +function ajaxPost(url, body, headers) { + return exports.ajax({ method: 'POST', url: url, body: body, headers: headers }); +} +function ajaxDelete(url, headers) { + return exports.ajax({ method: 'DELETE', url: url, headers: headers }); +} +function ajaxPut(url, body, headers) { + return exports.ajax({ method: 'PUT', url: url, body: body, headers: headers }); +} +function ajaxPatch(url, body, headers) { + return exports.ajax({ method: 'PATCH', url: url, body: body, headers: headers }); +} +var mapResponse = map_1.map(function (x) { return x.response; }); +function ajaxGetJSON(url, headers) { + return mapResponse(exports.ajax({ + method: 'GET', + url: url, + headers: headers, + })); +} +exports.ajax = (function () { + var create = function (urlOrConfig) { + var config = typeof urlOrConfig === 'string' + ? { + url: urlOrConfig, + } + : urlOrConfig; + return fromAjax(config); + }; + create.get = ajaxGet; + create.post = ajaxPost; + create.delete = ajaxDelete; + create.put = ajaxPut; + create.patch = ajaxPatch; + create.getJSON = ajaxGetJSON; + return create; +})(); +var UPLOAD = 'upload'; +var DOWNLOAD = 'download'; +var LOADSTART = 'loadstart'; +var PROGRESS = 'progress'; +var LOAD = 'load'; +function fromAjax(init) { + return new Observable_1.Observable(function (destination) { + var _a, _b; + var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); + var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; + var url = config.url; + if (!url) { + throw new TypeError('url is required'); + } + if (queryParams) { + var searchParams_1; + if (url.includes('?')) { + var parts = url.split('?'); + if (2 < parts.length) { + throw new TypeError('invalid url'); + } + searchParams_1 = new URLSearchParams(parts[1]); + new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); + url = parts[0] + '?' + searchParams_1; + } + else { + searchParams_1 = new URLSearchParams(queryParams); + url = url + '?' + searchParams_1; + } + } + var headers = {}; + if (configuredHeaders) { + for (var key in configuredHeaders) { + if (configuredHeaders.hasOwnProperty(key)) { + headers[key.toLowerCase()] = configuredHeaders[key]; + } + } + } + var crossDomain = config.crossDomain; + if (!crossDomain && !('x-requested-with' in headers)) { + headers['x-requested-with'] = 'XMLHttpRequest'; + } + var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; + if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { + var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; + if (xsrfCookie) { + headers[xsrfHeaderName] = xsrfCookie; + } + } + var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); + var _request = __assign(__assign({}, config), { url: url, + headers: headers, + body: body }); + var xhr; + xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); + { + var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; + var addErrorEvent = function (type, errorFactory) { + xhr.addEventListener(type, function () { + var _a; + var error = errorFactory(); + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); + destination.error(error); + }); + }; + addErrorEvent('timeout', function () { return new errors_1.AjaxTimeoutError(xhr, _request); }); + addErrorEvent('abort', function () { return new errors_1.AjaxError('aborted', xhr, _request); }); + var createResponse_1 = function (direction, event) { + return new AjaxResponse_1.AjaxResponse(event, xhr, _request, direction + "_" + event.type); + }; + var addProgressEvent_1 = function (target, type, direction) { + target.addEventListener(type, function (event) { + destination.next(createResponse_1(direction, event)); + }); + }; + if (includeUploadProgress) { + [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); + } + if (progressSubscriber_1) { + [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); + } + if (includeDownloadProgress) { + [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); + } + var emitError_1 = function (status) { + var msg = 'ajax error' + (status ? ' ' + status : ''); + destination.error(new errors_1.AjaxError(msg, xhr, _request)); + }; + xhr.addEventListener('error', function (e) { + var _a; + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); + emitError_1(); + }); + xhr.addEventListener(LOAD, function (event) { + var _a, _b; + var status = xhr.status; + if (status < 400) { + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); + var response = void 0; + try { + response = createResponse_1(DOWNLOAD, event); + } + catch (err) { + destination.error(err); + return; + } + destination.next(response); + destination.complete(); + } + else { + (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); + emitError_1(status); + } + }); + } + var user = _request.user, method = _request.method, async = _request.async; + if (user) { + xhr.open(method, url, async, user, _request.password); + } + else { + xhr.open(method, url, async); + } + if (async) { + xhr.timeout = _request.timeout; + xhr.responseType = _request.responseType; + } + if ('withCredentials' in xhr) { + xhr.withCredentials = _request.withCredentials; + } + for (var key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + if (body) { + xhr.send(body); + } + else { + xhr.send(); + } + return function () { + if (xhr && xhr.readyState !== 4) { + xhr.abort(); + } + }; + }); +} +exports.fromAjax = fromAjax; +function extractContentTypeAndMaybeSerializeBody(body, headers) { + var _a; + if (!body || + typeof body === 'string' || + isFormData(body) || + isURLSearchParams(body) || + isArrayBuffer(body) || + isFile(body) || + isBlob(body) || + isReadableStream(body)) { + return body; + } + if (isArrayBufferView(body)) { + return body.buffer; + } + if (typeof body === 'object') { + headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; + return JSON.stringify(body); + } + throw new TypeError('Unknown body type'); +} +var _toString = Object.prototype.toString; +function toStringCheck(obj, name) { + return _toString.call(obj) === "[object " + name + "]"; +} +function isArrayBuffer(body) { + return toStringCheck(body, 'ArrayBuffer'); +} +function isFile(body) { + return toStringCheck(body, 'File'); +} +function isBlob(body) { + return toStringCheck(body, 'Blob'); +} +function isArrayBufferView(body) { + return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); +} +function isFormData(body) { + return typeof FormData !== 'undefined' && body instanceof FormData; +} +function isURLSearchParams(body) { + return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; +} +function isReadableStream(body) { + return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; +} +//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map new file mode 100644 index 0000000..9fa597d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAuC;AACvC,4CAA2C;AAE3C,+CAA8C;AAC9C,mCAAuD;AAqIvD,SAAS,OAAO,CAAI,GAAW,EAAE,OAAgC;IAC/D,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC5E,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CAAI,GAAW,EAAE,OAAgC;IAClE,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EA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I,CAAC,CAAC;KAC7B;IAID,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAC3C,CAAC;AAED,IAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE5C,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAY;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,aAAW,IAAI,MAAG,CAAC;AACpD,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js new file mode 100644 index 0000000..495956c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AjaxTimeoutError = exports.AjaxError = void 0; +var getXHRResponse_1 = require("./getXHRResponse"); +var createErrorClass_1 = require("../util/createErrorClass"); +exports.AjaxError = createErrorClass_1.createErrorClass(function (_super) { + return function AjaxErrorImpl(message, xhr, request) { + this.message = message; + this.name = 'AjaxError'; + this.xhr = xhr; + this.request = request; + this.status = xhr.status; + this.responseType = xhr.responseType; + var response; + try { + response = getXHRResponse_1.getXHRResponse(xhr); + } + catch (err) { + response = xhr.responseText; + } + this.response = response; + }; +}); +exports.AjaxTimeoutError = (function () { + function AjaxTimeoutErrorImpl(xhr, request) { + exports.AjaxError.call(this, 'ajax timeout', xhr, request); + this.name = 'AjaxTimeoutError'; + return this; + } + AjaxTimeoutErrorImpl.prototype = Object.create(exports.AjaxError.prototype); + return AjaxTimeoutErrorImpl; +})(); +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map new file mode 100644 index 0000000..4cf1535 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAClD,6DAA4D;AAsD/C,QAAA,SAAS,GAAkB,mCAAgB,CACtD,UAAC,MAAM;IACL,OAAA,SAAS,aAAa,CAAY,OAAe,EAAE,GAAmB,EAAE,OAAoB;QAC1F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;QACrC,IAAI,QAAa,CAAC;QAClB,IAAI;YAGF,QAAQ,GAAG,+BAAc,CAAC,GAAG,CAAC,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;AAhBD,CAgBC,CACJ,CAAC;AAsBW,QAAA,gBAAgB,GAAyB,CAAC;IACrD,SAAS,oBAAoB,CAAY,GAAmB,EAAE,OAAoB;QAChF,iBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC,EAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js new file mode 100644 index 0000000..e2f8a51 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getXHRResponse = void 0; +function getXHRResponse(xhr) { + switch (xhr.responseType) { + case 'json': { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return JSON.parse(ieXHR.responseText); + } + } + case 'document': + return xhr.responseXML; + case 'text': + default: { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return ieXHR.responseText; + } + } + } +} +exports.getXHRResponse = getXHRResponse; +//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map new file mode 100644 index 0000000..142b909 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":";;;AAYA,SAAgB,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC;AAxBD,wCAwBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/types.js b/node_modules/rxjs/dist/cjs/internal/ajax/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map new file mode 100644 index 0000000..f08bdb1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/config.js b/node_modules/rxjs/dist/cjs/internal/config.js new file mode 100644 index 0000000..0e96e70 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/config.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.config = void 0; +exports.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, +}; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/config.js.map b/node_modules/rxjs/dist/cjs/internal/config.js.map new file mode 100644 index 0000000..4b498b5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":";;;AAOa,QAAA,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js new file mode 100644 index 0000000..43444ec --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.firstValueFrom = void 0; +var EmptyError_1 = require("./util/EmptyError"); +var Subscriber_1 = require("./Subscriber"); +function firstValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function (value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function () { + if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError_1.EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); +} +exports.firstValueFrom = firstValueFrom; +//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map new file mode 100644 index 0000000..91603f7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,2CAA8C;AAqD9C,SAAgB,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAM,UAAU,GAAG,IAAI,2BAAc,CAAI;YACvC,IAAI,EAAE,UAAC,KAAK;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,wCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js new file mode 100644 index 0000000..c29d0b3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lastValueFrom = void 0; +var EmptyError_1 = require("./util/EmptyError"); +function lastValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function (value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function () { + if (_hasValue) { + resolve(_value); + } + else if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError_1.EmptyError()); + } + }, + }); + }); +} +exports.lastValueFrom = lastValueFrom; +//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map new file mode 100644 index 0000000..7478518 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAoD/C,SAAgB,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,UAAC,KAAK;gBACV,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,sCAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js new file mode 100644 index 0000000..4683016 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js @@ -0,0 +1,80 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConnectableObservable = void 0; +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var refCount_1 = require("../operators/refCount"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var lift_1 = require("../util/lift"); +var ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype._teardown = function () { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable.prototype.connect = function () { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subject_1, undefined, function () { + _this._teardown(); + subject_1.complete(); + }, function (err) { + _this._teardown(); + subject_1.error(err); + }, function () { return _this._teardown(); }))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return refCount_1.refCount()(this); + }; + return ConnectableObservable; +}(Observable_1.Observable)); +exports.ConnectableObservable = ConnectableObservable; +//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map new file mode 100644 index 0000000..9c85c45 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,4CAA2C;AAE3C,gDAA+C;AAC/C,kDAAwE;AACxE,sEAA2E;AAC3E,qCAAuC;AASvC;IAA8C,yCAAa;IAgBzD,+BAAmB,MAAqB,EAAY,cAAgC;QAApF,YACE,iBAAO,SAOR;QARkB,YAAM,GAAN,MAAM,CAAe;QAAY,oBAAc,GAAd,cAAc,CAAkB;QAf1E,cAAQ,GAAsB,IAAI,CAAC;QACnC,eAAS,GAAW,CAAC,CAAC;QACtB,iBAAW,GAAwB,IAAI,CAAC;QAkBhD,IAAI,cAAO,CAAC,MAAM,CAAC,EAAE;YACnB,KAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAA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,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,UAAU,GAAG,2BAAY,CAAC,KAAK,CAAC;aACjC;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAMD,wCAAQ,GAAR;QACE,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAkB,CAAC;IACtD,CAAC;IACH,4BAAC;AAAD,CAAC,AAxFD,CAA8C,uBAAU,GAwFvD;AAxFY,sDAAqB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js new file mode 100644 index 0000000..c5aaa4f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindCallback = void 0; +var bindCallbackInternals_1 = require("./bindCallbackInternals"); +function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); +} +exports.bindCallback = bindCallback; +//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map new file mode 100644 index 0000000..fcb245b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":";;;AAGA,iEAAgE;AAuIhE,SAAgB,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,6CAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAND,oCAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js new file mode 100644 index 0000000..94360db --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js @@ -0,0 +1,103 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindCallbackInternals = void 0; +var isScheduler_1 = require("../util/isScheduler"); +var Observable_1 = require("../Observable"); +var subscribeOn_1 = require("../operators/subscribeOn"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var observeOn_1 = require("../operators/observeOn"); +var AsyncSubject_1 = require("../AsyncSubject"); +function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + .apply(this, args) + .pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc) + .apply(this, args) + .pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); + }; + } + return function () { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var subject = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function (subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ + function () { + var results = []; + for (var _i = 0; _i < arguments.length; _i++) { + results[_i] = arguments[_i]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + }, + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; +} +exports.bindCallbackInternals = bindCallbackInternals; +//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map new file mode 100644 index 0000000..a28c457 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAClD,4CAA2C;AAC3C,wDAAuD;AACvD,6DAA4D;AAC5D,oDAAmD;AACnD,gDAA+C;AAE/C,SAAgB,qBAAqB,CACnC,WAAoB,EACpB,YAAiB,EACjB,cAAoB,EACpB,SAAyB;IAEzB,IAAI,cAAc,EAAE;QAClB,IAAI,yBAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO;gBAAqB,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,Y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CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,YAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,SAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;mBAEJ,CAAC;gBAIF,IAAI,YAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,SAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA9GD,sDA8GC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js new file mode 100644 index 0000000..1b9da39 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindNodeCallback = void 0; +var bindCallbackInternals_1 = require("./bindCallbackInternals"); +function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); +} +exports.bindNodeCallback = bindNodeCallback; +//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map new file mode 100644 index 0000000..17cfa5d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":";;;AAGA,iEAAgE;AAsHhE,SAAgB,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,6CAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC;AAND,4CAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js new file mode 100644 index 0000000..b89f3c5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatestInit = exports.combineLatest = void 0; +var Observable_1 = require("../Observable"); +var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); +var from_1 = require("./from"); +var identity_1 = require("../util/identity"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var args_1 = require("../util/args"); +var createObject_1 = require("../util/createObject"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var executeSchedule_1 = require("../util/executeSchedule"); +function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var resultSelector = args_1.popResultSelector(args); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from_1.from([], scheduler); + } + var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys + ? + function (values) { return createObject_1.createObject(keys, values); } + : + identity_1.identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; +} +exports.combineLatest = combineLatest; +function combineLatestInit(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { valueTransform = identity_1.identity; } + return function (subscriber) { + maybeSchedule(scheduler, function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule(scheduler, function () { + var source = from_1.from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function () { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; +} +exports.combineLatestInit = combineLatestInit; +function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule_1.executeSchedule(subscription, scheduler, execute); + } + else { + execute(); + } +} +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map new file mode 100644 index 0000000..9b1da32 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,qEAAoE;AAEpE,+BAA8B;AAC9B,6CAA4C;AAE5C,6DAA4D;AAC5D,qCAA+D;AAC/D,qDAAoD;AACpD,sEAA2E;AAE3E,2DAA0D;AA4L1D,SAAgB,aAAa;IAAoC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAC7E,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,KAA8B,2CAAoB,CAAC,IAAI,CAAC,EAAhD,WAAW,UAAA,EAAE,IAAI,UAA+B,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,WAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,IAAM,MAAM,GAAG,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MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;;YAlCJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;wBAAtB,CAAC;aAmCT;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AA/DD,8CA+DC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,iCAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/concat.js b/node_modules/rxjs/dist/cjs/internal/observable/concat.js new file mode 100644 index 0000000..120d5fb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/concat.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concat = void 0; +var concatAll_1 = require("../operators/concatAll"); +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args))); +} +exports.concat = concat; +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map b/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map new file mode 100644 index 0000000..ec59ae3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AACnD,qCAA4C;AAC5C,+BAA8B;AA4G9B,SAAgB,MAAM;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACnC,OAAO,qBAAS,EAAE,CAAC,WAAI,CAAC,IAAI,EAAE,mBAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js new file mode 100644 index 0000000..5952e6a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.connectable = void 0; +var Subject_1 = require("../Subject"); +var Observable_1 = require("../Observable"); +var defer_1 = require("./defer"); +var DEFAULT_CONFIG = { + connector: function () { return new Subject_1.Subject(); }, + resetOnDisconnect: true, +}; +function connectable(source, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable_1.Observable(function (subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function () { + if (!connection || connection.closed) { + connection = defer_1.defer(function () { return source; }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function () { return (subject = connector()); }); + } + } + return connection; + }; + return result; +} +exports.connectable = connectable; +//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map new file mode 100644 index 0000000..f319d9f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":";;;AACA,sCAAqC;AAErC,4CAA2C;AAC3C,iCAAgC;AAsBhC,IAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,cAAM,OAAA,IAAI,iBAAO,EAAW,EAAtB,CAAsB;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,SAAgB,WAAW,CAAI,MAA0B,EAAE,MAA6C;IAA7C,uBAAA,EAAA,uBAA6C;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IACnC,IAAA,SAAS,GAA+B,MAAM,UAArC,EAAE,KAA6B,MAAM,kBAAX,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,CAAY;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,IAAM,MAAM,GAAQ,IAAI,uBAAU,CAAI,UAAC,UAAU;QAC/C,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,aAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,EAAvB,CAAuB,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAxBD,kCAwBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/defer.js b/node_modules/rxjs/dist/cjs/internal/observable/defer.js new file mode 100644 index 0000000..56f9ddb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/defer.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defer = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +function defer(observableFactory) { + return new Observable_1.Observable(function (subscriber) { + innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber); + }); +} +exports.defer = defer; +//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map b/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map new file mode 100644 index 0000000..df7957d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yCAAwC;AAkDxC,SAAgB,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,uBAAU,CAAqB,UAAC,UAAU;QACnD,qBAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js new file mode 100644 index 0000000..cead103 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js @@ -0,0 +1,249 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebSocketSubject = void 0; +var Subject_1 = require("../../Subject"); +var Subscriber_1 = require("../../Subscriber"); +var Observable_1 = require("../../Observable"); +var Subscription_1 = require("../../Subscription"); +var ReplaySubject_1 = require("../../ReplaySubject"); +var DEFAULT_WEBSOCKET_CONFIG = { + url: '', + deserializer: function (e) { return JSON.parse(e.data); }, + serializer: function (value) { return JSON.stringify(value); }, +}; +var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +var WebSocketSubject = (function (_super) { + __extends(WebSocketSubject, _super); + function WebSocketSubject(urlConfigOrSource, destination) { + var _this = _super.call(this) || this; + _this._socket = null; + if (urlConfigOrSource instanceof Observable_1.Observable) { + _this.destination = destination; + _this.source = urlConfigOrSource; + } + else { + var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + _this._output = new Subject_1.Subject(); + if (typeof urlConfigOrSource === 'string') { + config.url = urlConfigOrSource; + } + else { + for (var key in urlConfigOrSource) { + if (urlConfigOrSource.hasOwnProperty(key)) { + config[key] = urlConfigOrSource[key]; + } + } + } + if (!config.WebSocketCtor && WebSocket) { + config.WebSocketCtor = WebSocket; + } + else if (!config.WebSocketCtor) { + throw new Error('no WebSocket constructor can be found'); + } + _this.destination = new ReplaySubject_1.ReplaySubject(); + } + return _this; + } + WebSocketSubject.prototype.lift = function (operator) { + var sock = new WebSocketSubject(this._config, this.destination); + sock.operator = operator; + sock.source = this; + return sock; + }; + WebSocketSubject.prototype._resetState = function () { + this._socket = null; + if (!this.source) { + this.destination = new ReplaySubject_1.ReplaySubject(); + } + this._output = new Subject_1.Subject(); + }; + WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + var self = this; + return new Observable_1.Observable(function (observer) { + try { + self.next(subMsg()); + } + catch (err) { + observer.error(err); + } + var subscription = self.subscribe({ + next: function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } + catch (err) { + observer.error(err); + } + }, + error: function (err) { return observer.error(err); }, + complete: function () { return observer.complete(); }, + }); + return function () { + try { + self.next(unsubMsg()); + } + catch (err) { + observer.error(err); + } + subscription.unsubscribe(); + }; + }); + }; + WebSocketSubject.prototype._connectSocket = function () { + var _this = this; + var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var observer = this._output; + var socket = null; + try { + socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + this._socket = socket; + if (binaryType) { + this._socket.binaryType = binaryType; + } + } + catch (e) { + observer.error(e); + return; + } + var subscription = new Subscription_1.Subscription(function () { + _this._socket = null; + if (socket && socket.readyState === 1) { + socket.close(); + } + }); + socket.onopen = function (evt) { + var _socket = _this._socket; + if (!_socket) { + socket.close(); + _this._resetState(); + return; + } + var openObserver = _this._config.openObserver; + if (openObserver) { + openObserver.next(evt); + } + var queue = _this.destination; + _this.destination = Subscriber_1.Subscriber.create(function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } + catch (e) { + _this.destination.error(e); + } + } + }, function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + if (err && err.code) { + socket.close(err.code, err.reason); + } + else { + observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); + } + _this._resetState(); + }, function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); + }); + if (queue && queue instanceof ReplaySubject_1.ReplaySubject) { + subscription.add(queue.subscribe(_this.destination)); + } + }; + socket.onerror = function (e) { + _this._resetState(); + observer.error(e); + }; + socket.onclose = function (e) { + if (socket === _this._socket) { + _this._resetState(); + } + var closeObserver = _this._config.closeObserver; + if (closeObserver) { + closeObserver.next(e); + } + if (e.wasClean) { + observer.complete(); + } + else { + observer.error(e); + } + }; + socket.onmessage = function (e) { + try { + var deserializer = _this._config.deserializer; + observer.next(deserializer(e)); + } + catch (err) { + observer.error(err); + } + }; + }; + WebSocketSubject.prototype._subscribe = function (subscriber) { + var _this = this; + var source = this.source; + if (source) { + return source.subscribe(subscriber); + } + if (!this._socket) { + this._connectSocket(); + } + this._output.subscribe(subscriber); + subscriber.add(function () { + var _socket = _this._socket; + if (_this._output.observers.length === 0) { + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + _this._resetState(); + } + }); + return subscriber; + }; + WebSocketSubject.prototype.unsubscribe = function () { + var _socket = this._socket; + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + _super.prototype.unsubscribe.call(this); + }; + return WebSocketSubject; +}(Subject_1.AnonymousSubject)); +exports.WebSocketSubject = WebSocketSubject; +//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map new file mode 100644 index 0000000..ec11b0b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA0D;AAC1D,+CAA8C;AAC9C,+CAA8C;AAC9C,mDAAkD;AAElD,qDAAoD;AA4IpD,IAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,UAAC,CAAe,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAlB,CAAkB;IACrD,UAAU,EAAE,UAAC,KAAU,IAAK,OAAA,IAAI,CAA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AAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnC,UAAU,CAAC,GAAG,CAAC;YACL,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YACzB,IAAI,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;oBACrE,OAAO,CAAC,KAAK,EAAE,CAAC;iBACjB;gBACD,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,sCAAW,GAAX;QACU,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,iBAAM,WAAW,WAAE,CAAC;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AAhPD,CAAyC,0BAAgB,GAgPxD;AAhPY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js new file mode 100644 index 0000000..aeb24d1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrames = void 0; +var Observable_1 = require("../../Observable"); +var performanceTimestampProvider_1 = require("../../scheduler/performanceTimestampProvider"); +var animationFrameProvider_1 = require("../../scheduler/animationFrameProvider"); +function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; +} +exports.animationFrames = animationFrames; +function animationFramesFactory(timestampProvider) { + return new Observable_1.Observable(function (subscriber) { + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var id = 0; + var run = function () { + if (!subscriber.closed) { + id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function (timestamp) { + id = 0; + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + run(); + return function () { + if (id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); +} +var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); +//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map new file mode 100644 index 0000000..3291a02 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,6FAA4F;AAC5F,iFAAgF;AAuEhF,SAAgB,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAFD,0CAEC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,uBAAU,CAAyC,UAAC,UAAU;QAIvE,IAAM,QAAQ,GAAG,iBAAiB,IAAI,2DAA4B,CAAC;QAMnE,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAM,GAAG,GAAG;YACV,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,+CAAsB,CAAC,qBAAqB,CAAC,UAAC,SAAuC;oBACxF,EAAE,GAAG,CAAC,CAAC;oBAQP,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO;YACL,IAAI,EAAE,EAAE;gBACN,+CAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,IAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js new file mode 100644 index 0000000..0bb09ef --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js @@ -0,0 +1,79 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromFetch = void 0; +var OperatorSubscriber_1 = require("../../operators/OperatorSubscriber"); +var Observable_1 = require("../../Observable"); +var innerFrom_1 = require("../../observable/innerFrom"); +function fromFetch(input, initWithSelector) { + if (initWithSelector === void 0) { initWithSelector = {}; } + var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + return new Observable_1.Observable(function (subscriber) { + var controller = new AbortController(); + var signal = controller.signal; + var abortable = true; + var outerSignal = init.signal; + if (outerSignal) { + if (outerSignal.aborted) { + controller.abort(); + } + else { + var outerSignalHandler_1 = function () { + if (!signal.aborted) { + controller.abort(); + } + }; + outerSignal.addEventListener('abort', outerSignalHandler_1); + subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + } + } + var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var handleError = function (err) { + abortable = false; + subscriber.error(err); + }; + fetch(input, perSubscriberInit) + .then(function (response) { + if (selector) { + innerFrom_1.innerFrom(selector(response)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + abortable = false; + subscriber.complete(); + }, handleError)); + } + else { + abortable = false; + subscriber.next(response); + subscriber.complete(); + } + }) + .catch(handleError); + return function () { + if (abortable) { + controller.abort(); + } + }; + }); +} +exports.fromFetch = fromFetch; +//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map new file mode 100644 index 0000000..a770094 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA8E;AAC9E,+CAA8C;AAC9C,wDAAuD;AA4FvD,SAAgB,SAAS,CACvB,KAAuB,EACvB,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BAClB,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,EACD,WAAW,CACZ,CACF,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,KAAK,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO;YACL,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AArFD,8BAqFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js new file mode 100644 index 0000000..449b942 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.webSocket = void 0; +var WebSocketSubject_1 = require("./WebSocketSubject"); +function webSocket(urlConfigOrSource) { + return new WebSocketSubject_1.WebSocketSubject(urlConfigOrSource); +} +exports.webSocket = webSocket; +//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map new file mode 100644 index 0000000..f81c269 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":";;;AAAA,uDAA8E;AA+J9E,SAAgB,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,mCAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/empty.js b/node_modules/rxjs/dist/cjs/internal/observable/empty.js new file mode 100644 index 0000000..adce289 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/empty.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.empty = exports.EMPTY = void 0; +var Observable_1 = require("../Observable"); +exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); }); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : exports.EMPTY; +} +exports.empty = empty; +function emptyScheduled(scheduler) { + return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); +} +//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map b/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map new file mode 100644 index 0000000..bbe6332 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAiE9B,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAOlF,SAAgB,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;AACvD,CAAC;AAFD,sBAEC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,uBAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js new file mode 100644 index 0000000..3983354 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.forkJoin = void 0; +var Observable_1 = require("../Observable"); +var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); +var innerFrom_1 = require("./innerFrom"); +var args_1 = require("../util/args"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var createObject_1 = require("../util/createObject"); +function forkJoin() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var result = new Observable_1.Observable(function (subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function (sourceIndex) { + var hasValue = false; + innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, function () { return remainingCompletions--; }, undefined, function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; +} +exports.forkJoin = forkJoin; +//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map new file mode 100644 index 0000000..663d412 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,qEAAoE;AACpE,yCAAwC;AACxC,qCAAiD;AACjD,sEAA2E;AAC3E,6DAA4D;AAC5D,qDAAoD;AA2IpD,SAAgB,QAAQ;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACrC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAA,KAA0B,2CAAoB,CAAC,IAAI,CAAC,EAA5C,OAAO,UAAA,EAAE,IAAI,UAA+B,CAAC;IAC3D,IAAM,MAAM,GAAG,IAAI,uBAAU,CAAC,UAAC,UAAU;QAC/B,IAAA,MAAM,GAAK,OAAO,OAAZ,CAAa;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;gCACvB,WAAW;YAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,qBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAC5B,SAAS,EACT;gBACE,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,2BAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;;QAvBJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE;oBAApD,WAAW;SAwBnB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC;AAvCD,4BAuCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/from.js b/node_modules/rxjs/dist/cjs/internal/observable/from.js new file mode 100644 index 0000000..60e711c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/from.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.from = void 0; +var scheduled_1 = require("../scheduled/scheduled"); +var innerFrom_1 = require("./innerFrom"); +function from(input, scheduler) { + return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input); +} +exports.from = from; +//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/from.js.map b/node_modules/rxjs/dist/cjs/internal/observable/from.js.map new file mode 100644 index 0000000..2a9bc11 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/from.js.map @@ -0,0 +1 @@ +{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AACnD,yCAAwC;AAkGxC,SAAgB,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js new file mode 100644 index 0000000..f43351a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js @@ -0,0 +1,78 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromEvent = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Observable_1 = require("../Observable"); +var mergeMap_1 = require("../operators/mergeMap"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isFunction_1 = require("../util/isFunction"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var nodeEventEmitterMethods = ['addListener', 'removeListener']; +var eventTargetMethods = ['addEventListener', 'removeEventListener']; +var jqueryMethods = ['on', 'off']; +function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + var _a = __read(isEventTarget(target) + ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) + : + isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom_1.innerFrom(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add(handler); + return function () { return remove(handler); }; + }); +} +exports.fromEvent = fromEvent; +function toCommonHandlerRegistry(target, eventName) { + return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; +} +function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); +} +function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); +} +function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); +} +//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map new file mode 100644 index 0000000..d415344 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,4CAA2C;AAC3C,kDAAiD;AACjD,mDAAkD;AAClD,iDAAgD;AAChD,6DAA4D;AAG5D,IAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAC3E,IAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAU,CAAC;AAChF,IAAM,aAAa,GAAG,CAAC,I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js new file mode 100644 index 0000000..f319156 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromEventPattern = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("../util/isFunction"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; + }); +} +exports.fromEventPattern = fromEventPattern; +//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map new file mode 100644 index 0000000..eacc73f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,iDAAgD;AAEhD,6DAA4D;AAyI5D,SAAgB,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,uBAAU,CAAU,UAAC,UAAU;QACxC,IAAM,OAAO,GAAG;YAAC,WAAS;iBAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;gBAAT,sBAAS;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAA1C,CAA0C,CAAC;QAC1E,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,uBAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,4CAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js new file mode 100644 index 0000000..ee2fdb6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromSubscribable = void 0; +var Observable_1 = require("../Observable"); +function fromSubscribable(subscribable) { + return new Observable_1.Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); +} +exports.fromSubscribable = fromSubscribable; +//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map new file mode 100644 index 0000000..d217d0b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAc3C,SAAgB,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB,IAAK,OAAA,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,EAAlC,CAAkC,CAAC,CAAC;AAC3F,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/generate.js b/node_modules/rxjs/dist/cjs/internal/observable/generate.js new file mode 100644 index 0000000..250bb37 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/generate.js @@ -0,0 +1,79 @@ +"use strict"; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generate = void 0; +var identity_1 = require("../util/identity"); +var isScheduler_1 = require("../util/isScheduler"); +var defer_1 = require("./defer"); +var scheduleIterable_1 = require("../scheduled/scheduleIterable"); +function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity_1.identity : _b, scheduler = _a.scheduler); + } + else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler = resultSelectorOrScheduler; + } + else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = initialState; + _a.label = 1; + case 1: + if (!(!condition || condition(state))) return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: return [2]; + } + }); + } + return defer_1.defer((scheduler + ? + function () { return scheduleIterable_1.scheduleIterable(gen(), scheduler); } + : + gen)); +} +exports.generate = generate; +//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map b/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map new file mode 100644 index 0000000..214195a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA4C;AAE5C,mDAAkD;AAClD,iCAAgC;AAChC,kEAAiE;AAuUjE,SAAgB,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC,KAMG,qBAA8C,EALhD,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,OAAO,aAAA,EACP,sBAA6C,EAA7C,cAAc,mBAAG,mBAA4B,KAAA,EAC7C,SAAS,eAAA,CACwC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,yBAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,mBAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,SAAU,GAAG;;;;;oBACF,KAAK,GAAG,YAAY;;;yBAAE,CAAA,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAA;oBAC3D,WAAM,cAAc,CAAC,KAAK,CAAC,EAAA;;oBAA3B,SAA2B,CAAC;;;oBADiC,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,CAAA;;;;;KAGvF;IAGD,OAAO,aAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,cAAM,OAAA,mCAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC,EAAnC,CAAmC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC;AAnDD,4BAmDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/iif.js b/node_modules/rxjs/dist/cjs/internal/observable/iif.js new file mode 100644 index 0000000..63a69c1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/iif.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.iif = void 0; +var defer_1 = require("./defer"); +function iif(condition, trueResult, falseResult) { + return defer_1.defer(function () { return (condition() ? trueResult : falseResult); }); +} +exports.iif = iif; +//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map b/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map new file mode 100644 index 0000000..f31f89b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":";;;AACA,iCAAgC;AAiFhC,SAAgB,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,aAAK,CAAC,cAAM,OAAA,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,EAAxC,CAAwC,CAAC,CAAC;AAC/D,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js new file mode 100644 index 0000000..f25d71b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js @@ -0,0 +1,206 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromReadableStreamLike = exports.fromAsyncIterable = exports.fromIterable = exports.fromPromise = exports.fromArrayLike = exports.fromInteropObservable = exports.innerFrom = void 0; +var isArrayLike_1 = require("../util/isArrayLike"); +var isPromise_1 = require("../util/isPromise"); +var Observable_1 = require("../Observable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isAsyncIterable_1 = require("../util/isAsyncIterable"); +var throwUnobservableError_1 = require("../util/throwUnobservableError"); +var isIterable_1 = require("../util/isIterable"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +var isFunction_1 = require("../util/isFunction"); +var reportUnhandledError_1 = require("../util/reportUnhandledError"); +var observable_1 = require("../symbol/observable"); +function innerFrom(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); +} +exports.innerFrom = innerFrom; +function fromInteropObservable(obj) { + return new Observable_1.Observable(function (subscriber) { + var obs = obj[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} +exports.fromInteropObservable = fromInteropObservable; +function fromArrayLike(array) { + return new Observable_1.Observable(function (subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} +exports.fromArrayLike = fromArrayLike; +function fromPromise(promise) { + return new Observable_1.Observable(function (subscriber) { + promise + .then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, reportUnhandledError_1.reportUnhandledError); + }); +} +exports.fromPromise = fromPromise; +function fromIterable(iterable) { + return new Observable_1.Observable(function (subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }); +} +exports.fromIterable = fromIterable; +function fromAsyncIterable(asyncIterable) { + return new Observable_1.Observable(function (subscriber) { + process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); + }); +} +exports.fromAsyncIterable = fromAsyncIterable; +function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); +} +exports.fromReadableStreamLike = fromReadableStreamLike; +function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function () { + var value, e_2_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: return [3, 1]; + case 4: return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [3, 10]; + case 9: + if (e_2) throw e_2.error; + return [7]; + case 10: return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); +} +//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map new file mode 100644 index 0000000..95c4db3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAClD,+CAA8C;AAC9C,4CAA2C;AAE3C,mEAAkE;AAClE,2DAA0D;AAC1D,yEAAkF;AAClF,iDAAgD;AAChD,qEAAwG;AAExG,iDAAgD;AAChD,qEAAoE;AACpE,mDAAuE;AAGvE,SAAgB,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,uBAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,yCAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,yBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,qBAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,iCAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,uBAAU,CAAC,KAAK,CAAC,EAAE;YACrB,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ff --git a/node_modules/rxjs/dist/cjs/internal/observable/interval.js b/node_modules/rxjs/dist/cjs/internal/observable/interval.js new file mode 100644 index 0000000..e0cbf28 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/interval.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.interval = void 0; +var async_1 = require("../scheduler/async"); +var timer_1 = require("./timer"); +function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler); +} +exports.interval = interval; +//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map b/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map new file mode 100644 index 0000000..2b484d5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":";;;AACA,4CAAoD;AAEpD,iCAAgC;AA+ChC,SAAgB,QAAQ,CAAC,MAAU,EAAE,SAAyC;IAArD,uBAAA,EAAA,UAAU;IAAE,0BAAA,EAAA,YAA2B,sBAAc;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,aAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AAPD,4BAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/merge.js b/node_modules/rxjs/dist/cjs/internal/observable/merge.js new file mode 100644 index 0000000..079fe0f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/merge.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +var mergeAll_1 = require("../operators/mergeAll"); +var innerFrom_1 = require("./innerFrom"); +var empty_1 = require("./empty"); +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + var sources = args; + return !sources.length + ? + empty_1.EMPTY + : sources.length === 1 + ? + innerFrom_1.innerFrom(sources[0]) + : + mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler)); +} +exports.merge = merge; +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map b/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map new file mode 100644 index 0000000..69e9cd9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":";;;AAEA,kDAAiD;AACjD,yCAAwC;AACxC,iCAAgC;AAChC,qCAAuD;AACvD,+BAA8B;AAmF9B,SAAgB,KAAK;IAAC,cAA8D;SAA9D,UAA8D,EAA9D,qBAA8D,EAA9D,IAA8D;QAA9D,yBAA8D;;IAClF,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,gBAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,aAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,mBAAQ,CAAC,UAAU,CAAC,CAAC,WAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC;AAZD,sBAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/never.js b/node_modules/rxjs/dist/cjs/internal/observable/never.js new file mode 100644 index 0000000..2cd23cc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/never.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.never = exports.NEVER = void 0; +var Observable_1 = require("../Observable"); +var noop_1 = require("../util/noop"); +exports.NEVER = new Observable_1.Observable(noop_1.noop); +function never() { + return exports.NEVER; +} +exports.never = never; +//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/never.js.map b/node_modules/rxjs/dist/cjs/internal/observable/never.js.map new file mode 100644 index 0000000..3e2f405 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/never.js.map @@ -0,0 +1 @@ +{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,qCAAoC;AAmCvB,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,WAAI,CAAC,CAAC;AAKjD,SAAgB,KAAK;IACnB,OAAO,aAAK,CAAC;AACf,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/of.js b/node_modules/rxjs/dist/cjs/internal/observable/of.js new file mode 100644 index 0000000..8d21e88 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/of.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.of = void 0; +var args_1 = require("../util/args"); +var from_1 = require("./from"); +function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + return from_1.from(args, scheduler); +} +exports.of = of; +//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/of.js.map b/node_modules/rxjs/dist/cjs/internal/observable/of.js.map new file mode 100644 index 0000000..de3c52c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/of.js.map @@ -0,0 +1 @@ +{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":";;;AAEA,qCAA4C;AAC5C,+BAA8B;AA4E9B,SAAgB,EAAE;IAAI,cAAiC;SAAjC,UAAiC,EAAjC,qBAAiC,EAAjC,IAAiC;QAAjC,yBAAiC;;IACrD,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,WAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC;AAHD,gBAGC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js new file mode 100644 index 0000000..8b31e6c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.onErrorResumeNext = void 0; +var Observable_1 = require("../Observable"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var innerFrom_1 = require("./innerFrom"); +function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return new Observable_1.Observable(function (subscriber) { + var sourceIndex = 0; + var subscribeNext = function () { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]); + } + catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, noop_1.noop, noop_1.noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } + else { + subscriber.complete(); + } + }; + subscribeNext(); + }); +} +exports.onErrorResumeNext = onErrorResumeNext; +//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map new file mode 100644 index 0000000..8955f7a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yDAAwD;AACxD,sEAAqE;AACrE,qCAAoC;AACpC,yCAAwC;AAsExC,SAAgB,iBAAiB;IAC/B,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAEzE,IAAM,WAAW,GAA4B,+BAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;QAC/B,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAM,aAAa,GAAG;YACpB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAU,SAAuB,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,qBAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,IAAM,eAAe,GAAG,IAAI,uCAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,WAAI,EAAE,WAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,8CAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js new file mode 100644 index 0000000..480efe3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pairs = void 0; +var from_1 = require("./from"); +function pairs(obj, scheduler) { + return from_1.from(Object.entries(obj), scheduler); +} +exports.pairs = pairs; +//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map new file mode 100644 index 0000000..0ec6e43 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":";;;AAEA,+BAA8B;AA6E9B,SAAgB,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,WAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/partition.js b/node_modules/rxjs/dist/cjs/internal/observable/partition.js new file mode 100644 index 0000000..8dccf53 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/partition.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.partition = void 0; +var not_1 = require("../util/not"); +var filter_1 = require("../operators/filter"); +var innerFrom_1 = require("./innerFrom"); +function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))]; +} +exports.partition = partition; +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map b/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map new file mode 100644 index 0000000..697448d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,8CAA6C;AAG7C,yCAAwC;AA0ExC,SAAgB,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,eAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,EAAE,eAAM,CAAC,SAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC;AATD,8BASC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/race.js b/node_modules/rxjs/dist/cjs/internal/observable/race.js new file mode 100644 index 0000000..843f577 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/race.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.raceInit = exports.race = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray_1.argsOrArgArray(sources); + return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); +} +exports.race = race; +function raceInit(sources) { + return function (subscriber) { + var subscriptions = []; + var _loop_1 = function (i) { + subscriptions.push(innerFrom_1.innerFrom(sources[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; +} +exports.raceInit = raceInit; +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/race.js.map b/node_modules/rxjs/dist/cjs/internal/observable/race.js.map new file mode 100644 index 0000000..abbb3bb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,yCAAwC;AAGxC,yDAAwD;AACxD,sEAA2E;AA6C3E,SAAgB,IAAI;IAAI,iBAAyD;SAAzD,UAAyD,EAAzD,qBAAyD,EAAzD,IAAyD;QAAzD,4BAAyD;;IAC/E,OAAO,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAJD,oBAIC;AAOD,SAAgB,QAAQ,CAAI,OAA6B;IACvD,OAAO,UAAC,UAAyB;QAC/B,IAAI,aAAa,GAAmB,EAAE,CAAC;gCAM9B,CAAC;YACR,aAAa,CAAC,IAAI,CAChB,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBACzC,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;;QAfJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;oBAArE,CAAC;SAgBT;IACH,CAAC,CAAC;AACJ,CAAC;AA1BD,4BA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/range.js b/node_modules/rxjs/dist/cjs/internal/observable/range.js new file mode 100644 index 0000000..be91661 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/range.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.range = void 0; +var Observable_1 = require("../Observable"); +var empty_1 = require("./empty"); +function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.Observable(scheduler + ? + function (subscriber) { + var n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } + else { + subscriber.complete(); + } + }); + } + : + function (subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); +} +exports.range = range; +//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/range.js.map b/node_modules/rxjs/dist/cjs/internal/observable/range.js.map new file mode 100644 index 0000000..9a6a9ac --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/range.js.map @@ -0,0 +1 @@ +{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,iCAAgC;AAqDhC,SAAgB,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,aAAK,CAAC;KACd;IAGD,IAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,uBAAU,CACnB,SAAS;QACP,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC;AAtCD,sBAsCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js new file mode 100644 index 0000000..2ecdc50 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throwError = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("../util/isFunction"); +function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; + var init = function (subscriber) { return subscriber.error(errorFactory()); }; + return new Observable_1.Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); +} +exports.throwError = throwError; +//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map new file mode 100644 index 0000000..b8dfe65 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAG3C,iDAAgD;AAqHhD,SAAgB,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,IAAM,YAAY,GAAG,uBAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAM,OAAA,mBAAmB,EAAnB,CAAmB,CAAC;IACvG,IAAM,IAAI,GAAG,UAAC,UAA6B,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAhC,CAAgC,CAAC;IACjF,OAAO,IAAI,uBAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,EAA9C,CAA8C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC;AAJD,gCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/timer.js b/node_modules/rxjs/dist/cjs/internal/observable/timer.js new file mode 100644 index 0000000..e9b40b3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/timer.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timer = void 0; +var Observable_1 = require("../Observable"); +var async_1 = require("../scheduler/async"); +var isScheduler_1 = require("../util/isScheduler"); +var isDate_1 = require("../util/isDate"); +function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + if (scheduler === void 0) { scheduler = async_1.async; } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } + else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function (subscriber) { + var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } + else { + subscriber.complete(); + } + } + }, due); + }); +} +exports.timer = timer; +//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map b/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map new file mode 100644 index 0000000..c800b1d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,4CAA6D;AAC7D,mDAAkD;AAClD,yCAA6C;AAgI7C,SAAgB,KAAK,CACnB,OAA0B,EAC1B,mBAA4C,EAC5C,SAAyC;IAFzC,wBAAA,EAAA,WAA0B;IAE1B,0BAAA,EAAA,YAA2B,aAAc;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,yBAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;QAI/B,IAAI,GAAG,GAAG,oBAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC;AArDD,sBAqDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/using.js b/node_modules/rxjs/dist/cjs/internal/observable/using.js new file mode 100644 index 0000000..e4abd20 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/using.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.using = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +var empty_1 = require("./empty"); +function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function (subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function () { + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +exports.using = using; +//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/using.js.map b/node_modules/rxjs/dist/cjs/internal/observable/using.js.map new file mode 100644 index 0000000..5c308f3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/using.js.map @@ -0,0 +1 @@ +{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yCAAwC;AACxC,iCAAgC;AA8BhC,SAAgB,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,uBAAU,CAAqB,UAAC,UAAU;QACnD,IAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,IAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO;YAGL,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,sBAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/zip.js b/node_modules/rxjs/dist/cjs/internal/observable/zip.js new file mode 100644 index 0000000..9fca1cb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/zip.js @@ -0,0 +1,70 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zip = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("./innerFrom"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var empty_1 = require("./empty"); +var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); +var args_1 = require("../util/args"); +function zip() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + var sources = argsOrArgArray_1.argsOrArgArray(args); + return sources.length + ? new Observable_1.Observable(function (subscriber) { + var buffers = sources.map(function () { return []; }); + var completed = sources.map(function () { return false; }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + buffers[sourceIndex].push(value); + if (buffers.every(function (buffer) { return buffer.length; })) { + var result = buffers.map(function (buffer) { return buffer.shift(); }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); + if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { + subscriber.complete(); + } + } + }, function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) + : empty_1.EMPTY; +} +exports.zip = zip; +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map b/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map new file mode 100644 index 0000000..3e45db4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","s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,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM,EAAE,CAAC,IAAK,OAAA,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD;oBAGE,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;;YA/BJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE;wBAAlF,WAAW;aAgCnB;YAGD,OAAO;gBACL,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,aAAK,CAAC;AACZ,CAAC;AAhED,kBAgEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js new file mode 100644 index 0000000..dff340e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js @@ -0,0 +1,79 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperatorSubscriber = exports.createOperatorSubscriber = void 0; +var Subscriber_1 = require("../Subscriber"); +function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} +exports.createOperatorSubscriber = createOperatorSubscriber; +var OperatorSubscriber = (function (_super) { + __extends(OperatorSubscriber, _super); + function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; + _this._next = onNext + ? function (value) { + try { + onNext(value); + } + catch (err) { + destination.error(err); + } + } + : _super.prototype._next; + _this._error = onError + ? function (err) { + try { + onError(err); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._error; + _this._complete = onComplete + ? function () { + try { + onComplete(); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._complete; + return _this; + } + OperatorSubscriber.prototype.unsubscribe = function () { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + }; + return OperatorSubscriber; +}(Subscriber_1.Subscriber)); +exports.OperatorSubscriber = OperatorSubscriber; +//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map new file mode 100644 index 0000000..3a5b4f3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":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BAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,SAAS,CAAC;;IACtB,CAAC;IAED,wCAAW,GAAX;;QACE,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC/C,IAAA,QAAM,GAAK,IAAI,OAAT,CAAU;YACxB,iBAAM,WAAW,WAAE,CAAC;YAEpB,CAAC,QAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AAnFD,CAA2C,uBAAU,GAmFpD;AAnFY,gDAAkB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/audit.js b/node_modules/rxjs/dist/cjs/internal/operators/audit.js new file mode 100644 index 0000000..26c7cca --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/audit.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.audit = void 0; +var lift_1 = require("../util/lift"); +var innerFrom_1 = require("../observable/innerFrom"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function audit(durationSelector) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function () { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom_1.innerFrom(durationSelector(value)).subscribe((durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); + } + }, function () { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); +} +exports.audit = audit; +//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map b/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map new file mode 100644 index 0000000..2eed307 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AA+ChE,SAAgB,KAAK,CAAI,gBAAoD;IAC3E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,IAAM,eAAe,GAAG;YACtB,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,qBAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,6CAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA3CD,sBA2CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js new file mode 100644 index 0000000..e934c87 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.auditTime = void 0; +var async_1 = require("../scheduler/async"); +var audit_1 = require("./audit"); +var timer_1 = require("../observable/timer"); +function auditTime(duration, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return audit_1.audit(function () { return timer_1.timer(duration, scheduler); }); +} +exports.auditTime = auditTime; +//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map new file mode 100644 index 0000000..4199bf6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AACpD,iCAAgC;AAChC,6CAA4C;AAkD5C,SAAgB,SAAS,CAAI,QAAgB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACtF,OAAO,aAAK,CAAC,cAAM,OAAA,aAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js new file mode 100644 index 0000000..6352f92 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.buffer = void 0; +var lift_1 = require("../util/lift"); +var noop_1 = require("../util/noop"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function buffer(closingNotifier) { + return lift_1.operate(function (source, subscriber) { + var currentBuffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function () { + currentBuffer = null; + }; + }); +} +exports.buffer = buffer; +//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map new file mode 100644 index 0000000..2e8efdc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AAwCpD,SAAgB,MAAM,CAAI,eAAqC;IAC7D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAzB,CAAyB,EACpC;YACE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,qBAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,6CAAwB,CACtB,UAAU,EACV;YAEE,IAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,WAAI,CACL,CACF,CAAC;QAEF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AApCD,wBAoCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js new file mode 100644 index 0000000..25ff121 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js @@ -0,0 +1,85 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bufferCount = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var arrRemove_1 = require("../util/arrRemove"); +function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { startBufferEvery = null; } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return lift_1.operate(function (source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + if (toEmit) { + try { + for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + } + finally { if (e_2) throw e_2.error; } + } + } + }, function () { + var e_3, _a; + try { + for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + } + finally { if (e_3) throw e_3.error; } + } + subscriber.complete(); + }, undefined, function () { + buffers = null; + })); + }); +} +exports.bufferCount = bufferCount; +//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map new file mode 100644 index 0000000..466b102 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAqD9C,SAAgB,WAAW,CAAI,UAAkB,EAAE,gBAAsC;IAAtC,iCAAA,EAAA,uBAAsC;IAGvF,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,UAAU,CAAC;IAElD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAU,EAAE,CAAC;QACxB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;YACJ,IAAI,MAAM,GAAiB,IAAI,CAAC;YAKhC,IAAI,KAAK,EAAE,GAAG,gBAAiB,KAAK,CAAC,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAClB;;gBAGD,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAMnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;wBAC/B,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;wBACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACrB;iBACF;;;;;;;;;YAED,IAAI,MAAM,EAAE;;oBAIV,KAAqB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAxB,IAAM,MAAM,mBAAA;wBACf,qBAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACzB;;;;;;;;;aACF;QACH,CAAC,EACD;;;gBAGE,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACzB;;;;;;;;;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/DD,kCA+DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js new file mode 100644 index 0000000..5712d64 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js @@ -0,0 +1,91 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bufferTime = void 0; +var Subscription_1 = require("../Subscription"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var arrRemove_1 = require("../util/arrRemove"); +var async_1 = require("../scheduler/async"); +var args_1 = require("../util/args"); +var executeSchedule_1 = require("../util/executeSchedule"); +function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return lift_1.operate(function (source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function (record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function () { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer: buffer, + subs: subs, + }; + bufferRecords.push(record_1); + executeSchedule_1.executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } + else { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, undefined, function () { return (bufferRecords = null); }); + source.subscribe(bufferTimeSubscriber); + }); +} +exports.bufferTime = bufferTime; +//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map new file mode 100644 index 0000000..cbcb0a6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAC9C,4CAAoD;AACpD,qCAA4C;AAC5C,2DAA0D;AAsE1D,SAAgB,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,mBAAY,CAAC,SAAS,CAAC,mCAAI,sBAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAiD,EAAE,CAAC;QAGrE,IAAI,aAAa,GAAG,KAAK,CAAC;QAQ1B,IAAM,IAAI,GAAG,UAAC,MAA2C;YAC/C,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,qBAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxB,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC;QAOF,IAAM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oB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,aAAa,GAAG,IAAI,CAAC,EAAtB,CAAsB,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AA1FD,gCA0FC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js new file mode 100644 index 0000000..e6ac092 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js @@ -0,0 +1,59 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bufferToggle = void 0; +var Subscription_1 = require("../Subscription"); +var lift_1 = require("../util/lift"); +var innerFrom_1 = require("../observable/innerFrom"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var arrRemove_1 = require("../util/arrRemove"); +function bufferToggle(openings, closingSelector) { + return lift_1.operate(function (source, subscriber) { + var buffers = []; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function () { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); +} +exports.bufferToggle = bufferToggle; +//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map new file mode 100644 index 0000000..b39e1f3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AAChE,qCAAoC;AACpC,+CAA8C;AA6C9C,SAAgB,YAAY,CAC1B,QAA4B,EAC5B,eAAmD;IAEnD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAU,EAAE,CAAC;QAG1B,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAQ,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAGrB,IAAM,mBAAmB,GAAG,IAAI,2BAAY,EAAE,CAAC;YAE/C,IAAM,UAAU,GAAG;gBACjB,qBAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACxB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAGF,mBAAmB,CAAC,GAAG,CAAC,qBAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC,CAAC;QACnI,CAAC,EACD,WAAI,CACL,CACF,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;;gBAEJ,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAlDD,oCAkDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js new file mode 100644 index 0000000..a32e3e6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bufferWhen = void 0; +var lift_1 = require("../util/lift"); +var noop_1 = require("../util/noop"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function bufferWhen(closingSelector) { + return lift_1.operate(function (source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop))); + }; + openBuffer(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, undefined, function () { return (buffer = closingSubscriber = null); })); + }); +} +exports.bufferWhen = bufferWhen; +//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map new file mode 100644 index 0000000..9245ef6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AAwCpD,SAAgB,UAAU,CAAI,eAA2C;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,MAAM,GAAe,IAAI,CAAC;QAI9B,IAAI,iBAAiB,GAAyB,IAAI,CAAC;QAMnD,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAEjC,IAAM,CAAC,GAAG,MAAM,CAAC;YACjB,MAAM,GAAG,EAAE,CAAC;YACZ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAGxB,qBAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,6CAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC,CAAC;QACvH,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EAEV,UAAC,KAAK,IAAK,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAG9B;YACE,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,MAAM,GAAG,iBAAiB,GAAG,IAAK,CAAC,EAApC,CAAoC,CAC3C,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhDD,gCAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js new file mode 100644 index 0000000..ecff0f1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.catchError = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var lift_1 = require("../util/lift"); +function catchError(selector) { + return lift_1.operate(function (source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + handledResult = innerFrom_1.innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); +} +exports.catchError = catchError; +//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map new file mode 100644 index 0000000..7ca79f4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":";;;AAIA,qDAAoD;AACpD,2DAAgE;AAChE,qCAAuC;AAoGvC,SAAgB,UAAU,CACxB,QAAgD;IAEhD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;YAC7D,aAAa,GAAG,qBAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAlCD,gCAkCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js new file mode 100644 index 0000000..4a0d77c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineAll = void 0; +var combineLatestAll_1 = require("./combineLatestAll"); +exports.combineAll = combineLatestAll_1.combineLatestAll; +//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map new file mode 100644 index 0000000..717ef22 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAKzC,QAAA,UAAU,GAAG,mCAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js new file mode 100644 index 0000000..515d6f5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js @@ -0,0 +1,44 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatest = void 0; +var combineLatest_1 = require("../observable/combineLatest"); +var lift_1 = require("../util/lift"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var pipe_1 = require("../util/pipe"); +var args_1 = require("../util/args"); +function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + return resultSelector + ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) + : lift_1.operate(function (source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray([source], __read(argsOrArgArray_1.argsOrArgArray(args))))(subscriber); + }); +} +exports.combineLatest = combineLatest; +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map new file mode 100644 index 0000000..7ab194c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAgE;AAEhE,qCAAuC;AACvC,yDAAwD;AACxD,6DAA4D;AAC5D,qCAAoC;AACpC,qCAAiD;AAoBjD,SAAgB,aAAa;IAAO,cAA6D;SAA7D,UAA6D,EAA7D,qBAA6D,EAA7D,IAA6D;QAA7D,yBAA6D;;IAC/F,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,WAAI,CAAC,aAAa,wCAAK,IAAoC,KAAG,mCAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,iCAAiB,gBAAE,MAAM,UAAK,+BAAc,CAAC,IAAI,CAAC,GAAE,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC;AAPD,sCAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js new file mode 100644 index 0000000..11bcc07 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatestAll = void 0; +var combineLatest_1 = require("../observable/combineLatest"); +var joinAllInternals_1 = require("./joinAllInternals"); +function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); +} +exports.combineLatestAll = combineLatestAll; +//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map new file mode 100644 index 0000000..e7b51b4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAE5D,uDAAsD;AA6CtD,SAAgB,gBAAgB,CAAI,OAAsC;IACxE,OAAO,mCAAgB,CAAC,6BAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js new file mode 100644 index 0000000..8f5c34a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js @@ -0,0 +1,34 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.combineLatestWith = void 0; +var combineLatest_1 = require("./combineLatest"); +function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.combineLatestWith = combineLatestWith; +//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map new file mode 100644 index 0000000..885fec0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAgD;AA0ChD,SAAgB,iBAAiB;IAC/B,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,6BAAa,wCAAI,YAAY,IAAE;AACxC,CAAC;AAJD,8CAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concat.js b/node_modules/rxjs/dist/cjs/internal/operators/concat.js new file mode 100644 index 0000000..97c8462 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concat.js @@ -0,0 +1,40 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concat = void 0; +var lift_1 = require("../util/lift"); +var concatAll_1 = require("./concatAll"); +var args_1 = require("../util/args"); +var from_1 = require("../observable/from"); +function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + return lift_1.operate(function (source, subscriber) { + concatAll_1.concatAll()(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +exports.concat = concat; +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map new file mode 100644 index 0000000..dad6b26 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,yCAAwC;AACxC,qCAA4C;AAC5C,2CAA0C;AAY1C,SAAgB,MAAM;IAAO,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACzC,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,qBAAS,EAAE,CAAC,WAAI,gBAAE,MAAM,UAAK,IAAI,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC;AALD,wBAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js new file mode 100644 index 0000000..fd6c66c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatAll = void 0; +var mergeAll_1 = require("./mergeAll"); +function concatAll() { + return mergeAll_1.mergeAll(1); +} +exports.concatAll = concatAll; +//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map new file mode 100644 index 0000000..b20b300 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AA2DtC,SAAgB,SAAS;IACvB,OAAO,mBAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js new file mode 100644 index 0000000..456fbae --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatMap = void 0; +var mergeMap_1 = require("./mergeMap"); +var isFunction_1 = require("../util/isFunction"); +function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); +} +exports.concatMap = concatMap; +//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map new file mode 100644 index 0000000..5cd0412 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAEtC,iDAAgD;AA4EhD,SAAgB,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,mBAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js new file mode 100644 index 0000000..2e69bc7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatMapTo = void 0; +var concatMap_1 = require("./concatMap"); +var isFunction_1 = require("../util/isFunction"); +function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function () { return innerObservable; }, resultSelector) : concatMap_1.concatMap(function () { return innerObservable; }); +} +exports.concatMapTo = concatMapTo; +//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map new file mode 100644 index 0000000..96fd1a5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,iDAAgD;AAuEhD,SAAgB,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC;AALD,kCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js new file mode 100644 index 0000000..a4c2935 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js @@ -0,0 +1,34 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.concatWith = void 0; +var concat_1 = require("./concat"); +function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.concatWith = concatWith; +//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map new file mode 100644 index 0000000..6ab2a5e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAAkC;AA0ClC,SAAgB,UAAU;IACxB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,eAAM,wCAAI,YAAY,IAAE;AACjC,CAAC;AAJD,gCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/connect.js b/node_modules/rxjs/dist/cjs/internal/operators/connect.js new file mode 100644 index 0000000..3595728 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/connect.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.connect = void 0; +var Subject_1 = require("../Subject"); +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var fromSubscribable_1 = require("../observable/fromSubscribable"); +var DEFAULT_CONFIG = { + connector: function () { return new Subject_1.Subject(); }, +}; +function connect(selector, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connector = config.connector; + return lift_1.operate(function (source, subscriber) { + var subject = connector(); + innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} +exports.connect = connect; +//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map b/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map new file mode 100644 index 0000000..1674c4c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,qDAAoD;AACpD,qCAAuC;AACvC,mEAAkE;AAgBlE,IAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,cAAM,OAAA,IAAI,iBAAO,EAAW,EAAtB,CAAsB;CACxC,CAAC;AA2EF,SAAgB,OAAO,CACrB,QAAsC,EACtC,MAAyC;IAAzC,uBAAA,EAAA,uBAAyC;IAEjC,IAAA,SAAS,GAAK,MAAM,UAAX,CAAY;IAC7B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,qBAAS,CAAC,QAAQ,CAAC,mCAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,0BAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/count.js b/node_modules/rxjs/dist/cjs/internal/operators/count.js new file mode 100644 index 0000000..9ba151e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/count.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.count = void 0; +var reduce_1 = require("./reduce"); +function count(predicate) { + return reduce_1.reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); +} +exports.count = count; +//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/count.js.map b/node_modules/rxjs/dist/cjs/internal/operators/count.js.map new file mode 100644 index 0000000..6a38e90 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/count.js.map @@ -0,0 +1 @@ +{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAyDlC,SAAgB,KAAK,CAAI,SAAgD;IACvE,OAAO,eAAM,CAAC,UAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAvD,CAAuD,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js new file mode 100644 index 0000000..bfc6aed --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.debounce = void 0; +var lift_1 = require("../util/lift"); +var noop_1 = require("../util/noop"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function debounce(durationSelector) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop); + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = durationSubscriber = null; + })); + }); +} +exports.debounce = debounce; +//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map new file mode 100644 index 0000000..db85e16 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/intern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a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js new file mode 100644 index 0000000..8362c93 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.debounceTime = void 0; +var async_1 = require("../scheduler/async"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return lift_1.operate(function (source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function () { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = activeTask = null; + })); + }); +} +exports.debounceTime = debounceTime; +//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map new file mode 100644 index 0000000..5a598a4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAGpD,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,YAAY,CAAI,OAAe,EAAE,SAA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UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5DD,oCA4DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js new file mode 100644 index 0000000..f554cea --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultIfEmpty = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function defaultIfEmpty(defaultValue) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); +} +exports.defaultIfEmpty = defaultIfEmpty; +//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map new file mode 100644 index 0000000..61ae27d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAqChE,SAAgB,cAAc,CAAO,YAAe;IAClD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD;YACE,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,wCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delay.js b/node_modules/rxjs/dist/cjs/internal/operators/delay.js new file mode 100644 index 0000000..47097f7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/delay.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.delay = void 0; +var async_1 = require("../scheduler/async"); +var delayWhen_1 = require("./delayWhen"); +var timer_1 = require("../observable/timer"); +function delay(due, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + var duration = timer_1.timer(due, scheduler); + return delayWhen_1.delayWhen(function () { return duration; }); +} +exports.delay = delay; +//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map new file mode 100644 index 0000000..0e026cc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,yCAAwC;AACxC,6CAA4C;AA0D5C,SAAgB,KAAK,CAAI,GAAkB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACpF,IAAM,QAAQ,GAAG,aAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,qBAAS,CAAC,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC,CAAC;AACnC,CAAC;AAHD,sBAGC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js new file mode 100644 index 0000000..265b0fb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.delayWhen = void 0; +var concat_1 = require("../observable/concat"); +var take_1 = require("./take"); +var ignoreElements_1 = require("./ignoreElements"); +var mapTo_1 = require("./mapTo"); +var mergeMap_1 = require("./mergeMap"); +var innerFrom_1 = require("../observable/innerFrom"); +function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function (source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function (value, index) { return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); }); +} +exports.delayWhen = delayWhen; +//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map new file mode 100644 index 0000000..1c7ac15 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":";;;AAEA,+CAA8C;AAC9C,+BAA8B;AAC9B,mDAAkD;AAClD,iCAAgC;AAChC,uCAAsC;AACtC,qDAAoD;AAoFpD,SAAgB,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,UAAC,MAAqB;YAC3B,OAAA,eAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAI,CAAC,CAAC,CAAC,EAAE,+BAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAAxG,CAAwG,CAAC;KAC5G;IAED,OAAO,mBAAQ,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,qBAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAI,CAAC,CAAC,CAAC,EAAE,aAAK,CAAC,KAAK,CAAC,CAAC,EAA1E,CAA0E,CAAC,CAAC;AAChH,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js new file mode 100644 index 0000000..511b755 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dematerialize = void 0; +var Notification_1 = require("../Notification"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function dematerialize() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); })); + }); +} +exports.dematerialize = dematerialize; +//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map new file mode 100644 index 0000000..e4f37c2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,aAAa;IAC3B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,YAAY,IAAK,OAAA,kCAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA7C,CAA6C,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js new file mode 100644 index 0000000..fc733c1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.distinct = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var innerFrom_1 = require("../observable/innerFrom"); +function distinct(keySelector, flushes) { + return lift_1.operate(function (source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop)); + }); +} +exports.distinct = distinct; +//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map new file mode 100644 index 0000000..36026a8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AACpC,qDAAoD;AA2DpD,SAAgB,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,qBAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,EAAE,EAApB,CAAoB,EAAE,WAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,4BAeC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js new file mode 100644 index 0000000..f5555d9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.distinctUntilChanged = void 0; +var identity_1 = require("../util/identity"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { keySelector = identity_1.identity; } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return lift_1.operate(function (source, subscriber) { + var previousKey; + var first = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); +} +exports.distinctUntilChanged = distinctUntilChanged; +function defaultCompare(a, b) { + return a === b; +} +//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map new file mode 100644 index 0000000..abd11b3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AAuIhE,SAAgB,oBAAoB,CAClC,UAAiD,EACjD,WAA0D;IAA1D,4BAAA,EAAA,cAA+B,mBAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YAEzC,IAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvCD,oDAuCC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js new file mode 100644 index 0000000..1f45aee --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.distinctUntilKeyChanged = void 0; +var distinctUntilChanged_1 = require("./distinctUntilChanged"); +function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged_1.distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); +} +exports.distinctUntilKeyChanged = distinctUntilKeyChanged; +//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map new file mode 100644 index 0000000..88e9262 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAoE9D,SAAgB,uBAAuB,CAAuB,GAAM,EAAE,OAAuC;IAC3G,OAAO,2CAAoB,CAAC,UAAC,CAAI,EAAE,CAAI,IAAK,OAAA,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAArD,CAAqD,CAAC,CAAC;AACrG,CAAC;AAFD,0DAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js new file mode 100644 index 0000000..f057736 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.elementAt = void 0; +var ArgumentOutOfRangeError_1 = require("../util/ArgumentOutOfRangeError"); +var filter_1 = require("./filter"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var take_1 = require("./take"); +function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); })); + }; +} +exports.elementAt = elementAt; +//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map new file mode 100644 index 0000000..246c83f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":";;;AAAA,2EAA0E;AAG1E,mCAAkC;AAClC,+CAA8C;AAC9C,mDAAkD;AAClD,+BAA8B;AAkD9B,SAAgB,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,iDAAuB,EAAE,CAAC;KACrC;IACD,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,KAAK,EAAX,CAAW,CAAC,EAC7B,WAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,iDAAuB,EAAE,EAA7B,CAA6B,CAAC,CACpG;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js new file mode 100644 index 0000000..fab323d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js @@ -0,0 +1,35 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.endWith = void 0; +var concat_1 = require("../observable/concat"); +var of_1 = require("../observable/of"); +function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function (source) { return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); }; +} +exports.endWith = endWith; +//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map new file mode 100644 index 0000000..05aa744 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAA8C;AAC9C,uCAAsC;AA8DtC,SAAgB,OAAO;IAAI,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IAC5D,OAAO,UAAC,MAAqB,IAAK,OAAA,eAAM,CAAC,MAAM,EAAE,OAAE,wCAAI,MAAM,IAAmB,EAA9C,CAA8C,CAAC;AACnF,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/every.js b/node_modules/rxjs/dist/cjs/internal/operators/every.js new file mode 100644 index 0000000..47e4014 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/every.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.every = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function every(predicate, thisArg) { + return lift_1.operate(function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +exports.every = every; +//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/every.js.map b/node_modules/rxjs/dist/cjs/internal/operators/every.js.map new file mode 100644 index 0000000..295cf17 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/every.js.map @@ -0,0 +1 @@ +{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,2DAAgE;AAwChE,SAAgB,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,sBAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js new file mode 100644 index 0000000..3a70412 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaust = void 0; +var exhaustAll_1 = require("./exhaustAll"); +exports.exhaust = exhaustAll_1.exhaustAll; +//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map new file mode 100644 index 0000000..0ae482d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAK7B,QAAA,OAAO,GAAG,uBAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js new file mode 100644 index 0000000..2e8955e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaustAll = void 0; +var exhaustMap_1 = require("./exhaustMap"); +var identity_1 = require("../util/identity"); +function exhaustAll() { + return exhaustMap_1.exhaustMap(identity_1.identity); +} +exports.exhaustAll = exhaustAll; +//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map new file mode 100644 index 0000000..1172eba --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAC1C,6CAA4C;AA8C5C,SAAgB,UAAU;IACxB,OAAO,uBAAU,CAAC,mBAAQ,CAAC,CAAC;AAC9B,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js new file mode 100644 index 0000000..1e1bafa --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.exhaustMap = void 0; +var map_1 = require("./map"); +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function (source) { + return source.pipe(exhaustMap(function (a, i) { return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + }; + } + return lift_1.operate(function (source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (outerValue) { + if (!innerSub) { + innerSub = OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function () { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); +} +exports.exhaustMap = exhaustMap; +//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map new file mode 100644 index 0000000..131d036 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":";;;AAGA,6BAA4B;AAC5B,qDAAoD;AACpD,qCAAuC;AACvC,2DAAgE;AA8DhE,SAAgB,UAAU,CACxB,OAAuC,EACvC,cAA6G;IAE7G,IAAI,cAAc,EAAE;QAElB,OAAO,UAAC,MAAqB;YAC3B,OAAA,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,qBAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAG,CAAC,UAAC,CAAM,EAAE,EAAO,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,EAApF,CAAoF,CAAC,CAAC;QAAvH,CAAuH,CAAC;KAC3H;IACD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAyB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YACT,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBACzD,QAAQ,GAAG,IAAI,CAAC;oBAChB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC;gBACH,qBAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7D;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,gCAgCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/expand.js b/node_modules/rxjs/dist/cjs/internal/operators/expand.js new file mode 100644 index 0000000..74934ea --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/expand.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.expand = void 0; +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { concurrent = Infinity; } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function (source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); + }); +} +exports.expand = expand; +//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map b/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map new file mode 100644 index 0000000..97d1a83 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map @@ -0,0 +1 @@ +{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,mDAAkD;AAuElD,SAAgB,MAAM,CACpB,OAAuC,EACvC,UAAqB,EACrB,SAAyB;IADzB,2BAAA,EAAA,qBAAqB;IAGrB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,OAAA,+BAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV;IAbD,CAaC,CACF,CAAC;AACJ,CAAC;AAtBD,wBAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/filter.js b/node_modules/rxjs/dist/cjs/internal/operators/filter.js new file mode 100644 index 0000000..ef8ae08 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/filter.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.filter = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function filter(predicate, thisArg) { + return lift_1.operate(function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + }); +} +exports.filter = filter; +//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map b/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map new file mode 100644 index 0000000..418bd24 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA0DhE,SAAgB,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAjE,CAAiE,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,wBAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js new file mode 100644 index 0000000..3bee9b7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.finalize = void 0; +var lift_1 = require("../util/lift"); +function finalize(callback) { + return lift_1.operate(function (source, subscriber) { + try { + source.subscribe(subscriber); + } + finally { + subscriber.add(callback); + } + }); +} +exports.finalize = finalize; +//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map new file mode 100644 index 0000000..ff7cc0a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AA+DvC,SAAgB,QAAQ,CAAI,QAAoB;IAC9C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,4BAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/find.js b/node_modules/rxjs/dist/cjs/internal/operators/find.js new file mode 100644 index 0000000..46a4389 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/find.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFind = exports.find = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, 'value')); +} +exports.find = find; +function createFind(predicate, thisArg, emit) { + var findIndex = emit === 'index'; + return function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + })); + }; +} +exports.createFind = createFind; +//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/find.js.map b/node_modules/rxjs/dist/cjs/internal/operators/find.js.map new file mode 100644 index 0000000..09d8ef6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/find.js.map @@ -0,0 +1 @@ +{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,2DAAgE;AA4DhE,SAAgB,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AALD,oBAKC;AAED,SAAgB,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,IAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAzBD,gCAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js new file mode 100644 index 0000000..7422995 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.findIndex = void 0; +var lift_1 = require("../util/lift"); +var find_1 = require("./find"); +function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, 'index')); +} +exports.findIndex = findIndex; +//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map new file mode 100644 index 0000000..9e122c9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,+BAAoC;AAuDpC,SAAgB,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,iBAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/first.js b/node_modules/rxjs/dist/cjs/internal/operators/first.js new file mode 100644 index 0000000..607da9f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/first.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.first = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var filter_1 = require("./filter"); +var take_1 = require("./take"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var identity_1 = require("../util/identity"); +function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); + }; +} +exports.first = first; +//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/first.js.map b/node_modules/rxjs/dist/cjs/internal/operators/first.js.map new file mode 100644 index 0000000..6907748 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/first.js.map @@ -0,0 +1 @@ +{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAEhD,mCAAkC;AAClC,+BAA8B;AAC9B,mDAAkD;AAClD,+CAA8C;AAC9C,6CAA4C;AAyE5C,SAAgB,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,mBAAQ,EAChE,WAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,uBAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,sBAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js new file mode 100644 index 0000000..a7f0e81 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.flatMap = void 0; +var mergeMap_1 = require("./mergeMap"); +exports.flatMap = mergeMap_1.mergeMap; +//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map new file mode 100644 index 0000000..2105491 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAKzB,QAAA,OAAO,GAAG,mBAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js new file mode 100644 index 0000000..18a5bd5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.groupBy = void 0; +var Observable_1 = require("../Observable"); +var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function groupBy(keySelector, elementOrOptions, duration, connector) { + return lift_1.operate(function (source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === 'function') { + element = elementOrOptions; + } + else { + (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } + var groups = new Map(); + var notify = function (cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, (group_1 = connector ? connector() : new Subject_1.Subject())); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(group_1, function () { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, undefined, undefined, function () { return groups.delete(key_1); }); + groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } + catch (err) { + handleError(err); + } + }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable_1.Observable(function (groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function () { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); +} +exports.groupBy = groupBy; +//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map new file mode 100644 index 0000000..eb92bd8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,qDAAoD;AACpD,sCAAqC;AAErC,qCAAuC;AACvC,2DAAoF;AAuIpF,SAAgB,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAG,QAAQ,GAAyB,gBAAgB,SAAzC,EAAE,OAAO,GAAgB,gBAAgB,QAAhC,EAAE,SAAS,GAAK,gBAAgB,UAArB,CAAsB,CAAC;SACvD;QAGD,IAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,IAAM,MAAM,GAAG,UAAC,EAAkC;YAChD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,IAAM,WAAW,GAAG,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,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,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,EAE/C,WAAW,EAKX,cAAM,OAAA,MAAM,CAAC,KAAK,EAAE,EAAd,CAAc,EACpB;YACE,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,IAAM,MAAM,GAAQ,IAAI,uBAAU,CAAI,UAAC,eAAe;gBACpD,YAAY,EAAE,CAAC;gBACf,IAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO;oBACL,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAxID,0BAwIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js new file mode 100644 index 0000000..d33ce63 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ignoreElements = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var noop_1 = require("../util/noop"); +function ignoreElements() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop)); + }); +} +exports.ignoreElements = ignoreElements; +//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map new file mode 100644 index 0000000..d07aa4a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AAqCpC,SAAgB,cAAc;IAC5B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,wCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js new file mode 100644 index 0000000..1b74a24 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEmpty = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function isEmpty() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + subscriber.next(false); + subscriber.complete(); + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +exports.isEmpty = isEmpty; +//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map new file mode 100644 index 0000000..ad98783 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA+DhE,SAAgB,OAAO;IACrB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV;YACE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,0BAgBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js new file mode 100644 index 0000000..9eae80f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinAllInternals = void 0; +var identity_1 = require("../util/identity"); +var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); +var pipe_1 = require("../util/pipe"); +var mergeMap_1 = require("./mergeMap"); +var toArray_1 = require("./toArray"); +function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); +} +exports.joinAllInternals = joinAllInternals; +//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map new file mode 100644 index 0000000..3c3601a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,6DAA4D;AAC5D,qCAAoC;AACpC,uCAAsC;AACtC,qCAAoC;AAYpC,SAAgB,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,WAAI,CAGT,iBAAO,EAAgE,EAEvE,mBAAQ,CAAC,UAAC,OAAO,IAAK,OAAA,MAAM,CAAC,OAAO,CAAC,EAAf,CAAe,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,mCAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,mBAAgB,CACxD,CAAC;AACJ,CAAC;AAVD,4CAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/last.js b/node_modules/rxjs/dist/cjs/internal/operators/last.js new file mode 100644 index 0000000..99a43b2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/last.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.last = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var filter_1 = require("./filter"); +var takeLast_1 = require("./takeLast"); +var throwIfEmpty_1 = require("./throwIfEmpty"); +var defaultIfEmpty_1 = require("./defaultIfEmpty"); +var identity_1 = require("../util/identity"); +function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); + }; +} +exports.last = last; +//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/last.js.map b/node_modules/rxjs/dist/cjs/internal/operators/last.js.map new file mode 100644 index 0000000..b51aa80 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/last.js.map @@ -0,0 +1 @@ +{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAEhD,mCAAkC;AAClC,uCAAsC;AACtC,+CAA8C;AAC9C,mDAAkD;AAClD,6CAA4C;AAuE5C,SAAgB,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,mBAAQ,EAChE,mBAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,uBAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,oBAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/map.js b/node_modules/rxjs/dist/cjs/internal/operators/map.js new file mode 100644 index 0000000..67a9909 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/map.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.map = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function map(project, thisArg) { + return lift_1.operate(function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); +} +exports.map = map; +//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/map.js.map b/node_modules/rxjs/dist/cjs/internal/operators/map.js.map new file mode 100644 index 0000000..c5e2e73 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/map.js.map @@ -0,0 +1 @@ +{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA6ChE,SAAgB,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kBAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js new file mode 100644 index 0000000..6f59967 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapTo = void 0; +var map_1 = require("./map"); +function mapTo(value) { + return map_1.map(function () { return value; }); +} +exports.mapTo = mapTo; +//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map new file mode 100644 index 0000000..c3e2ee8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":";;;AACA,6BAA4B;AA4C5B,SAAgB,KAAK,CAAI,KAAQ;IAC/B,OAAO,SAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;AAC1B,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js new file mode 100644 index 0000000..0ec3155 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.materialize = void 0; +var Notification_1 = require("../Notification"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function materialize() { + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + subscriber.next(Notification_1.Notification.createNext(value)); + }, function () { + subscriber.next(Notification_1.Notification.createComplete()); + subscriber.complete(); + }, function (err) { + subscriber.next(Notification_1.Notification.createError(err)); + subscriber.complete(); + })); + }); +} +exports.materialize = materialize; +//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map new file mode 100644 index 0000000..7332bf8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,WAAW;IACzB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,kCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/max.js b/node_modules/rxjs/dist/cjs/internal/operators/max.js new file mode 100644 index 0000000..29ba768 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/max.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.max = void 0; +var reduce_1 = require("./reduce"); +var isFunction_1 = require("../util/isFunction"); +function max(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); +} +exports.max = max; +//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/max.js.map b/node_modules/rxjs/dist/cjs/internal/operators/max.js.map new file mode 100644 index 0000000..174920e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/max.js.map @@ -0,0 +1 @@ +{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,iDAAgD;AAgDhD,SAAgB,GAAG,CAAI,QAAiC;IACtD,OAAO,eAAM,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/merge.js b/node_modules/rxjs/dist/cjs/internal/operators/merge.js new file mode 100644 index 0000000..1b81d7f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/merge.js @@ -0,0 +1,43 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +var lift_1 = require("../util/lift"); +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var mergeAll_1 = require("./mergeAll"); +var args_1 = require("../util/args"); +var from_1 = require("../observable/from"); +function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + args = argsOrArgArray_1.argsOrArgArray(args); + return lift_1.operate(function (source, subscriber) { + mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +exports.merge = merge; +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map b/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map new file mode 100644 index 0000000..26f63a5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,yDAAwD;AACxD,uCAAsC;AACtC,qCAAuD;AACvD,2CAA0C;AAiB1C,SAAgB,KAAK;IAAI,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACzC,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,gBAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAI,GAAG,+BAAc,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,mBAAQ,CAAC,UAAU,CAAC,CAAC,WAAI,gBAAE,MAAM,UAAM,IAA6B,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC;AARD,sBAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js new file mode 100644 index 0000000..e51138b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeAll = void 0; +var mergeMap_1 = require("./mergeMap"); +var identity_1 = require("../util/identity"); +function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); +} +exports.mergeAll = mergeAll; +//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map new file mode 100644 index 0000000..5ad1660 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,6CAA4C;AA8D5C,SAAgB,QAAQ,CAAiC,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IACpF,OAAO,mBAAQ,CAAC,mBAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js new file mode 100644 index 0000000..17a8a02 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js @@ -0,0 +1,65 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeInternals = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var executeSchedule_1 = require("../util/executeSchedule"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function () { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var doInnerSub = function (value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } + else { + subscriber.next(innerValue); + } + }, function () { + innerComplete = true; + }, undefined, function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); + } + else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } + catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + })); + return function () { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; +} +exports.mergeInternals = mergeInternals; +//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map new file mode 100644 index 0000000..aa4e2ac --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAGpD,2DAA0D;AAC1D,2DAAgE;AAehE,SAAgB,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,IAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,CAAC;IAKvB,IAAM,aAAa,GAAG;QAIpB,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YAC3C,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC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AAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;QAE9C,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO;QACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAhID,wCAgIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js new file mode 100644 index 0000000..c20cca6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeMap = void 0; +var map_1 = require("./map"); +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +var isFunction_1 = require("../util/isFunction"); +function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function (a, i) { return map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom_1.innerFrom(project(a, i))); }, concurrent); + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return lift_1.operate(function (source, subscriber) { return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); }); +} +exports.mergeMap = mergeMap; +//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map new file mode 100644 index 0000000..5acc68b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":";;;AACA,6BAA4B;AAC5B,qDAAoD;AACpD,qCAAuC;AACvC,mDAAkD;AAClD,iDAAgD;AA6EhD,SAAgB,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,uBAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAG,CAAC,UAAC,CAAM,EAAE,EAAU,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAlF,CAAkF,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU,IAAK,OAAA,+BAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAvD,CAAuD,CAAC,CAAC;AAClG,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js new file mode 100644 index 0000000..0ea80a5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeMapTo = void 0; +var mergeMap_1 = require("./mergeMap"); +var isFunction_1 = require("../util/isFunction"); +function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function () { return innerObservable; }, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function () { return innerObservable; }, concurrent); +} +exports.mergeMapTo = mergeMapTo; +//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map new file mode 100644 index 0000000..4c12c29 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,iDAAgD;AA2DhD,SAAgB,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,uBAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC;AAZD,gCAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js new file mode 100644 index 0000000..1fde167 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeScan = void 0; +var lift_1 = require("../util/lift"); +var mergeInternals_1 = require("./mergeInternals"); +function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return lift_1.operate(function (source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { + state = value; + }, false, undefined, function () { return (state = null); }); + }); +} +exports.mergeScan = mergeScan; +//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map new file mode 100644 index 0000000..0f2354e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,mDAAkD;AAoElD,SAAgB,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAqB;IAArB,2BAAA,EAAA,qBAAqB;IAErB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,+BAAc,CACnB,MAAM,EACN,UAAU,EACV,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAClD,UAAU,EACV,UAAC,KAAK;YACJ,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,cAAM,OAAA,CAAC,KAAK,GAAG,IAAK,CAAC,EAAf,CAAe,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js new file mode 100644 index 0000000..0af9e43 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js @@ -0,0 +1,34 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeWith = void 0; +var merge_1 = require("./merge"); +function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources))); +} +exports.mergeWith = mergeWith; +//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map new file mode 100644 index 0000000..6729011 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAgC;AA2ChC,SAAgB,SAAS;IACvB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,aAAK,wCAAI,YAAY,IAAE;AAChC,CAAC;AAJD,8BAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/min.js b/node_modules/rxjs/dist/cjs/internal/operators/min.js new file mode 100644 index 0000000..312ccc0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/min.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.min = void 0; +var reduce_1 = require("./reduce"); +var isFunction_1 = require("../util/isFunction"); +function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); +} +exports.min = min; +//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/min.js.map b/node_modules/rxjs/dist/cjs/internal/operators/min.js.map new file mode 100644 index 0000000..ec0e251 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,iDAAgD;AAgDhD,SAAgB,GAAG,CAAI,QAAiC;IACtD,OAAO,eAAM,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js new file mode 100644 index 0000000..7abaf0e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.multicast = void 0; +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +var isFunction_1 = require("../util/isFunction"); +var connect_1 = require("./connect"); +function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory, + }); + } + return function (source) { return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); }; +} +exports.multicast = multicast; +//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map new file mode 100644 index 0000000..e85a9ad --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":";;;AAEA,6EAA4E;AAE5E,iDAAgD;AAChD,qCAAoC;AA4EpC,SAAgB,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,IAAM,cAAc,GAAG,uBAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IAErH,IAAI,uBAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,iBAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,IAAI,6CAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,EAAtD,CAAsD,CAAC;AAC3F,CAAC;AAhBD,8BAgBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js new file mode 100644 index 0000000..617e0af --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observeOn = void 0; +var executeSchedule_1 = require("../util/executeSchedule"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return lift_1.operate(function (source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + }); +} +exports.observeOn = observeOn; +//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map new file mode 100644 index 0000000..3a7c9d1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":";;;AAEA,2DAA0D;AAC1D,qCAAuC;AACvC,2DAAgE;AAsDhE,SAAgB,SAAS,CAAI,SAAwB,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;IAC9D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAtB,CAAsB,EAAE,KAAK,CAAC,EAA3E,CAA2E,EACtF,cAAM,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,EAChF,UAAC,GAAG,IAAK,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js new file mode 100644 index 0000000..0af7cda --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js @@ -0,0 +1,37 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.onErrorResumeNext = exports.onErrorResumeNextWith = void 0; +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var onErrorResumeNext_1 = require("../observable/onErrorResumeNext"); +function onErrorResumeNextWith() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return function (source) { return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); }; +} +exports.onErrorResumeNextWith = onErrorResumeNextWith; +exports.onErrorResumeNext = onErrorResumeNextWith; +//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map new file mode 100644 index 0000000..8aad7e4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAAwD;AACxD,qEAAkF;AAiFlF,SAAgB,qBAAqB;IACnC,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAMzE,IAAM,WAAW,GAAG,+BAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,UAAC,MAAM,IAAK,OAAA,qCAAU,8BAAC,MAAM,UAAK,WAAW,KAAjC,CAAkC,CAAC;AACxD,CAAC;AAVD,sDAUC;AAKY,QAAA,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js new file mode 100644 index 0000000..dec77fd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pairwise = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function pairwise() { + return lift_1.operate(function (source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); +} +exports.pairwise = pairwise; +//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map new file mode 100644 index 0000000..a418242 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA6ChE,SAAgB,QAAQ;IACtB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/partition.js b/node_modules/rxjs/dist/cjs/internal/operators/partition.js new file mode 100644 index 0000000..fbfee81 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/partition.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.partition = void 0; +var not_1 = require("../util/not"); +var filter_1 = require("./filter"); +function partition(predicate, thisArg) { + return function (source) { + return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; + }; +} +exports.partition = partition; +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map b/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map new file mode 100644 index 0000000..7735a9f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,mCAAkC;AAuDlC,SAAgB,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,UAAC,MAAqB;QAC3B,OAAA,CAAC,eAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,eAAM,CAAC,SAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC;IAA/G,CAA+G,CAAC;AACpH,CAAC;AAND,8BAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js new file mode 100644 index 0000000..a3170c5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pluck = void 0; +var map_1 = require("./map"); +function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map_1.map(function (x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } + else { + return undefined; + } + } + return currentProp; + }); +} +exports.pluck = pluck; +//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map new file mode 100644 index 0000000..e7b3149 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAwF5B,SAAgB,KAAK;IAAO,oBAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,+BAA8C;;IACxE,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,SAAG,CAAC,UAAC,CAAC;QACX,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,sBAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publish.js b/node_modules/rxjs/dist/cjs/internal/operators/publish.js new file mode 100644 index 0000000..1fec3b4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publish.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publish = void 0; +var Subject_1 = require("../Subject"); +var multicast_1 = require("./multicast"); +var connect_1 = require("./connect"); +function publish(selector) { + return selector ? function (source) { return connect_1.connect(selector)(source); } : function (source) { return multicast_1.multicast(new Subject_1.Subject())(source); }; +} +exports.publish = publish; +//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map new file mode 100644 index 0000000..9b1b245 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":";;;AACA,sCAAqC;AACrC,yCAAwC;AAGxC,qCAAoC;AAqFpC,SAAgB,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,iBAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,qBAAS,CAAC,IAAI,iBAAO,EAAK,CAAC,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC;AAC5G,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js new file mode 100644 index 0000000..3887094 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishBehavior = void 0; +var BehaviorSubject_1 = require("../BehaviorSubject"); +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +function publishBehavior(initialValue) { + return function (source) { + var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); + }; +} +exports.publishBehavior = publishBehavior; +//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map new file mode 100644 index 0000000..ed76b7c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":";;;AACA,sDAAqD;AACrD,6EAA4E;AAiB5E,SAAgB,eAAe,CAAI,YAAe;IAEhD,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,iCAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,0CAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js new file mode 100644 index 0000000..fb94783 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishLast = void 0; +var AsyncSubject_1 = require("../AsyncSubject"); +var ConnectableObservable_1 = require("../observable/ConnectableObservable"); +function publishLast() { + return function (source) { + var subject = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); + }; +} +exports.publishLast = publishLast; +//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map new file mode 100644 index 0000000..e84e10d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,6EAA4E;AAmE5E,SAAgB,WAAW;IAEzB,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,2BAAY,EAAK,CAAC;QACtC,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js new file mode 100644 index 0000000..15061cb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publishReplay = void 0; +var ReplaySubject_1 = require("../ReplaySubject"); +var multicast_1 = require("./multicast"); +var isFunction_1 = require("../util/isFunction"); +function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + return function (source) { return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; +} +exports.publishReplay = publishReplay; +//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map new file mode 100644 index 0000000..ae0e0ae --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":";;;AACA,kDAAiD;AACjD,yCAAwC;AAExC,iDAAgD;AA8EhD,SAAgB,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,uBAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,IAAM,QAAQ,GAAG,uBAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,UAAC,MAAqB,IAAK,OAAA,qBAAS,CAAC,IAAI,6BAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,EAA7F,CAA6F,CAAC;AAClI,CAAC;AAbD,sCAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/race.js b/node_modules/rxjs/dist/cjs/internal/operators/race.js new file mode 100644 index 0000000..cf4df95 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/race.js @@ -0,0 +1,35 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.race = void 0; +var argsOrArgArray_1 = require("../util/argsOrArgArray"); +var raceWith_1 = require("./raceWith"); +function race() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return raceWith_1.raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray_1.argsOrArgArray(args)))); +} +exports.race = race; +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/race.js.map b/node_modules/rxjs/dist/cjs/internal/operators/race.js.map new file mode 100644 index 0000000..8d06db0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAAwD;AACxD,uCAAsC;AAetC,SAAgB,IAAI;IAAI,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACpC,OAAO,mBAAQ,wCAAI,+BAAc,CAAC,IAAI,CAAC,IAAE;AAC3C,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js new file mode 100644 index 0000000..a29805d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js @@ -0,0 +1,40 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.raceWith = void 0; +var race_1 = require("../observable/race"); +var lift_1 = require("../util/lift"); +var identity_1 = require("../util/identity"); +function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length + ? identity_1.identity + : lift_1.operate(function (source, subscriber) { + race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); +} +exports.raceWith = raceWith; +//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map new file mode 100644 index 0000000..1bacc7d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA8C;AAC9C,qCAAuC;AACvC,6CAA4C;AA4B5C,SAAgB,QAAQ;IACtB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,eAAQ,gBAAiB,MAAM,UAAK,YAAY,GAAE,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC;AARD,4BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js new file mode 100644 index 0000000..147a264 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reduce = void 0; +var scanInternals_1 = require("./scanInternals"); +var lift_1 = require("../util/lift"); +function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); +} +exports.reduce = reduce; +//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map new file mode 100644 index 0000000..1852a6b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAEhD,qCAAuC;AAyDvC,SAAgB,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,cAAO,CAAC,6BAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js new file mode 100644 index 0000000..1c86a48 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.refCount = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function refCount() { + return lift_1.operate(function (source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); +} +exports.refCount = refCount; +//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map new file mode 100644 index 0000000..fa771cc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,2DAAgE;AA4DhE,SAAgB,QAAQ;IACtB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,IAAM,UAAU,GAAG,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACvF,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,IAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAtDD,4BAsDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js new file mode 100644 index 0000000..80e9bf3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.repeat = void 0; +var empty_1 = require("../observable/empty"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +var timer_1 = require("../observable/timer"); +function repeat(countOrConfig) { + var _a; + var count = Infinity; + var delay; + if (countOrConfig != null) { + if (typeof countOrConfig === 'object') { + (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); + } + else { + count = countOrConfig; + } + } + return count <= 0 + ? function () { return empty_1.EMPTY; } + : lift_1.operate(function (source, subscriber) { + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } + else { + syncUnsub = true; + } + } + else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); +} +exports.repeat = repeat; +//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map new file mode 100644 index 0000000..2a29002 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AAEvC,2DAAgE;AAChE,qDAAoD;AACpD,6CAA4C;AA6G5C,SAAgB,MAAM,CAAI,aAAqC;;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAG,KAA4B,aAAa,MAAzB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED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EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC;AAxDD,wBAwDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js new file mode 100644 index 0000000..e3ca262 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.repeatWhen = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function repeatWhen(notifier) { + return lift_1.operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var getCompletionSubject = function () { + if (!completions$) { + completions$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + if (innerSub) { + subscribeForRepeatWhen(); + } + else { + syncResub = true; + } + }, function () { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function () { + isMainComplete = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); +} +exports.repeatWhen = repeatWhen; +//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map new file mode 100644 index 0000000..8202430 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map @@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C;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC;AAjFD,gCAiFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retry.js b/node_modules/rxjs/dist/cjs/internal/operators/retry.js new file mode 100644 index 0000000..f850078 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/retry.js @@ -0,0 +1,73 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retry = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var identity_1 = require("../util/identity"); +var timer_1 = require("../observable/timer"); +var innerFrom_1 = require("../observable/innerFrom"); +function retry(configOrCount) { + if (configOrCount === void 0) { configOrCount = Infinity; } + var config; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } + else { + config = { + count: configOrCount, + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 + ? identity_1.identity + : lift_1.operate(function (source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, undefined, function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function () { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + resub_1(); + } + } + else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); +} +exports.retry = retry; +//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map b/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map new file mode 100644 index 0000000..5397e2c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AAEvC,2DAAgE;AAChE,6CAA4C;AAC5C,6CAA4C;AAC5C,qDAAoD;AA4EpD,SAAgB,KAAK,CAAI,aAA8C;IAA9C,8BAAA,EAAA,wBAA8C;IACrE,IAAI,MAAmB,CAAC;IACxB,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACtD,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM;QACL,MAAM,GAAG;YACP,KAAK,EAAE,aAAuB;SAC/B,CAAC;KACH;IACO,IAAA,KAAoE,MAAM,MAA1D,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAA6C,MAAM,MAAnD,EAAE,KAA2C,MAAM,eAAX,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAY;IAEnF,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,QAA6B,CAAC;YAClC,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAA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EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC;AApFD,sBAoFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js new file mode 100644 index 0000000..d2c5095 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retryWhen = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function retryWhen(notifier) { + return lift_1.operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function () { + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + return innerSub ? subscribeForRetryWhen() : (syncResub = true); + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); +} +exports.retryWhen = retryWhen; +//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map new file mode 100644 index 0000000..e93a7f2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AACpD,sCAAqC;AAIrC,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,SAAS,CAAI,QAA2D;IACtF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,IAAM,qBAAqB,GAAG;YAC5B,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;gBAC7D,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;oBACxB,qBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,6CAAwB,CAAC,UAAU,EAAE;wBAMnC,OAAA,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;oBAAvD,CAAuD,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AA9CD,8BA8CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sample.js b/node_modules/rxjs/dist/cjs/internal/operators/sample.js new file mode 100644 index 0000000..59b6f71 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sample.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sample = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var noop_1 = require("../util/noop"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function sample(notifier) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + })); + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop_1.noop)); + }); +} +exports.sample = sample; +//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map new file mode 100644 index 0000000..12d83a6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAEpD,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AA0ChE,SAAgB,MAAM,CAAI,QAA8B;IACtD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV;YACE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,WAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,wBAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js new file mode 100644 index 0000000..d01f392 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sampleTime = void 0; +var async_1 = require("../scheduler/async"); +var sample_1 = require("./sample"); +var interval_1 = require("../observable/interval"); +function sampleTime(period, scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return sample_1.sample(interval_1.interval(period, scheduler)); +} +exports.sampleTime = sampleTime; +//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map new file mode 100644 index 0000000..4d47967 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,mCAAkC;AAClC,mDAAkD;AA6ClD,SAAgB,UAAU,CAAI,MAAc,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACrF,OAAO,eAAM,CAAC,mBAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scan.js b/node_modules/rxjs/dist/cjs/internal/operators/scan.js new file mode 100644 index 0000000..eb8d1b3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/scan.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scan = void 0; +var lift_1 = require("../util/lift"); +var scanInternals_1 = require("./scanInternals"); +function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); +} +exports.scan = scan; +//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map new file mode 100644 index 0000000..f78aef4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,iDAAgD;AAqFhD,SAAgB,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,cAAO,CAAC,6BAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC;AAPD,oBAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js new file mode 100644 index 0000000..36fd8b2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scanInternals = void 0; +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function (source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var i = index++; + state = hasState + ? + accumulator(state, value, i) + : + ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && + (function () { + hasState && subscriber.next(state); + subscriber.complete(); + }))); + }; +} +exports.scanInternals = scanInternals; +//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map new file mode 100644 index 0000000..d3bfecd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":";;;AAEA,2DAAgE;AAWhE,SAAgB,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QAIxD,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC;gBACC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAhDD,sCAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js new file mode 100644 index 0000000..9416b3a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sequenceEqual = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + return lift_1.operate(function (source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function (isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function (selfState, otherState) { + var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } + else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function () { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); +} +exports.sequenceEqual = sequenceEqual; +function createState() { + return { + buffer: [], + complete: false, + }; +} +//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map new file mode 100644 index 0000000..19faf27 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":";;;AACA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E,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,qBAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AA9DD,sCA8DC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/share.js b/node_modules/rxjs/dist/cjs/internal/operators/share.js new file mode 100644 index 0000000..71d7fda --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/share.js @@ -0,0 +1,109 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.share = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var Subject_1 = require("../Subject"); +var Subscriber_1 = require("../Subscriber"); +var lift_1 = require("../util/lift"); +function share(options) { + if (options === void 0) { options = {}; } + var _a = options.connector, connector = _a === void 0 ? function () { return new Subject_1.Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function (wrapperSource) { + var connection; + var resetConnection; + var subject; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function () { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + var reset = function () { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function () { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function (source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + subscriber.add(function () { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && + refCount > 0) { + connection = new Subscriber_1.SafeSubscriber({ + next: function (value) { return dest.next(value); }, + error: function (err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function () { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom_1.innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; +} +exports.share = share; +function handleReset(reset, on) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + var onSubscriber = new Subscriber_1.SafeSubscriber({ + next: function () { + onSubscriber.unsubscribe(); + reset(); + }, + }); + return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); +} +//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/share.js.map b/node_modules/rxjs/dist/cjs/internal/operators/share.js.map new file mode 100644 index 0000000..768a9b0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/intern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IACpB,CAAC,CAAC;AACJ,CAAC;AArGD,sBAqGC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD;IACpD,cAAU;SAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;QAAV,6BAAU;;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,IAAM,YAAY,GAAG,IAAI,2BAAc,CAAC;QACtC,IAAI,EAAE;YACJ,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,qBAAS,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js new file mode 100644 index 0000000..7fa74a2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.shareReplay = void 0; +var ReplaySubject_1 = require("../ReplaySubject"); +var share_1 = require("./share"); +function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b, _c; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); + } + else { + bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); + } + return share_1.share({ + connector: function () { return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); +} +exports.shareReplay = shareReplay; +//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map new file mode 100644 index 0000000..e94278f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":";;;AAAA,kDAAiD;AAEjD,iCAAgC;AAwJhC,SAAgB,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAG,KAA8E,kBAAkB,WAA3E,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAuD,kBAAkB,WAApD,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAgC,kBAAkB,SAAlC,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,SAAS,GAAK,kBAAkB,UAAvB,CAAwB,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,aAAK,CAAI;QACd,SAAS,EAAE,cAAM,OAAA,IAAI,6BAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAApD,CAAoD;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC;AAlBD,kCAkBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/single.js b/node_modules/rxjs/dist/cjs/internal/operators/single.js new file mode 100644 index 0000000..f56f2c0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/single.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.single = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var SequenceError_1 = require("../util/SequenceError"); +var NotFoundError_1 = require("../util/NotFoundError"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function single(predicate) { + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError_1.SequenceError('Too many matching values')); + hasValue = true; + singleValue = value; + } + }, function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } + else { + subscriber.error(seenValue ? new NotFoundError_1.NotFoundError('No matching values') : new EmptyError_1.EmptyError()); + } + })); + }); +} +exports.single = single; +//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/single.js.map b/node_modules/rxjs/dist/cjs/internal/operators/single.js.map new file mode 100644 index 0000000..c9a4599 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/single.js.map @@ -0,0 +1 @@ +{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAGhD,uDAAsD;AACtD,uDAAsD;AACtD,qCAAuC;AACvC,2DAAgE;AAiFhE,SAAgB,MAAM,CAAI,SAAuE;IAC/F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,6BAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD;YACE,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,6BAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,wBA4BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skip.js b/node_modules/rxjs/dist/cjs/internal/operators/skip.js new file mode 100644 index 0000000..0f0af1d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skip.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skip = void 0; +var filter_1 = require("./filter"); +function skip(count) { + return filter_1.filter(function (_, index) { return count <= index; }); +} +exports.skip = skip; +//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map new file mode 100644 index 0000000..14739a8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAmClC,SAAgB,IAAI,CAAI,KAAa;IACnC,OAAO,eAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,IAAI,KAAK,EAAd,CAAc,CAAC,CAAC;AAC9C,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js new file mode 100644 index 0000000..66e789d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skipLast = void 0; +var identity_1 = require("../util/identity"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function skipLast(skipCount) { + return skipCount <= 0 + ? + identity_1.identity + : lift_1.operate(function (source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } + else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function () { + ring = null; + }; + }); +} +exports.skipLast = skipLast; +//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map new file mode 100644 index 0000000..696e8e6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AA4ChE,SAAgB,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAIzB,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAKzC,IAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,IAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO;gBAEL,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AA/CD,4BA+CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js new file mode 100644 index 0000000..f5d424e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skipUntil = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +var noop_1 = require("../util/noop"); +function skipUntil(notifier) { + return lift_1.operate(function (source, subscriber) { + var taking = false; + var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + }); +} +exports.skipUntil = skipUntil; +//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map new file mode 100644 index 0000000..39d8ab9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,qCAAoC;AA+CpC,SAAgB,SAAS,CAAI,QAA8B;IACzD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAM,cAAc,GAAG,6CAAwB,CAC7C,UAAU,EACV;YACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,WAAI,CACL,CAAC;QAEF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,8BAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js new file mode 100644 index 0000000..31c2c5f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.skipWhile = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function skipWhile(predicate) { + return lift_1.operate(function (source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + }); +} +exports.skipWhile = skipWhile; +//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map new file mode 100644 index 0000000..dbe7d19 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAiDhE,SAAgB,SAAS,CAAI,SAA+C;IAC1E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAA3E,CAA2E,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js new file mode 100644 index 0000000..3142a98 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.startWith = void 0; +var concat_1 = require("../observable/concat"); +var args_1 = require("../util/args"); +var lift_1 = require("../util/lift"); +function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = args_1.popScheduler(values); + return lift_1.operate(function (source, subscriber) { + (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); + }); +} +exports.startWith = startWith; +//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map new file mode 100644 index 0000000..9f28c9d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,qCAA4C;AAC5C,qCAAuC;AAuDvC,SAAgB,SAAS;IAAO,gBAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,2BAAc;;IAC5C,IAAM,SAAS,GAAG,mBAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAIhC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js new file mode 100644 index 0000000..2cd97ab --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribeOn = void 0; +var lift_1 = require("../util/lift"); +function subscribeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return lift_1.operate(function (source, subscriber) { + subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); + }); +} +exports.subscribeOn = subscribeOn; +//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map new file mode 100644 index 0000000..9ba9a68 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AA6DvC,SAAgB,WAAW,CAAI,SAAwB,EAAE,KAAiB;IAAjB,sBAAA,EAAA,SAAiB;IACxE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAA5B,CAA4B,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js new file mode 100644 index 0000000..0beb281 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchAll = void 0; +var switchMap_1 = require("./switchMap"); +var identity_1 = require("../util/identity"); +function switchAll() { + return switchMap_1.switchMap(identity_1.identity); +} +exports.switchAll = switchAll; +//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map new file mode 100644 index 0000000..8b16a7a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,6CAA4C;AA4D5C,SAAgB,SAAS;IACvB,OAAO,qBAAS,CAAC,mBAAQ,CAAC,CAAC;AAC7B,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js new file mode 100644 index 0000000..0abf43d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchMap = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function switchMap(project, resultSelector) { + return lift_1.operate(function (source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom_1.innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { + innerSubscriber = null; + checkComplete(); + }))); + }, function () { + isComplete = true; + checkComplete(); + })); + }); +} +exports.switchMap = switchMap; +//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map new file mode 100644 index 0000000..d5d78c7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":";;;AAEA,qDAAoD;AACpD,qCAAuC;AACvC,2DAAgE;AAiFhE,SAAgB,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,IAAM,aAAa,GAAG,cAAM,OAAA,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,EAAvD,CAAuD,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,IAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,qBAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,6CAAwB,CACzC,UAAU,EAIV,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAA1G,CAA0G,EAC1H;gBAIE,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/CD,8BA+CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js new file mode 100644 index 0000000..626fcc1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchMapTo = void 0; +var switchMap_1 = require("./switchMap"); +var isFunction_1 = require("../util/isFunction"); +function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function () { return innerObservable; }, resultSelector) : switchMap_1.switchMap(function () { return innerObservable; }); +} +exports.switchMapTo = switchMapTo; +//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map new file mode 100644 index 0000000..fa903ae --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,iDAAgD;AAwDhD,SAAgB,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC;AALD,kCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js new file mode 100644 index 0000000..357c00b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.switchScan = void 0; +var switchMap_1 = require("./switchMap"); +var lift_1 = require("../util/lift"); +function switchScan(accumulator, seed) { + return lift_1.operate(function (source, subscriber) { + var state = seed; + switchMap_1.switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); + return function () { + state = null; + }; + }); +} +exports.switchScan = switchScan; +//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map new file mode 100644 index 0000000..5bc192b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,qCAAuC;AAqBvC,SAAgB,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,qBAAS,CAGP,UAAC,KAAQ,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAGrD,UAAC,CAAC,EAAE,UAAU,IAAK,OAAA,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,EAAlC,CAAkC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO;YAEL,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,gCA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/take.js b/node_modules/rxjs/dist/cjs/internal/operators/take.js new file mode 100644 index 0000000..c2c9868 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/take.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.take = void 0; +var empty_1 = require("../observable/empty"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function take(count) { + return count <= 0 + ? + function () { return empty_1.EMPTY; } + : lift_1.operate(function (source, subscriber) { + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); +} +exports.take = take; +//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/take.js.map b/node_modules/rxjs/dist/cjs/internal/operators/take.js.map new file mode 100644 index 0000000..5a9c032 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/take.js.map @@ -0,0 +1 @@ +{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AA4ChE,SAAgB,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAIzC,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AAvBD,oBAuBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js new file mode 100644 index 0000000..7b8d9d9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js @@ -0,0 +1,48 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.takeLast = void 0; +var empty_1 = require("../observable/empty"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function takeLast(count) { + return count <= 0 + ? function () { return empty_1.EMPTY; } + : lift_1.operate(function (source, subscriber) { + var buffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function () { + var e_1, _a; + try { + for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }, undefined, function () { + buffer = null; + })); + }); +} +exports.takeLast = takeLast; +//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map new file mode 100644 index 0000000..d55f5ac --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAKzB,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBAEJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD;;;oBAGE,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAvB,IAAM,KAAK,mBAAA;wBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT;gBAEE,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AApCD,4BAoCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js new file mode 100644 index 0000000..0297e8e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.takeUntil = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +var noop_1 = require("../util/noop"); +function takeUntil(notifier) { + return lift_1.operate(function (source, subscriber) { + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} +exports.takeUntil = takeUntil; +//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map new file mode 100644 index 0000000..f278807 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,qCAAoC;AAyCpC,SAAgB,SAAS,CAAI,QAA8B;IACzD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,WAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js new file mode 100644 index 0000000..10953cc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.takeWhile = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { inclusive = false; } + return lift_1.operate(function (source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); +} +exports.takeWhile = takeWhile; +//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map new file mode 100644 index 0000000..eba122e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAoDhE,SAAgB,SAAS,CAAI,SAA+C,EAAE,SAAiB;IAAjB,0BAAA,EAAA,iBAAiB;IAC7F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/tap.js b/node_modules/rxjs/dist/cjs/internal/operators/tap.js new file mode 100644 index 0000000..585c5c2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/tap.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.tap = void 0; +var isFunction_1 = require("../util/isFunction"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var identity_1 = require("../util/identity"); +function tap(observerOrNext, error, complete) { + var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete + ? + { next: observerOrNext, error: error, complete: complete } + : observerOrNext; + return tapObserver + ? lift_1.operate(function (source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); + subscriber.next(value); + }, function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + subscriber.complete(); + }, function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); + subscriber.error(err); + }, function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) + : + identity_1.identity; +} +exports.tap = tap; +//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map new file mode 100644 index 0000000..b9611e8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAChD,q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BAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js new file mode 100644 index 0000000..474be8c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throttle = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function throttle(durationSelector, config) { + return lift_1.operate(function (source, subscriber) { + var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function () { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function () { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function (value) { + return (throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + }; + var send = function () { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function () { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); +} +exports.throttle = throttle; +//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map new file mode 100644 index 0000000..22b6834 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map @@ -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AAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBAEjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EAMV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA3DD,4BA2DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js new file mode 100644 index 0000000..e91124d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throttleTime = void 0; +var async_1 = require("../scheduler/async"); +var throttle_1 = require("./throttle"); +var timer_1 = require("../observable/timer"); +function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + var duration$ = timer_1.timer(duration, scheduler); + return throttle_1.throttle(function () { return duration$; }, config); +} +exports.throttleTime = throttleTime; +//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map new file mode 100644 index 0000000..1b7737d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AACpD,uCAAsD;AAEtD,6CAA4C;AAmD5C,SAAgB,YAAY,CAC1B,QAAgB,EAChB,SAAyC,EACzC,MAAuB;IADvB,0BAAA,EAAA,YAA2B,sBAAc;IAGzC,IAAM,SAAS,GAAG,aAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,mBAAQ,CAAC,cAAM,OAAA,SAAS,EAAT,CAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAPD,oCAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js new file mode 100644 index 0000000..fe26c0b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.throwIfEmpty = void 0; +var EmptyError_1 = require("../util/EmptyError"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + return lift_1.operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + }); +} +exports.throwIfEmpty = throwIfEmpty; +function defaultErrorFactory() { + return new EmptyError_1.EmptyError(); +} +//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map new file mode 100644 index 0000000..577e656 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAEhD,qCAAuC;AACvC,2DAAgE;AAsChE,SAAgB,YAAY,CAAI,YAA6C;IAA7C,6BAAA,EAAA,kCAA6C;IAC3E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,cAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,EAArE,CAAqE,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,oCAcC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,uBAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js new file mode 100644 index 0000000..0a32d91 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TimeInterval = exports.timeInterval = void 0; +var async_1 = require("../scheduler/async"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function timeInterval(scheduler) { + if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } + return lift_1.operate(function (source, subscriber) { + var last = scheduler.now(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var now = scheduler.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); +} +exports.timeInterval = timeInterval; +var TimeInterval = (function () { + function TimeInterval(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval; +}()); +exports.TimeInterval = TimeInterval; +//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map new file mode 100644 index 0000000..c8e43cb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,YAAY,CAAI,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,oCAYC;AAKD;IAIE,sBAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAC1D,mBAAC;AAAD,CAAC,AALD,IAKC;AALY,oCAAY"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js new file mode 100644 index 0000000..eeb0e6b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeout = exports.TimeoutError = void 0; +var async_1 = require("../scheduler/async"); +var isDate_1 = require("../util/isDate"); +var lift_1 = require("../util/lift"); +var innerFrom_1 = require("../observable/innerFrom"); +var createErrorClass_1 = require("../util/createErrorClass"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var executeSchedule_1 = require("../util/executeSchedule"); +exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { info = null; } + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + }; +}); +function timeout(config, schedulerArg) { + var _a = (isDate_1.isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return lift_1.operate(function (source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function (delay) { + timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom_1.innerFrom(_with({ + meta: meta, + lastValue: lastValue, + seen: seen, + })).subscribe(subscriber); + } + catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, undefined, undefined, function () { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + }); +} +exports.timeout = timeout; +function timeoutErrorFactory(info) { + throw new exports.TimeoutError(info); +} +//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map new file mode 100644 index 0000000..719d47e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,yCAA6C;AAE7C,qCAAuC;AAEvC,qDAAoD;AACpD,6DAA4D;AAC5D,2DAAgE;AAChE,2DAA0D;AA8E7C,QAAA,YAAY,GAAqB,mCAAgB,CAC5D,UAAC,MAAM;IACL,OAAA,SAAS,gBAAgB,CAAY,IAAoC;QAApC,qBAAA,EAAA,WAAoC;QACvE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;AALD,CAKC,CACJ,CAAC;AA6MF,SAAgB,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAStB,IAAA,KAMF,CAAC,oBAAW,CAAC,MAAM,CAAC,CAAC,CAA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,CAAE,WAAW,EAAE,CAAC;YACjC,IAAI,EAAE,CAAC;YAEP,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;YAErC,IAAK,GAAG,CAAC,IAAI,UAAU,CAAC,IAAK,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EACT,SAAS,EACT;YACE,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AA/FD,0BA+FC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,oBAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js new file mode 100644 index 0000000..5811d86 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeoutWith = void 0; +var async_1 = require("../scheduler/async"); +var isDate_1 = require("../util/isDate"); +var timeout_1 = require("./timeout"); +function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; + if (isDate_1.isValidDate(due)) { + first = due; + } + else if (typeof due === 'number') { + each = due; + } + if (withObservable) { + _with = function () { return withObservable; }; + } + else { + throw new TypeError('No observable provided to switch to'); + } + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return timeout_1.timeout({ + first: first, + each: each, + scheduler: scheduler, + with: _with, + }); +} +exports.timeoutWith = timeoutWith; +//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map new file mode 100644 index 0000000..b524d77 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,yCAA6C;AAE7C,qCAAoC;AA+EpC,SAAgB,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,aAAK,CAAC;IAE/B,IAAI,oBAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,cAAM,OAAA,cAAc,EAAd,CAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,iBAAO,CAAwB;QACpC,KAAK,OAAA;QACL,IAAI,MAAA;QACJ,SAAS,WAAA;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC;AAjCD,kCAiCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js new file mode 100644 index 0000000..274b888 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timestamp = void 0; +var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); +var map_1 = require("./map"); +function timestamp(timestampProvider) { + if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider_1.dateTimestampProvider; } + return map_1.map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); +} +exports.timestamp = timestamp; +//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map new file mode 100644 index 0000000..d3f74a7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":";;;AACA,4EAA2E;AAC3E,6BAA4B;AAkC5B,SAAgB,SAAS,CAAI,iBAA4D;IAA5D,kCAAA,EAAA,oBAAuC,6CAAqB;IACvF,OAAO,SAAG,CAAC,UAAC,KAAQ,IAAK,OAAA,CAAC,EAAE,KAAK,OAAA,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC5E,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js new file mode 100644 index 0000000..51ef796 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toArray = void 0; +var reduce_1 = require("./reduce"); +var lift_1 = require("../util/lift"); +var arrReducer = function (arr, value) { return (arr.push(value), arr); }; +function toArray() { + return lift_1.operate(function (source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); +} +exports.toArray = toArray; +//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map new file mode 100644 index 0000000..761a761 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,qCAAuC;AAEvC,IAAM,UAAU,GAAG,UAAC,GAAU,EAAE,KAAU,IAAK,OAAA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAtB,CAAsB,CAAC;AAgCtE,SAAgB,OAAO;IAIrB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,eAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,0BAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/window.js b/node_modules/rxjs/dist/cjs/internal/operators/window.js new file mode 100644 index 0000000..a2bc14b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/window.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.window = void 0; +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var innerFrom_1 = require("../observable/innerFrom"); +function window(windowBoundaries) { + return lift_1.operate(function (source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function (err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject_1.Subject())); + }, noop_1.noop, errorHandler)); + return function () { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); +} +exports.window = window; +//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/window.js.map b/node_modules/rxjs/dist/cjs/internal/operators/window.js.map new file mode 100644 index 0000000..244fe91 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/window.js.map @@ -0,0 +1 @@ +{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AACpC,qDAAoD;AA8CpD,SAAgB,MAAM,CAAI,gBAAsC;IAC9D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,aAAa,GAAe,IAAI,iBAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,IAAM,YAAY,GAAG,UAAC,GAAQ;YAC5B,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EAA1B,CAA0B,EACrC;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,qBAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,6CAAwB,CACtB,UAAU,EACV;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,iBAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,WAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO;YAIL,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA7CD,wBA6CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js new file mode 100644 index 0000000..2de7fb1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js @@ -0,0 +1,67 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.windowCount = void 0; +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { startWindowEvery = 0; } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return lift_1.operate(function (source, subscriber) { + var windows = [new Subject_1.Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + } + finally { if (e_1) throw e_1.error; } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function () { + starts = null; + windows = null; + })); + }); +} +exports.windowCount = windowCount; +//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map new file mode 100644 index 0000000..b349486 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sCAAqC;AAErC,qCAAuC;AACvC,2DAAgE;AAgEhE,SAAgB,WAAW,CAAI,UAAkB,EAAE,gBAA4B;IAA5B,iCAAA,EAAA,oBAA4B;IAC7E,IAAM,UAAU,GAAG,gBAAgB,GAAG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AC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA7DD,kCA6DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js new file mode 100644 index 0000000..ba43677 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.windowTime = void 0; +var Subject_1 = require("../Subject"); +var async_1 = require("../scheduler/async"); +var Subscription_1 = require("../Subscription"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var arrRemove_1 = require("../util/arrRemove"); +var args_1 = require("../util/args"); +var executeSchedule_1 = require("../util/executeSchedule"); +function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return lift_1.operate(function (source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function (record) { + var window = record.window, subs = record.subs; + window.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function () { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs: subs, + seen: 0, + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + executeSchedule_1.executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } + else { + restartOnClose = true; + } + startWindow(); + var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var terminate = function (cb) { + loop(function (_a) { + var window = _a.window; + return cb(window); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + return function () { + windowRecords = null; + }; + }); +} +exports.windowTime = windowTime; +//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map new file mode 100644 index 0000000..e4d51f9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":";;;AAAA,sCAAqC;AACrC,4CAAoD;AAEpD,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAC9C,qCAA4C;AAC5C,2DAA0D;AAgG1D,SAAgB,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,mBAAY,CAAC,SAAS,CAAC,mCAAI,sBAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,a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WAAW,EAAE,CAAC;QAQd,IAAM,IAAI,GAAG,UAAC,EAAqC,IAAK,OAAA,aAAc,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC;QAM3F,IAAM,SAAS,GAAG,UAAC,EAAqC;YACtD,IAAI,CAAC,UAAC,EAAU;oBAAR,MAAM,YAAA;gBAAO,OAAA,EAAE,CAAC,MAAM,CAAC;YAAV,CAAU,CAAC,CAAC;YACjC,EAAE,CAAC,UAAU,CAAC,CAAC;YACf,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,IAAI,CAAC,UAAC,MAAM;gBACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAE1B,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC,EAED,cAAM,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,EAElD,UAAC,GAAG,IAAK,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,CACtD,CACF,CAAC;QAKF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/FD,gCA+FC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js new file mode 100644 index 0000000..10d4d74 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js @@ -0,0 +1,80 @@ +"use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.windowToggle = void 0; +var Subject_1 = require("../Subject"); +var Subscription_1 = require("../Subscription"); +var lift_1 = require("../util/lift"); +var innerFrom_1 = require("../observable/innerFrom"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var noop_1 = require("../util/noop"); +var arrRemove_1 = require("../util/arrRemove"); +function windowToggle(openings, closingSelector) { + return lift_1.operate(function (source, subscriber) { + var windows = []; + var handleError = function (err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) { + var window = new Subject_1.Subject(); + windows.push(window); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function () { + arrRemove_1.arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue)); + } + catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); +} +exports.windowToggle = windowToggle; +//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map new file mode 100644 index 0000000..08adabd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sCAAqC;AACrC,gDAA+C;AAE/C,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AAChE,qCAAoC;AACpC,+CAA8C;AAiD9C,SAAgB,YAAY,CAC1B,QAA4B,EAC5B,eAAuD;IAEvD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAiB,EAAE,CAAC;QAEjC,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,IAAM,mBAAmB,GAAG,IAAI,2BAAY,EAAE,CAAC;YAC/C,IAAM,WAAW,GAAG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EC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js new file mode 100644 index 0000000..8c7ded1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.windowWhen = void 0; +var Subject_1 = require("../Subject"); +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +function windowWhen(closingSelector) { + return lift_1.operate(function (source, subscriber) { + var window; + var closingSubscriber; + var handleError = function (err) { + window.error(err); + subscriber.error(err); + }; + var openWindow = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window === null || window === void 0 ? void 0 : window.complete(); + window = new Subject_1.Subject(); + subscriber.next(window.asObservable()); + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector()); + } + catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + openWindow(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { + window.complete(); + subscriber.complete(); + }, handleError, function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window = null; + })); + }); +} +exports.windowWhen = windowWhen; +//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map new file mode 100644 index 0000000..50eb8ef --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":";;;AA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BAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvED,gCAuEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js new file mode 100644 index 0000000..8ccfcd9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js @@ -0,0 +1,63 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withLatestFrom = void 0; +var lift_1 = require("../util/lift"); +var OperatorSubscriber_1 = require("./OperatorSubscriber"); +var innerFrom_1 = require("../observable/innerFrom"); +var identity_1 = require("../util/identity"); +var noop_1 = require("../util/noop"); +var args_1 = require("../util/args"); +function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function (source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function () { return false; }); + var ready = false; + var _loop_1 = function (i) { + innerFrom_1.innerFrom(inputs[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity_1.identity)) && (hasValue = null); + } + }, noop_1.noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); + } + })); + }); +} +exports.withLatestFrom = withLatestFrom; +//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map new file mode 100644 index 0000000..ddd91b4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,6CAA4C;AAC5C,qCAAoC;AACpC,qCAAiD;AAmDjD,SAAgB,cAAc;IAAO,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IACnD,IAAM,OAAO,GAAG,wBAAiB,CAAC,MAAM,CAAwC,CAAC;IAEjF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAInC,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;QAGvC,IAAI,KAAK,GAAG,KAAK,CAAC;gCAMT,CAAC;YACR,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBAE1B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;oBAKnB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAK,CAAC,CAAC;iBAC1D;YACH,CAAC,EAGD,WAAI,CACL,CACF,CAAC;;QApBJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;SAqBT;QAGD,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAI,KAAK,EAAE;gBAET,IAAM,MAAM,kBAAI,KAAK,UAAK,WAAW,EAAC,CAAC;gBACvC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AApDD,wCAoDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zip.js b/node_modules/rxjs/dist/cjs/internal/operators/zip.js new file mode 100644 index 0000000..8074fad --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zip.js @@ -0,0 +1,37 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zip = void 0; +var zip_1 = require("../observable/zip"); +var lift_1 = require("../util/lift"); +function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return lift_1.operate(function (source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); +} +exports.zip = zip; +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map new file mode 100644 index 0000000..41755c6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqD;AAErD,qCAAuC;AAmBvC,SAAgB,GAAG;IAAO,iBAAwE;SAAxE,UAAwE,EAAxE,qBAAwE,EAAxE,IAAwE;QAAxE,4BAAwE;;IAChG,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,8BAAC,MAA8B,UAAM,OAAuC,IAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kBAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js new file mode 100644 index 0000000..45c3937 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zipAll = void 0; +var zip_1 = require("../observable/zip"); +var joinAllInternals_1 = require("./joinAllInternals"); +function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); +} +exports.zipAll = zipAll; +//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map new file mode 100644 index 0000000..a2058de --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,uDAAsD;AAetD,SAAgB,MAAM,CAAO,OAA+B;IAC1D,OAAO,mCAAgB,CAAC,SAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js new file mode 100644 index 0000000..9dc4448 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js @@ -0,0 +1,34 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.zipWith = void 0; +var zip_1 = require("./zip"); +function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs))); +} +exports.zipWith = zipWith; +//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map new file mode 100644 index 0000000..f0e7a6d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,6BAA4B;AAyB5B,SAAgB,OAAO;IAAkC,qBAA4C;SAA5C,UAA4C,EAA5C,qBAA4C,EAA5C,IAA4C;QAA5C,gCAA4C;;IACnG,OAAO,SAAG,wCAAI,WAAW,IAAE;AAC7B,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js new file mode 100644 index 0000000..9af85a7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleArray = void 0; +var Observable_1 = require("../Observable"); +function scheduleArray(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } + else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} +exports.scheduleArray = scheduleArray; +//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map new file mode 100644 index 0000000..b42b310 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAG3C,SAAgB,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAElC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAvBD,sCAuBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js new file mode 100644 index 0000000..4729896 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleAsyncIterable = void 0; +var Observable_1 = require("../Observable"); +var executeSchedule_1 = require("../util/executeSchedule"); +function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable_1.Observable(function (subscriber) { + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + var iterator = input[Symbol.asyncIterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + iterator.next().then(function (result) { + if (result.done) { + subscriber.complete(); + } + else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); +} +exports.scheduleAsyncIterable = scheduleAsyncIterable; +//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map new file mode 100644 index 0000000..1dcd219 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,2DAA0D;AAE1D,SAAgB,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAClC,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YACrC,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,iCAAe,CACb,UAAU,EACV,SAAS,EACT;gBACE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,UAAC,MAAM;oBAC1B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,sDA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js new file mode 100644 index 0000000..0444efe --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleIterable = void 0; +var Observable_1 = require("../Observable"); +var iterator_1 = require("../symbol/iterator"); +var isFunction_1 = require("../util/isFunction"); +var executeSchedule_1 = require("../util/executeSchedule"); +function scheduleIterable(input, scheduler) { + return new Observable_1.Observable(function (subscriber) { + var iterator; + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + iterator = input[iterator_1.iterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler, function () { + var _a; + var value; + var done; + try { + (_a = iterator.next(), value = _a.value, done = _a.done); + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + } + }, 0, true); + }); + return function () { return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; + }); +} +exports.scheduleIterable = scheduleIterable; +//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map new file mode 100644 index 0000000..ead78f7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,+CAAiE;AACjE,iDAAgD;AAChD,2DAA0D;AAO1D,SAAgB,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAClC,IAAI,QAAwB,CAAC;QAK7B,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YAErC,QAAQ,GAAI,KAAa,CAAC,mBAAe,CAAC,EAAE,CAAC;YAE7C,iCAAe,CACb,UAAU,EACV,SAAS,EACT;;gBACE,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,KAAkB,QAAQ,CAAC,IAAI,EAAE,EAA/B,KAAK,WAAA,EAAE,IAAI,UAAA,CAAqB,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,cAAM,OAAA,uBAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAjD,CAAiD,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC;AAhDD,4CAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js new file mode 100644 index 0000000..90ee012 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleObservable = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var observeOn_1 = require("../operators/observeOn"); +var subscribeOn_1 = require("../operators/subscribeOn"); +function scheduleObservable(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); +} +exports.scheduleObservable = scheduleObservable; +//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map new file mode 100644 index 0000000..3cfdc17 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,oDAAmD;AACnD,wDAAuD;AAGvD,SAAgB,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,yBAAW,CAAC,SAAS,CAAC,EAAE,qBAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,gDAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js new file mode 100644 index 0000000..37629d4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.schedulePromise = void 0; +var innerFrom_1 = require("../observable/innerFrom"); +var observeOn_1 = require("../operators/observeOn"); +var subscribeOn_1 = require("../operators/subscribeOn"); +function schedulePromise(input, scheduler) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); +} +exports.schedulePromise = schedulePromise; +//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map new file mode 100644 index 0000000..f6d7bcf --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,oDAAmD;AACnD,wDAAuD;AAGvD,SAAgB,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,yBAAW,CAAC,SAAS,CAAC,EAAE,qBAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js new file mode 100644 index 0000000..067ca61 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduleReadableStreamLike = void 0; +var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); +} +exports.scheduleReadableStreamLike = scheduleReadableStreamLike; +//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map new file mode 100644 index 0000000..00be810 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":";;;AAEA,iEAAgE;AAChE,qEAAkF;AAElF,SAAgB,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,6CAAqB,CAAC,yDAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC;AAFD,gEAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js new file mode 100644 index 0000000..8b2564b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.scheduled = void 0; +var scheduleObservable_1 = require("./scheduleObservable"); +var schedulePromise_1 = require("./schedulePromise"); +var scheduleArray_1 = require("./scheduleArray"); +var scheduleIterable_1 = require("./scheduleIterable"); +var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); +var isInteropObservable_1 = require("../util/isInteropObservable"); +var isPromise_1 = require("../util/isPromise"); +var isArrayLike_1 = require("../util/isArrayLike"); +var isIterable_1 = require("../util/isIterable"); +var isAsyncIterable_1 = require("../util/isAsyncIterable"); +var throwUnobservableError_1 = require("../util/throwUnobservableError"); +var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); +var scheduleReadableStreamLike_1 = require("./scheduleReadableStreamLike"); +function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); +} +exports.scheduled = scheduled; +//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map new file mode 100644 index 0000000..bffb909 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAC1D,qDAAoD;AACpD,iDAAgD;AAChD,uDAAsD;AACtD,iEAAgE;AAChE,mEAAkE;AAClE,+CAA8C;AAC9C,mDAAkD;AAClD,iDAAgD;AAGhD,2DAA0D;AAC1D,yEAAkF;AAClF,qEAAoE;AACpE,2EAA0E;AAa1E,SAAgB,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,yCAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,uCAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,yBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,6BAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,qBAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,iCAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,iCAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,6CAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,uBAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,mCAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,2CAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,uDAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,yDAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js new file mode 100644 index 0000000..bc1216e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js @@ -0,0 +1,32 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Action = void 0; +var Subscription_1 = require("../Subscription"); +var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; +}(Subscription_1.Subscription)); +exports.Action = Action; +//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map new file mode 100644 index 0000000..9c9625d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,gDAA+C;AAiB/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,2BAAY,GAiB1C;AAjBY,wBAAM"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js new file mode 100644 index 0000000..31f72fb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js @@ -0,0 +1,53 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnimationFrameAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var animationFrameProvider_1 = require("./animationFrameProvider"); +var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; +}(AsyncAction_1.AsyncAction)); +exports.AnimationFrameAction = AnimationFrameAction; +//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map new file mode 100644 index 0000000..c5e1a18 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAG5C,mEAAkE;AAGlE;IAA6C,wCAAc;IACzD,8BAAsB,SAAkC,EAAY,IAAmD;QAAvH,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAyB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAEvH,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,+CAAsB,CAAC,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,+CAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,CAA6C,yBAAW,GAoCvD;AApCY,oDAAoB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js new file mode 100644 index 0000000..7415986 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js @@ -0,0 +1,48 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnimationFrameScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AnimationFrameScheduler = AnimationFrameScheduler; +//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map new file mode 100644 index 0000000..6cde13b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAA6C,2CAAc;IAA3D;;IAkCA,CAAC;IAjCQ,uCAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAlCD,CAA6C,+BAAc,GAkC1D;AAlCY,0DAAuB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js new file mode 100644 index 0000000..5056bcd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js @@ -0,0 +1,55 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsapAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var immediateProvider_1 = require("./immediateProvider"); +var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider_1.immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + }; + return AsapAction; +}(AsyncAction_1.AsyncAction)); +exports.AsapAction = AsapAction; +//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map new file mode 100644 index 0000000..4971d28 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAG5C,yDAAwD;AAGxD;IAAmC,8BAAc;IAC/C,oBAAsB,SAAwB,EAAY,IAAmD;QAA7G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAe;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE7G,CAAC;IAES,mCAAc,GAA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duler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js new file mode 100644 index 0000000..6a4ddeb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js @@ -0,0 +1,48 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsapScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.AsapScheduler = AsapScheduler; +//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map new file mode 100644 index 0000000..1684c40 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAAmC,iCAAc;IAAjD;;IAkCA,CAAC;IAjCQ,6BAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAlCD,CAAmC,+BAAc,GAkChD;AAlCY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js new file mode 100644 index 0000000..7b6c496 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js @@ -0,0 +1,107 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAction = void 0; +var Action_1 = require("./Action"); +var intervalProvider_1 = require("./intervalProvider"); +var arrRemove_1 = require("../util/arrRemove"); +var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { + if (delay === void 0) { delay = 0; } + return intervalProvider_1.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + intervalProvider_1.intervalProvider.clearInterval(id); + } + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype.unsubscribe = function () { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction; +}(Action_1.Action)); +exports.AsyncAction = AsyncAction; +//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map new file mode 100644 index 0000000..d6656e7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mCAAkC;AAIlC,uDAAsD;AACtD,+CAA8C;AAG9C;IAAoC,+BAAS;IAO3C,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;QAFpG,aAAO,GAAY,KAAK,CAAC;;IAInC,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;SACb;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,EAAE;gBACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,KAAK,GAAG,IAAK,CAAC;YACnB,iBAAM,WAAW,WAAE,CAAC;SACrB;IACH,CAAC;IACH,kBAAC;AAAD,CAAC,AA9ID,CAAoC,eAAM,GA8IzC;AA9IY,kCAAW"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js new file mode 100644 index 0000000..9a9c167 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js @@ -0,0 +1,53 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncScheduler = void 0; +var Scheduler_1 = require("../Scheduler"); +var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler_1.Scheduler.now; } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift())); + this._active = false; + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(Scheduler_1.Scheduler)); +exports.AsyncScheduler = AsyncScheduler; +//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map new file mode 100644 index 0000000..b3b81c1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0CAAyC;AAKzC;IAAoC,kCAAS;IAkB3C,wBAAY,eAA8B,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,qBAAS,CAAC,GAAG;QAA7E,YACE,kBAAM,eAAe,EAAE,GAAG,CAAC,SAC5B;QAnBM,aAAO,GAA4B,EAAE,CAAC;QAOtC,aAAO,GAAY,KAAK,CAAC;;IAYhC,CAAC;IAEM,8BAAK,GAAZ,UAAa,MAAwB;QAC3B,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAhDD,CAAoC,qBAAS,GAgD5C;AAhDY,wCAAc"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js new file mode 100644 index 0000000..4e370a9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js @@ -0,0 +1,52 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.QueueAction = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.flush(this); + return 0; + }; + return QueueAction; +}(AsyncAction_1.AsyncAction)); +exports.QueueAction = QueueAction; +//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map new file mode 100644 index 0000000..746c7ee --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAM5C;IAAoC,+BAAc;IAChD,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE9G,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAM,OAAO,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;IACH,kBAAC;AAAD,CAAC,AArCD,CAAoC,yBAAW,GAqC9C;AArCY,kCAAW"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js new file mode 100644 index 0000000..a38f3f8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js @@ -0,0 +1,28 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.QueueScheduler = void 0; +var AsyncScheduler_1 = require("./AsyncScheduler"); +var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.QueueScheduler = QueueScheduler; +//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map new file mode 100644 index 0000000..fb2cba3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAElD;IAAoC,kCAAc;IAAlD;;IACA,CAAC;IAAD,qBAAC;AAAD,CAAC,AADD,CAAoC,+BAAc,GACjD;AADY,wCAAc"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js new file mode 100644 index 0000000..a0a7cf5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js @@ -0,0 +1,121 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VirtualAction = exports.VirtualTimeScheduler = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var Subscription_1 = require("../Subscription"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +var VirtualTimeScheduler = (function (_super) { + __extends(VirtualTimeScheduler, _super); + function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } + if (maxFrames === void 0) { maxFrames = Infinity; } + var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler.prototype.flush = function () { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; +}(AsyncScheduler_1.AsyncScheduler)); +exports.VirtualTimeScheduler = VirtualTimeScheduler; +var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = (scheduler.index += 1); } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } + else { + return Subscription_1.Subscription.EMPTY; + } + }; + VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return 1; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; +}(AsyncAction_1.AsyncAction)); +exports.VirtualAction = VirtualAction; +//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map new file mode 100644 index 0000000..8293a9d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,gDAA+C;AAC/C,mDAAkD;AAIlD;IAA0C,wCAAc;IAyBtD,8BAAY,mBAA8D,EAAS,SAA4B;QAAnG,oCAAA,EAAA,sBAA0C,aAAoB;QAAS,0BAAA,EAAA,oBAA4B;QAA/G,YACE,kBAAM,mBAAmB,EAAE,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC,SAC7C;QAFkF,eAAS,GAAT,SAAS,CAAmB;QAfxG,WAAK,GAAW,CAAC,CAAC;QAMlB,WAAK,GAAW,CAAC,CAAC,CAAC;;IAW1B,CAAC;IAOM,oCAAK,GAAZ;QACQ,IAAA,KAAyB,IAAI,EAA3B,OAAO,aAAA,EAAE,SAAS,eAAS,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,MAAoC,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;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5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjED,CAAsC,yBAAW,GAiEhD;AAjEY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js new file mode 100644 index 0000000..b82c164 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrame = exports.animationFrameScheduler = void 0; +var AnimationFrameAction_1 = require("./AnimationFrameAction"); +var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler"); +exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); +exports.animationFrame = exports.animationFrameScheduler; +//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map new file mode 100644 index 0000000..775c374 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAC9D,qEAAoE;AAkCvD,QAAA,uBAAuB,GAAG,IAAI,iDAAuB,CAAC,2CAAoB,CAAC,CAAC;AAK5E,QAAA,cAAc,GAAG,+BAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js new file mode 100644 index 0000000..f2405de --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js @@ -0,0 +1,59 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.animationFrameProvider = void 0; +var Subscription_1 = require("../Subscription"); +exports.animationFrameProvider = { + schedule: function (callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function (timestamp) { + cancel = undefined; + callback(timestamp); + }); + return new Subscription_1.Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); + }, + requestAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + cancelAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + delegate: undefined, +}; +//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map new file mode 100644 index 0000000..f7288d4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAclC,QAAA,sBAAsB,GAA2B;IAG5D,QAAQ,EAAR,UAAS,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QACnE,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,IAAM,MAAM,GAAG,OAAO,CAAC,UAAC,SAAS;YAI/B,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,2BAAY,CAAC,cAAM,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,EAAhB,CAAgB,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnB,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,wCAAI,IAAI,IAAE;IAC7E,CAAC;IACD,oBAAoB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAClB,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,wCAAI,IAAI,IAAE;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js new file mode 100644 index 0000000..4a56552 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.asap = exports.asapScheduler = void 0; +var AsapAction_1 = require("./AsapAction"); +var AsapScheduler_1 = require("./AsapScheduler"); +exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); +exports.asap = exports.asapScheduler; +//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map new file mode 100644 index 0000000..2014dc3 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAC1C,iDAAgD;AAqCnC,QAAA,aAAa,GAAG,IAAI,6BAAa,CAAC,uBAAU,CAAC,CAAC;AAK9C,QAAA,IAAI,GAAG,qBAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js new file mode 100644 index 0000000..b856880 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.async = exports.asyncScheduler = void 0; +var AsyncAction_1 = require("./AsyncAction"); +var AsyncScheduler_1 = require("./AsyncScheduler"); +exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); +exports.async = exports.asyncScheduler; +//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map new file mode 100644 index 0000000..d0e7845 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map @@ -0,0 +1 @@ +{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,mDAAkD;AAiDrC,QAAA,cAAc,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC;AAKjD,QAAA,KAAK,GAAG,sBAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js new file mode 100644 index 0000000..ff0d65c --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dateTimestampProvider = void 0; +exports.dateTimestampProvider = { + now: function () { + return (exports.dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map new file mode 100644 index 0000000..8c17b6e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":";;;AAMa,QAAA,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,6BAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js new file mode 100644 index 0000000..8aec321 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js @@ -0,0 +1,42 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.immediateProvider = void 0; +var Immediate_1 = require("../util/Immediate"); +var setImmediate = Immediate_1.Immediate.setImmediate, clearImmediate = Immediate_1.Immediate.clearImmediate; +exports.immediateProvider = { + setImmediate: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); + }, + clearImmediate: function (handle) { + var delegate = exports.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map new file mode 100644 index 0000000..0f1f16a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8C;AAEtC,IAAA,YAAY,GAAqB,qBAAS,aAA9B,EAAE,cAAc,GAAK,qBAAS,eAAd,CAAe;AAgBtC,QAAA,iBAAiB,GAAsB;IAGlD,YAAY;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACV,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,wCAAI,IAAI,IAAE;IAC3D,CAAC;IACD,cAAc,EAAd,UAAe,MAAM;QACX,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js new file mode 100644 index 0000000..e12dcaa --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js @@ -0,0 +1,43 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.intervalProvider = void 0; +exports.intervalProvider = { + setInterval: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports.intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearInterval: function (handle) { + var delegate = exports.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map new file mode 100644 index 0000000..b8fe755 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAea,QAAA,gBAAgB,GAAqB;IAGhD,WAAW,EAAX,UAAY,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAChD,IAAA,QAAQ,GAAK,wBAAgB,SAArB,CAAsB;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,OAApB,QAAQ,iBAAa,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACxD;QACD,OAAO,WAAW,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAChD,CAAC;IACD,aAAa,EAAb,UAAc,MAAM;QACV,IAAA,QAAQ,GAAK,wBAAgB,SAArB,CAAsB;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js new file mode 100644 index 0000000..f28dd47 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.performanceTimestampProvider = void 0; +exports.performanceTimestampProvider = { + now: function () { + return (exports.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map new file mode 100644 index 0000000..774bfbd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":";;;AAMa,QAAA,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,oCAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js new file mode 100644 index 0000000..db9e485 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.queue = exports.queueScheduler = void 0; +var QueueAction_1 = require("./QueueAction"); +var QueueScheduler_1 = require("./QueueScheduler"); +exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); +exports.queue = exports.queueScheduler; +//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map new file mode 100644 index 0000000..64600be --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,mDAAkD;AAiErC,QAAA,cAAc,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC;AAKjD,QAAA,KAAK,GAAG,sBAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js new file mode 100644 index 0000000..893c458 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js @@ -0,0 +1,43 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.timeoutProvider = void 0; +exports.timeoutProvider = { + setTimeout: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports.timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearTimeout: function (handle) { + var delegate = exports.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map new file mode 100644 index 0000000..efc21bc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAea,QAAA,eAAe,GAAoB;IAG9C,UAAU,EAAV,UAAW,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC/C,IAAA,QAAQ,GAAK,uBAAe,SAApB,CAAqB;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,OAAnB,QAAQ,iBAAY,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACvD;QACD,OAAO,UAAU,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAC/C,CAAC;IACD,YAAY,EAAZ,UAAa,MAAM;QACT,IAAA,QAAQ,GAAK,uBAAe,SAApB,CAAqB;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js new file mode 100644 index 0000000..6480e89 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map new file mode 100644 index 0000000..8efd320 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js new file mode 100644 index 0000000..61058fc --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.iterator = exports.getSymbolIterator = void 0; +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +exports.getSymbolIterator = getSymbolIterator; +exports.iterator = getSymbolIterator(); +//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map new file mode 100644 index 0000000..7f39958 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAND,8CAMC;AAEY,QAAA,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js new file mode 100644 index 0000000..f80dd59 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.observable = void 0; +exports.observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); +//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map new file mode 100644 index 0000000..7bf62fe --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":";;;AAMa,QAAA,UAAU,GAAoB,CAAC,cAAM,OAAA,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,EAArE,CAAqE,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js new file mode 100644 index 0000000..a9b1816 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js @@ -0,0 +1,56 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColdObservable = void 0; +var Observable_1 = require("../Observable"); +var Subscription_1 = require("../Subscription"); +var SubscriptionLoggable_1 = require("./SubscriptionLoggable"); +var applyMixins_1 = require("../util/applyMixins"); +var Notification_1 = require("../Notification"); +var ColdObservable = (function (_super) { + __extends(ColdObservable, _super); + function ColdObservable(messages, scheduler) { + var _this = _super.call(this, function (subscriber) { + var observable = this; + var index = observable.logSubscribedFrame(); + var subscription = new Subscription_1.Subscription(); + subscription.add(new Subscription_1.Subscription(function () { + observable.logUnsubscribedFrame(index); + })); + observable.scheduleMessages(subscriber); + return subscription; + }) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + ColdObservable.prototype.scheduleMessages = function (subscriber) { + var messagesLength = this.messages.length; + for (var i = 0; i < messagesLength; i++) { + var message = this.messages[i]; + subscriber.add(this.scheduler.schedule(function (state) { + var _a = state, notification = _a.message.notification, destination = _a.subscriber; + Notification_1.observeNotification(notification, destination); + }, message.frame, { message: message, subscriber: subscriber })); + } + }; + return ColdObservable; +}(Observable_1.Observable)); +exports.ColdObservable = ColdObservable; +applyMixins_1.applyMixins(ColdObservable, [SubscriptionLoggable_1.SubscriptionLoggable]); +//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map new file mode 100644 index 0000000..875114d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAC3C,gDAA+C;AAI/C,+DAA8D;AAC9D,mDAAkD;AAElD,gDAAsD;AAEtD;IAAuC,kCAAa;IAQlD,wBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,kBAAM,UAA+B,UAA2B;YAC9D,IAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,IAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,IAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,2BAAY,CAAC;gBACf,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,SAEH;QAdkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAoB3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAED,yCAAgB,GAAhB,UAAiB,UAA2B;QAC1C,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,UAAC,KAAK;gBACE,IAAA,KAAyD,KAAM,EAAlD,YAAY,0BAAA,EAAgB,WAAW,gBAAW,CAAC;gBACtE,kCAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAxCD,CAAuC,uBAAU,GAwChD;AAxCY,wCAAc;AAyC3B,yBAAW,CAAC,cAAc,EAAE,CAAC,2CAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js new file mode 100644 index 0000000..a01c570 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js @@ -0,0 +1,62 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HotObservable = void 0; +var Subject_1 = require("../Subject"); +var Subscription_1 = require("../Subscription"); +var SubscriptionLoggable_1 = require("./SubscriptionLoggable"); +var applyMixins_1 = require("../util/applyMixins"); +var Notification_1 = require("../Notification"); +var HotObservable = (function (_super) { + __extends(HotObservable, _super); + function HotObservable(messages, scheduler) { + var _this = _super.call(this) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + HotObservable.prototype._subscribe = function (subscriber) { + var subject = this; + var index = subject.logSubscribedFrame(); + var subscription = new Subscription_1.Subscription(); + subscription.add(new Subscription_1.Subscription(function () { + subject.logUnsubscribedFrame(index); + })); + subscription.add(_super.prototype._subscribe.call(this, subscriber)); + return subscription; + }; + HotObservable.prototype.setup = function () { + var subject = this; + var messagesLength = subject.messages.length; + var _loop_1 = function (i) { + (function () { + var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; + subject.scheduler.schedule(function () { + Notification_1.observeNotification(notification, subject); + }, frame); + })(); + }; + for (var i = 0; i < messagesLength; i++) { + _loop_1(i); + } + }; + return HotObservable; +}(Subject_1.Subject)); +exports.HotObservable = HotObservable; +applyMixins_1.applyMixins(HotObservable, [SubscriptionLoggable_1.SubscriptionLoggable]); +//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map new file mode 100644 index 0000000..449a094 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAErC,gDAA+C;AAI/C,+DAA8D;AAC9D,mDAAkD;AAClD,gDAAsD;AAEtD;IAAsC,iCAAU;IAQ9C,uBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,iBAAO,SAER;QAHkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAS3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAGS,kCAAU,GAApB,UAAqB,UAA2B;QAC9C,IAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,IAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,IAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CACd,IAAI,2BAAY,CAAC;YACf,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,YAAY,CAAC,GAAG,CAAC,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,6BAAK,GAAL;QACE,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gCAEtC,CAAC;YACR,CAAC;gBACO,IAAA,KAA0B,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAA3C,YAAY,kBAAA,EAAE,KAAK,WAAwB,CAAC;gBAEpD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;oBACzB,kCAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC7C,CAAC,EAAE,KAAK,CAAC,CAAC;YACZ,CAAC,CAAC,EAAE,CAAC;;QAPP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE;oBAA9B,CAAC;SAQT;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzCD,CAAsC,iBAAO,GAyC5C;AAzCY,sCAAa;AA0C1B,yBAAW,CAAC,aAAa,EAAE,CAAC,2CAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js new file mode 100644 index 0000000..24120b0 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SubscriptionLog = void 0; +var SubscriptionLog = (function () { + function SubscriptionLog(subscribedFrame, unsubscribedFrame) { + if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } + this.subscribedFrame = subscribedFrame; + this.unsubscribedFrame = unsubscribedFrame; + } + return SubscriptionLog; +}()); +exports.SubscriptionLog = SubscriptionLog; +//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map new file mode 100644 index 0000000..5356258 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":";;;AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoC;QAApC,kCAAA,EAAA,4BAAoC;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,0CAAe"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js new file mode 100644 index 0000000..a457305 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SubscriptionLoggable = void 0; +var SubscriptionLog_1 = require("./SubscriptionLog"); +var SubscriptionLoggable = (function () { + function SubscriptionLoggable() { + this.subscriptions = []; + } + SubscriptionLoggable.prototype.logSubscribedFrame = function () { + this.subscriptions.push(new SubscriptionLog_1.SubscriptionLog(this.scheduler.now())); + return this.subscriptions.length - 1; + }; + SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { + var subscriptionLogs = this.subscriptions; + var oldSubscriptionLog = subscriptionLogs[index]; + subscriptionLogs[index] = new SubscriptionLog_1.SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); + }; + return SubscriptionLoggable; +}()); +exports.SubscriptionLoggable = SubscriptionLoggable; +//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map new file mode 100644 index 0000000..debaa6d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAEpD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iCAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,oDAAoB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js new file mode 100644 index 0000000..7bb158d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map new file mode 100644 index 0000000..f91e8da --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js new file mode 100644 index 0000000..a7a4924 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js @@ -0,0 +1,618 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TestScheduler = void 0; +var Observable_1 = require("../Observable"); +var ColdObservable_1 = require("./ColdObservable"); +var HotObservable_1 = require("./HotObservable"); +var SubscriptionLog_1 = require("./SubscriptionLog"); +var VirtualTimeScheduler_1 = require("../scheduler/VirtualTimeScheduler"); +var NotificationFactories_1 = require("../NotificationFactories"); +var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); +var performanceTimestampProvider_1 = require("../scheduler/performanceTimestampProvider"); +var animationFrameProvider_1 = require("../scheduler/animationFrameProvider"); +var immediateProvider_1 = require("../scheduler/immediateProvider"); +var intervalProvider_1 = require("../scheduler/intervalProvider"); +var timeoutProvider_1 = require("../scheduler/timeoutProvider"); +var defaultMaxFrame = 750; +var TestScheduler = (function (_super) { + __extends(TestScheduler, _super); + function TestScheduler(assertDeepEqual) { + var _this = _super.call(this, VirtualTimeScheduler_1.VirtualAction, defaultMaxFrame) || this; + _this.assertDeepEqual = assertDeepEqual; + _this.hotObservables = []; + _this.coldObservables = []; + _this.flushTests = []; + _this.runMode = false; + return _this; + } + TestScheduler.prototype.createTime = function (marbles) { + var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + if (indexOf === -1) { + throw new Error('marble diagram for time should have a completion marker "|"'); + } + return indexOf * TestScheduler.frameTimeFactor; + }; + TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + if (marbles.indexOf('^') !== -1) { + throw new Error('cold observable cannot have subscription offset "^"'); + } + if (marbles.indexOf('!') !== -1) { + throw new Error('cold observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var cold = new ColdObservable_1.ColdObservable(messages, this); + this.coldObservables.push(cold); + return cold; + }; + TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + if (marbles.indexOf('!') !== -1) { + throw new Error('hot observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var subject = new HotObservable_1.HotObservable(messages, this); + this.hotObservables.push(subject); + return subject; + }; + TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + var _this = this; + var messages = []; + observable.subscribe({ + next: function (value) { + messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.nextNotification(value) }); + }, + error: function (error) { + messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.errorNotification(error) }); + }, + complete: function () { + messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); + }, + }); + return messages; + }; + TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + var _this = this; + if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + var actual = []; + var flushTest = { actual: actual, ready: false }; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); + var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; + var subscription; + this.schedule(function () { + subscription = observable.subscribe({ + next: function (x) { + var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + actual.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); + }, + error: function (error) { + actual.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); + }, + complete: function () { + actual.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + if (unsubscriptionFrame !== Infinity) { + this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + } + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marbles, values, errorValue) { + flushTest.ready = true; + flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + }, + toEqual: function (other) { + flushTest.ready = true; + flushTest.expected = []; + _this.schedule(function () { + subscription = other.subscribe({ + next: function (x) { + var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); + }, + error: function (error) { + flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); + }, + complete: function () { + flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + }, + }; + }; + TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + var flushTest = { actual: actualSubscriptionLogs, ready: false }; + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marblesOrMarblesArray) { + var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + flushTest.ready = true; + flushTest.expected = marblesArray + .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) + .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); + }, + }; + }; + TestScheduler.prototype.flush = function () { + var _this = this; + var hotObservables = this.hotObservables; + while (hotObservables.length > 0) { + hotObservables.shift().setup(); + } + _super.prototype.flush.call(this); + this.flushTests = this.flushTests.filter(function (test) { + if (test.ready) { + _this.assertDeepEqual(test.actual, test.expected); + return false; + } + return true; + }); + }; + TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { + var _this = this; + if (runMode === void 0) { runMode = false; } + if (typeof marbles !== 'string') { + return new SubscriptionLog_1.SubscriptionLog(Infinity); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var groupStart = -1; + var subscriptionFrame = Infinity; + var unsubscriptionFrame = Infinity; + var frame = 0; + var _loop_1 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '^': + if (subscriptionFrame !== Infinity) { + throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + } + subscriptionFrame = groupStart > -1 ? groupStart : frame; + advanceFrameBy(1); + break; + case '!': + if (unsubscriptionFrame !== Infinity) { + throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + } + unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_1.frameTimeFactor); + break; + } + } + } + throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + } + frame = nextFrame; + out_i_1 = i; + }; + var this_1 = this, out_i_1; + for (var i = 0; i < len; i++) { + _loop_1(i); + i = out_i_1; + } + if (unsubscriptionFrame < 0) { + return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame); + } + else { + return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } + }; + TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { + var _this = this; + if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } + if (runMode === void 0) { runMode = false; } + if (marbles.indexOf('!') !== -1) { + throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var testMessages = []; + var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; + var getValue = typeof values !== 'object' + ? function (x) { return x; } + : function (x) { + if (materializeInnerObservables && values[x] instanceof ColdObservable_1.ColdObservable) { + return values[x].messages; + } + return values[x]; + }; + var groupStart = -1; + var _loop_2 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var notification = void 0; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '|': + notification = NotificationFactories_1.COMPLETE_NOTIFICATION; + advanceFrameBy(1); + break; + case '^': + advanceFrameBy(1); + break; + case '#': + notification = NotificationFactories_1.errorNotification(errorValue || 'error'); + advanceFrameBy(1); + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_2.frameTimeFactor); + break; + } + } + } + notification = NotificationFactories_1.nextNotification(getValue(c)); + advanceFrameBy(1); + break; + } + if (notification) { + testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + } + frame = nextFrame; + out_i_2 = i; + }; + var this_2 = this, out_i_2; + for (var i = 0; i < len; i++) { + _loop_2(i); + i = out_i_2; + } + return testMessages; + }; + TestScheduler.prototype.createAnimator = function () { + var _this = this; + if (!this.runMode) { + throw new Error('animate() must only be used in run mode'); + } + var lastHandle = 0; + var map; + var delegate = { + requestAnimationFrame: function (callback) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + var handle = ++lastHandle; + map.set(handle, callback); + return handle; + }, + cancelAnimationFrame: function (handle) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + map.delete(handle); + }, + }; + var animate = function (marbles) { + var e_1, _a; + if (map) { + throw new Error('animate() must not be called more than once within run()'); + } + if (/[|#]/.test(marbles)) { + throw new Error('animate() must not complete or error'); + } + map = new Map(); + var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + try { + for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + var message = messages_1_1.value; + _this.schedule(function () { + var e_2, _a; + var now = _this.now(); + var callbacks = Array.from(map.values()); + map.clear(); + try { + for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + var callback = callbacks_1_1.value; + callback(now); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + } + finally { if (e_2) throw e_2.error; } + } + }, message.frame); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + return { animate: animate, delegate: delegate }; + }; + TestScheduler.prototype.createDelegates = function () { + var _this = this; + var lastHandle = 0; + var scheduleLookup = new Map(); + var run = function () { + var now = _this.now(); + var scheduledRecords = Array.from(scheduleLookup.values()); + var scheduledRecordsDue = scheduledRecords.filter(function (_a) { + var due = _a.due; + return due <= now; + }); + var dueImmediates = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'immediate'; + }); + if (dueImmediates.length > 0) { + var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + var dueIntervals = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'interval'; + }); + if (dueIntervals.length > 0) { + var firstDueInterval = dueIntervals[0]; + var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + firstDueInterval.due = now + duration; + firstDueInterval.subscription = _this.schedule(run, duration); + handler(); + return; + } + var dueTimeouts = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'timeout'; + }); + if (dueTimeouts.length > 0) { + var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + throw new Error('Expected a due immediate or interval'); + }; + var immediate = { + setImmediate: function (handler) { + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now(), + duration: 0, + handle: handle, + handler: handler, + subscription: _this.schedule(run, 0), + type: 'immediate', + }); + return handle; + }, + clearImmediate: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var interval = { + setInterval: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'interval', + }); + return handle; + }, + clearInterval: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var timeout = { + setTimeout: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'timeout', + }); + return handle; + }, + clearTimeout: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + return { immediate: immediate, interval: interval, timeout: timeout }; + }; + TestScheduler.prototype.run = function (callback) { + var prevFrameTimeFactor = TestScheduler.frameTimeFactor; + var prevMaxFrames = this.maxFrames; + TestScheduler.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = true; + var animator = this.createAnimator(); + var delegates = this.createDelegates(); + animationFrameProvider_1.animationFrameProvider.delegate = animator.delegate; + dateTimestampProvider_1.dateTimestampProvider.delegate = this; + immediateProvider_1.immediateProvider.delegate = delegates.immediate; + intervalProvider_1.intervalProvider.delegate = delegates.interval; + timeoutProvider_1.timeoutProvider.delegate = delegates.timeout; + performanceTimestampProvider_1.performanceTimestampProvider.delegate = this; + var helpers = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: animator.animate, + }; + try { + var ret = callback(helpers); + this.flush(); + return ret; + } + finally { + TestScheduler.frameTimeFactor = prevFrameTimeFactor; + this.maxFrames = prevMaxFrames; + this.runMode = false; + animationFrameProvider_1.animationFrameProvider.delegate = undefined; + dateTimestampProvider_1.dateTimestampProvider.delegate = undefined; + immediateProvider_1.immediateProvider.delegate = undefined; + intervalProvider_1.intervalProvider.delegate = undefined; + timeoutProvider_1.timeoutProvider.delegate = undefined; + performanceTimestampProvider_1.performanceTimestampProvider.delegate = undefined; + } + }; + TestScheduler.frameTimeFactor = 10; + return TestScheduler; +}(VirtualTimeScheduler_1.VirtualTimeScheduler)); +exports.TestScheduler = TestScheduler; +//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map new file mode 100644 index 0000000..ea27091 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources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AC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,IAAI;YACF,IAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,CAAC;SACZ;gBAAS;YACR,aAAa,CAAC,eAAe,GAAG,mBAAmB,CAAC;YACpD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,+CAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5C,6CAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC3C,qCAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACvC,mCAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACtC,iCAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;YACrC,2DAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;SACnD;IACH,CAAC;IAtoBM,6BAAe,GAAG,EAAE,CAAC;IAuoB9B,oBAAC;CAAA,AA9oBD,CAAmC,2CAAoB,GA8oBtD;AA9oBY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/types.js b/node_modules/rxjs/dist/cjs/internal/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/types.js.map b/node_modules/rxjs/dist/cjs/internal/types.js.map new file mode 100644 index 0000000..493d291 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js new file mode 100644 index 0000000..8a661e6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ArgumentOutOfRangeError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function (_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + }; +}); +//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map new file mode 100644 index 0000000..74c76b5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAsBzC,QAAA,uBAAuB,GAAgC,mCAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;IACzC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js new file mode 100644 index 0000000..6d54d7f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EmptyError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.EmptyError = createErrorClass_1.createErrorClass(function (_super) { return function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}; }); +//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map new file mode 100644 index 0000000..f782eda --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAwBzC,QAAA,UAAU,GAAmB,mCAAgB,CAAC,UAAC,MAAM,IAAK,OAAA,SAAS,cAAc;IAC5F,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;AAC3C,CAAC,EAJsE,CAItE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js new file mode 100644 index 0000000..34dd82a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TestTools = exports.Immediate = void 0; +var nextHandle = 1; +var resolved; +var activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +exports.Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, +}; +exports.TestTools = { + pending: function () { + return Object.keys(activeHandles).length; + } +}; +//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map new file mode 100644 index 0000000..60a8566 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,IAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKY,QAAA,SAAS,GAAG;IACvB,YAAY,EAAZ,UAAa,EAAc;QACzB,IAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,cAAM,OAAA,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAlC,CAAkC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,EAAd,UAAe,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKW,QAAA,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js new file mode 100644 index 0000000..0c9c88b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NotFoundError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.NotFoundError = createErrorClass_1.createErrorClass(function (_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; + }; +}); +//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map new file mode 100644 index 0000000..32a74bd --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAoBzC,QAAA,aAAa,GAAsB,mCAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js new file mode 100644 index 0000000..b4a9686 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ObjectUnsubscribedError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function (_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + }; +}); +//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map new file mode 100644 index 0000000..a24c2ce --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAqBzC,QAAA,uBAAuB,GAAgC,mCAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;IACvC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js new file mode 100644 index 0000000..1875ff5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SequenceError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.SequenceError = createErrorClass_1.createErrorClass(function (_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = 'SequenceError'; + this.message = message; + }; +}); +//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map new file mode 100644 index 0000000..7bc0066 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAoBzC,QAAA,aAAa,GAAsB,mCAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js new file mode 100644 index 0000000..4ce4275 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnsubscriptionError = void 0; +var createErrorClass_1 = require("./createErrorClass"); +exports.UnsubscriptionError = createErrorClass_1.createErrorClass(function (_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors + ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + }; +}); +//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map new file mode 100644 index 0000000..ce49bb6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAkBzC,QAAA,mBAAmB,GAA4B,mCAAgB,CAC1E,UAAC,MAAM;IACL,OAAA,SAAS,uBAAuB,CAAY,MAA0B;QACpE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,MAAM;YACnB,CAAC,CAAI,MAAM,CAAC,MAAM,iDACxB,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG,EAAE,CAAC,IAAK,OAAG,CAAC,GAAG,CAAC,UAAK,GAAG,CAAC,QAAQ,EAAI,EAA7B,CAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAG;YAC9D,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;AARD,CAQC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js new file mode 100644 index 0000000..80c7044 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyMixins = void 0; +function applyMixins(derivedCtor, baseCtors) { + for (var i = 0, len = baseCtors.length; i < len; i++) { + var baseCtor = baseCtors[i]; + var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); + for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { + var name_1 = propertyKeys[j]; + derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; + } + } +} +exports.applyMixins = applyMixins; +//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map new file mode 100644 index 0000000..642813d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,IAAM,MAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,MAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC;AATD,kCASC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/args.js b/node_modules/rxjs/dist/cjs/internal/util/args.js new file mode 100644 index 0000000..e0b3548 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/args.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.popNumber = exports.popScheduler = exports.popResultSelector = void 0; +var isFunction_1 = require("./isFunction"); +var isScheduler_1 = require("./isScheduler"); +function last(arr) { + return arr[arr.length - 1]; +} +function popResultSelector(args) { + return isFunction_1.isFunction(last(args)) ? args.pop() : undefined; +} +exports.popResultSelector = popResultSelector; +function popScheduler(args) { + return isScheduler_1.isScheduler(last(args)) ? args.pop() : undefined; +} +exports.popScheduler = popScheduler; +function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; +} +exports.popNumber = popNumber; +//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/args.js.map b/node_modules/rxjs/dist/cjs/internal/util/args.js.map new file mode 100644 index 0000000..78419e6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/args.js.map @@ -0,0 +1 @@ +{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAC1C,6CAA4C;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAW;IAC3C,OAAO,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,IAAW;IACtC,OAAO,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oCAEC;AAED,SAAgB,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js new file mode 100644 index 0000000..f82fa97 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.argsArgArrayOrObject = void 0; +var isArray = Array.isArray; +var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; +function argsArgArrayOrObject(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function (key) { return first_1[key]; }), + keys: keys, + }; + } + } + return { args: args, keys: null }; +} +exports.argsArgArrayOrObject = argsArgArrayOrObject; +function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} +//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map new file mode 100644 index 0000000..377529d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":";;;AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAClB,IAAA,cAAc,GAA4C,MAAM,eAAlD,EAAa,WAAW,GAAoB,MAAM,UAA1B,EAAQ,OAAO,GAAK,MAAM,KAAX,CAAY;AAQzE,SAAgB,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,IAAM,OAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,OAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,OAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,OAAK,CAAC,EAAE;YACjB,IAAM,IAAI,GAAG,OAAO,CAAC,OAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAK,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC;gBACnC,IAAI,MAAA;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAhBD,oDAgBC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js new file mode 100644 index 0000000..8048185 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.argsOrArgArray = void 0; +var isArray = Array.isArray; +function argsOrArgArray(args) { + return args.length === 1 && isArray(args[0]) ? args[0] : args; +} +exports.argsOrArgArray = argsOrArgArray; +//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map new file mode 100644 index 0000000..c4fb829 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":";;;AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAM1B,SAAgB,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC;AAFD,wCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js new file mode 100644 index 0000000..38eb259 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.arrRemove = void 0; +function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} +exports.arrRemove = arrRemove; +//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map new file mode 100644 index 0000000..a6fab5f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map @@ -0,0 +1 @@ +{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":";;;AAKA,SAAgB,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,IAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js new file mode 100644 index 0000000..98a6e52 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createErrorClass = void 0; +function createErrorClass(createImpl) { + var _super = function (instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} +exports.createErrorClass = createErrorClass; +//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map new file mode 100644 index 0000000..0086064 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":";;;AASA,SAAgB,gBAAgB,CAAI,UAAgC;IAClE,IAAM,MAAM,GAAG,UAAC,QAAa;QAC3B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAVD,4CAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createObject.js b/node_modules/rxjs/dist/cjs/internal/util/createObject.js new file mode 100644 index 0000000..2b6df93 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/createObject.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createObject = void 0; +function createObject(keys, values) { + return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); +} +exports.createObject = createObject; +//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map b/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map new file mode 100644 index 0000000..e5c5df6 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAnC,CAAmC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC;AAFD,oCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js new file mode 100644 index 0000000..7918da1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.captureError = exports.errorContext = void 0; +var config_1 = require("../config"); +var context = null; +function errorContext(cb) { + if (config_1.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } + else { + cb(); + } +} +exports.errorContext = errorContext; +function captureError(err) { + if (config_1.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} +exports.captureError = captureError; +//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map new file mode 100644 index 0000000..6b98e6f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,SAAgB,YAAY,CAAC,EAAc;IACzC,IAAI,eAAM,CAAC,qCAAqC,EAAE;QAChD,IAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACJ,IAAA,KAAyB,OAAQ,EAA/B,WAAW,iBAAA,EAAE,KAAK,WAAa,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAnBD,oCAmBC;AAMD,SAAgB,YAAY,CAAC,GAAQ;IACnC,IAAI,eAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC;AALD,oCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js new file mode 100644 index 0000000..8eda971 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.executeSchedule = void 0; +function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { + if (delay === void 0) { delay = 0; } + if (repeat === void 0) { repeat = false; } + var scheduleSubscription = scheduler.schedule(function () { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } + else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } +} +exports.executeSchedule = executeSchedule; +//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map new file mode 100644 index 0000000..8cf548d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":";;;AAkBA,SAAgB,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAS,EACT,MAAc;IADd,sBAAA,EAAA,SAAS;IACT,uBAAA,EAAA,cAAc;IAEd,IAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC;AAzBD,0CAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/identity.js b/node_modules/rxjs/dist/cjs/internal/util/identity.js new file mode 100644 index 0000000..da61150 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/identity.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.identity = void 0; +function identity(x) { + return x; +} +exports.identity = identity; +//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/identity.js.map b/node_modules/rxjs/dist/cjs/internal/util/identity.js.map new file mode 100644 index 0000000..a1e3fd4 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/identity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":";;;AA0CA,SAAgB,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js new file mode 100644 index 0000000..682c617 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isArrayLike = void 0; +exports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); +//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map new file mode 100644 index 0000000..3237b48 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js new file mode 100644 index 0000000..0369064 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAsyncIterable = void 0; +var isFunction_1 = require("./isFunction"); +function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); +} +exports.isAsyncIterable = isAsyncIterable; +//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map new file mode 100644 index 0000000..fdb9371 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAE1C,SAAgB,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,uBAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isDate.js b/node_modules/rxjs/dist/cjs/internal/util/isDate.js new file mode 100644 index 0000000..bce0113 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isDate.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValidDate = void 0; +function isValidDate(value) { + return value instanceof Date && !isNaN(value); +} +exports.isValidDate = isValidDate; +//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map b/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map new file mode 100644 index 0000000..41223d8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":";;;AAOA,SAAgB,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js new file mode 100644 index 0000000..e04791f --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isFunction = void 0; +function isFunction(value) { + return typeof value === 'function'; +} +exports.isFunction = isFunction; +//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map new file mode 100644 index 0000000..be3106e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":";;;AAIA,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js new file mode 100644 index 0000000..63db48e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isInteropObservable = void 0; +var observable_1 = require("../symbol/observable"); +var isFunction_1 = require("./isFunction"); +function isInteropObservable(input) { + return isFunction_1.isFunction(input[observable_1.observable]); +} +exports.isInteropObservable = isInteropObservable; +//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map new file mode 100644 index 0000000..37e5edb --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":";;;AACA,mDAAuE;AACvE,2CAA0C;AAG1C,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,OAAO,uBAAU,CAAC,KAAK,CAAC,uBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js new file mode 100644 index 0000000..dc62d9a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isIterable = void 0; +var iterator_1 = require("../symbol/iterator"); +var isFunction_1 = require("./isFunction"); +function isIterable(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); +} +exports.isIterable = isIterable; +//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map new file mode 100644 index 0000000..1c10e94 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AACjE,2CAA0C;AAG1C,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,uBAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,mBAAe,CAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js new file mode 100644 index 0000000..280ece5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isObservable = void 0; +var Observable_1 = require("../Observable"); +var isFunction_1 = require("./isFunction"); +function isObservable(obj) { + return !!obj && (obj instanceof Observable_1.Observable || (isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe))); +} +exports.isObservable = isObservable; +//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map new file mode 100644 index 0000000..37f51f8 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,2CAA0C;AAM1C,SAAgB,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,uBAAU,IAAI,CAAC,uBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC;AAJD,oCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js new file mode 100644 index 0000000..fae4d1e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isPromise = void 0; +var isFunction_1 = require("./isFunction"); +function isPromise(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); +} +exports.isPromise = isPromise; +//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map new file mode 100644 index 0000000..00767ab --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAM1C,SAAgB,SAAS,CAAC,KAAU;IAClC,OAAO,uBAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js new file mode 100644 index 0000000..3b016e1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js @@ -0,0 +1,82 @@ +"use strict"; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isReadableStreamLike = exports.readableStreamLikeToAsyncGenerator = void 0; +var isFunction_1 = require("./isFunction"); +function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + if (!true) return [3, 8]; + return [4, __await(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) return [3, 5]; + return [4, __await(void 0)]; + case 4: return [2, _b.sent()]; + case 5: return [4, __await(value)]; + case 6: return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: return [2]; + } + }); + }); +} +exports.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; +function isReadableStreamLike(obj) { + return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); +} +exports.isReadableStreamLike = isReadableStreamLike; +//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map new file mode 100644 index 0000000..7b6a7ae --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C,SAAuB,kCAAkC,CAAI,cAAqC;;;;;;oBAC1F,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;;;;;;yBAEjC,IAAI;oBACe,mBAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,KAAK,WAAA,EAAE,IAAI,UAAA;yBACf,IAAI,EAAJ,cAAI;;wBACN,sBAAO;2CAEH,KAAM;wBAAZ,sBAAY;;oBAAZ,SAAY,CAAC;;;;oBAGf,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAbD,gFAaC;AAED,SAAgB,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,uBAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC;AAJD,oDAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js new file mode 100644 index 0000000..89ea7d5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isScheduler = void 0; +var isFunction_1 = require("./isFunction"); +function isScheduler(value) { + return value && isFunction_1.isFunction(value.schedule); +} +exports.isScheduler = isScheduler; +//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map new file mode 100644 index 0000000..1f72d18 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAE1C,SAAgB,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,uBAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/lift.js b/node_modules/rxjs/dist/cjs/internal/util/lift.js new file mode 100644 index 0000000..fd489c9 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/lift.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.operate = exports.hasLift = void 0; +var isFunction_1 = require("./isFunction"); +function hasLift(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); +} +exports.hasLift = hasLift; +function operate(init) { + return function (source) { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } + catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; +} +exports.operate = operate; +//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/lift.js.map b/node_modules/rxjs/dist/cjs/internal/util/lift.js.map new file mode 100644 index 0000000..481fe66 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/lift.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":";;;AAGA,2CAA0C;AAK1C,SAAgB,OAAO,CAAC,MAAW;IACjC,OAAO,uBAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,0BAEC;AAMD,SAAgB,OAAO,CACrB,IAAqF;IAErF,OAAO,UAAC,MAAqB;QAC3B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC;AAfD,0BAeC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js new file mode 100644 index 0000000..8cc61aa --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js @@ -0,0 +1,34 @@ +"use strict"; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapOneOrManyArgs = void 0; +var map_1 = require("../operators/map"); +var isArray = Array.isArray; +function callOrApply(fn, args) { + return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); +} +function mapOneOrManyArgs(fn) { + return map_1.map(function (args) { return callOrApply(fn, args); }); +} +exports.mapOneOrManyArgs = mapOneOrManyArgs; +//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map new file mode 100644 index 0000000..af09230 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAuC;AAE/B,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,SAAgB,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,SAAG,CAAC,UAAA,IAAI,IAAI,OAAA,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAA;AAC7C,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/noop.js b/node_modules/rxjs/dist/cjs/internal/util/noop.js new file mode 100644 index 0000000..d62ac36 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/noop.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.noop = void 0; +function noop() { } +exports.noop = noop; +//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/noop.js.map b/node_modules/rxjs/dist/cjs/internal/util/noop.js.map new file mode 100644 index 0000000..484103e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/noop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":";;;AACA,SAAgB,IAAI,KAAK,CAAC;AAA1B,oBAA0B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/not.js b/node_modules/rxjs/dist/cjs/internal/util/not.js new file mode 100644 index 0000000..a02b0ba --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/not.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.not = void 0; +function not(pred, thisArg) { + return function (value, index) { return !pred.call(thisArg, value, index); }; +} +exports.not = not; +//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/not.js.map b/node_modules/rxjs/dist/cjs/internal/util/not.js.map new file mode 100644 index 0000000..5cdca90 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/not.js.map @@ -0,0 +1 @@ +{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":";;;AAAA,SAAgB,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,UAAC,KAAQ,EAAE,KAAa,IAAK,OAAA,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,EAAjC,CAAiC,CAAC;AACxE,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/pipe.js b/node_modules/rxjs/dist/cjs/internal/util/pipe.js new file mode 100644 index 0000000..b89617e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/pipe.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pipeFromArray = exports.pipe = void 0; +var identity_1 = require("./identity"); +function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +exports.pipe = pipe; +function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +exports.pipeFromArray = pipeFromArray; +//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map b/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map new file mode 100644 index 0000000..75ba2d5 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AA6EtC,SAAgB,IAAI;IAAC,aAAsC;SAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;QAAtC,wBAAsC;;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAFD,oBAEC;AAGD,SAAgB,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,mBAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,IAAS,EAAE,EAAuB,IAAK,OAAA,EAAE,CAAC,IAAI,CAAC,EAAR,CAAQ,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC;AAZD,sCAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js new file mode 100644 index 0000000..b380ca1 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reportUnhandledError = void 0; +var config_1 = require("../config"); +var timeoutProvider_1 = require("../scheduler/timeoutProvider"); +function reportUnhandledError(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function () { + var onUnhandledError = config_1.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } + else { + throw err; + } + }); +} +exports.reportUnhandledError = reportUnhandledError; +//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map new file mode 100644 index 0000000..59ad080 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AACnC,gEAA+D;AAW/D,SAAgB,oBAAoB,CAAC,GAAQ;IAC3C,iCAAe,CAAC,UAAU,CAAC;QACjB,IAAA,gBAAgB,GAAK,eAAM,iBAAX,CAAY;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,oDAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js new file mode 100644 index 0000000..6755f9a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.subscribeToArray = void 0; +var subscribeToArray = function (array) { return function (subscriber) { + for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); +}; }; +exports.subscribeToArray = subscribeToArray; +//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map new file mode 100644 index 0000000..6f3e01d --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":";;;AAMO,IAAM,gBAAgB,GAAG,UAAI,KAAmB,IAAK,OAAA,UAAC,UAAyB;IACpF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,EAL2D,CAK3D,CAAC;AALW,QAAA,gBAAgB,oBAK3B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js new file mode 100644 index 0000000..82abb2a --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createInvalidObservableTypeError = void 0; +function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); +} +exports.createInvalidObservableTypeError = createInvalidObservableTypeError; +//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map new file mode 100644 index 0000000..aa8e572 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":";;;AAIA,SAAgB,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,mBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAI,KAAK,MAAG,8HACwC,CAC3H,CAAC;AACJ,CAAC;AAPD,4EAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js new file mode 100644 index 0000000..d82fbda --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map new file mode 100644 index 0000000..75e7271 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/operators/index.js b/node_modules/rxjs/dist/cjs/operators/index.js new file mode 100644 index 0000000..b0ea54e --- /dev/null +++ b/node_modules/rxjs/dist/cjs/operators/index.js @@ -0,0 +1,232 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mergeAll = exports.merge = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.concat = exports.combineLatestWith = exports.combineLatest = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = void 0; +exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.race = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.partition = exports.pairwise = exports.onErrorResumeNext = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = void 0; +exports.zipWith = exports.zipAll = exports.zip = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = void 0; +var audit_1 = require("../internal/operators/audit"); +Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } }); +var auditTime_1 = require("../internal/operators/auditTime"); +Object.defineProperty(exports, "auditTime", { enumerable: true, get: function () { return auditTime_1.auditTime; } }); +var buffer_1 = require("../internal/operators/buffer"); +Object.defineProperty(exports, "buffer", { enumerable: true, get: function () { return buffer_1.buffer; } }); +var bufferCount_1 = require("../internal/operators/bufferCount"); +Object.defineProperty(exports, "bufferCount", { enumerable: true, get: function () { return bufferCount_1.bufferCount; } }); +var bufferTime_1 = require("../internal/operators/bufferTime"); +Object.defineProperty(exports, "bufferTime", { enumerable: true, get: function () { return bufferTime_1.bufferTime; } }); +var bufferToggle_1 = require("../internal/operators/bufferToggle"); +Object.defineProperty(exports, "bufferToggle", { enumerable: true, get: function () { return bufferToggle_1.bufferToggle; } }); +var bufferWhen_1 = require("../internal/operators/bufferWhen"); +Object.defineProperty(exports, "bufferWhen", { enumerable: true, get: function () { return bufferWhen_1.bufferWhen; } }); +var catchError_1 = require("../internal/operators/catchError"); +Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } }); +var combineAll_1 = require("../internal/operators/combineAll"); +Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } }); +var combineLatestAll_1 = require("../internal/operators/combineLatestAll"); +Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } }); +var combineLatest_1 = require("../internal/operators/combineLatest"); +Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } }); +var combineLatestWith_1 = require("../internal/operators/combineLatestWith"); +Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } }); +var concat_1 = require("../internal/operators/concat"); +Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } }); +var concatAll_1 = require("../internal/operators/concatAll"); +Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } }); +var concatMap_1 = require("../internal/operators/concatMap"); +Object.defineProperty(exports, "concatMap", { enumerable: true, get: function () { return concatMap_1.concatMap; } }); +var concatMapTo_1 = require("../internal/operators/concatMapTo"); +Object.defineProperty(exports, "concatMapTo", { enumerable: true, get: function () { return concatMapTo_1.concatMapTo; } }); +var concatWith_1 = require("../internal/operators/concatWith"); +Object.defineProperty(exports, "concatWith", { enumerable: true, get: function () { return concatWith_1.concatWith; } }); +var connect_1 = require("../internal/operators/connect"); +Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } }); +var count_1 = require("../internal/operators/count"); +Object.defineProperty(exports, "count", { enumerable: true, get: function () { return count_1.count; } }); +var debounce_1 = require("../internal/operators/debounce"); +Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } }); +var debounceTime_1 = require("../internal/operators/debounceTime"); +Object.defineProperty(exports, "debounceTime", { enumerable: true, get: function () { return debounceTime_1.debounceTime; } }); +var defaultIfEmpty_1 = require("../internal/operators/defaultIfEmpty"); +Object.defineProperty(exports, "defaultIfEmpty", { enumerable: true, get: function () { return defaultIfEmpty_1.defaultIfEmpty; } }); +var delay_1 = require("../internal/operators/delay"); +Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } }); +var delayWhen_1 = require("../internal/operators/delayWhen"); +Object.defineProperty(exports, "delayWhen", { enumerable: true, get: function () { return delayWhen_1.delayWhen; } }); +var dematerialize_1 = require("../internal/operators/dematerialize"); +Object.defineProperty(exports, "dematerialize", { enumerable: true, get: function () { return dematerialize_1.dematerialize; } }); +var distinct_1 = require("../internal/operators/distinct"); +Object.defineProperty(exports, "distinct", { enumerable: true, get: function () { return distinct_1.distinct; } }); +var distinctUntilChanged_1 = require("../internal/operators/distinctUntilChanged"); +Object.defineProperty(exports, "distinctUntilChanged", { enumerable: true, get: function () { return distinctUntilChanged_1.distinctUntilChanged; } }); +var distinctUntilKeyChanged_1 = require("../internal/operators/distinctUntilKeyChanged"); +Object.defineProperty(exports, "distinctUntilKeyChanged", { enumerable: true, get: function () { return distinctUntilKeyChanged_1.distinctUntilKeyChanged; } }); +var elementAt_1 = require("../internal/operators/elementAt"); +Object.defineProperty(exports, "elementAt", { enumerable: true, get: function () { return elementAt_1.elementAt; } }); +var endWith_1 = require("../internal/operators/endWith"); +Object.defineProperty(exports, "endWith", { enumerable: true, get: function () { return endWith_1.endWith; } }); +var every_1 = require("../internal/operators/every"); +Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } }); +var exhaust_1 = require("../internal/operators/exhaust"); +Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } }); +var exhaustAll_1 = require("../internal/operators/exhaustAll"); +Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } }); +var exhaustMap_1 = require("../internal/operators/exhaustMap"); +Object.defineProperty(exports, "exhaustMap", { enumerable: true, get: function () { return exhaustMap_1.exhaustMap; } }); +var expand_1 = require("../internal/operators/expand"); +Object.defineProperty(exports, "expand", { enumerable: true, get: function () { return expand_1.expand; } }); +var filter_1 = require("../internal/operators/filter"); +Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_1.filter; } }); +var finalize_1 = require("../internal/operators/finalize"); +Object.defineProperty(exports, "finalize", { enumerable: true, get: function () { return finalize_1.finalize; } }); +var find_1 = require("../internal/operators/find"); +Object.defineProperty(exports, "find", { enumerable: true, get: function () { return find_1.find; } }); +var findIndex_1 = require("../internal/operators/findIndex"); +Object.defineProperty(exports, "findIndex", { enumerable: true, get: function () { return findIndex_1.findIndex; } }); +var first_1 = require("../internal/operators/first"); +Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_1.first; } }); +var groupBy_1 = require("../internal/operators/groupBy"); +Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } }); +var ignoreElements_1 = require("../internal/operators/ignoreElements"); +Object.defineProperty(exports, "ignoreElements", { enumerable: true, get: function () { return ignoreElements_1.ignoreElements; } }); +var isEmpty_1 = require("../internal/operators/isEmpty"); +Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_1.isEmpty; } }); +var last_1 = require("../internal/operators/last"); +Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_1.last; } }); +var map_1 = require("../internal/operators/map"); +Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } }); +var mapTo_1 = require("../internal/operators/mapTo"); +Object.defineProperty(exports, "mapTo", { enumerable: true, get: function () { return mapTo_1.mapTo; } }); +var materialize_1 = require("../internal/operators/materialize"); +Object.defineProperty(exports, "materialize", { enumerable: true, get: function () { return materialize_1.materialize; } }); +var max_1 = require("../internal/operators/max"); +Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } }); +var merge_1 = require("../internal/operators/merge"); +Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } }); +var mergeAll_1 = require("../internal/operators/mergeAll"); +Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } }); +var flatMap_1 = require("../internal/operators/flatMap"); +Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } }); +var mergeMap_1 = require("../internal/operators/mergeMap"); +Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } }); +var mergeMapTo_1 = require("../internal/operators/mergeMapTo"); +Object.defineProperty(exports, "mergeMapTo", { enumerable: true, get: function () { return mergeMapTo_1.mergeMapTo; } }); +var mergeScan_1 = require("../internal/operators/mergeScan"); +Object.defineProperty(exports, "mergeScan", { enumerable: true, get: function () { return mergeScan_1.mergeScan; } }); +var mergeWith_1 = require("../internal/operators/mergeWith"); +Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return mergeWith_1.mergeWith; } }); +var min_1 = require("../internal/operators/min"); +Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } }); +var multicast_1 = require("../internal/operators/multicast"); +Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } }); +var observeOn_1 = require("../internal/operators/observeOn"); +Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } }); +var onErrorResumeNextWith_1 = require("../internal/operators/onErrorResumeNextWith"); +Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNext; } }); +var pairwise_1 = require("../internal/operators/pairwise"); +Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } }); +var partition_1 = require("../internal/operators/partition"); +Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } }); +var pluck_1 = require("../internal/operators/pluck"); +Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } }); +var publish_1 = require("../internal/operators/publish"); +Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } }); +var publishBehavior_1 = require("../internal/operators/publishBehavior"); +Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } }); +var publishLast_1 = require("../internal/operators/publishLast"); +Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } }); +var publishReplay_1 = require("../internal/operators/publishReplay"); +Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } }); +var race_1 = require("../internal/operators/race"); +Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } }); +var raceWith_1 = require("../internal/operators/raceWith"); +Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } }); +var reduce_1 = require("../internal/operators/reduce"); +Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } }); +var repeat_1 = require("../internal/operators/repeat"); +Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return repeat_1.repeat; } }); +var repeatWhen_1 = require("../internal/operators/repeatWhen"); +Object.defineProperty(exports, "repeatWhen", { enumerable: true, get: function () { return repeatWhen_1.repeatWhen; } }); +var retry_1 = require("../internal/operators/retry"); +Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } }); +var retryWhen_1 = require("../internal/operators/retryWhen"); +Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } }); +var refCount_1 = require("../internal/operators/refCount"); +Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } }); +var sample_1 = require("../internal/operators/sample"); +Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } }); +var sampleTime_1 = require("../internal/operators/sampleTime"); +Object.defineProperty(exports, "sampleTime", { enumerable: true, get: function () { return sampleTime_1.sampleTime; } }); +var scan_1 = require("../internal/operators/scan"); +Object.defineProperty(exports, "scan", { enumerable: true, get: function () { return scan_1.scan; } }); +var sequenceEqual_1 = require("../internal/operators/sequenceEqual"); +Object.defineProperty(exports, "sequenceEqual", { enumerable: true, get: function () { return sequenceEqual_1.sequenceEqual; } }); +var share_1 = require("../internal/operators/share"); +Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_1.share; } }); +var shareReplay_1 = require("../internal/operators/shareReplay"); +Object.defineProperty(exports, "shareReplay", { enumerable: true, get: function () { return shareReplay_1.shareReplay; } }); +var single_1 = require("../internal/operators/single"); +Object.defineProperty(exports, "single", { enumerable: true, get: function () { return single_1.single; } }); +var skip_1 = require("../internal/operators/skip"); +Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_1.skip; } }); +var skipLast_1 = require("../internal/operators/skipLast"); +Object.defineProperty(exports, "skipLast", { enumerable: true, get: function () { return skipLast_1.skipLast; } }); +var skipUntil_1 = require("../internal/operators/skipUntil"); +Object.defineProperty(exports, "skipUntil", { enumerable: true, get: function () { return skipUntil_1.skipUntil; } }); +var skipWhile_1 = require("../internal/operators/skipWhile"); +Object.defineProperty(exports, "skipWhile", { enumerable: true, get: function () { return skipWhile_1.skipWhile; } }); +var startWith_1 = require("../internal/operators/startWith"); +Object.defineProperty(exports, "startWith", { enumerable: true, get: function () { return startWith_1.startWith; } }); +var subscribeOn_1 = require("../internal/operators/subscribeOn"); +Object.defineProperty(exports, "subscribeOn", { enumerable: true, get: function () { return subscribeOn_1.subscribeOn; } }); +var switchAll_1 = require("../internal/operators/switchAll"); +Object.defineProperty(exports, "switchAll", { enumerable: true, get: function () { return switchAll_1.switchAll; } }); +var switchMap_1 = require("../internal/operators/switchMap"); +Object.defineProperty(exports, "switchMap", { enumerable: true, get: function () { return switchMap_1.switchMap; } }); +var switchMapTo_1 = require("../internal/operators/switchMapTo"); +Object.defineProperty(exports, "switchMapTo", { enumerable: true, get: function () { return switchMapTo_1.switchMapTo; } }); +var switchScan_1 = require("../internal/operators/switchScan"); +Object.defineProperty(exports, "switchScan", { enumerable: true, get: function () { return switchScan_1.switchScan; } }); +var take_1 = require("../internal/operators/take"); +Object.defineProperty(exports, "take", { enumerable: true, get: function () { return take_1.take; } }); +var takeLast_1 = require("../internal/operators/takeLast"); +Object.defineProperty(exports, "takeLast", { enumerable: true, get: function () { return takeLast_1.takeLast; } }); +var takeUntil_1 = require("../internal/operators/takeUntil"); +Object.defineProperty(exports, "takeUntil", { enumerable: true, get: function () { return takeUntil_1.takeUntil; } }); +var takeWhile_1 = require("../internal/operators/takeWhile"); +Object.defineProperty(exports, "takeWhile", { enumerable: true, get: function () { return takeWhile_1.takeWhile; } }); +var tap_1 = require("../internal/operators/tap"); +Object.defineProperty(exports, "tap", { enumerable: true, get: function () { return tap_1.tap; } }); +var throttle_1 = require("../internal/operators/throttle"); +Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return throttle_1.throttle; } }); +var throttleTime_1 = require("../internal/operators/throttleTime"); +Object.defineProperty(exports, "throttleTime", { enumerable: true, get: function () { return throttleTime_1.throttleTime; } }); +var throwIfEmpty_1 = require("../internal/operators/throwIfEmpty"); +Object.defineProperty(exports, "throwIfEmpty", { enumerable: true, get: function () { return throwIfEmpty_1.throwIfEmpty; } }); +var timeInterval_1 = require("../internal/operators/timeInterval"); +Object.defineProperty(exports, "timeInterval", { enumerable: true, get: function () { return timeInterval_1.timeInterval; } }); +var timeout_1 = require("../internal/operators/timeout"); +Object.defineProperty(exports, "timeout", { enumerable: true, get: function () { return timeout_1.timeout; } }); +var timeoutWith_1 = require("../internal/operators/timeoutWith"); +Object.defineProperty(exports, "timeoutWith", { enumerable: true, get: function () { return timeoutWith_1.timeoutWith; } }); +var timestamp_1 = require("../internal/operators/timestamp"); +Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_1.timestamp; } }); +var toArray_1 = require("../internal/operators/toArray"); +Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } }); +var window_1 = require("../internal/operators/window"); +Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.window; } }); +var windowCount_1 = require("../internal/operators/windowCount"); +Object.defineProperty(exports, "windowCount", { enumerable: true, get: function () { return windowCount_1.windowCount; } }); +var windowTime_1 = require("../internal/operators/windowTime"); +Object.defineProperty(exports, "windowTime", { enumerable: true, get: function () { return windowTime_1.windowTime; } }); +var windowToggle_1 = require("../internal/operators/windowToggle"); +Object.defineProperty(exports, "windowToggle", { enumerable: true, get: function () { return windowToggle_1.windowToggle; } }); +var windowWhen_1 = require("../internal/operators/windowWhen"); +Object.defineProperty(exports, "windowWhen", { enumerable: true, get: function () { return windowWhen_1.windowWhen; } }); +var withLatestFrom_1 = require("../internal/operators/withLatestFrom"); +Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } }); +var zip_1 = require("../internal/operators/zip"); +Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } }); +var zipAll_1 = require("../internal/operators/zipAll"); +Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } }); +var zipWith_1 = require("../internal/operators/zipWith"); +Object.defineProperty(exports, "zipWith", { enumerable: true, get: function () { return zipWith_1.zipWith; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/operators/index.js.map b/node_modules/rxjs/dist/cjs/operators/index.js.map new file mode 100644 index 0000000..8217be7 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/operators/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":";;;;;AACA,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,2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YAAY,OAAA;AACrB,yDAAoF;AAA3E,kGAAA,OAAO,OAAA;AAChB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,yDAAwD;AAA/C,kGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/testing/index.js b/node_modules/rxjs/dist/cjs/testing/index.js new file mode 100644 index 0000000..b57ab23 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/testing/index.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TestScheduler = void 0; +var TestScheduler_1 = require("../internal/testing/TestScheduler"); +Object.defineProperty(exports, "TestScheduler", { enumerable: true, get: function () { return TestScheduler_1.TestScheduler; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/testing/index.js.map b/node_modules/rxjs/dist/cjs/testing/index.js.map new file mode 100644 index 0000000..290bebf --- /dev/null +++ b/node_modules/rxjs/dist/cjs/testing/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8E;AAArE,8GAAA,aAAa,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/webSocket/index.js b/node_modules/rxjs/dist/cjs/webSocket/index.js new file mode 100644 index 0000000..b183bf2 --- /dev/null +++ b/node_modules/rxjs/dist/cjs/webSocket/index.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebSocketSubject = exports.webSocket = void 0; +var webSocket_1 = require("../internal/observable/dom/webSocket"); +Object.defineProperty(exports, "webSocket", { enumerable: true, get: function () { return webSocket_1.webSocket; } }); +var WebSocketSubject_1 = require("../internal/observable/dom/WebSocketSubject"); +Object.defineProperty(exports, "WebSocketSubject", { enumerable: true, get: function () { return WebSocketSubject_1.WebSocketSubject; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/webSocket/index.js.map b/node_modules/rxjs/dist/cjs/webSocket/index.js.map new file mode 100644 index 0000000..bfcfc5b --- /dev/null +++ b/node_modules/rxjs/dist/cjs/webSocket/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":";;;AAAA,kEAA8E;AAArE,sGAAA,SAAS,OAAa;AAC/B,gFAAuG;AAA9F,oHAAA,gBAAgB,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/ajax/index.js b/node_modules/rxjs/dist/esm/ajax/index.js new file mode 100644 index 0000000..e387b2b --- /dev/null +++ b/node_modules/rxjs/dist/esm/ajax/index.js @@ -0,0 +1,4 @@ +export { ajax } from '../internal/ajax/ajax'; +export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; +export { AjaxResponse } from '../internal/ajax/AjaxResponse'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/ajax/index.js.map b/node_modules/rxjs/dist/esm/ajax/index.js.map new file mode 100644 index 0000000..d45ff17 --- /dev/null +++ b/node_modules/rxjs/dist/esm/ajax/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/fetch/index.js b/node_modules/rxjs/dist/esm/fetch/index.js new file mode 100644 index 0000000..e851987 --- /dev/null +++ b/node_modules/rxjs/dist/esm/fetch/index.js @@ -0,0 +1,2 @@ +export { fromFetch } from '../internal/observable/dom/fetch'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/fetch/index.js.map b/node_modules/rxjs/dist/esm/fetch/index.js.map new file mode 100644 index 0000000..75fe99b --- /dev/null +++ b/node_modules/rxjs/dist/esm/fetch/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/index.js b/node_modules/rxjs/dist/esm/index.js new file mode 100644 index 0000000..cda695d --- /dev/null +++ b/node_modules/rxjs/dist/esm/index.js @@ -0,0 +1,169 @@ +export { Observable } from './internal/Observable'; +export { ConnectableObservable } from './internal/observable/ConnectableObservable'; +export { observable } from './internal/symbol/observable'; +export { animationFrames } from './internal/observable/dom/animationFrames'; +export { Subject } from './internal/Subject'; +export { BehaviorSubject } from './internal/BehaviorSubject'; +export { ReplaySubject } from './internal/ReplaySubject'; +export { AsyncSubject } from './internal/AsyncSubject'; +export { asap, asapScheduler } from './internal/scheduler/asap'; +export { async, asyncScheduler } from './internal/scheduler/async'; +export { queue, queueScheduler } from './internal/scheduler/queue'; +export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; +export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; +export { Scheduler } from './internal/Scheduler'; +export { Subscription } from './internal/Subscription'; +export { Subscriber } from './internal/Subscriber'; +export { Notification, NotificationKind } from './internal/Notification'; +export { pipe } from './internal/util/pipe'; +export { noop } from './internal/util/noop'; +export { identity } from './internal/util/identity'; +export { isObservable } from './internal/util/isObservable'; +export { lastValueFrom } from './internal/lastValueFrom'; +export { firstValueFrom } from './internal/firstValueFrom'; +export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; +export { EmptyError } from './internal/util/EmptyError'; +export { NotFoundError } from './internal/util/NotFoundError'; +export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; +export { SequenceError } from './internal/util/SequenceError'; +export { TimeoutError } from './internal/operators/timeout'; +export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; +export { bindCallback } from './internal/observable/bindCallback'; +export { bindNodeCallback } from './internal/observable/bindNodeCallback'; +export { combineLatest } from './internal/observable/combineLatest'; +export { concat } from './internal/observable/concat'; +export { connectable } from './internal/observable/connectable'; +export { defer } from './internal/observable/defer'; +export { empty } from './internal/observable/empty'; +export { forkJoin } from './internal/observable/forkJoin'; +export { from } from './internal/observable/from'; +export { fromEvent } from './internal/observable/fromEvent'; +export { fromEventPattern } from './internal/observable/fromEventPattern'; +export { generate } from './internal/observable/generate'; +export { iif } from './internal/observable/iif'; +export { interval } from './internal/observable/interval'; +export { merge } from './internal/observable/merge'; +export { never } from './internal/observable/never'; +export { of } from './internal/observable/of'; +export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; +export { pairs } from './internal/observable/pairs'; +export { partition } from './internal/observable/partition'; +export { race } from './internal/observable/race'; +export { range } from './internal/observable/range'; +export { throwError } from './internal/observable/throwError'; +export { timer } from './internal/observable/timer'; +export { using } from './internal/observable/using'; +export { zip } from './internal/observable/zip'; +export { scheduled } from './internal/scheduled/scheduled'; +export { EMPTY } from './internal/observable/empty'; +export { NEVER } from './internal/observable/never'; +export * from './internal/types'; +export { config } from './internal/config'; +export { audit } from './internal/operators/audit'; +export { auditTime } from './internal/operators/auditTime'; +export { buffer } from './internal/operators/buffer'; +export { bufferCount } from './internal/operators/bufferCount'; +export { bufferTime } from './internal/operators/bufferTime'; +export { bufferToggle } from './internal/operators/bufferToggle'; +export { bufferWhen } from './internal/operators/bufferWhen'; +export { catchError } from './internal/operators/catchError'; +export { combineAll } from './internal/operators/combineAll'; +export { combineLatestAll } from './internal/operators/combineLatestAll'; +export { combineLatestWith } from './internal/operators/combineLatestWith'; +export { concatAll } from './internal/operators/concatAll'; +export { concatMap } from './internal/operators/concatMap'; +export { concatMapTo } from './internal/operators/concatMapTo'; +export { concatWith } from './internal/operators/concatWith'; +export { connect } from './internal/operators/connect'; +export { count } from './internal/operators/count'; +export { debounce } from './internal/operators/debounce'; +export { debounceTime } from './internal/operators/debounceTime'; +export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; +export { delay } from './internal/operators/delay'; +export { delayWhen } from './internal/operators/delayWhen'; +export { dematerialize } from './internal/operators/dematerialize'; +export { distinct } from './internal/operators/distinct'; +export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; +export { elementAt } from './internal/operators/elementAt'; +export { endWith } from './internal/operators/endWith'; +export { every } from './internal/operators/every'; +export { exhaust } from './internal/operators/exhaust'; +export { exhaustAll } from './internal/operators/exhaustAll'; +export { exhaustMap } from './internal/operators/exhaustMap'; +export { expand } from './internal/operators/expand'; +export { filter } from './internal/operators/filter'; +export { finalize } from './internal/operators/finalize'; +export { find } from './internal/operators/find'; +export { findIndex } from './internal/operators/findIndex'; +export { first } from './internal/operators/first'; +export { groupBy } from './internal/operators/groupBy'; +export { ignoreElements } from './internal/operators/ignoreElements'; +export { isEmpty } from './internal/operators/isEmpty'; +export { last } from './internal/operators/last'; +export { map } from './internal/operators/map'; +export { mapTo } from './internal/operators/mapTo'; +export { materialize } from './internal/operators/materialize'; +export { max } from './internal/operators/max'; +export { mergeAll } from './internal/operators/mergeAll'; +export { flatMap } from './internal/operators/flatMap'; +export { mergeMap } from './internal/operators/mergeMap'; +export { mergeMapTo } from './internal/operators/mergeMapTo'; +export { mergeScan } from './internal/operators/mergeScan'; +export { mergeWith } from './internal/operators/mergeWith'; +export { min } from './internal/operators/min'; +export { multicast } from './internal/operators/multicast'; +export { observeOn } from './internal/operators/observeOn'; +export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; +export { pairwise } from './internal/operators/pairwise'; +export { pluck } from './internal/operators/pluck'; +export { publish } from './internal/operators/publish'; +export { publishBehavior } from './internal/operators/publishBehavior'; +export { publishLast } from './internal/operators/publishLast'; +export { publishReplay } from './internal/operators/publishReplay'; +export { raceWith } from './internal/operators/raceWith'; +export { reduce } from './internal/operators/reduce'; +export { repeat } from './internal/operators/repeat'; +export { repeatWhen } from './internal/operators/repeatWhen'; +export { retry } from './internal/operators/retry'; +export { retryWhen } from './internal/operators/retryWhen'; +export { refCount } from './internal/operators/refCount'; +export { sample } from './internal/operators/sample'; +export { sampleTime } from './internal/operators/sampleTime'; +export { scan } from './internal/operators/scan'; +export { sequenceEqual } from './internal/operators/sequenceEqual'; +export { share } from './internal/operators/share'; +export { shareReplay } from './internal/operators/shareReplay'; +export { single } from './internal/operators/single'; +export { skip } from './internal/operators/skip'; +export { skipLast } from './internal/operators/skipLast'; +export { skipUntil } from './internal/operators/skipUntil'; +export { skipWhile } from './internal/operators/skipWhile'; +export { startWith } from './internal/operators/startWith'; +export { subscribeOn } from './internal/operators/subscribeOn'; +export { switchAll } from './internal/operators/switchAll'; +export { switchMap } from './internal/operators/switchMap'; +export { switchMapTo } from './internal/operators/switchMapTo'; +export { switchScan } from './internal/operators/switchScan'; +export { take } from './internal/operators/take'; +export { takeLast } from './internal/operators/takeLast'; +export { takeUntil } from './internal/operators/takeUntil'; +export { takeWhile } from './internal/operators/takeWhile'; +export { tap } from './internal/operators/tap'; +export { throttle } from './internal/operators/throttle'; +export { throttleTime } from './internal/operators/throttleTime'; +export { throwIfEmpty } from './internal/operators/throwIfEmpty'; +export { timeInterval } from './internal/operators/timeInterval'; +export { timeout } from './internal/operators/timeout'; +export { timeoutWith } from './internal/operators/timeoutWith'; +export { timestamp } from './internal/operators/timestamp'; +export { toArray } from './internal/operators/toArray'; +export { window } from './internal/operators/window'; +export { windowCount } from './internal/operators/windowCount'; +export { windowTime } from './internal/operators/windowTime'; +export { windowToggle } from './internal/operators/windowToggle'; +export { windowWhen } from './internal/operators/windowWhen'; +export { withLatestFrom } from './internal/operators/withLatestFrom'; +export { zipAll } from './internal/operators/zipAll'; +export { zipWith } from './internal/operators/zipWith'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/index.js.map b/node_modules/rxjs/dist/esm/index.js.map new file mode 100644 index 0000000..c8082be --- /dev/null +++ b/node_modules/rxjs/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGpF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cA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mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,OAAO,EAA8B,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js new file mode 100644 index 0000000..4bc63fd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=AnyCatcher.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map new file mode 100644 index 0000000..83e9e18 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnyCatcher.js","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js new file mode 100644 index 0000000..b7a71a2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js @@ -0,0 +1,34 @@ +import { Subject } from './Subject'; +export class AsyncSubject extends Subject { + constructor() { + super(...arguments); + this._value = null; + this._hasValue = false; + this._isComplete = false; + } + _checkFinalizedStatuses(subscriber) { + const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + } + next(value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + } + complete() { + const { _hasValue, _value, _isComplete } = this; + if (!_isComplete) { + this._isComplete = true; + _hasValue && super.next(_value); + super.complete(); + } + } +} +//# sourceMappingURL=AsyncSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map new file mode 100644 index 0000000..c55d461 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncSubject.js","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,MAAM,OAAO,YAAgB,SAAQ,OAAU;IAA/C;;QACU,WAAM,GAAa,IAAI,CAAC;QACxB,cAAS,GAAG,KAAK,CAAC;QAClB,gBAAW,GAAG,KAAK,CAAC;IA4B9B,CAAC;IAzBW,uBAAuB,CAAC,UAAyB;QACzD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAClF,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,IAAI,WAAW,EAAE;YACnC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACtC,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;IACH,CAAC;IAED,QAAQ;QACN,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACjC,KAAK,CAAC,QAAQ,EAAE,CAAC;SAClB;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js new file mode 100644 index 0000000..b9d4f6c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js @@ -0,0 +1,27 @@ +import { Subject } from './Subject'; +export class BehaviorSubject extends Subject { + constructor(_value) { + super(); + this._value = _value; + } + get value() { + return this.getValue(); + } + _subscribe(subscriber) { + const subscription = super._subscribe(subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + } + getValue() { + const { hasError, thrownError, _value } = this; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + } + next(value) { + super.next((this._value = value)); + } +} +//# sourceMappingURL=BehaviorSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map new file mode 100644 index 0000000..6c1621a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BehaviorSubject.js","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,MAAM,OAAO,eAAmB,SAAQ,OAAU;IAChD,YAAoB,MAAS;QAC3B,KAAK,EAAE,CAAC;QADU,WAAM,GAAN,MAAM,CAAG;IAE7B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/C,IAAI,QAAQ,EAAE;YACZ,MAAM,WAAW,CAAC;SACnB;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Notification.js b/node_modules/rxjs/dist/esm/internal/Notification.js new file mode 100644 index 0000000..2ea4395 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Notification.js @@ -0,0 +1,70 @@ +import { EMPTY } from './observable/empty'; +import { of } from './observable/of'; +import { throwError } from './observable/throwError'; +import { isFunction } from './util/isFunction'; +export var NotificationKind; +(function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; +})(NotificationKind || (NotificationKind = {})); +export class Notification { + constructor(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + observe(observer) { + return observeNotification(this, observer); + } + do(nextHandler, errorHandler, completeHandler) { + const { kind, value, error } = this; + return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + } + accept(nextOrObserver, error, complete) { + var _a; + return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) + ? this.observe(nextOrObserver) + : this.do(nextOrObserver, error, complete); + } + toObservable() { + const { kind, value, error } = this; + const result = kind === 'N' + ? + of(value) + : + kind === 'E' + ? + throwError(() => error) + : + kind === 'C' + ? + EMPTY + : + 0; + if (!result) { + throw new TypeError(`Unexpected notification kind ${kind}`); + } + return result; + } + static createNext(value) { + return new Notification('N', value); + } + static createError(err) { + return new Notification('E', undefined, err); + } + static createComplete() { + return Notification.completeNotification; + } +} +Notification.completeNotification = new Notification('C'); +export function observeNotification(notification, observer) { + var _a, _b, _c; + const { kind, value, error } = notification; + if (typeof kind !== 'string') { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); +} +//# sourceMappingURL=Notification.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Notification.js.map b/node_modules/rxjs/dist/esm/internal/Notification.js.map new file mode 100644 index 0000000..481faf4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Notification.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OA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AAI,+CAAb,QAAQ,EAAQ,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,KAAK,+CAAd,QAAQ,EAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,QAAQ,+CAAjB,QAAQ,CAAa,CAAC;AAC1G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js new file mode 100644 index 0000000..536f265 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js @@ -0,0 +1,15 @@ +export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))(); +export function errorNotification(error) { + return createNotification('E', undefined, error); +} +export function nextNotification(value) { + return createNotification('N', value, undefined); +} +export function createNotification(kind, value, error) { + return { + kind, + value, + error, + }; +} +//# sourceMappingURL=NotificationFactories.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map new file mode 100644 index 0000000..12f4c42 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotificationFactories.js","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAyB,CAAC,EAAE,CAAC;AAOrH,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAQ,CAAC;AAC1D,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAwB,CAAC;AAC1E,CAAC;AAQD,MAAM,UAAU,kBAAkB,CAAC,IAAqB,EAAE,KAAU,EAAE,KAAU;IAC9E,OAAO;QACL,IAAI;QACJ,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Observable.js b/node_modules/rxjs/dist/esm/internal/Observable.js new file mode 100644 index 0000000..a0370b2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Observable.js @@ -0,0 +1,93 @@ +import { SafeSubscriber, Subscriber } from './Subscriber'; +import { isSubscription } from './Subscription'; +import { observable as Symbol_observable } from './symbol/observable'; +import { pipeFromArray } from './util/pipe'; +import { config } from './config'; +import { isFunction } from './util/isFunction'; +import { errorContext } from './util/errorContext'; +export class Observable { + constructor(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + lift(operator) { + const observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + } + subscribe(observerOrNext, error, complete) { + const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); + errorContext(() => { + const { operator, source } = this; + subscriber.add(operator + ? + operator.call(subscriber, source) + : source + ? + this._subscribe(subscriber) + : + this._trySubscribe(subscriber)); + }); + return subscriber; + } + _trySubscribe(sink) { + try { + return this._subscribe(sink); + } + catch (err) { + sink.error(err); + } + } + forEach(next, promiseCtor) { + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor((resolve, reject) => { + const subscriber = new SafeSubscriber({ + next: (value) => { + try { + next(value); + } + catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + this.subscribe(subscriber); + }); + } + _subscribe(subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + } + [Symbol_observable]() { + return this; + } + pipe(...operations) { + return pipeFromArray(operations)(this); + } + toPromise(promiseCtor) { + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor((resolve, reject) => { + let value; + this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value)); + }); + } +} +Observable.create = (subscribe) => { + return new Observable(subscribe); +}; +function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; +} +function isObserver(value) { + return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); +} +function isSubscriber(value) { + return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); +} +//# sourceMappingURL=Observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Observable.js.map b/node_modules/rxjs/dist/esm/internal/Observable.js.map new file mode 100644 index 0000000..a659f5a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Observable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Observable.js","sourceRoot":"","sources":["../../../src/internal/Observable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAgB,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQnD,MAAM,OAAO,UAAU;IAkBrB,YAAY,SAA6E;QACvF,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;IACH,CAAC;IA4BD,IAAI,CAAI,QAAyB;QAC/B,MAAM,UAAU,GAAG,IAAI,UAAU,EAAK,CAAC;QACvC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,UAAU,CAAC,QAAQ,GAAG,QAAQ,CA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U,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,SAAS,YAAY,CAAI,KAAU;IACjC,OAAO,CAAC,KAAK,IAAI,KAAK,YAAY,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Operator.js b/node_modules/rxjs/dist/esm/internal/Operator.js new file mode 100644 index 0000000..b9b664f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Operator.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Operator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Operator.js.map b/node_modules/rxjs/dist/esm/internal/Operator.js.map new file mode 100644 index 0000000..7401e0c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Operator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js new file mode 100644 index 0000000..630f426 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js @@ -0,0 +1,50 @@ +import { Subject } from './Subject'; +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; +export class ReplaySubject extends Subject { + constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) { + super(); + this._bufferSize = _bufferSize; + this._windowTime = _windowTime; + this._timestampProvider = _timestampProvider; + this._buffer = []; + this._infiniteTimeWindow = true; + this._infiniteTimeWindow = _windowTime === Infinity; + this._bufferSize = Math.max(1, _bufferSize); + this._windowTime = Math.max(1, _windowTime); + } + next(value) { + const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + super.next(value); + } + _subscribe(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + const subscription = this._innerSubscribe(subscriber); + const { _infiniteTimeWindow, _buffer } = this; + const copy = _buffer.slice(); + for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + } + _trimBuffer() { + const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this; + const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + const now = _timestampProvider.now(); + let last = 0; + for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + } +} +//# sourceMappingURL=ReplaySubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map new file mode 100644 index 0000000..d8004b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ReplaySubject.js","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAgC1E,MAAM,OAAO,aAAiB,SAAQ,OAAU;IAU9C,YACU,cAAc,QAAQ,EACtB,cAAc,QAAQ,EACtB,qBAAwC,qBAAqB;QAErE,KAAK,EAAE,CAAC;QAJA,gBAAW,GAAX,WAAW,CAAW;QACtB,gBAAW,GAAX,WAAW,CAAW;QACtB,uBAAkB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CAAC,IAAI,CAAC,CAAC,CAAM,CAAC,CAAC;SAC/B;QAED,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAEzC,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,WAAW;QACjB,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC;QAK/E,MAAM,kBAAkB,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;QACvE,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;QAIxH,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,IAAI,GAAG,CAAC,CAAC;YAGb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAK,OAAO,CAAC,CAAC,CAAY,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;gBAC3E,IAAI,GAAG,CAAC,CAAC;aACV;YACD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;SACrC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Scheduler.js b/node_modules/rxjs/dist/esm/internal/Scheduler.js new file mode 100644 index 0000000..f803a78 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Scheduler.js @@ -0,0 +1,12 @@ +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; +export class Scheduler { + constructor(schedulerActionCtor, now = Scheduler.now) { + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + schedule(work, delay = 0, state) { + return new this.schedulerActionCtor(this, work).schedule(state, delay); + } +} +Scheduler.now = dateTimestampProvider.now; +//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Scheduler.js.map b/node_modules/rxjs/dist/esm/internal/Scheduler.js.map new file mode 100644 index 0000000..a3f9f52 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Scheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAqB1E,MAAM,OAAO,SAAS;IAGpB,YAAoB,mBAAkC,EAAE,MAAoB,SAAS,CAAC,GAAG;QAArE,wBAAmB,GAAnB,mBAAmB,CAAe;QACpD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA6BM,QAAQ,CAAI,IAAmD,EAAE,QAAgB,CAAC,EAAE,KAAS;QAClG,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;;AAnCa,aAAG,GAAiB,qBAAqB,CAAC,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subject.js b/node_modules/rxjs/dist/esm/internal/Subject.js new file mode 100644 index 0000000..4295f07 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subject.js @@ -0,0 +1,134 @@ +import { Observable } from './Observable'; +import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; +import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; +import { arrRemove } from './util/arrRemove'; +import { errorContext } from './util/errorContext'; +export class Subject extends Observable { + constructor() { + super(); + this.closed = false; + this.currentObservers = null; + this.observers = []; + this.isStopped = false; + this.hasError = false; + this.thrownError = null; + } + lift(operator) { + const subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + } + _throwIfClosed() { + if (this.closed) { + throw new ObjectUnsubscribedError(); + } + } + next(value) { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + if (!this.currentObservers) { + this.currentObservers = Array.from(this.observers); + } + for (const observer of this.currentObservers) { + observer.next(value); + } + } + }); + } + error(err) { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.hasError = this.isStopped = true; + this.thrownError = err; + const { observers } = this; + while (observers.length) { + observers.shift().error(err); + } + } + }); + } + complete() { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.isStopped = true; + const { observers } = this; + while (observers.length) { + observers.shift().complete(); + } + } + }); + } + unsubscribe() { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + } + get observed() { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + } + _trySubscribe(subscriber) { + this._throwIfClosed(); + return super._trySubscribe(subscriber); + } + _subscribe(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + } + _innerSubscribe(subscriber) { + const { hasError, isStopped, observers } = this; + if (hasError || isStopped) { + return EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription(() => { + this.currentObservers = null; + arrRemove(observers, subscriber); + }); + } + _checkFinalizedStatuses(subscriber) { + const { hasError, thrownError, isStopped } = this; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped) { + subscriber.complete(); + } + } + asObservable() { + const observable = new Observable(); + observable.source = this; + return observable; + } +} +Subject.create = (destination, source) => { + return new AnonymousSubject(destination, source); +}; +export class AnonymousSubject extends Subject { + constructor(destination, source) { + super(); + this.destination = destination; + this.source = source; + } + next(value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + } + error(err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + } + complete() { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + } + _subscribe(subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; + } +} +//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subject.js.map b/node_modules/rxjs/dist/esm/internal/Subject.js.map new file mode 100644 index 0000000..a3350ed --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASnD,MAAM,OAAO,OAAW,SAAQ,UAAa;IAwB3C;QAEE,KAAK,EAAE,CAAC;QAzBV,WAAM,GAAG,KAAK,CAAC;QAEP,qBAAgB,GAAyB,IAAI,CAAC;QAGtD,cAAS,GAAkB,EAAE,CAAC;QAE9B,cAAS,GAAG,KAAK,CAAC;QAElB,aAAQ,GAAG,KAAK,CAAC;QAEjB,gBAAW,GAAQ,IAAI,CAAC;IAexB,CAAC;IAGD,IAAI,CAAI,QAAwB;QAC9B,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,QAAe,CAAC;QACnC,OAAO,OAAc,CAAC;IACxB,CA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E;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,EAAE;YACpB,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAQD,YAAY;QACV,MAAM,UAAU,GAAQ,IAAI,UAAU,EAAK,CAAC;QAC5C,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;;AAxHM,cAAM,GAA4B,CAAI,WAAwB,EAAE,MAAqB,EAAuB,EAAE;IACnH,OAAO,IAAI,gBAAgB,CAAI,WAAW,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC;AA4HJ,MAAM,OAAO,gBAAoB,SAAQ,OAAU;IACjD,YAES,WAAyB,EAChC,MAAsB;QAEtB,KAAK,EAAE,CAAC;QAHD,gBAAW,GAAX,WAAW,CAAc;QAIhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,QAAQ;;QACN,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,UAAU,CAAC,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,kBAAkB,CAAC;IAClE,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscriber.js b/node_modules/rxjs/dist/esm/internal/Subscriber.js new file mode 100644 index 0000000..550efe4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subscriber.js @@ -0,0 +1,174 @@ +import { isFunction } from './util/isFunction'; +import { isSubscription, Subscription } from './Subscription'; +import { config } from './config'; +import { reportUnhandledError } from './util/reportUnhandledError'; +import { noop } from './util/noop'; +import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; +import { timeoutProvider } from './scheduler/timeoutProvider'; +import { captureError } from './util/errorContext'; +export class Subscriber extends Subscription { + constructor(destination) { + super(); + this.isStopped = false; + if (destination) { + this.destination = destination; + if (isSubscription(destination)) { + destination.add(this); + } + } + else { + this.destination = EMPTY_OBSERVER; + } + } + static create(next, error, complete) { + return new SafeSubscriber(next, error, complete); + } + next(value) { + if (this.isStopped) { + handleStoppedNotification(nextNotification(value), this); + } + else { + this._next(value); + } + } + error(err) { + if (this.isStopped) { + handleStoppedNotification(errorNotification(err), this); + } + else { + this.isStopped = true; + this._error(err); + } + } + complete() { + if (this.isStopped) { + handleStoppedNotification(COMPLETE_NOTIFICATION, this); + } + else { + this.isStopped = true; + this._complete(); + } + } + unsubscribe() { + if (!this.closed) { + this.isStopped = true; + super.unsubscribe(); + this.destination = null; + } + } + _next(value) { + this.destination.next(value); + } + _error(err) { + try { + this.destination.error(err); + } + finally { + this.unsubscribe(); + } + } + _complete() { + try { + this.destination.complete(); + } + finally { + this.unsubscribe(); + } + } +} +const _bind = Function.prototype.bind; +function bind(fn, thisArg) { + return _bind.call(fn, thisArg); +} +class ConsumerObserver { + constructor(partialObserver) { + this.partialObserver = partialObserver; + } + next(value) { + const { partialObserver } = this; + if (partialObserver.next) { + try { + partialObserver.next(value); + } + catch (error) { + handleUnhandledError(error); + } + } + } + error(err) { + const { partialObserver } = this; + if (partialObserver.error) { + try { + partialObserver.error(err); + } + catch (error) { + handleUnhandledError(error); + } + } + else { + handleUnhandledError(err); + } + } + complete() { + const { partialObserver } = this; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } + catch (error) { + handleUnhandledError(error); + } + } + } +} +export class SafeSubscriber extends Subscriber { + constructor(observerOrNext, error, complete) { + super(); + let partialObserver; + if (isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), + error: error !== null && error !== void 0 ? error : undefined, + complete: complete !== null && complete !== void 0 ? complete : undefined, + }; + } + else { + let context; + if (this && config.useDeprecatedNextContext) { + context = Object.create(observerOrNext); + context.unsubscribe = () => this.unsubscribe(); + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context), + error: observerOrNext.error && bind(observerOrNext.error, context), + complete: observerOrNext.complete && bind(observerOrNext.complete, context), + }; + } + else { + partialObserver = observerOrNext; + } + } + this.destination = new ConsumerObserver(partialObserver); + } +} +function handleUnhandledError(error) { + if (config.useDeprecatedSynchronousErrorHandling) { + captureError(error); + } + else { + reportUnhandledError(error); + } +} +function defaultErrorHandler(err) { + throw err; +} +function handleStoppedNotification(notification, subscriber) { + const { onStoppedNotification } = config; + onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); +} +export const EMPTY_OBSERVER = { + closed: true, + next: noop, + error: defaultErrorHandler, + complete: noop, +}; +//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscriber.js.map b/node_modules/rxjs/dist/esm/internal/Subscriber.js.map new file mode 100644 index 0000000..eb96ce9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,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CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC;oBAC/D,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;oBAClE,QAAQ,EAAE,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC;iBAC5E,CAAC;aACH;iBAAM;gBAEL,eAAe,GAAG,cAAc,CAAC;aAClC;SACF;QAID,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,SAAS,oBAAoB,CAAC,KAAU;IACtC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;SAAM;QAGL,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAQD,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,GAAG,CAAC;AACZ,CAAC;AAOD,SAAS,yBAAyB,CAAC,YAAyC,EAAE,UAA2B;IACvG,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;IACzC,qBAAqB,IAAI,eAAe,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;AAC7G,CAAC;AAOD,MAAM,CAAC,MAAM,cAAc,GAA+C;IACxE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,IAAI;CACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscription.js b/node_modules/rxjs/dist/esm/internal/Subscription.js new file mode 100644 index 0000000..69835fb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subscription.js @@ -0,0 +1,119 @@ +import { isFunction } from './util/isFunction'; +import { UnsubscriptionError } from './util/UnsubscriptionError'; +import { arrRemove } from './util/arrRemove'; +export class Subscription { + constructor(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + unsubscribe() { + let errors; + if (!this.closed) { + this.closed = true; + const { _parentage } = this; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + for (const parent of _parentage) { + parent.remove(this); + } + } + else { + _parentage.remove(this); + } + } + const { initialTeardown: initialFinalizer } = this; + if (isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } + catch (e) { + errors = e instanceof UnsubscriptionError ? e.errors : [e]; + } + } + const { _finalizers } = this; + if (_finalizers) { + this._finalizers = null; + for (const finalizer of _finalizers) { + try { + execFinalizer(finalizer); + } + catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError) { + errors = [...errors, ...err.errors]; + } + else { + errors.push(err); + } + } + } + } + if (errors) { + throw new UnsubscriptionError(errors); + } + } + } + add(teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } + else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + } + _hasParent(parent) { + const { _parentage } = this; + return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + } + _addParent(parent) { + const { _parentage } = this; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + } + _removeParent(parent) { + const { _parentage } = this; + if (_parentage === parent) { + this._parentage = null; + } + else if (Array.isArray(_parentage)) { + arrRemove(_parentage, parent); + } + } + remove(teardown) { + const { _finalizers } = this; + _finalizers && arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + } +} +Subscription.EMPTY = (() => { + const empty = new Subscription(); + empty.closed = true; + return empty; +})(); +export const EMPTY_SUBSCRIPTION = Subscription.EMPTY; +export function isSubscription(value) { + return (value instanceof Subscription || + (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); +} +function execFinalizer(finalizer) { + if (isFunction(finalizer)) { + finalizer(); + } + else { + finalizer.unsubscribe(); + } +} +//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscription.js.map b/node_modules/rxjs/dist/esm/internal/Subscription.js.map new file mode 100644 index 0000000..e945abd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/Subscription.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAc7C,MAAM,OAAO,YAAY;IAyBvB,YAAoB,eAA4B;QAA5B,oBAAe,GAAf,eAAe,CAAa;QAdzC,WAAM,GAAG,KAAK,CAAC;QAEd,eAAU,GAAyC,IAAI,CAAC;QAMxD,gBAAW,GAA0C,IAAI,CAAC;IAMf,CAAC;IAQpD,WAAW;QACT,IAAI,MAAyB,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAGnB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;YAC5B,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;oBAC7B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE;wBAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;qBACrB;iBACF;qBAAM;oBACL,UAAU,CAAC,MAAM,CAAC,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C,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC;;AAlLa,kBAAK,GAAG,CAAC,GAAG,EAAE;IAC1B,MAAM,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;IACjC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC,EAAE,CAAC;AAiLP,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js new file mode 100644 index 0000000..1292724 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js @@ -0,0 +1,26 @@ +import { getXHRResponse } from './getXHRResponse'; +export class AjaxResponse { + constructor(originalEvent, xhr, request, type = 'download_load') { + this.originalEvent = originalEvent; + this.xhr = xhr; + this.request = request; + this.type = type; + const { status, responseType } = xhr; + this.status = status !== null && status !== void 0 ? status : 0; + this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; + const allHeaders = xhr.getAllResponseHeaders(); + this.responseHeaders = allHeaders + ? + allHeaders.split('\n').reduce((headers, line) => { + const index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) + : {}; + this.response = getXHRResponse(xhr); + const { loaded, total } = originalEvent; + this.loaded = loaded; + this.total = total; + } +} +//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map new file mode 100644 index 0000000..6784324 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBlD,MAAM,OAAO,YAAY;IA+CvB,YAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,OAAyB,eAAe;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAExD,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,MAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,OAA+B,EAAE,IAAI,EAAE,EAAE;oBAItE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js new file mode 100644 index 0000000..b5df317 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js @@ -0,0 +1,236 @@ +import { map } from '../operators/map'; +import { Observable } from '../Observable'; +import { AjaxResponse } from './AjaxResponse'; +import { AjaxTimeoutError, AjaxError } from './errors'; +function ajaxGet(url, headers) { + return ajax({ method: 'GET', url, headers }); +} +function ajaxPost(url, body, headers) { + return ajax({ method: 'POST', url, body, headers }); +} +function ajaxDelete(url, headers) { + return ajax({ method: 'DELETE', url, headers }); +} +function ajaxPut(url, body, headers) { + return ajax({ method: 'PUT', url, body, headers }); +} +function ajaxPatch(url, body, headers) { + return ajax({ method: 'PATCH', url, body, headers }); +} +const mapResponse = map((x) => x.response); +function ajaxGetJSON(url, headers) { + return mapResponse(ajax({ + method: 'GET', + url, + headers, + })); +} +export const ajax = (() => { + const create = (urlOrConfig) => { + const config = typeof urlOrConfig === 'string' + ? { + url: urlOrConfig, + } + : urlOrConfig; + return fromAjax(config); + }; + create.get = ajaxGet; + create.post = ajaxPost; + create.delete = ajaxDelete; + create.put = ajaxPut; + create.patch = ajaxPatch; + create.getJSON = ajaxGetJSON; + return create; +})(); +const UPLOAD = 'upload'; +const DOWNLOAD = 'download'; +const LOADSTART = 'loadstart'; +const PROGRESS = 'progress'; +const LOAD = 'load'; +export function fromAjax(init) { + return new Observable((destination) => { + var _a, _b; + const config = Object.assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); + const { queryParams, body: configuredBody, headers: configuredHeaders } = config; + let url = config.url; + if (!url) { + throw new TypeError('url is required'); + } + if (queryParams) { + let searchParams; + if (url.includes('?')) { + const parts = url.split('?'); + if (2 < parts.length) { + throw new TypeError('invalid url'); + } + searchParams = new URLSearchParams(parts[1]); + new URLSearchParams(queryParams).forEach((value, key) => searchParams.set(key, value)); + url = parts[0] + '?' + searchParams; + } + else { + searchParams = new URLSearchParams(queryParams); + url = url + '?' + searchParams; + } + } + const headers = {}; + if (configuredHeaders) { + for (const key in configuredHeaders) { + if (configuredHeaders.hasOwnProperty(key)) { + headers[key.toLowerCase()] = configuredHeaders[key]; + } + } + } + const crossDomain = config.crossDomain; + if (!crossDomain && !('x-requested-with' in headers)) { + headers['x-requested-with'] = 'XMLHttpRequest'; + } + const { withCredentials, xsrfCookieName, xsrfHeaderName } = config; + if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { + const xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp(`(^|;\\s*)(${xsrfCookieName})=([^;]*)`))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; + if (xsrfCookie) { + headers[xsrfHeaderName] = xsrfCookie; + } + } + const body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); + const _request = Object.assign(Object.assign({}, config), { url, + headers, + body }); + let xhr; + xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); + { + const { progressSubscriber, includeDownloadProgress = false, includeUploadProgress = false } = init; + const addErrorEvent = (type, errorFactory) => { + xhr.addEventListener(type, () => { + var _a; + const error = errorFactory(); + (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, error); + destination.error(error); + }); + }; + addErrorEvent('timeout', () => new AjaxTimeoutError(xhr, _request)); + addErrorEvent('abort', () => new AjaxError('aborted', xhr, _request)); + const createResponse = (direction, event) => new AjaxResponse(event, xhr, _request, `${direction}_${event.type}`); + const addProgressEvent = (target, type, direction) => { + target.addEventListener(type, (event) => { + destination.next(createResponse(direction, event)); + }); + }; + if (includeUploadProgress) { + [LOADSTART, PROGRESS, LOAD].forEach((type) => addProgressEvent(xhr.upload, type, UPLOAD)); + } + if (progressSubscriber) { + [LOADSTART, PROGRESS].forEach((type) => xhr.upload.addEventListener(type, (e) => { var _a; return (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e); })); + } + if (includeDownloadProgress) { + [LOADSTART, PROGRESS].forEach((type) => addProgressEvent(xhr, type, DOWNLOAD)); + } + const emitError = (status) => { + const msg = 'ajax error' + (status ? ' ' + status : ''); + destination.error(new AjaxError(msg, xhr, _request)); + }; + xhr.addEventListener('error', (e) => { + var _a; + (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e); + emitError(); + }); + xhr.addEventListener(LOAD, (event) => { + var _a, _b; + const { status } = xhr; + if (status < 400) { + (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber); + let response; + try { + response = createResponse(DOWNLOAD, event); + } + catch (err) { + destination.error(err); + return; + } + destination.next(response); + destination.complete(); + } + else { + (_b = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber, event); + emitError(status); + } + }); + } + const { user, method, async } = _request; + if (user) { + xhr.open(method, url, async, user, _request.password); + } + else { + xhr.open(method, url, async); + } + if (async) { + xhr.timeout = _request.timeout; + xhr.responseType = _request.responseType; + } + if ('withCredentials' in xhr) { + xhr.withCredentials = _request.withCredentials; + } + for (const key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + if (body) { + xhr.send(body); + } + else { + xhr.send(); + } + return () => { + if (xhr && xhr.readyState !== 4) { + xhr.abort(); + } + }; + }); +} +function extractContentTypeAndMaybeSerializeBody(body, headers) { + var _a; + if (!body || + typeof body === 'string' || + isFormData(body) || + isURLSearchParams(body) || + isArrayBuffer(body) || + isFile(body) || + isBlob(body) || + isReadableStream(body)) { + return body; + } + if (isArrayBufferView(body)) { + return body.buffer; + } + if (typeof body === 'object') { + headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; + return JSON.stringify(body); + } + throw new TypeError('Unknown body type'); +} +const _toString = Object.prototype.toString; +function toStringCheck(obj, name) { + return _toString.call(obj) === `[object ${name}]`; +} +function isArrayBuffer(body) { + return toStringCheck(body, 'ArrayBuffer'); +} +function isFile(body) { + return toStringCheck(body, 'File'); +} +function isBlob(body) { + return toStringCheck(body, 'Blob'); +} +function isArrayBufferView(body) { + return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); +} +function isFormData(body) { + return typeof FormData !== 'undefined' && body instanceof FormData; +} +function isURLSearchParams(body) { + return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; +} +function isReadableStream(body) { + return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; +} +//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map new file mode 100644 index 0000000..b4f8c35 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GA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AC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/errors.js b/node_modules/rxjs/dist/esm/internal/ajax/errors.js new file mode 100644 index 0000000..6b5c43d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/errors.js @@ -0,0 +1,28 @@ +import { getXHRResponse } from './getXHRResponse'; +import { createErrorClass } from '../util/createErrorClass'; +export const AjaxError = createErrorClass((_super) => function AjaxErrorImpl(message, xhr, request) { + this.message = message; + this.name = 'AjaxError'; + this.xhr = xhr; + this.request = request; + this.status = xhr.status; + this.responseType = xhr.responseType; + let response; + try { + response = getXHRResponse(xhr); + } + catch (err) { + response = xhr.responseText; + } + this.response = response; +}); +export const AjaxTimeoutError = (() => { + function AjaxTimeoutErrorImpl(xhr, request) { + AjaxError.call(this, 'ajax timeout', xhr, request); + this.name = 'AjaxTimeoutError'; + return this; + } + AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); + return AjaxTimeoutErrorImpl; +})(); +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map b/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map new file mode 100644 index 0000000..285981b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AACA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ist/esm/internal/ajax/getXHRResponse.js new file mode 100644 index 0000000..9f947fd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js @@ -0,0 +1,26 @@ +export function getXHRResponse(xhr) { + switch (xhr.responseType) { + case 'json': { + if ('response' in xhr) { + return xhr.response; + } + else { + const ieXHR = xhr; + return JSON.parse(ieXHR.responseText); + } + } + case 'document': + return xhr.responseXML; + case 'text': + default: { + if ('response' in xhr) { + return xhr.response; + } + else { + const ieXHR = xhr; + return ieXHR.responseText; + } + } + } +} +//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map new file mode 100644 index 0000000..f9fdf68 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,MAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,MAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/types.js b/node_modules/rxjs/dist/esm/internal/ajax/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/types.js.map b/node_modules/rxjs/dist/esm/internal/ajax/types.js.map new file mode 100644 index 0000000..f08bdb1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/ajax/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/config.js b/node_modules/rxjs/dist/esm/internal/config.js new file mode 100644 index 0000000..07906c2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/config.js @@ -0,0 +1,8 @@ +export const config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, +}; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/config.js.map b/node_modules/rxjs/dist/esm/internal/config.js.map new file mode 100644 index 0000000..fd7b0e1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js new file mode 100644 index 0000000..26c8b9f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js @@ -0,0 +1,24 @@ +import { EmptyError } from './util/EmptyError'; +import { SafeSubscriber } from './Subscriber'; +export function firstValueFrom(source, config) { + const hasConfig = typeof config === 'object'; + return new Promise((resolve, reject) => { + const subscriber = new SafeSubscriber({ + next: (value) => { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: () => { + if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); +} +//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map new file mode 100644 index 0000000..4e16bc7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js new file mode 100644 index 0000000..90b7bc3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js @@ -0,0 +1,27 @@ +import { EmptyError } from './util/EmptyError'; +export function lastValueFrom(source, config) { + const hasConfig = typeof config === 'object'; + return new Promise((resolve, reject) => { + let _hasValue = false; + let _value; + source.subscribe({ + next: (value) => { + _value = value; + _hasValue = true; + }, + error: reject, + complete: () => { + if (_hasValue) { + resolve(_value); + } + else if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + }); +} +//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map new file mode 100644 index 0000000..f9e72ac --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoD/C,MAAM,UAAU,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js new file mode 100644 index 0000000..0d7c10e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js @@ -0,0 +1,57 @@ +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { refCount as higherOrderRefCount } from '../operators/refCount'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { hasLift } from '../util/lift'; +export class ConnectableObservable extends Observable { + constructor(source, subjectFactory) { + super(); + this.source = source; + this.subjectFactory = subjectFactory; + this._subject = null; + this._refCount = 0; + this._connection = null; + if (hasLift(source)) { + this.lift = source.lift; + } + } + _subscribe(subscriber) { + return this.getSubject().subscribe(subscriber); + } + getSubject() { + const subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + } + _teardown() { + this._refCount = 0; + const { _connection } = this; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + } + connect() { + let connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription(); + const subject = this.getSubject(); + connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => { + this._teardown(); + subject.complete(); + }, (err) => { + this._teardown(); + subject.error(err); + }, () => this._teardown()))); + if (connection.closed) { + this._connection = null; + connection = Subscription.EMPTY; + } + } + return connection; + } + refCount() { + return higherOrderRefCount()(this); + } +} +//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map new file mode 100644 index 0000000..74fe4e9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AASvC,MAAM,OAAO,qBAAyB,SAAQ,UAAa;IAgBzD,YAAmB,MAAqB,EAAY,cAAgC;QAClF,KAAK,EAAE,CAAC;QADS,WAAM,GAAN,MAAM,CAAe;QAAY,mBAAc,GAAd,cAAc,CAAkB;QAf1E,aAAQ,GAAsB,IAAI,CAAC;QACnC,cAAS,GAAW,CAAC,CAAC;QACtB,gBAAW,GAAwB,IAAI,CAAC;QAkBhD,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;SACzB;IACH,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAES,UAAU;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QA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I,CAAkB,CAAC;IACtD,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js new file mode 100644 index 0000000..0f730ac --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js @@ -0,0 +1,5 @@ +import { bindCallbackInternals } from './bindCallbackInternals'; +export function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); +} +//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map new file mode 100644 index 0000000..5b6af6f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAuIhE,MAAM,UAAU,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js new file mode 100644 index 0000000..79015c5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js @@ -0,0 +1,62 @@ +import { isScheduler } from '../util/isScheduler'; +import { Observable } from '../Observable'; +import { subscribeOn } from '../operators/subscribeOn'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { observeOn } from '../operators/observeOn'; +import { AsyncSubject } from '../AsyncSubject'; +export function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function (...args) { + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + .apply(this, args) + .pipe(mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function (...args) { + return bindCallbackInternals(isNodeStyle, callbackFunc) + .apply(this, args) + .pipe(subscribeOn(scheduler), observeOn(scheduler)); + }; + } + return function (...args) { + const subject = new AsyncSubject(); + let uninitialized = true; + return new Observable((subscriber) => { + const subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + let isAsync = false; + let isComplete = false; + callbackFunc.apply(this, [ + ...args, + (...results) => { + if (isNodeStyle) { + const err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete = true; + if (isAsync) { + subject.complete(); + } + }, + ]); + if (isComplete) { + subject.complete(); + } + isAsync = true; + } + return subs; + }); + }; +} +//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map new file mode 100644 index 0000000..7f87da0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,q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IAAI,IAAI,EAAE;gCACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gCAGnB,OAAO;6BACR;yBACF;wBAKD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,UAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,OAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;iBACF,CACF,CAAC;gBAIF,IAAI,UAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,OAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js new file mode 100644 index 0000000..e8fbf53 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js @@ -0,0 +1,5 @@ +import { bindCallbackInternals } from './bindCallbackInternals'; +export function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); +} +//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map new file mode 100644 index 0000000..81e4887 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAsHhE,MAAM,UAAU,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js new file mode 100644 index 0000000..f5d10fd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js @@ -0,0 +1,62 @@ +import { Observable } from '../Observable'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { from } from './from'; +import { identity } from '../util/identity'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { popResultSelector, popScheduler } from '../util/args'; +import { createObject } from '../util/createObject'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { executeSchedule } from '../util/executeSchedule'; +export function combineLatest(...args) { + const scheduler = popScheduler(args); + const resultSelector = popResultSelector(args); + const { args: observables, keys } = argsArgArrayOrObject(args); + if (observables.length === 0) { + return from([], scheduler); + } + const result = new Observable(combineLatestInit(observables, scheduler, keys + ? + (values) => createObject(keys, values) + : + identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; +} +export function combineLatestInit(observables, scheduler, valueTransform = identity) { + return (subscriber) => { + maybeSchedule(scheduler, () => { + const { length } = observables; + const values = new Array(length); + let active = length; + let remainingFirstValues = length; + for (let i = 0; i < length; i++) { + maybeSchedule(scheduler, () => { + const source = from(observables[i], scheduler); + let hasFirstValue = false; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, () => { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + } + }, subscriber); + }; +} +function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule(subscription, scheduler, execute); + } + else { + execute(); + } +} +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map new file mode 100644 index 0000000..400b7d7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4L1D,MAAM,UAAU,aAAa,CAAoC,GAAG,IAAW;IAC7E,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,IAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,MAAM,MAAM,GAAG,IAAI,UAAU,CAC3B,iBAAiB,CACf,WAAoD,EACpD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D,GAAG,EAAE;wBACH,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;aACH;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/concat.js b/node_modules/rxjs/dist/esm/internal/observable/concat.js new file mode 100644 index 0000000..f2706e0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/concat.js @@ -0,0 +1,7 @@ +import { concatAll } from '../operators/concatAll'; +import { popScheduler } from '../util/args'; +import { from } from './from'; +export function concat(...args) { + return concatAll()(from(args, popScheduler(args))); +} +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/concat.js.map b/node_modules/rxjs/dist/esm/internal/observable/concat.js.map new file mode 100644 index 0000000..40fe68c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4G9B,MAAM,UAAU,MAAM,CAAC,GAAG,IAAW;IACnC,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/connectable.js b/node_modules/rxjs/dist/esm/internal/observable/connectable.js new file mode 100644 index 0000000..c4cb530 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/connectable.js @@ -0,0 +1,26 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { defer } from './defer'; +const DEFAULT_CONFIG = { + connector: () => new Subject(), + resetOnDisconnect: true, +}; +export function connectable(source, config = DEFAULT_CONFIG) { + let connection = null; + const { connector, resetOnDisconnect = true } = config; + let subject = connector(); + const result = new Observable((subscriber) => { + return subject.subscribe(subscriber); + }); + result.connect = () => { + if (!connection || connection.closed) { + connection = defer(() => source).subscribe(subject); + if (resetOnDisconnect) { + connection.add(() => (subject = connector())); + } + } + return connection; + }; + return result; +} +//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map b/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map new file mode 100644 index 0000000..0721330 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAsBhC,MAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAW;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,MAAM,UAAU,WAAW,CAAI,MAA0B,EAAE,SAA+B,cAAc;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IAC3C,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,MAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACnD,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;QACpB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/defer.js b/node_modules/rxjs/dist/esm/internal/observable/defer.js new file mode 100644 index 0000000..0dd47a3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/defer.js @@ -0,0 +1,8 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +export function defer(observableFactory) { + return new Observable((subscriber) => { + innerFrom(observableFactory()).subscribe(subscriber); + }); +} +//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/defer.js.map b/node_modules/rxjs/dist/esm/internal/observable/defer.js.map new file mode 100644 index 0000000..e597bf2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/defer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkDxC,MAAM,UAAU,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,UAAU,CAAqB,CAAC,UAAU,EAAE,EAAE;QACvD,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js new file mode 100644 index 0000000..7a61722 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js @@ -0,0 +1,214 @@ +import { Subject, AnonymousSubject } from '../../Subject'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { ReplaySubject } from '../../ReplaySubject'; +const DEFAULT_WEBSOCKET_CONFIG = { + url: '', + deserializer: (e) => JSON.parse(e.data), + serializer: (value) => JSON.stringify(value), +}; +const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +export class WebSocketSubject extends AnonymousSubject { + constructor(urlConfigOrSource, destination) { + super(); + this._socket = null; + if (urlConfigOrSource instanceof Observable) { + this.destination = destination; + this.source = urlConfigOrSource; + } + else { + const config = (this._config = Object.assign({}, DEFAULT_WEBSOCKET_CONFIG)); + this._output = new Subject(); + if (typeof urlConfigOrSource === 'string') { + config.url = urlConfigOrSource; + } + else { + for (const key in urlConfigOrSource) { + if (urlConfigOrSource.hasOwnProperty(key)) { + config[key] = urlConfigOrSource[key]; + } + } + } + if (!config.WebSocketCtor && WebSocket) { + config.WebSocketCtor = WebSocket; + } + else if (!config.WebSocketCtor) { + throw new Error('no WebSocket constructor can be found'); + } + this.destination = new ReplaySubject(); + } + } + lift(operator) { + const sock = new WebSocketSubject(this._config, this.destination); + sock.operator = operator; + sock.source = this; + return sock; + } + _resetState() { + this._socket = null; + if (!this.source) { + this.destination = new ReplaySubject(); + } + this._output = new Subject(); + } + multiplex(subMsg, unsubMsg, messageFilter) { + const self = this; + return new Observable((observer) => { + try { + self.next(subMsg()); + } + catch (err) { + observer.error(err); + } + const subscription = self.subscribe({ + next: (x) => { + try { + if (messageFilter(x)) { + observer.next(x); + } + } + catch (err) { + observer.error(err); + } + }, + error: (err) => observer.error(err), + complete: () => observer.complete(), + }); + return () => { + try { + self.next(unsubMsg()); + } + catch (err) { + observer.error(err); + } + subscription.unsubscribe(); + }; + }); + } + _connectSocket() { + const { WebSocketCtor, protocol, url, binaryType } = this._config; + const observer = this._output; + let socket = null; + try { + socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + this._socket = socket; + if (binaryType) { + this._socket.binaryType = binaryType; + } + } + catch (e) { + observer.error(e); + return; + } + const subscription = new Subscription(() => { + this._socket = null; + if (socket && socket.readyState === 1) { + socket.close(); + } + }); + socket.onopen = (evt) => { + const { _socket } = this; + if (!_socket) { + socket.close(); + this._resetState(); + return; + } + const { openObserver } = this._config; + if (openObserver) { + openObserver.next(evt); + } + const queue = this.destination; + this.destination = Subscriber.create((x) => { + if (socket.readyState === 1) { + try { + const { serializer } = this._config; + socket.send(serializer(x)); + } + catch (e) { + this.destination.error(e); + } + } + }, (err) => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); + } + if (err && err.code) { + socket.close(err.code, err.reason); + } + else { + observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); + } + this._resetState(); + }, () => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + this._resetState(); + }); + if (queue && queue instanceof ReplaySubject) { + subscription.add(queue.subscribe(this.destination)); + } + }; + socket.onerror = (e) => { + this._resetState(); + observer.error(e); + }; + socket.onclose = (e) => { + if (socket === this._socket) { + this._resetState(); + } + const { closeObserver } = this._config; + if (closeObserver) { + closeObserver.next(e); + } + if (e.wasClean) { + observer.complete(); + } + else { + observer.error(e); + } + }; + socket.onmessage = (e) => { + try { + const { deserializer } = this._config; + observer.next(deserializer(e)); + } + catch (err) { + observer.error(err); + } + }; + } + _subscribe(subscriber) { + const { source } = this; + if (source) { + return source.subscribe(subscriber); + } + if (!this._socket) { + this._connectSocket(); + } + this._output.subscribe(subscriber); + subscriber.add(() => { + const { _socket } = this; + if (this._output.observers.length === 0) { + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + } + }); + return subscriber; + } + unsubscribe() { + const { _socket } = this; + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + super.unsubscribe(); + } +} +//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map new file mode 100644 index 0000000..0a1ef94 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4IpD,MAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,CAAC,CAAe,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,UAAU,EAAE,CAAC,KAAU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,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;QACD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YACzB,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;oBACrE,OAAO,CAAC,KAAK,EAAE,CAAC;iBACjB;gBACD,IAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,WAAW;QACT,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,KAAK,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js new file mode 100644 index 0000000..d29825f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js @@ -0,0 +1,34 @@ +import { Observable } from '../../Observable'; +import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; +export function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; +} +function animationFramesFactory(timestampProvider) { + return new Observable((subscriber) => { + const provider = timestampProvider || performanceTimestampProvider; + const start = provider.now(); + let id = 0; + const run = () => { + if (!subscriber.closed) { + id = animationFrameProvider.requestAnimationFrame((timestamp) => { + id = 0; + const now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + run(); + return () => { + if (id) { + animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); +} +const DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); +//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map new file mode 100644 index 0000000..56c16cd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAuEhF,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,UAAU,CAAyC,CAAC,UAAU,EAAE,EAAE;QAI3E,MAAM,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;QAMnE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,MAAM,GAAG,GAAG,GAAG,EAAE;YACf,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC,SAAuC,EAAE,EAAE;oBAC5F,EAAE,GAAG,CAAC,CAAC;oBAQP,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO,GAAG,EAAE;YACV,IAAI,EAAE,EAAE;gBACN,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,MAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js new file mode 100644 index 0000000..48b0af3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js @@ -0,0 +1,53 @@ +import { __rest } from "tslib"; +import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; +import { Observable } from '../../Observable'; +import { innerFrom } from '../../observable/innerFrom'; +export function fromFetch(input, initWithSelector = {}) { + const { selector } = initWithSelector, init = __rest(initWithSelector, ["selector"]); + return new Observable((subscriber) => { + const controller = new AbortController(); + const { signal } = controller; + let abortable = true; + const { signal: outerSignal } = init; + if (outerSignal) { + if (outerSignal.aborted) { + controller.abort(); + } + else { + const outerSignalHandler = () => { + if (!signal.aborted) { + controller.abort(); + } + }; + outerSignal.addEventListener('abort', outerSignalHandler); + subscriber.add(() => outerSignal.removeEventListener('abort', outerSignalHandler)); + } + } + const perSubscriberInit = Object.assign(Object.assign({}, init), { signal }); + const handleError = (err) => { + abortable = false; + subscriber.error(err); + }; + fetch(input, perSubscriberInit) + .then((response) => { + if (selector) { + innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, () => { + abortable = false; + subscriber.complete(); + }, handleError)); + } + else { + abortable = false; + subscriber.next(response); + subscriber.complete(); + } + }) + .catch(handleError); + return () => { + if (abortable) { + controller.abort(); + } + }; + }); +} +//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map new file mode 100644 index 0000000..1418334 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AA4FvD,MAAM,UAAU,SAAS,CACvB,KAAuB,EACvB,mBAEI,EAAE;IAEN,MAAM,EAAE,QAAQ,KAAc,gBAAgB,EAAzB,IAAI,UAAK,gBAAgB,EAAxC,YAAqB,CAAmB,CAAC;IAC/C,OAAO,IAAI,UAAU,CAAe,CAAC,UAAU,EAAE,EAAE;QAKjD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;QAK9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAKrB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QACrC,IAAI,WAAW,EAAE;YACf,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;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No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js new file mode 100644 index 0000000..73a51ab --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js @@ -0,0 +1,5 @@ +import { WebSocketSubject } from './WebSocketSubject'; +export function webSocket(urlConfigOrSource) { + return new WebSocketSubject(urlConfigOrSource); +} +//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map new file mode 100644 index 0000000..ab58e40 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AA+J9E,MAAM,UAAU,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,gBAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/empty.js b/node_modules/rxjs/dist/esm/internal/observable/empty.js new file mode 100644 index 0000000..13be736 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/empty.js @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +export const EMPTY = new Observable((subscriber) => subscriber.complete()); +export function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; +} +function emptyScheduled(scheduler) { + return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete())); +} +//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/empty.js.map b/node_modules/rxjs/dist/esm/internal/observable/empty.js.map new file mode 100644 index 0000000..8eb1e1f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiE3C,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AAOlF,MAAM,UAAU,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,UAAU,CAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js new file mode 100644 index 0000000..fe5b095 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js @@ -0,0 +1,40 @@ +import { Observable } from '../Observable'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { innerFrom } from './innerFrom'; +import { popResultSelector } from '../util/args'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { createObject } from '../util/createObject'; +export function forkJoin(...args) { + const resultSelector = popResultSelector(args); + const { args: sources, keys } = argsArgArrayOrObject(args); + const result = new Observable((subscriber) => { + const { length } = sources; + if (!length) { + subscriber.complete(); + return; + } + const values = new Array(length); + let remainingCompletions = length; + let remainingEmissions = length; + for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { + let hasValue = false; + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, () => remainingCompletions--, undefined, () => { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; +} +//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map new file mode 100644 index 0000000..ee1d5c1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA2IpD,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;QAChC,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;gBACR,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,GAAG,EAAE,CAAC,oBAAoB,EAAE,EAC5B,SAAS,EACT,GAAG,EAAE;gBACH,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/from.js b/node_modules/rxjs/dist/esm/internal/observable/from.js new file mode 100644 index 0000000..2b61be4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/from.js @@ -0,0 +1,6 @@ +import { scheduled } from '../scheduled/scheduled'; +import { innerFrom } from './innerFrom'; +export function from(input, scheduler) { + return scheduler ? scheduled(input, scheduler) : innerFrom(input); +} +//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/from.js.map b/node_modules/rxjs/dist/esm/internal/observable/from.js.map new file mode 100644 index 0000000..baf621f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/from.js.map @@ -0,0 +1 @@ +{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkGxC,MAAM,UAAU,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js new file mode 100644 index 0000000..fbb95c9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js @@ -0,0 +1,52 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Observable } from '../Observable'; +import { mergeMap } from '../operators/mergeMap'; +import { isArrayLike } from '../util/isArrayLike'; +import { isFunction } from '../util/isFunction'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +const nodeEventEmitterMethods = ['addListener', 'removeListener']; +const eventTargetMethods = ['addEventListener', 'removeEventListener']; +const jqueryMethods = ['on', 'off']; +export function fromEvent(target, eventName, options, resultSelector) { + if (isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); + } + const [add, remove] = isEventTarget(target) + ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options)) + : + isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : []; + if (!add) { + if (isArrayLike(target)) { + return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new Observable((subscriber) => { + const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]); + add(handler); + return () => remove(handler); + }); +} +function toCommonHandlerRegistry(target, eventName) { + return (methodName) => (handler) => target[methodName](eventName, handler); +} +function isNodeStyleEventEmitter(target) { + return isFunction(target.addListener) && isFunction(target.removeListener); +} +function isJQueryStyleEventEmitter(target) { + return isFunction(target.on) && isFunction(target.off); +} +function isEventTarget(target) { + return isFunction(target.addEventListener) && isFunction(target.removeEventListener); +} +//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map new file mode 100644 index 0000000..21d63fb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,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ern.js b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js new file mode 100644 index 0000000..6ec311b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js @@ -0,0 +1,14 @@ +import { Observable } from '../Observable'; +import { isFunction } from '../util/isFunction'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +export function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); + } + return new Observable((subscriber) => { + const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e); + const retValue = addHandler(handler); + return isFunction(removeHandler) ? () => removeHandler(handler, retValue) : undefined; + }); +} +//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map new file mode 100644 index 0000000..704d0e9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAyI5D,MAAM,UAAU,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,UAAU,CAAU,CAAC,UAAU,EAAE,EAAE;QAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,CAAM,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js new file mode 100644 index 0000000..bfc7c8c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +export function fromSubscribable(subscribable) { + return new Observable((subscriber) => subscribable.subscribe(subscriber)); +} +//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map new file mode 100644 index 0000000..0725366 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/generate.js b/node_modules/rxjs/dist/esm/internal/observable/generate.js new file mode 100644 index 0000000..4d709c7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/generate.js @@ -0,0 +1,38 @@ +import { identity } from '../util/identity'; +import { isScheduler } from '../util/isScheduler'; +import { defer } from './defer'; +import { scheduleIterable } from '../scheduled/scheduleIterable'; +export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + let resultSelector; + let initialState; + if (arguments.length === 1) { + ({ + initialState, + condition, + iterate, + resultSelector = identity, + scheduler, + } = initialStateOrOptions); + } + else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity; + scheduler = resultSelectorOrScheduler; + } + else { + resultSelector = resultSelectorOrScheduler; + } + } + function* gen() { + for (let state = initialState; !condition || condition(state); state = iterate(state)) { + yield resultSelector(state); + } + } + return defer((scheduler + ? + () => scheduleIterable(gen(), scheduler) + : + gen)); +} +//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/generate.js.map b/node_modules/rxjs/dist/esm/internal/observable/generate.js.map new file mode 100644 index 0000000..a9f9d78 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/generate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAuUjE,MAAM,UAAU,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC;YACC,YAAY;YACZ,SAAS;YACT,OAAO;YACP,cAAc,GAAG,QAA4B;YAC7C,SAAS;SACV,GAAG,qBAA8C,CAAC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,WAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,QAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,QAAQ,CAAC,CAAC,GAAG;QACX,KAAK,IAAI,KAAK,GAAG,YAAY,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,EAAE;YACtF,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC;IAGD,OAAO,KAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,GAAG,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/iif.js b/node_modules/rxjs/dist/esm/internal/observable/iif.js new file mode 100644 index 0000000..8a204d6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/iif.js @@ -0,0 +1,5 @@ +import { defer } from './defer'; +export function iif(condition, trueResult, falseResult) { + return defer(() => (condition() ? trueResult : falseResult)); +} +//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/iif.js.map b/node_modules/rxjs/dist/esm/internal/observable/iif.js.map new file mode 100644 index 0000000..a175051 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/iif.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiFhC,MAAM,UAAU,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js new file mode 100644 index 0000000..f315ce5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js @@ -0,0 +1,110 @@ +import { __asyncValues, __awaiter } from "tslib"; +import { isArrayLike } from '../util/isArrayLike'; +import { isPromise } from '../util/isPromise'; +import { Observable } from '../Observable'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isIterable } from '../util/isIterable'; +import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; +import { isFunction } from '../util/isFunction'; +import { reportUnhandledError } from '../util/reportUnhandledError'; +import { observable as Symbol_observable } from '../symbol/observable'; +export function innerFrom(input) { + if (input instanceof Observable) { + return input; + } + if (input != null) { + if (isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw createInvalidObservableTypeError(input); +} +export function fromInteropObservable(obj) { + return new Observable((subscriber) => { + const obs = obj[Symbol_observable](); + if (isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} +export function fromArrayLike(array) { + return new Observable((subscriber) => { + for (let i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} +export function fromPromise(promise) { + return new Observable((subscriber) => { + promise + .then((value) => { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, (err) => subscriber.error(err)) + .then(null, reportUnhandledError); + }); +} +export function fromIterable(iterable) { + return new Observable((subscriber) => { + for (const value of iterable) { + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + subscriber.complete(); + }); +} +export function fromAsyncIterable(asyncIterable) { + return new Observable((subscriber) => { + process(asyncIterable, subscriber).catch((err) => subscriber.error(err)); + }); +} +export function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); +} +function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_1, _a; + return __awaiter(this, void 0, void 0, function* () { + try { + for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) { + const value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }); +} +//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map new file mode 100644 index 0000000..69c1286 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA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L,CAAC;AAED,MAAM,UAAU,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;YAC5B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,OAAO;aACR;SACF;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;YAClF,KAA0B,kBAAA,cAAA,aAAa,CAAA;gBAA5B,MAAM,KAAK,0BAAA,CAAA;gBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;;CACvB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/interval.js b/node_modules/rxjs/dist/esm/internal/observable/interval.js new file mode 100644 index 0000000..6cec82a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/interval.js @@ -0,0 +1,9 @@ +import { asyncScheduler } from '../scheduler/async'; +import { timer } from './timer'; +export function interval(period = 0, scheduler = asyncScheduler) { + if (period < 0) { + period = 0; + } + return timer(period, period, scheduler); +} +//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/interval.js.map b/node_modules/rxjs/dist/esm/internal/observable/interval.js.map new file mode 100644 index 0000000..561565d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/interval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+ChC,MAAM,UAAU,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,YAA2B,cAAc;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/merge.js b/node_modules/rxjs/dist/esm/internal/observable/merge.js new file mode 100644 index 0000000..0275354 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/merge.js @@ -0,0 +1,19 @@ +import { mergeAll } from '../operators/mergeAll'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from './from'; +export function merge(...args) { + const scheduler = popScheduler(args); + const concurrent = popNumber(args, Infinity); + const sources = args; + return !sources.length + ? + EMPTY + : sources.length === 1 + ? + innerFrom(sources[0]) + : + mergeAll(concurrent)(from(sources, scheduler)); +} +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/merge.js.map b/node_modules/rxjs/dist/esm/internal/observable/merge.js.map new file mode 100644 index 0000000..54d8d93 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAmF9B,MAAM,UAAU,KAAK,CAAC,GAAG,IAA2D;IAClF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,KAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/never.js b/node_modules/rxjs/dist/esm/internal/observable/never.js new file mode 100644 index 0000000..ca45f75 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/never.js @@ -0,0 +1,7 @@ +import { Observable } from '../Observable'; +import { noop } from '../util/noop'; +export const NEVER = new Observable(noop); +export function never() { + return NEVER; +} +//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/never.js.map b/node_modules/rxjs/dist/esm/internal/observable/never.js.map new file mode 100644 index 0000000..7c323ad --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/never.js.map @@ -0,0 +1 @@ +{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAmCpC,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,IAAI,CAAC,CAAC;AAKjD,MAAM,UAAU,KAAK;IACnB,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/of.js b/node_modules/rxjs/dist/esm/internal/observable/of.js new file mode 100644 index 0000000..711d706 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/of.js @@ -0,0 +1,7 @@ +import { popScheduler } from '../util/args'; +import { from } from './from'; +export function of(...args) { + const scheduler = popScheduler(args); + return from(args, scheduler); +} +//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/of.js.map b/node_modules/rxjs/dist/esm/internal/observable/of.js.map new file mode 100644 index 0000000..97eb298 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/of.js.map @@ -0,0 +1 @@ +{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4E9B,MAAM,UAAU,EAAE,CAAI,GAAG,IAA8B;IACrD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js new file mode 100644 index 0000000..ef74377 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js @@ -0,0 +1,31 @@ +import { Observable } from '../Observable'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { OperatorSubscriber } from '../operators/OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from './innerFrom'; +export function onErrorResumeNext(...sources) { + const nextSources = argsOrArgArray(sources); + return new Observable((subscriber) => { + let sourceIndex = 0; + const subscribeNext = () => { + if (sourceIndex < nextSources.length) { + let nextSource; + try { + nextSource = innerFrom(nextSources[sourceIndex++]); + } + catch (err) { + subscribeNext(); + return; + } + const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } + else { + subscriber.complete(); + } + }; + subscribeNext(); + }); +} +//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map new file mode 100644 index 0000000..8c06865 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsExC,MAAM,UAAU,iBAAiB,CAC/B,GAAG,OAAsE;IAEzE,MAAM,WAAW,GAA4B,cAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAiC,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,MAAM,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/pairs.js b/node_modules/rxjs/dist/esm/internal/observable/pairs.js new file mode 100644 index 0000000..77cc110 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/pairs.js @@ -0,0 +1,5 @@ +import { from } from './from'; +export function pairs(obj, scheduler) { + return from(Object.entries(obj), scheduler); +} +//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map b/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map new file mode 100644 index 0000000..50c158e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6E9B,MAAM,UAAU,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/partition.js b/node_modules/rxjs/dist/esm/internal/observable/partition.js new file mode 100644 index 0000000..a5a7d48 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/partition.js @@ -0,0 +1,7 @@ +import { not } from '../util/not'; +import { filter } from '../operators/filter'; +import { innerFrom } from './innerFrom'; +export function partition(source, predicate, thisArg) { + return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; +} +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/partition.js.map b/node_modules/rxjs/dist/esm/internal/observable/partition.js.map new file mode 100644 index 0000000..7466104 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0ExC,MAAM,UAAU,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/race.js b/node_modules/rxjs/dist/esm/internal/observable/race.js new file mode 100644 index 0000000..c45a0ee --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/race.js @@ -0,0 +1,25 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +export function race(...sources) { + sources = argsOrArgArray(sources); + return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); +} +export function raceInit(sources) { + return (subscriber) => { + let subscriptions = []; + for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, (value) => { + if (subscriptions) { + for (let s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + } + }; +} +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/race.js.map b/node_modules/rxjs/dist/esm/internal/observable/race.js.map new file mode 100644 index 0000000..9df27c2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AA6C3E,MAAM,UAAU,IAAI,CAAI,GAAG,OAAsD;IAC/E,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAOD,MAAM,UAAU,QAAQ,CAAI,OAA6B;IACvD,OAAO,CAAC,UAAyB,EAAE,EAAE;QACnC,IAAI,aAAa,GAAmB,EAAE,CAAC;QAMvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9E,aAAa,CAAC,IAAI,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC7C,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;SACH;IACH,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/range.js b/node_modules/rxjs/dist/esm/internal/observable/range.js new file mode 100644 index 0000000..7ff311b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/range.js @@ -0,0 +1,35 @@ +import { Observable } from '../Observable'; +import { EMPTY } from './empty'; +export function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return EMPTY; + } + const end = count + start; + return new Observable(scheduler + ? + (subscriber) => { + let n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } + else { + subscriber.complete(); + } + }); + } + : + (subscriber) => { + let n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); +} +//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/range.js.map b/node_modules/rxjs/dist/esm/internal/observable/range.js.map new file mode 100644 index 0000000..d0edd52 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/range.js.map @@ -0,0 +1 @@ +{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAqDhC,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,KAAK,CAAC;KACd;IAGD,MAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,UAAU,CACnB,SAAS;QACP,CAAC;YACC,CAAC,UAAU,EAAE,EAAE;gBACb,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,CAAC,UAAU,EAAE,EAAE;gBACb,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/throwError.js b/node_modules/rxjs/dist/esm/internal/observable/throwError.js new file mode 100644 index 0000000..bf39a7e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/throwError.js @@ -0,0 +1,8 @@ +import { Observable } from '../Observable'; +import { isFunction } from '../util/isFunction'; +export function throwError(errorOrErrorFactory, scheduler) { + const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; + const init = (subscriber) => subscriber.error(errorFactory()); + return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init); +} +//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map b/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map new file mode 100644 index 0000000..931a747 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAqHhD,MAAM,UAAU,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,MAAM,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC;IACvG,MAAM,IAAI,GAAG,CAAC,UAA6B,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IACjF,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/timer.js b/node_modules/rxjs/dist/esm/internal/observable/timer.js new file mode 100644 index 0000000..088a051 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/timer.js @@ -0,0 +1,34 @@ +import { Observable } from '../Observable'; +import { async as asyncScheduler } from '../scheduler/async'; +import { isScheduler } from '../util/isScheduler'; +import { isValidDate } from '../util/isDate'; +export function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) { + let intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } + else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable((subscriber) => { + let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + let n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } + else { + subscriber.complete(); + } + } + }, due); + }); +} +//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/timer.js.map b/node_modules/rxjs/dist/esm/internal/observable/timer.js.map new file mode 100644 index 0000000..ba6ba75 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/timer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgI7C,MAAM,UAAU,KAAK,CACnB,UAAyB,CAAC,EAC1B,mBAA4C,EAC5C,YAA2B,cAAc;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAInC,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/using.js b/node_modules/rxjs/dist/esm/internal/observable/using.js new file mode 100644 index 0000000..ce38cd6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/using.js @@ -0,0 +1,17 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; +export function using(resourceFactory, observableFactory) { + return new Observable((subscriber) => { + const resource = resourceFactory(); + const result = observableFactory(resource); + const source = result ? innerFrom(result) : EMPTY; + source.subscribe(subscriber); + return () => { + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/using.js.map b/node_modules/rxjs/dist/esm/internal/observable/using.js.map new file mode 100644 index 0000000..66ad8df --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/using.js.map @@ -0,0 +1 @@ +{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8BhC,MAAM,UAAU,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,UAAU,CAAqB,CAAC,UAAU,EAAE,EAAE;QACvD,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YAGV,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/zip.js b/node_modules/rxjs/dist/esm/internal/observable/zip.js new file mode 100644 index 0000000..ed4487b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/zip.js @@ -0,0 +1,38 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { EMPTY } from './empty'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { popResultSelector } from '../util/args'; +export function zip(...args) { + const resultSelector = popResultSelector(args); + const sources = argsOrArgArray(args); + return sources.length + ? new Observable((subscriber) => { + let buffers = sources.map(() => []); + let completed = sources.map(() => false); + subscriber.add(() => { + buffers = completed = null; + }); + for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => { + buffers[sourceIndex].push(value); + if (buffers.every((buffer) => buffer.length)) { + const result = buffers.map((buffer) => buffer.shift()); + subscriber.next(resultSelector ? resultSelector(...result) : result); + if (buffers.some((buffer, i) => !buffer.length && completed[i])) { + subscriber.complete(); + } + } + }, () => { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && subscriber.complete(); + })); + } + return () => { + buffers = completed = null; + }; + }) + : EMPTY; +} +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/zip.js.map b/node_modules/rxjs/dist/esm/internal/observable/zip.js.map new file mode 100644 index 0000000..9e5dffb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/observable/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA4CjD,MAAM,UAAU,GAAG,CAAC,GAAG,IAAe;IACpC,MAAM,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AAI,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD,GAAG,EAAE;oBAGH,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;aACH;YAGD,OAAO,GAAG,EAAE;gBACV,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js new file mode 100644 index 0000000..317373b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js @@ -0,0 +1,56 @@ +import { Subscriber } from '../Subscriber'; +export function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} +export class OperatorSubscriber extends Subscriber { + constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + super(destination); + this.onFinalize = onFinalize; + this.shouldUnsubscribe = shouldUnsubscribe; + this._next = onNext + ? function (value) { + try { + onNext(value); + } + catch (err) { + destination.error(err); + } + } + : super._next; + this._error = onError + ? function (err) { + try { + onError(err); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : super._error; + this._complete = onComplete + ? function () { + try { + onComplete(); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : super._complete; + } + unsubscribe() { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + const { closed } = this; + super.unsubscribe(); + !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + } +} +//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map new file mode 100644 index 0000000..c679c10 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,wBAAwB,CACtC,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EAC5B,UAAuB;IAEvB,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACtF,CAAC;AAMD,MAAM,OAAO,kBAAsB,SAAQ,UAAa;IAiBtD,YACE,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EACpB,UAAuB,EACvB,iBAAiC;QAczC,KAAK,CAAC,WAAW,CAAC,CAAC;QAfX,eAAU,GAAV,UAAU,CAAa;QACvB,sBAAiB,GAAjB,iBAAiB,CAAgB;QAezC,IAAI,CAAC,KAAK,GAAG,MAAM;YACjB,CAAC,CAAC,UAAuC,KAAQ;gBAC7C,IAAI;oBACF,MAAM,CAAC,KAAK,CAAC,CAAC;iBACf;gBAAC,OAAO,GAAG,EAAE;oBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,OAAO;YACnB,CAAC,CAAC,UAAuC,GAAQ;gBAC7C,IAAI;oBACF,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,UAAU;YACzB,CAAC,CAAC;gBACE,IAAI;oBACF,UAAU,EAAE,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;IACtB,CAAC;IAED,WAAW;;QACT,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YACvD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YACxB,KAAK,CAAC,WAAW,EAAE,CAAC;YAEpB,CAAC,MAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/audit.js b/node_modules/rxjs/dist/esm/internal/operators/audit.js new file mode 100644 index 0000000..22139a0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/audit.js @@ -0,0 +1,37 @@ +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function audit(durationSelector) { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue = null; + let durationSubscriber = null; + let isComplete = false; + const endDuration = () => { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + const cleanupDuration = () => { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); + } + }, () => { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/audit.js.map b/node_modules/rxjs/dist/esm/internal/operators/audit.js.map new file mode 100644 index 0000000..eac61f4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/audit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+ChE,MAAM,UAAU,KAAK,CAAI,gBAAoD;IAC3E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG,GAAG,EAAE;YAC3B,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js new file mode 100644 index 0000000..559f365 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js @@ -0,0 +1,7 @@ +import { asyncScheduler } from '../scheduler/async'; +import { audit } from './audit'; +import { timer } from '../observable/timer'; +export function auditTime(duration, scheduler = asyncScheduler) { + return audit(() => timer(duration, scheduler)); +} +//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map new file mode 100644 index 0000000..2f1f665 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkD5C,MAAM,UAAU,SAAS,CAAI,QAAgB,EAAE,YAA2B,cAAc;IACtF,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/buffer.js b/node_modules/rxjs/dist/esm/internal/operators/buffer.js new file mode 100644 index 0000000..bdce480 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/buffer.js @@ -0,0 +1,22 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function buffer(closingNotifier) { + return operate((source, subscriber) => { + let currentBuffer = []; + source.subscribe(createOperatorSubscriber(subscriber, (value) => currentBuffer.push(value), () => { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => { + const b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop)); + return () => { + currentBuffer = null; + }; + }); +} +//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map b/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map new file mode 100644 index 0000000..5633ca3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,MAAM,CAAI,eAAqC;IAC7D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EACpC,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,SAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YAEH,MAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,OAAO,GAAG,EAAE;YAEV,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js new file mode 100644 index 0000000..2cf2880 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js @@ -0,0 +1,37 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +export function bufferCount(bufferSize, startBufferEvery = null) { + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return operate((source, subscriber) => { + let buffers = []; + let count = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + let toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + for (const buffer of buffers) { + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + if (toEmit) { + for (const buffer of toEmit) { + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + }, () => { + for (const buffer of buffers) { + subscriber.next(buffer); + } + subscriber.complete(); + }, undefined, () => { + buffers = null; + })); + }); +} +//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map new file mode 100644 index 0000000..713be10 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAqD9C,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,mBAAkC,IAAI;IAGvF,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,UAAU,CAAC;IAElD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,OAAO,GAAU,EAAE,CAAC;QACxB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,MAAM,GAAiB,IAAI,CAAC;YAKhC,IAAI,KAAK,EAAE,GAAG,gBAAiB,KAAK,CAAC,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAClB;YAGD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAMnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;oBAC/B,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;oBACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACrB;aACF;YAED,IAAI,MAAM,EAAE;gBAIV,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE;oBAC3B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACzB;aACF;QACH,CAAC,EACD,GAAG,EAAE;YAGH,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACzB;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js new file mode 100644 index 0000000..f5b61b0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js @@ -0,0 +1,61 @@ +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { asyncScheduler } from '../scheduler/async'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; +export function bufferTime(bufferTimeSpan, ...otherArgs) { + var _a, _b; + const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + const bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + const maxBufferSize = otherArgs[1] || Infinity; + return operate((source, subscriber) => { + let bufferRecords = []; + let restartOnEmit = false; + const emit = (record) => { + const { buffer, subs } = record; + subs.unsubscribe(); + arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + const startBuffer = () => { + if (bufferRecords) { + const subs = new Subscription(); + subscriber.add(subs); + const buffer = []; + const record = { + buffer, + subs, + }; + bufferRecords.push(record); + executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } + else { + restartOnEmit = true; + } + startBuffer(); + const bufferTimeSubscriber = createOperatorSubscriber(subscriber, (value) => { + const recordsCopy = bufferRecords.slice(); + for (const record of recordsCopy) { + const { buffer } = record; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + }, () => { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, undefined, () => (bufferRecords = null)); + source.subscribe(bufferTimeSubscriber); + }); +} +//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map new file mode 100644 index 0000000..452569b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferT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E,CAAC,CAAC,aAAa,GAAG,IAAI,CAAC,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js new file mode 100644 index 0000000..dfefe4a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js @@ -0,0 +1,33 @@ +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; +export function bufferToggle(openings, closingSelector) { + return operate((source, subscriber) => { + const buffers = []; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => { + const buffer = []; + buffers.push(buffer); + const closingSubscription = new Subscription(); + const emitBuffer = () => { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + for (const buffer of buffers) { + buffer.push(value); + } + }, () => { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map new file mode 100644 index 0000000..b1c0426 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;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G,EAAE;YAEH,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js new file mode 100644 index 0000000..8e47b0d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js @@ -0,0 +1,23 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function bufferWhen(closingSelector) { + return operate((source, subscriber) => { + let buffer = null; + let closingSubscriber = null; + const openBuffer = () => { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + const b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); + }; + openBuffer(); + source.subscribe(createOperatorSubscriber(subscriber, (value) => buffer === null || buffer === void 0 ? void 0 : buffer.push(value), () => { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, undefined, () => (buffer = closingSubscriber = null))); + }); +} +//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map new file mode 100644 index 0000000..5ea39fa --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,C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/esm/internal/operators/catchError.js new file mode 100644 index 0000000..1dba646 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/catchError.js @@ -0,0 +1,27 @@ +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { operate } from '../util/lift'; +export function catchError(selector) { + return operate((source, subscriber) => { + let innerSub = null; + let syncUnsub = false; + let handledResult; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => { + handledResult = innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); +} +//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map b/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map new file mode 100644 index 0000000..b1c3db7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAoGvC,MAAM,UAAU,UAAU,CACxB,QAAgD;IAEhD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;YACjE,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js new file mode 100644 index 0000000..65f4bbf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js @@ -0,0 +1,3 @@ +import { combineLatestAll } from './combineLatestAll'; +export const combineAll = combineLatestAll; +//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map new file mode 100644 index 0000000..63debb6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js new file mode 100644 index 0000000..abed1f5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js @@ -0,0 +1,15 @@ +import { combineLatestInit } from '../observable/combineLatest'; +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { popResultSelector } from '../util/args'; +export function combineLatest(...args) { + const resultSelector = popResultSelector(args); + return resultSelector + ? pipe(combineLatest(...args), mapOneOrManyArgs(resultSelector)) + : operate((source, subscriber) => { + combineLatestInit([source, ...argsOrArgArray(args)])(subscriber); + }); +} +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map new file mode 100644 index 0000000..0da0c16 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoBjD,MAAM,UAAU,aAAa,CAAO,GAAG,IAA0D;IAC/F,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,GAAI,IAAoC,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,iBAAiB,CAAC,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js new file mode 100644 index 0000000..3af3909 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js @@ -0,0 +1,6 @@ +import { combineLatest } from '../observable/combineLatest'; +import { joinAllInternals } from './joinAllInternals'; +export function combineLatestAll(project) { + return joinAllInternals(combineLatest, project); +} +//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map new file mode 100644 index 0000000..2adf9b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6CtD,MAAM,UAAU,gBAAgB,CAAI,OAAsC;IACxE,OAAO,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js new file mode 100644 index 0000000..880ec84 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js @@ -0,0 +1,5 @@ +import { combineLatest } from './combineLatest'; +export function combineLatestWith(...otherSources) { + return combineLatest(...otherSources); +} +//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map new file mode 100644 index 0000000..93deadd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ChD,MAAM,UAAU,iBAAiB,CAC/B,GAAG,YAA0C;IAE7C,OAAO,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concat.js b/node_modules/rxjs/dist/esm/internal/operators/concat.js new file mode 100644 index 0000000..7a5502f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concat.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { concatAll } from './concatAll'; +import { popScheduler } from '../util/args'; +import { from } from '../observable/from'; +export function concat(...args) { + const scheduler = popScheduler(args); + return operate((source, subscriber) => { + concatAll()(from([source, ...args], scheduler)).subscribe(subscriber); + }); +} +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concat.js.map b/node_modules/rxjs/dist/esm/internal/operators/concat.js.map new file mode 100644 index 0000000..f0fc841 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAY1C,MAAM,UAAU,MAAM,CAAO,GAAG,IAAW;IACzC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js new file mode 100644 index 0000000..9ef0022 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js @@ -0,0 +1,5 @@ +import { mergeAll } from './mergeAll'; +export function concatAll() { + return mergeAll(1); +} +//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map new file mode 100644 index 0000000..0231f3f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2DtC,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js new file mode 100644 index 0000000..bdacda3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js @@ -0,0 +1,6 @@ +import { mergeMap } from './mergeMap'; +import { isFunction } from '../util/isFunction'; +export function concatMap(project, resultSelector) { + return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); +} +//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map new file mode 100644 index 0000000..cc84ef6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4EhD,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js new file mode 100644 index 0000000..6aa9800 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js @@ -0,0 +1,6 @@ +import { concatMap } from './concatMap'; +import { isFunction } from '../util/isFunction'; +export function concatMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable); +} +//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map new file mode 100644 index 0000000..8bf071c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuEhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js new file mode 100644 index 0000000..e4be83d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js @@ -0,0 +1,5 @@ +import { concat } from './concat'; +export function concatWith(...otherSources) { + return concat(...otherSources); +} +//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map new file mode 100644 index 0000000..818f89f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA0ClC,MAAM,UAAU,UAAU,CACxB,GAAG,YAA0C;IAE7C,OAAO,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/connect.js b/node_modules/rxjs/dist/esm/internal/operators/connect.js new file mode 100644 index 0000000..9d3e6dd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/connect.js @@ -0,0 +1,16 @@ +import { Subject } from '../Subject'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { fromSubscribable } from '../observable/fromSubscribable'; +const DEFAULT_CONFIG = { + connector: () => new Subject(), +}; +export function connect(selector, config = DEFAULT_CONFIG) { + const { connector } = config; + return operate((source, subscriber) => { + const subject = connector(); + innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} +//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/connect.js.map b/node_modules/rxjs/dist/esm/internal/operators/connect.js.map new file mode 100644 index 0000000..cb98156 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/connect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,MAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAW;CACxC,CAAC;AA2EF,MAAM,UAAU,OAAO,CACrB,QAAsC,EACtC,SAA2B,cAAc;IAEzC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/count.js b/node_modules/rxjs/dist/esm/internal/operators/count.js new file mode 100644 index 0000000..e53cbaa --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/count.js @@ -0,0 +1,5 @@ +import { reduce } from './reduce'; +export function count(predicate) { + return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0); +} +//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/count.js.map b/node_modules/rxjs/dist/esm/internal/operators/count.js.map new file mode 100644 index 0000000..f0a1b08 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/count.js.map @@ -0,0 +1 @@ +{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAyDlC,MAAM,UAAU,KAAK,CAAI,SAAgD;IACvE,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounce.js b/node_modules/rxjs/dist/esm/internal/operators/debounce.js new file mode 100644 index 0000000..138602e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/debounce.js @@ -0,0 +1,34 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function debounce(durationSelector) { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue = null; + let durationSubscriber = null; + const emit = () => { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); + innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, () => { + emit(); + subscriber.complete(); + }, undefined, () => { + lastValue = durationSubscriber = null; + })); + }); +} +//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map b/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map new file mode 100644 index 0000000..45b0615 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA4DpD,MAAM,UAAU,QAAQ,CAAI,gBAAoD;IAC9E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QAEtD,MAAM,IAAI,GAAG,GAAG,EAAE;YAIhB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBAEZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAIX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAGlB,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAEtE,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnE,CAAC,EACD,GAAG,EAAE;YAGH,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js new file mode 100644 index 0000000..28c058a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js @@ -0,0 +1,43 @@ +import { asyncScheduler } from '../scheduler/async'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function debounceTime(dueTime, scheduler = asyncScheduler) { + return operate((source, subscriber) => { + let activeTask = null; + let lastValue = null; + let lastTime = null; + const emit = () => { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + const targetTime = lastTime + dueTime; + const now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, () => { + emit(); + subscriber.complete(); + }, undefined, () => { + lastValue = activeTask = null; + })); + }); +} +//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map new file mode 100644 index 0000000..c5e302e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,YAAY,CAAI,OAAe,EAAE,YAA2B,cAAc;IACxF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,MAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YACX,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD,GAAG,EAAE;YAGH,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js new file mode 100644 index 0000000..651de76 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js @@ -0,0 +1,17 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function defaultIfEmpty(defaultValue) { + return operate((source, subscriber) => { + let hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + subscriber.next(value); + }, () => { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map new file mode 100644 index 0000000..230a9df --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqChE,MAAM,UAAU,cAAc,CAAO,YAAe;IAClD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,GAAG,EAAE;YACH,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delay.js b/node_modules/rxjs/dist/esm/internal/operators/delay.js new file mode 100644 index 0000000..2ceb484 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/delay.js @@ -0,0 +1,8 @@ +import { asyncScheduler } from '../scheduler/async'; +import { delayWhen } from './delayWhen'; +import { timer } from '../observable/timer'; +export function delay(due, scheduler = asyncScheduler) { + const duration = timer(due, scheduler); + return delayWhen(() => duration); +} +//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delay.js.map b/node_modules/rxjs/dist/esm/internal/operators/delay.js.map new file mode 100644 index 0000000..26fdd77 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/delay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA0D5C,MAAM,UAAU,KAAK,CAAI,GAAkB,EAAE,YAA2B,cAAc;IACpF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js new file mode 100644 index 0000000..ec40e71 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js @@ -0,0 +1,13 @@ +import { concat } from '../observable/concat'; +import { take } from './take'; +import { ignoreElements } from './ignoreElements'; +import { mapTo } from './mapTo'; +import { mergeMap } from './mergeMap'; +import { innerFrom } from '../observable/innerFrom'; +export function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + } + return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value))); +} +//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map new file mode 100644 index 0000000..8ba7fff --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoFpD,MAAM,UAAU,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;KAC5G;IAED,OAAO,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js new file mode 100644 index 0000000..36fd9f6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js @@ -0,0 +1,9 @@ +import { observeNotification } from '../Notification'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function dematerialize() { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber))); + }); +} +//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map new file mode 100644 index 0000000..7e5a2cf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinct.js b/node_modules/rxjs/dist/esm/internal/operators/distinct.js new file mode 100644 index 0000000..597a805 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinct.js @@ -0,0 +1,18 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; +export function distinct(keySelector, flushes) { + return operate((source, subscriber) => { + const distinctKeys = new Set(); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop)); + }); +} +//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map new file mode 100644 index 0000000..46576eb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js new file mode 100644 index 0000000..7e7d17c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js @@ -0,0 +1,22 @@ +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function distinctUntilChanged(comparator, keySelector = identity) { + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return operate((source, subscriber) => { + let previousKey; + let first = true; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); +} +function defaultCompare(a, b) { + return a === b; +} +//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map new file mode 100644 index 0000000..06dc6cc --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAuIhE,MAAM,UAAU,oBAAoB,CAClC,UAAiD,EACjD,cAA+B,QAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAE7C,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js new file mode 100644 index 0000000..240fd1a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js @@ -0,0 +1,5 @@ +import { distinctUntilChanged } from './distinctUntilChanged'; +export function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]); +} +//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map new file mode 100644 index 0000000..2a4f208 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAoE9D,MAAM,UAAU,uBAAuB,CAAuB,GAAM,EAAE,OAAuC;IAC3G,OAAO,oBAAoB,CAAC,CAAC,CAAI,EAAE,CAAI,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js new file mode 100644 index 0000000..4851bd0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js @@ -0,0 +1,13 @@ +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; +import { filter } from './filter'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { take } from './take'; +export function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError(); + } + const hasDefaultValue = arguments.length >= 2; + return (source) => source.pipe(filter((v, i) => i === index), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new ArgumentOutOfRangeError())); +} +//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map new file mode 100644 index 0000000..9b7de9b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAkD9B,MAAM,UAAU,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,uBAAuB,EAAE,CAAC;KACrC;IACD,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,EAC7B,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,uBAAuB,EAAE,CAAC,CACpG,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/endWith.js b/node_modules/rxjs/dist/esm/internal/operators/endWith.js new file mode 100644 index 0000000..b3d3719 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/endWith.js @@ -0,0 +1,6 @@ +import { concat } from '../observable/concat'; +import { of } from '../observable/of'; +export function endWith(...values) { + return (source) => concat(source, of(...values)); +} +//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map new file mode 100644 index 0000000..a3d371b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AA8DtC,MAAM,UAAU,OAAO,CAAI,GAAG,MAAgC;IAC5D,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAkB,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/every.js b/node_modules/rxjs/dist/esm/internal/operators/every.js new file mode 100644 index 0000000..3692a1c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/every.js @@ -0,0 +1,17 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function every(predicate, thisArg) { + return operate((source, subscriber) => { + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, () => { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/every.js.map b/node_modules/rxjs/dist/esm/internal/operators/every.js.map new file mode 100644 index 0000000..fc7da5b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/every.js.map @@ -0,0 +1 @@ +{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwChE,MAAM,UAAU,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js new file mode 100644 index 0000000..2c5be00 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js @@ -0,0 +1,3 @@ +import { exhaustAll } from './exhaustAll'; +export const exhaust = exhaustAll; +//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map new file mode 100644 index 0000000..e29a1f2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js new file mode 100644 index 0000000..c61b4f8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js @@ -0,0 +1,6 @@ +import { exhaustMap } from './exhaustMap'; +import { identity } from '../util/identity'; +export function exhaustAll() { + return exhaustMap(identity); +} +//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map new file mode 100644 index 0000000..9d961b0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8C5C,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js new file mode 100644 index 0000000..b4d99a4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js @@ -0,0 +1,27 @@ +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function exhaustMap(project, resultSelector) { + if (resultSelector) { + return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))))); + } + return operate((source, subscriber) => { + let index = 0; + let innerSub = null; + let isComplete = false; + source.subscribe(createOperatorSubscriber(subscriber, (outerValue) => { + if (!innerSub) { + innerSub = createOperatorSubscriber(subscriber, undefined, () => { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, () => { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map new file mode 100644 index 0000000..f867487 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA8DhE,MAAM,UAAU,UAAU,CACxB,OAAuC,EACvC,cAA6G;IAE7G,IAAI,cAAc,EAAE;QAElB,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3H;IACD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAyB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,UAAU,EAAE,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;oBAC9D,QAAQ,GAAG,IAAI,CAAC;oBAChB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7D;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/expand.js b/node_modules/rxjs/dist/esm/internal/operators/expand.js new file mode 100644 index 0000000..c515da0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/expand.js @@ -0,0 +1,7 @@ +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +export function expand(project, concurrent = Infinity, scheduler) { + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler)); +} +//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/expand.js.map b/node_modules/rxjs/dist/esm/internal/operators/expand.js.map new file mode 100644 index 0000000..ade87a4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/expand.js.map @@ -0,0 +1 @@ +{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuElD,MAAM,UAAU,MAAM,CACpB,OAAuC,EACvC,UAAU,GAAG,QAAQ,EACrB,SAAyB;IAEzB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CACpC,cAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/filter.js b/node_modules/rxjs/dist/esm/internal/operators/filter.js new file mode 100644 index 0000000..d141765 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/filter.js @@ -0,0 +1,9 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function filter(predicate, thisArg) { + return operate((source, subscriber) => { + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))); + }); +} +//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/filter.js.map b/node_modules/rxjs/dist/esm/internal/operators/filter.js.map new file mode 100644 index 0000000..e9f3b6c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/filter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/finalize.js b/node_modules/rxjs/dist/esm/internal/operators/finalize.js new file mode 100644 index 0000000..a5dd66f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/finalize.js @@ -0,0 +1,12 @@ +import { operate } from '../util/lift'; +export function finalize(callback) { + return operate((source, subscriber) => { + try { + source.subscribe(subscriber); + } + finally { + subscriber.add(callback); + } + }); +} +//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map b/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map new file mode 100644 index 0000000..c1c0959 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+DvC,MAAM,UAAU,QAAQ,CAAI,QAAoB;IAC9C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/find.js b/node_modules/rxjs/dist/esm/internal/operators/find.js new file mode 100644 index 0000000..daf1706 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/find.js @@ -0,0 +1,22 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function find(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'value')); +} +export function createFind(predicate, thisArg, emit) { + const findIndex = emit === 'index'; + return (source, subscriber) => { + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, () => { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + })); + }; +} +//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/find.js.map b/node_modules/rxjs/dist/esm/internal/operators/find.js.map new file mode 100644 index 0000000..a0fd9f6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/find.js.map @@ -0,0 +1 @@ +{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,MAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,CAAC,MAAqB,EAAE,UAA2B,EAAE,EAAE;QAC5D,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js new file mode 100644 index 0000000..d59c5f8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js @@ -0,0 +1,6 @@ +import { operate } from '../util/lift'; +import { createFind } from './find'; +export function findIndex(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'index')); +} +//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map new file mode 100644 index 0000000..c4d30fc --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAuDpC,MAAM,UAAU,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/first.js b/node_modules/rxjs/dist/esm/internal/operators/first.js new file mode 100644 index 0000000..406bba0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/first.js @@ -0,0 +1,11 @@ +import { EmptyError } from '../util/EmptyError'; +import { filter } from './filter'; +import { take } from './take'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { throwIfEmpty } from './throwIfEmpty'; +import { identity } from '../util/identity'; +export function first(predicate, defaultValue) { + const hasDefaultValue = arguments.length >= 2; + return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); +} +//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/first.js.map b/node_modules/rxjs/dist/esm/internal/operators/first.js.map new file mode 100644 index 0000000..17a1bbd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/first.js.map @@ -0,0 +1 @@ +{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyE5C,MAAM,UAAU,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,CACvF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js new file mode 100644 index 0000000..96e084c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js @@ -0,0 +1,3 @@ +import { mergeMap } from './mergeMap'; +export const flatMap = mergeMap; +//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map new file mode 100644 index 0000000..83f9dac --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js new file mode 100644 index 0000000..56f00b6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js @@ -0,0 +1,63 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; +export function groupBy(keySelector, elementOrOptions, duration, connector) { + return operate((source, subscriber) => { + let element; + if (!elementOrOptions || typeof elementOrOptions === 'function') { + element = elementOrOptions; + } + else { + ({ duration, element, connector } = elementOrOptions); + } + const groups = new Map(); + const notify = (cb) => { + groups.forEach(cb); + cb(subscriber); + }; + const handleError = (err) => notify((consumer) => consumer.error(err)); + let activeGroups = 0; + let teardownAttempted = false; + const groupBySourceSubscriber = new OperatorSubscriber(subscriber, (value) => { + try { + const key = keySelector(value); + let group = groups.get(key); + if (!group) { + groups.set(key, (group = connector ? connector() : new Subject())); + const grouped = createGroupedObservable(key, group); + subscriber.next(grouped); + if (duration) { + const durationSubscriber = createOperatorSubscriber(group, () => { + group.complete(); + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + }, undefined, undefined, () => groups.delete(key)); + groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber)); + } + } + group.next(element ? element(value) : value); + } + catch (err) { + handleError(err); + } + }, () => notify((consumer) => consumer.complete()), handleError, () => groups.clear(), () => { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + const result = new Observable((groupSubscriber) => { + activeGroups++; + const innerSub = groupSubject.subscribe(groupSubscriber); + return () => { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); +} +//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map new file mode 100644 index 0000000..c02375f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,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Ae,EAAE,EAAE;gBACxD,YAAY,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO,GAAG,EAAE;oBACV,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js new file mode 100644 index 0000000..138ee2b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js @@ -0,0 +1,9 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +export function ignoreElements() { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, noop)); + }); +} +//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map new file mode 100644 index 0000000..459e9cf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAqCpC,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js new file mode 100644 index 0000000..763aec5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js @@ -0,0 +1,14 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function isEmpty() { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, () => { + subscriber.next(false); + subscriber.complete(); + }, () => { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map new file mode 100644 index 0000000..e3584eb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,OAAO;IACrB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js new file mode 100644 index 0000000..398bb58 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js @@ -0,0 +1,9 @@ +import { identity } from '../util/identity'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { mergeMap } from './mergeMap'; +import { toArray } from './toArray'; +export function joinAllInternals(joinFn, project) { + return pipe(toArray(), mergeMap((sources) => joinFn(sources)), project ? mapOneOrManyArgs(project) : identity); +} +//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map new file mode 100644 index 0000000..bda561d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,UAAU,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,IAAI,CAGT,OAAO,EAAgE,EAEvE,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,QAAgB,CACxD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/last.js b/node_modules/rxjs/dist/esm/internal/operators/last.js new file mode 100644 index 0000000..ff65d75 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/last.js @@ -0,0 +1,11 @@ +import { EmptyError } from '../util/EmptyError'; +import { filter } from './filter'; +import { takeLast } from './takeLast'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { identity } from '../util/identity'; +export function last(predicate, defaultValue) { + const hasDefaultValue = arguments.length >= 2; + return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); +} +//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/last.js.map b/node_modules/rxjs/dist/esm/internal/operators/last.js.map new file mode 100644 index 0000000..c6042f7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/last.js.map @@ -0,0 +1 @@ +{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAuE5C,MAAM,UAAU,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,QAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,CACvF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/map.js b/node_modules/rxjs/dist/esm/internal/operators/map.js new file mode 100644 index 0000000..f16375a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/map.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function map(project, thisArg) { + return operate((source, subscriber) => { + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); +} +//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/map.js.map b/node_modules/rxjs/dist/esm/internal/operators/map.js.map new file mode 100644 index 0000000..38325e6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/map.js.map @@ -0,0 +1 @@ +{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAQ,EAAE,EAAE;YAGhD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js new file mode 100644 index 0000000..147161a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js @@ -0,0 +1,5 @@ +import { map } from './map'; +export function mapTo(value) { + return map(() => value); +} +//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map new file mode 100644 index 0000000..75052d6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA4C5B,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/materialize.js b/node_modules/rxjs/dist/esm/internal/operators/materialize.js new file mode 100644 index 0000000..9fed5d5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/materialize.js @@ -0,0 +1,17 @@ +import { Notification } from '../Notification'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function materialize() { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + subscriber.next(Notification.createNext(value)); + }, () => { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, (err) => { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map b/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map new file mode 100644 index 0000000..3f551ab --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/max.js b/node_modules/rxjs/dist/esm/internal/operators/max.js new file mode 100644 index 0000000..73abbb6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/max.js @@ -0,0 +1,6 @@ +import { reduce } from './reduce'; +import { isFunction } from '../util/isFunction'; +export function max(comparer) { + return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) > 0 ? x : y) : (x, y) => (x > y ? x : y)); +} +//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/max.js.map b/node_modules/rxjs/dist/esm/internal/operators/max.js.map new file mode 100644 index 0000000..9c52966 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/max.js.map @@ -0,0 +1 @@ +{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/merge.js b/node_modules/rxjs/dist/esm/internal/operators/merge.js new file mode 100644 index 0000000..86604ea --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/merge.js @@ -0,0 +1,14 @@ +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mergeAll } from './mergeAll'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from '../observable/from'; +export function merge(...args) { + const scheduler = popScheduler(args); + const concurrent = popNumber(args, Infinity); + args = argsOrArgArray(args); + return operate((source, subscriber) => { + mergeAll(concurrent)(from([source, ...args], scheduler)).subscribe(subscriber); + }); +} +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/merge.js.map b/node_modules/rxjs/dist/esm/internal/operators/merge.js.map new file mode 100644 index 0000000..f9a3865 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAiB1C,MAAM,UAAU,KAAK,CAAI,GAAG,IAAe;IACzC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,GAAI,IAA6B,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js new file mode 100644 index 0000000..bd26d7a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js @@ -0,0 +1,6 @@ +import { mergeMap } from './mergeMap'; +import { identity } from '../util/identity'; +export function mergeAll(concurrent = Infinity) { + return mergeMap(identity, concurrent); +} +//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map new file mode 100644 index 0000000..4b41a30 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8D5C,MAAM,UAAU,QAAQ,CAAiC,aAAqB,QAAQ;IACpF,OAAO,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js new file mode 100644 index 0000000..f387656 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js @@ -0,0 +1,58 @@ +import { innerFrom } from '../observable/innerFrom'; +import { executeSchedule } from '../util/executeSchedule'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + const buffer = []; + let active = 0; + let index = 0; + let isComplete = false; + const checkComplete = () => { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value)); + const doInnerSub = (value) => { + expand && subscriber.next(value); + active++; + let innerComplete = false; + innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } + else { + subscriber.next(innerValue); + } + }, () => { + innerComplete = true; + }, undefined, () => { + if (innerComplete) { + try { + active--; + while (buffer.length && active < concurrent) { + const bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); + } + else { + doInnerSub(bufferedValue); + } + } + checkComplete(); + } + catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => { + isComplete = true; + checkComplete(); + })); + return () => { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; +} +//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map new file mode 100644 index 0000000..7a7ffe0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAehE,MAAM,UAAU,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,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EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;qBACF;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;QAEnD,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO,GAAG,EAAE;QACV,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js new file mode 100644 index 0000000..fc2d2fd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js @@ -0,0 +1,15 @@ +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +import { isFunction } from '../util/isFunction'; +export function mergeMap(project, resultSelector, concurrent = Infinity) { + if (isFunction(resultSelector)) { + return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent); + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent)); +} +//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map new file mode 100644 index 0000000..71d4d09 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA6EhD,MAAM,UAAU,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,aAAqB,QAAQ;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAU,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js new file mode 100644 index 0000000..bccbabe --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js @@ -0,0 +1,12 @@ +import { mergeMap } from './mergeMap'; +import { isFunction } from '../util/isFunction'; +export function mergeMapTo(innerObservable, resultSelector, concurrent = Infinity) { + if (isFunction(resultSelector)) { + return mergeMap(() => innerObservable, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap(() => innerObservable, concurrent); +} +//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map new file mode 100644 index 0000000..024ca43 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2DhD,MAAM,UAAU,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,aAAqB,QAAQ;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js new file mode 100644 index 0000000..aa27459 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +export function mergeScan(accumulator, seed, concurrent = Infinity) { + return operate((source, subscriber) => { + let state = seed; + return mergeInternals(source, subscriber, (value, index) => accumulator(state, value, index), concurrent, (value) => { + state = value; + }, false, undefined, () => (state = null)); + }); +} +//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map new file mode 100644 index 0000000..d2402e6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoElD,MAAM,UAAU,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAU,GAAG,QAAQ;IAErB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,cAAc,CACnB,MAAM,EACN,UAAU,EACV,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAClD,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,GAAG,EAAE,CAAC,CAAC,KAAK,GAAG,IAAK,CAAC,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js new file mode 100644 index 0000000..166e291 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js @@ -0,0 +1,5 @@ +import { merge } from './merge'; +export function mergeWith(...otherSources) { + return merge(...otherSources); +} +//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map new file mode 100644 index 0000000..6867e8a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2ChC,MAAM,UAAU,SAAS,CACvB,GAAG,YAA0C;IAE7C,OAAO,KAAK,CAAC,GAAG,YAAY,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/min.js b/node_modules/rxjs/dist/esm/internal/operators/min.js new file mode 100644 index 0000000..708a4d2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/min.js @@ -0,0 +1,6 @@ +import { reduce } from './reduce'; +import { isFunction } from '../util/isFunction'; +export function min(comparer) { + return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) < 0 ? x : y) : (x, y) => (x < y ? x : y)); +} +//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/min.js.map b/node_modules/rxjs/dist/esm/internal/operators/min.js.map new file mode 100644 index 0000000..32ce865 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/multicast.js b/node_modules/rxjs/dist/esm/internal/operators/multicast.js new file mode 100644 index 0000000..717ba9c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/multicast.js @@ -0,0 +1,13 @@ +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { isFunction } from '../util/isFunction'; +import { connect } from './connect'; +export function multicast(subjectOrSubjectFactory, selector) { + const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory; + if (isFunction(selector)) { + return connect(selector, { + connector: subjectFactory, + }); + } + return (source) => new ConnectableObservable(source, subjectFactory); +} +//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map b/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map new file mode 100644 index 0000000..24d4b1c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC,MAAM,UAAU,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,MAAM,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;IAErH,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js new file mode 100644 index 0000000..884979c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js @@ -0,0 +1,9 @@ +import { executeSchedule } from '../util/executeSchedule'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function observeOn(scheduler, delay = 0) { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay))); + }); +} +//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map new file mode 100644 index 0000000..9ea9fa2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsDhE,MAAM,UAAU,SAAS,CAAI,SAAwB,EAAE,KAAK,GAAG,CAAC;IAC9D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,EACtF,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,EAChF,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js new file mode 100644 index 0000000..a3fd144 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js @@ -0,0 +1,8 @@ +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; +export function onErrorResumeNextWith(...sources) { + const nextSources = argsOrArgArray(sources); + return (source) => oERNCreate(source, ...nextSources); +} +export const onErrorResumeNext = onErrorResumeNextWith; +//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map new file mode 100644 index 0000000..7bbd7bb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAiFlF,MAAM,UAAU,qBAAqB,CACnC,GAAG,OAAsE;IAMzE,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,WAAW,CAAC,CAAC;AACxD,CAAC;AAKD,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js new file mode 100644 index 0000000..bec8fd8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js @@ -0,0 +1,15 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function pairwise() { + return operate((source, subscriber) => { + let prev; + let hasPrev = false; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); +} +//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map new file mode 100644 index 0000000..b0d8eb2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/partition.js b/node_modules/rxjs/dist/esm/internal/operators/partition.js new file mode 100644 index 0000000..7125a62 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/partition.js @@ -0,0 +1,6 @@ +import { not } from '../util/not'; +import { filter } from './filter'; +export function partition(predicate, thisArg) { + return (source) => [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; +} +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/partition.js.map b/node_modules/rxjs/dist/esm/internal/operators/partition.js.map new file mode 100644 index 0000000..1e426fa --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuDlC,MAAM,UAAU,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC,CAAC;AACpH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pluck.js b/node_modules/rxjs/dist/esm/internal/operators/pluck.js new file mode 100644 index 0000000..66a5f27 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/pluck.js @@ -0,0 +1,21 @@ +import { map } from './map'; +export function pluck(...properties) { + const length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map((x) => { + let currentProp = x; + for (let i = 0; i < length; i++) { + const p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } + else { + return undefined; + } + } + return currentProp; + }); +} +//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map b/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map new file mode 100644 index 0000000..bb44249 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwF5B,MAAM,UAAU,KAAK,CAAO,GAAG,UAA2C;IACxE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACf,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publish.js b/node_modules/rxjs/dist/esm/internal/operators/publish.js new file mode 100644 index 0000000..0878c0a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publish.js @@ -0,0 +1,7 @@ +import { Subject } from '../Subject'; +import { multicast } from './multicast'; +import { connect } from './connect'; +export function publish(selector) { + return selector ? (source) => connect(selector)(source) : (source) => multicast(new Subject())(source); +} +//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publish.js.map b/node_modules/rxjs/dist/esm/internal/operators/publish.js.map new file mode 100644 index 0000000..ad0d969 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqFpC,MAAM,UAAU,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js new file mode 100644 index 0000000..ed80476 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js @@ -0,0 +1,9 @@ +import { BehaviorSubject } from '../BehaviorSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +export function publishBehavior(initialValue) { + return (source) => { + const subject = new BehaviorSubject(initialValue); + return new ConnectableObservable(source, () => subject); + }; +} +//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map new file mode 100644 index 0000000..f227f5c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAiB5E,MAAM,UAAU,eAAe,CAAI,YAAe;IAEhD,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,IAAI,eAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js new file mode 100644 index 0000000..c912bb5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js @@ -0,0 +1,9 @@ +import { AsyncSubject } from '../AsyncSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +export function publishLast() { + return (source) => { + const subject = new AsyncSubject(); + return new ConnectableObservable(source, () => subject); + }; +} +//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map new file mode 100644 index 0000000..a9c0240 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAmE5E,MAAM,UAAU,WAAW;IAEzB,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,IAAI,YAAY,EAAK,CAAC;QACtC,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js new file mode 100644 index 0000000..c3f9dc1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js @@ -0,0 +1,11 @@ +import { ReplaySubject } from '../ReplaySubject'; +import { multicast } from './multicast'; +import { isFunction } from '../util/isFunction'; +export function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + return (source) => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); +} +//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map new file mode 100644 index 0000000..fee688d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA8EhD,MAAM,UAAU,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,aAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAClI,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/race.js b/node_modules/rxjs/dist/esm/internal/operators/race.js new file mode 100644 index 0000000..822b399 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/race.js @@ -0,0 +1,6 @@ +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { raceWith } from './raceWith'; +export function race(...args) { + return raceWith(...argsOrArgArray(args)); +} +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/race.js.map b/node_modules/rxjs/dist/esm/internal/operators/race.js.map new file mode 100644 index 0000000..cac5855 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,MAAM,UAAU,IAAI,CAAI,GAAG,IAAW;IACpC,OAAO,QAAQ,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js new file mode 100644 index 0000000..ff63ee1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js @@ -0,0 +1,11 @@ +import { raceInit } from '../observable/race'; +import { operate } from '../util/lift'; +import { identity } from '../util/identity'; +export function raceWith(...otherSources) { + return !otherSources.length + ? identity + : operate((source, subscriber) => { + raceInit([source, ...otherSources])(subscriber); + }); +} +//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map new file mode 100644 index 0000000..96b6065 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4B5C,MAAM,UAAU,QAAQ,CACtB,GAAG,YAA0C;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,QAAQ,CAAgB,CAAC,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/reduce.js b/node_modules/rxjs/dist/esm/internal/operators/reduce.js new file mode 100644 index 0000000..55be35a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/reduce.js @@ -0,0 +1,6 @@ +import { scanInternals } from './scanInternals'; +import { operate } from '../util/lift'; +export function reduce(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); +} +//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map b/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map new file mode 100644 index 0000000..2ec4cdc --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAyDvC,MAAM,UAAU,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/refCount.js b/node_modules/rxjs/dist/esm/internal/operators/refCount.js new file mode 100644 index 0000000..e666637 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/refCount.js @@ -0,0 +1,26 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function refCount() { + return operate((source, subscriber) => { + let connection = null; + source._refCount++; + const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + const sharedConnection = source._connection; + const conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); +} +//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map new file mode 100644 index 0000000..b2a2c03 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,MAAM,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE;YAC5F,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,MAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,MAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeat.js b/node_modules/rxjs/dist/esm/internal/operators/repeat.js new file mode 100644 index 0000000..c011f82 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/repeat.js @@ -0,0 +1,59 @@ +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { timer } from '../observable/timer'; +export function repeat(countOrConfig) { + let count = Infinity; + let delay; + if (countOrConfig != null) { + if (typeof countOrConfig === 'object') { + ({ count = Infinity, delay } = countOrConfig); + } + else { + count = countOrConfig; + } + } + return count <= 0 + ? () => EMPTY + : operate((source, subscriber) => { + let soFar = 0; + let sourceSub; + const resubscribe = () => { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); + const notifierSubscriber = createOperatorSubscriber(subscriber, () => { + notifierSubscriber.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber); + } + else { + subscribeToSource(); + } + }; + const subscribeToSource = () => { + let syncUnsub = false; + sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } + else { + syncUnsub = true; + } + } + else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); +} +//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map b/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map new file mode 100644 index 0000000..e87a215 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA6G5C,MAAM,UAAU,MAAM,CAAI,aAAqC;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAC,EAAE,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,MAAM,WAAW,GAAG,GAAG,EAAE;gBACvB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE;wBACnE,kBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;gBAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;oBACnD,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js new file mode 100644 index 0000000..82ecdd9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js @@ -0,0 +1,46 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function repeatWhen(notifier) { + return operate((source, subscriber) => { + let innerSub; + let syncResub = false; + let completions$; + let isNotifierComplete = false; + let isMainComplete = false; + const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true); + const getCompletionSubject = () => { + if (!completions$) { + completions$ = new Subject(); + innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => { + if (innerSub) { + subscribeForRepeatWhen(); + } + else { + syncResub = true; + } + }, () => { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + const subscribeForRepeatWhen = () => { + isMainComplete = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); +} +//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map new file mode 100644 index 0000000..65f5bbf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoChE,MAAM,UAAU,UAAU,CAAI,QAAmE;IAC/F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAk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modules/rxjs/dist/esm/internal/operators/retry.js b/node_modules/rxjs/dist/esm/internal/operators/retry.js new file mode 100644 index 0000000..c961747 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/retry.js @@ -0,0 +1,68 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; +import { timer } from '../observable/timer'; +import { innerFrom } from '../observable/innerFrom'; +export function retry(configOrCount = Infinity) { + let config; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } + else { + config = { + count: configOrCount, + }; + } + const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; + return count <= 0 + ? identity + : operate((source, subscriber) => { + let soFar = 0; + let innerSub; + const subscribeForRetry = () => { + let syncUnsub = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, (value) => { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, undefined, (err) => { + if (soFar++ < count) { + const resub = () => { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + else { + syncUnsub = true; + } + }; + if (delay != null) { + const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); + const notifierSubscriber = createOperatorSubscriber(subscriber, () => { + notifierSubscriber.unsubscribe(); + resub(); + }, () => { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber); + } + else { + resub(); + } + } + else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); +} +//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retry.js.map b/node_modules/rxjs/dist/esm/internal/operators/retry.js.map new file mode 100644 index 0000000..81bdf98 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/retry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"A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AC,WAAW,EAAE,CAAC;gCACvB,QAAQ,GAAG,IAAI,CAAC;gCAChB,iBAAiB,EAAE,CAAC;6BACrB;iCAAM;gCACL,SAAS,GAAG,IAAI,CAAC;6BAClB;wBACH,CAAC,CAAC;wBAEF,IAAI,KAAK,IAAI,IAAI,EAAE;4BAIjB,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;4BACzF,MAAM,kBAAkB,GAAG,wBAAwB,CACjD,UAAU,EACV,GAAG,EAAE;gCAIH,kBAAkB,CAAC,WAAW,EAAE,CAAC;gCACjC,KAAK,EAAE,CAAC;4BACV,CAAC,EACD,GAAG,EAAE;gCAGH,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACxB,CAAC,CACF,CAAC;4BACF,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;yBACxC;6BAAM;4BAEL,KAAK,EAAE,CAAC;yBACT;qBACF;yBAAM;wBAGL,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACvB;gBACH,CAAC,CACF,CACF,CAAC;gBACF,IAAI,SAAS,EAAE;oBACb,QAAQ,CAAC,WAAW,EAAE,CAAC;oBACvB,QAAQ,GAAG,IAAI,CAAC;oBAChB,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js new file mode 100644 index 0000000..cda09f2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js @@ -0,0 +1,30 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function retryWhen(notifier) { + return operate((source, subscriber) => { + let innerSub; + let syncResub = false; + let errors$; + const subscribeForRetryWhen = () => { + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => { + if (!errors$) { + errors$ = new Subject(); + innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true))); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); +} +//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map new file mode 100644 index 0000000..5a870c0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,SAAS,CAAI,QAA2D;IACtF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,MAAM,qBAAqB,GAAG,GAAG,EAAE;YACjC,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;gBACjE,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;oBACxB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAMxC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sample.js b/node_modules/rxjs/dist/esm/internal/operators/sample.js new file mode 100644 index 0000000..5c36c57 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sample.js @@ -0,0 +1,23 @@ +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function sample(notifier) { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue = null; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + lastValue = value; + })); + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => { + if (hasValue) { + hasValue = false; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop)); + }); +} +//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sample.js.map b/node_modules/rxjs/dist/esm/internal/operators/sample.js.map new file mode 100644 index 0000000..fb0440c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sample.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0ChE,MAAM,UAAU,MAAM,CAAI,QAA8B;IACtD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,IAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js new file mode 100644 index 0000000..b95210b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js @@ -0,0 +1,7 @@ +import { asyncScheduler } from '../scheduler/async'; +import { sample } from './sample'; +import { interval } from '../observable/interval'; +export function sampleTime(period, scheduler = asyncScheduler) { + return sample(interval(period, scheduler)); +} +//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map new file mode 100644 index 0000000..4842d3b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA6ClD,MAAM,UAAU,UAAU,CAAI,MAAc,EAAE,YAA2B,cAAc;IACrF,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scan.js b/node_modules/rxjs/dist/esm/internal/operators/scan.js new file mode 100644 index 0000000..b60b8e0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/scan.js @@ -0,0 +1,6 @@ +import { operate } from '../util/lift'; +import { scanInternals } from './scanInternals'; +export function scan(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); +} +//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scan.js.map b/node_modules/rxjs/dist/esm/internal/operators/scan.js.map new file mode 100644 index 0000000..dd32f36 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/scan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqFhD,MAAM,UAAU,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js new file mode 100644 index 0000000..9074cd1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js @@ -0,0 +1,22 @@ +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return (source, subscriber) => { + let hasState = hasSeed; + let state = seed; + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const i = index++; + state = hasState + ? + accumulator(state, value, i) + : + ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && + (() => { + hasState && subscriber.next(state); + subscriber.complete(); + }))); + }; +} +//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map new file mode 100644 index 0000000..5df4e95 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAWhE,MAAM,UAAU,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,CAAC,MAAqB,EAAE,UAA2B,EAAE,EAAE;QAI5D,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC,GAAG,EAAE;gBACJ,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js new file mode 100644 index 0000000..9b9f177 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js @@ -0,0 +1,39 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function sequenceEqual(compareTo, comparator = (a, b) => a === b) { + return operate((source, subscriber) => { + const aState = createState(); + const bState = createState(); + const emit = (isEqual) => { + subscriber.next(isEqual); + subscriber.complete(); + }; + const createSubscriber = (selfState, otherState) => { + const sequenceEqualSubscriber = createOperatorSubscriber(subscriber, (a) => { + const { buffer, complete } = otherState; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } + else { + !comparator(a, buffer.shift()) && emit(false); + } + }, () => { + selfState.complete = true; + const { complete, buffer } = otherState; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); +} +function createState() { + return { + buffer: [], + complete: false, + }; +} +//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map new file mode 100644 index 0000000..4d5f853 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,aAAa,CAC3B,SAA6B,EAC7B,aAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAEvD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,MAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAEhC,MAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAGhC,MAAM,IAAI,GAAG,CAAC,OAAgB,EAAE,EAAE;YAChC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAOF,MAAM,gBAAgB,GAAG,CAAC,SAA2B,EAAE,UAA4B,EAAE,EAAE;YACrF,MAAM,uBAAuB,GAAG,wBAAwB,CACtD,UAAU,EACV,CAAC,CAAI,EAAE,EAAE;gBACP,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;gBACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBAOvB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnD;qBAAM;oBAIL,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAChD;YACH,CAAC,EACD,GAAG,EAAE;gBAEH,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;gBAC1B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;gBAKxC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBAEtC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/share.js b/node_modules/rxjs/dist/esm/internal/operators/share.js new file mode 100644 index 0000000..da77830 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/share.js @@ -0,0 +1,79 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { SafeSubscriber } from '../Subscriber'; +import { operate } from '../util/lift'; +export function share(options = {}) { + const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options; + return (wrapperSource) => { + let connection; + let resetConnection; + let subject; + let refCount = 0; + let hasCompleted = false; + let hasErrored = false; + const cancelReset = () => { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + const reset = () => { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + const resetAndUnsubscribe = () => { + const conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return operate((source, subscriber) => { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + const dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + subscriber.add(() => { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && + refCount > 0) { + connection = new SafeSubscriber({ + next: (value) => dest.next(value), + error: (err) => { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: () => { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; +} +function handleReset(reset, on, ...args) { + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + const onSubscriber = new SafeSubscriber({ + next: () => { + onSubscriber.unsubscribe(); + reset(); + }, + }); + return innerFrom(on(...args)).subscribe(onSubscriber); +} +//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/share.js.map b/node_modules/rxjs/dist/esm/internal/operators/share.js.map new file mode 100644 index 0000000..589eff5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/share.js.map @@ -0,0 +1 @@ +{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwIvC,MAAM,UAAU,KAAK,CAAI,UAA0B,EAAE;IACnD,MAAM,EAAE,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,EAAK,EAAE,YAAY,GAAG,IAAI,EAAE,eAAe,GAAG,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAUhI,OAAO,CAAC,aAAa,EAAE,EAAE;QACvB,IAAI,UAAyC,CAAC;QAC9C,IAAI,eAAyC,CAAC;QAC9C,IAAI,OAAmC,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,eAAe,GAAG,SAAS,CAAC;QAC9B,CAAC,CAAC;QAGF,MAAM,KAAK,GAAG,GAAG,EAAE;YACjB,WAAW,EAAE,CAAC;YACd,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;YACjC,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;QACpC,CAAC,CAAC;QACF,MAAM,mBAAmB,GAAG,GAAG,EAAE;YAG/B,MAAM,IAAI,GAAG,UAAU,CAAC;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,CAAC;Q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CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD,EACpD,GAAG,IAAO;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,MAAM,YAAY,GAAG,IAAI,cAAc,CAAC;QACtC,IAAI,EAAE,GAAG,EAAE;YACT,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js new file mode 100644 index 0000000..aaf03bd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js @@ -0,0 +1,19 @@ +import { ReplaySubject } from '../ReplaySubject'; +import { share } from './share'; +export function shareReplay(configOrBufferSize, windowTime, scheduler) { + let bufferSize; + let refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize); + } + else { + bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); + } + return share({ + connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); +} +//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map new file mode 100644 index 0000000..48a09d0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwJhC,MAAM,UAAU,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAC,EAAE,UAAU,GAAG,QAAQ,EAAE,UAAU,GAAG,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/single.js b/node_modules/rxjs/dist/esm/internal/operators/single.js new file mode 100644 index 0000000..ccf5ac2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/single.js @@ -0,0 +1,30 @@ +import { EmptyError } from '../util/EmptyError'; +import { SequenceError } from '../util/SequenceError'; +import { NotFoundError } from '../util/NotFoundError'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function single(predicate) { + return operate((source, subscriber) => { + let hasValue = false; + let singleValue; + let seenValue = false; + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError('Too many matching values')); + hasValue = true; + singleValue = value; + } + }, () => { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } + else { + subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); + } + })); + }); +} +//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/single.js.map b/node_modules/rxjs/dist/esm/internal/operators/single.js.map new file mode 100644 index 0000000..fe9adb0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/single.js.map @@ -0,0 +1 @@ +{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiFhE,MAAM,UAAU,MAAM,CAAI,SAAuE;IAC/F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD,GAAG,EAAE;YACH,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skip.js b/node_modules/rxjs/dist/esm/internal/operators/skip.js new file mode 100644 index 0000000..0b3ef26 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skip.js @@ -0,0 +1,5 @@ +import { filter } from './filter'; +export function skip(count) { + return filter((_, index) => count <= index); +} +//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skip.js.map b/node_modules/rxjs/dist/esm/internal/operators/skip.js.map new file mode 100644 index 0000000..37a3d3b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmClC,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js new file mode 100644 index 0000000..5e99e1d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js @@ -0,0 +1,28 @@ +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function skipLast(skipCount) { + return skipCount <= 0 + ? + identity + : operate((source, subscriber) => { + let ring = new Array(skipCount); + let seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } + else { + const index = valueIndex % skipCount; + const oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return () => { + ring = null; + }; + }); +} +//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map new file mode 100644 index 0000000..9a4b519 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAI7B,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAK7C,MAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,MAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO,GAAG,EAAE;gBAEV,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js new file mode 100644 index 0000000..9de3cf8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js @@ -0,0 +1,16 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; +export function skipUntil(notifier) { + return operate((source, subscriber) => { + let taking = false; + const skipSubscriber = createOperatorSubscriber(subscriber, () => { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop); + innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); + }); +} +//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map new file mode 100644 index 0000000..41f7991 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA+CpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,MAAM,cAAc,GAAG,wBAAwB,CAC7C,UAAU,EACV,GAAG,EAAE;YACH,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,IAAI,CACL,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js new file mode 100644 index 0000000..4ce61e2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js @@ -0,0 +1,10 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function skipWhile(predicate) { + return operate((source, subscriber) => { + let taking = false; + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value))); + }); +} +//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map new file mode 100644 index 0000000..09bae37 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/startWith.js b/node_modules/rxjs/dist/esm/internal/operators/startWith.js new file mode 100644 index 0000000..7a3887e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/startWith.js @@ -0,0 +1,10 @@ +import { concat } from '../observable/concat'; +import { popScheduler } from '../util/args'; +import { operate } from '../util/lift'; +export function startWith(...values) { + const scheduler = popScheduler(values); + return operate((source, subscriber) => { + (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); + }); +} +//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map new file mode 100644 index 0000000..976a00b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuDvC,MAAM,UAAU,SAAS,CAAO,GAAG,MAAW;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAIpC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js new file mode 100644 index 0000000..35e23c0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js @@ -0,0 +1,7 @@ +import { operate } from '../util/lift'; +export function subscribeOn(scheduler, delay = 0) { + return operate((source, subscriber) => { + subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay)); + }); +} +//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map new file mode 100644 index 0000000..8a70bd5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6DvC,MAAM,UAAU,WAAW,CAAI,SAAwB,EAAE,QAAgB,CAAC;IACxE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js new file mode 100644 index 0000000..f0db599 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js @@ -0,0 +1,6 @@ +import { switchMap } from './switchMap'; +import { identity } from '../util/identity'; +export function switchAll() { + return switchMap(identity); +} +//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map new file mode 100644 index 0000000..f4b6438 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4D5C,MAAM,UAAU,SAAS;IACvB,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js new file mode 100644 index 0000000..10256d6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js @@ -0,0 +1,24 @@ +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function switchMap(project, resultSelector) { + return operate((source, subscriber) => { + let innerSubscriber = null; + let index = 0; + let isComplete = false; + const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + let innerIndex = 0; + const outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => { + innerSubscriber = null; + checkComplete(); + }))); + }, () => { + isComplete = true; + checkComplete(); + })); + }); +} +//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map new file mode 100644 index 0000000..a60c28b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiFhE,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,wBAAwB,CACzC,UAAU,EAIV,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC1H,GAAG,EAAE;gBAIH,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js new file mode 100644 index 0000000..7d1cfb9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js @@ -0,0 +1,6 @@ +import { switchMap } from './switchMap'; +import { isFunction } from '../util/isFunction'; +export function switchMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable); +} +//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map new file mode 100644 index 0000000..3483daa --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js new file mode 100644 index 0000000..0013b6d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js @@ -0,0 +1,12 @@ +import { switchMap } from './switchMap'; +import { operate } from '../util/lift'; +export function switchScan(accumulator, seed) { + return operate((source, subscriber) => { + let state = seed; + switchMap((value, index) => accumulator(state, value, index), (_, innerValue) => ((state = innerValue), innerValue))(source).subscribe(subscriber); + return () => { + state = null; + }; + }); +} +//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map new file mode 100644 index 0000000..bf73288 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAqBvC,MAAM,UAAU,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,SAAS,CAGP,CAAC,KAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAGrD,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO,GAAG,EAAE;YAEV,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/take.js b/node_modules/rxjs/dist/esm/internal/operators/take.js new file mode 100644 index 0000000..6319139 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/take.js @@ -0,0 +1,20 @@ +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function take(count) { + return count <= 0 + ? + () => EMPTY + : operate((source, subscriber) => { + let seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); +} +//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/take.js.map b/node_modules/rxjs/dist/esm/internal/operators/take.js.map new file mode 100644 index 0000000..d3cc7ac --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/take.js.map @@ -0,0 +1 @@ +{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAI7C,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js new file mode 100644 index 0000000..089d723 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js @@ -0,0 +1,22 @@ +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function takeLast(count) { + return count <= 0 + ? () => EMPTY + : operate((source, subscriber) => { + let buffer = []; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, () => { + for (const value of buffer) { + subscriber.next(value); + } + subscriber.complete(); + }, undefined, () => { + buffer = null; + })); + }); +} +//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map new file mode 100644 index 0000000..33585c2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAK7B,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;gBAER,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD,GAAG,EAAE;gBAGH,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;gBAEH,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js new file mode 100644 index 0000000..5913741 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; +export function takeUntil(notifier) { + return operate((source, subscriber) => { + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} +//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map new file mode 100644 index 0000000..818cdac --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAyCpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js new file mode 100644 index 0000000..1884fda --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js @@ -0,0 +1,13 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function takeWhile(predicate, inclusive = false) { + return operate((source, subscriber) => { + let index = 0; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map new file mode 100644 index 0000000..7b83c9d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoDhE,MAAM,UAAU,SAAS,CAAI,SAA+C,EAAE,SAAS,GAAG,KAAK;IAC7F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/tap.js b/node_modules/rxjs/dist/esm/internal/operators/tap.js new file mode 100644 index 0000000..96d1832 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/tap.js @@ -0,0 +1,40 @@ +import { isFunction } from '../util/isFunction'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; +export function tap(observerOrNext, error, complete) { + const tapObserver = isFunction(observerOrNext) || error || complete + ? + { next: observerOrNext, error, complete } + : observerOrNext; + return tapObserver + ? operate((source, subscriber) => { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + let isUnsub = true; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + var _a; + (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); + subscriber.next(value); + }, () => { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + subscriber.complete(); + }, (err) => { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); + subscriber.error(err); + }, () => { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) + : + identity; +} +//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/tap.js.map b/node_modules/rxjs/dist/esm/internal/operators/tap.js.map new file mode 100644 index 0000000..549b69d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/tap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,O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W,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,QAAQ,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttle.js b/node_modules/rxjs/dist/esm/internal/operators/throttle.js new file mode 100644 index 0000000..704be4b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throttle.js @@ -0,0 +1,43 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function throttle(durationSelector, config) { + return operate((source, subscriber) => { + const { leading = true, trailing = false } = config !== null && config !== void 0 ? config : {}; + let hasValue = false; + let sendValue = null; + let throttled = null; + let isComplete = false; + const endThrottling = () => { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + const cleanupThrottling = () => { + throttled = null; + isComplete && subscriber.complete(); + }; + const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + const send = () => { + if (hasValue) { + hasValue = false; + const value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, () => { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map b/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map new file mode 100644 index 0000000..e79ba8d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttle.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAG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,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBAEjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAMV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js new file mode 100644 index 0000000..4398d50 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js @@ -0,0 +1,8 @@ +import { asyncScheduler } from '../scheduler/async'; +import { throttle } from './throttle'; +import { timer } from '../observable/timer'; +export function throttleTime(duration, scheduler = asyncScheduler, config) { + const duration$ = timer(duration, scheduler); + return throttle(() => duration$, config); +} +//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map new file mode 100644 index 0000000..67c3997 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAmD5C,MAAM,UAAU,YAAY,CAC1B,QAAgB,EAChB,YAA2B,cAAc,EACzC,MAAuB;IAEvB,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js new file mode 100644 index 0000000..ca881bd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js @@ -0,0 +1,16 @@ +import { EmptyError } from '../util/EmptyError'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function throwIfEmpty(errorFactory = defaultErrorFactory) { + return operate((source, subscriber) => { + let hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + subscriber.next(value); + }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory())))); + }); +} +function defaultErrorFactory() { + return new EmptyError(); +} +//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map new file mode 100644 index 0000000..ba28c32 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsChE,MAAM,UAAU,YAAY,CAAI,eAA0B,mBAAmB;IAC3E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,UAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js new file mode 100644 index 0000000..3f93bf7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js @@ -0,0 +1,21 @@ +import { asyncScheduler } from '../scheduler/async'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function timeInterval(scheduler = asyncScheduler) { + return operate((source, subscriber) => { + let last = scheduler.now(); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const now = scheduler.now(); + const interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); +} +export class TimeInterval { + constructor(value, interval) { + this.value = value; + this.interval = interval; + } +} +//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map new file mode 100644 index 0000000..c1e0b60 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,YAAY,CAAI,YAA2B,cAAc;IACvE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,MAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAKD,MAAM,OAAO,YAAY;IAIvB,YAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;CACzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeout.js b/node_modules/rxjs/dist/esm/internal/operators/timeout.js new file mode 100644 index 0000000..3544461 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeout.js @@ -0,0 +1,56 @@ +import { asyncScheduler } from '../scheduler/async'; +import { isValidDate } from '../util/isDate'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createErrorClass } from '../util/createErrorClass'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { executeSchedule } from '../util/executeSchedule'; +export const TimeoutError = createErrorClass((_super) => function TimeoutErrorImpl(info = null) { + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; +}); +export function timeout(config, schedulerArg) { + const { first, each, with: _with = timeoutErrorFactory, scheduler = schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler, meta = null, } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config); + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return operate((source, subscriber) => { + let originalSourceSubscription; + let timerSubscription; + let lastValue = null; + let seen = 0; + const startTimer = (delay) => { + timerSubscription = executeSchedule(subscriber, scheduler, () => { + try { + originalSourceSubscription.unsubscribe(); + innerFrom(_with({ + meta, + lastValue, + seen, + })).subscribe(subscriber); + } + catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, (value) => { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, undefined, undefined, () => { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + }); +} +function timeoutErrorFactory(info) { + throw new TimeoutError(info); +} +//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map new file mode 100644 index 0000000..fea4b6c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA8E1D,MAAM,CAAC,MAAM,YAAY,GAAqB,gBAAgB,CAC5D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,gBAAgB,CAAY,OAAgC,IAAI;IACvE,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;IACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACnB,CAAC,CACJ,CAAC;AA6MF,MAAM,UAAU,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAS5B,MAAM,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EAAE,KAAK,GAAG,mBAAmB,EACjC,SAAS,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,cAAc,EAC1C,IAAI,GAAG,IAAK,GACb,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,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CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js new file mode 100644 index 0000000..7016ce1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js @@ -0,0 +1,31 @@ +import { async } from '../scheduler/async'; +import { isValidDate } from '../util/isDate'; +import { timeout } from './timeout'; +export function timeoutWith(due, withObservable, scheduler) { + let first; + let each; + let _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; + if (isValidDate(due)) { + first = due; + } + else if (typeof due === 'number') { + each = due; + } + if (withObservable) { + _with = () => withObservable; + } + else { + throw new TypeError('No observable provided to switch to'); + } + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return timeout({ + first, + each, + scheduler, + with: _with, + }); +} +//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map new file mode 100644 index 0000000..76cfe45 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,MAAM,UAAU,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC;IAE/B,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAwB;QACpC,KAAK;QACL,IAAI;QACJ,SAAS;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js new file mode 100644 index 0000000..b96206e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js @@ -0,0 +1,6 @@ +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { map } from './map'; +export function timestamp(timestampProvider = dateTimestampProvider) { + return map((value) => ({ value, timestamp: timestampProvider.now() })); +} +//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map new file mode 100644 index 0000000..1b623c9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkC5B,MAAM,UAAU,SAAS,CAAI,oBAAuC,qBAAqB;IACvF,OAAO,GAAG,CAAC,CAAC,KAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/toArray.js b/node_modules/rxjs/dist/esm/internal/operators/toArray.js new file mode 100644 index 0000000..01b9a1f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/toArray.js @@ -0,0 +1,9 @@ +import { reduce } from './reduce'; +import { operate } from '../util/lift'; +const arrReducer = (arr, value) => (arr.push(value), arr); +export function toArray() { + return operate((source, subscriber) => { + reduce(arrReducer, [])(source).subscribe(subscriber); + }); +} +//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map b/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map new file mode 100644 index 0000000..745c865 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,GAAG,CAAC,GAAU,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AAgCtE,MAAM,UAAU,OAAO;IAIrB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/window.js b/node_modules/rxjs/dist/esm/internal/operators/window.js new file mode 100644 index 0000000..0cd28da --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/window.js @@ -0,0 +1,28 @@ +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; +export function window(windowBoundaries) { + return operate((source, subscriber) => { + let windowSubject = new Subject(); + subscriber.next(windowSubject.asObservable()); + const errorHandler = (err) => { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(createOperatorSubscriber(subscriber, (value) => windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value), () => { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, () => { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, noop, errorHandler)); + return () => { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); +} +//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/window.js.map b/node_modules/rxjs/dist/esm/internal/operators/window.js.map new file mode 100644 index 0000000..0f7885c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/window.js.map @@ -0,0 +1 @@ +{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,MAAM,CAAI,gBAAsC;IAC9D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,aAAa,GAAe,IAAI,OAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAE,EAAE;YAChC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EACrC,GAAG,EAAE;YACH,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,IAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO,GAAG,EAAE;YAIV,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js new file mode 100644 index 0000000..6597452 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js @@ -0,0 +1,40 @@ +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function windowCount(windowSize, startWindowEvery = 0) { + const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return operate((source, subscriber) => { + let windows = [new Subject()]; + let starts = []; + let count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + for (const window of windows) { + window.next(value); + } + const c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + const window = new Subject(); + windows.push(window); + subscriber.next(window.asObservable()); + } + }, () => { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, (err) => { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, () => { + starts = null; + windows = null; + })); + }); +} +//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map new file mode 100644 index 0000000..45668a2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"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ACH,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD,GAAG,EAAE;YACH,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js new file mode 100644 index 0000000..eb37ebb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js @@ -0,0 +1,63 @@ +import { Subject } from '../Subject'; +import { asyncScheduler } from '../scheduler/async'; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; +export function windowTime(windowTimeSpan, ...otherArgs) { + var _a, _b; + const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + const windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + const maxWindowSize = otherArgs[1] || Infinity; + return operate((source, subscriber) => { + let windowRecords = []; + let restartOnClose = false; + const closeWindow = (record) => { + const { window, subs } = record; + window.complete(); + subs.unsubscribe(); + arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + const startWindow = () => { + if (windowRecords) { + const subs = new Subscription(); + subscriber.add(subs); + const window = new Subject(); + const record = { + window, + subs, + seen: 0, + }; + windowRecords.push(record); + subscriber.next(window.asObservable()); + executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } + else { + restartOnClose = true; + } + startWindow(); + const loop = (cb) => windowRecords.slice().forEach(cb); + const terminate = (cb) => { + loop(({ window }) => cb(window)); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + loop((record) => { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, () => terminate((consumer) => consumer.complete()), (err) => terminate((consumer) => consumer.error(err)))); + return () => { + windowRecords = null; + }; + }); +} +//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map new file mode 100644 index 0000000..f2ef41e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgG1D,MAAM,UAAU,UAAU,CAAI,cAAsB,EAAE,GA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owToggle.js b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js new file mode 100644 index 0000000..d7c27fb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js @@ -0,0 +1,54 @@ +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; +export function windowToggle(openings, closingSelector) { + return operate((source, subscriber) => { + const windows = []; + const handleError = (err) => { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => { + const window = new Subject(); + windows.push(window); + const closingSubscription = new Subscription(); + const closeWindow = () => { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + let closingNotifier; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } + catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + const windowsCopy = windows.slice(); + for (const window of windowsCopy) { + window.next(value); + } + }, () => { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, () => { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); +} +//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map new file mode 100644 index 0000000..a5cc88f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAA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aACzD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAEvC,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAGX,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;YACpC,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;gBAChC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,GAAG,EAAE;YAEH,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX,GAAG,EAAE;YAMH,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,WAAW,EAAE,CAAC;aAChC;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js new file mode 100644 index 0000000..10e4972 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js @@ -0,0 +1,38 @@ +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function windowWhen(closingSelector) { + return operate((source, subscriber) => { + let window; + let closingSubscriber; + const handleError = (err) => { + window.error(err); + subscriber.error(err); + }; + const openWindow = () => { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window === null || window === void 0 ? void 0 : window.complete(); + window = new Subject(); + subscriber.next(window.asObservable()); + let closingNotifier; + try { + closingNotifier = innerFrom(closingSelector()); + } + catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + openWindow(); + source.subscribe(createOperatorSubscriber(subscriber, (value) => window.next(value), () => { + window.complete(); + subscriber.complete(); + }, handleError, () => { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window = null; + })); + }); +} +//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map new file mode 100644 index 0000000..486bcec --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAyB,CAAC;QAC9B,IAAI,iBAA8C,CAAC;QAMnD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;YAC/B,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAQF,MAAM,UAAU,GAAG,GAAG,EAAE;YAGtB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAGjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,CAAC;YAGnB,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAGvC,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAMD,eAAe,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,MAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAC9B,GAAG,EAAE;YAEH,MAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX,GAAG,EAAE;YAGH,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js new file mode 100644 index 0000000..94a4811 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js @@ -0,0 +1,31 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { identity } from '../util/identity'; +import { noop } from '../util/noop'; +import { popResultSelector } from '../util/args'; +export function withLatestFrom(...inputs) { + const project = popResultSelector(inputs); + return operate((source, subscriber) => { + const len = inputs.length; + const otherValues = new Array(len); + let hasValue = inputs.map(() => false); + let ready = false; + for (let i = 0; i < len; i++) { + innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && (hasValue = null); + } + }, noop)); + } + source.subscribe(createOperatorSubscriber(subscriber, (value) => { + if (ready) { + const values = [value, ...otherValues]; + subscriber.next(project ? project(...values) : values); + } + })); + }); +} +//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map new file mode 100644 index 0000000..b1ef971 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAmDjD,MAAM,UAAU,cAAc,CAAO,GAAG,MA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AAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zip.js b/node_modules/rxjs/dist/esm/internal/operators/zip.js new file mode 100644 index 0000000..39709ed --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zip.js @@ -0,0 +1,8 @@ +import { zip as zipStatic } from '../observable/zip'; +import { operate } from '../util/lift'; +export function zip(...sources) { + return operate((source, subscriber) => { + zipStatic(source, ...sources).subscribe(subscriber); + }); +} +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zip.js.map b/node_modules/rxjs/dist/esm/internal/operators/zip.js.map new file mode 100644 index 0000000..59aadb9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmBvC,MAAM,UAAU,GAAG,CAAO,GAAG,OAAqE;IAChG,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,CAAC,MAA8B,EAAE,GAAI,OAAuC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js new file mode 100644 index 0000000..c3faf7e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js @@ -0,0 +1,6 @@ +import { zip } from '../observable/zip'; +import { joinAllInternals } from './joinAllInternals'; +export function zipAll(project) { + return joinAllInternals(zip, project); +} +//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map new file mode 100644 index 0000000..92c858e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAetD,MAAM,UAAU,MAAM,CAAO,OAA+B;IAC1D,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js new file mode 100644 index 0000000..102d362 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js @@ -0,0 +1,5 @@ +import { zip } from './zip'; +export function zipWith(...otherInputs) { + return zip(...otherInputs); +} +//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map new file mode 100644 index 0000000..2949854 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAyB5B,MAAM,UAAU,OAAO,CAAkC,GAAG,WAAyC;IACnG,OAAO,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js new file mode 100644 index 0000000..ea7b5cb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js @@ -0,0 +1,18 @@ +import { Observable } from '../Observable'; +export function scheduleArray(input, scheduler) { + return new Observable((subscriber) => { + let i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } + else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} +//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map new file mode 100644 index 0000000..b14139b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QAEtC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js new file mode 100644 index 0000000..2ab8199 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js @@ -0,0 +1,23 @@ +import { Observable } from '../Observable'; +import { executeSchedule } from '../util/executeSchedule'; +export function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable((subscriber) => { + executeSchedule(subscriber, scheduler, () => { + const iterator = input[Symbol.asyncIterator](); + executeSchedule(subscriber, scheduler, () => { + iterator.next().then((result) => { + if (result.done) { + subscriber.complete(); + } + else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); +} +//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map new file mode 100644 index 0000000..80005cd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,UAAU,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACtC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;YAC1C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,eAAe,CACb,UAAU,EACV,SAAS,EACT,GAAG,EAAE;gBACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBAC9B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js new file mode 100644 index 0000000..c4f6236 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js @@ -0,0 +1,31 @@ +import { Observable } from '../Observable'; +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from '../util/isFunction'; +import { executeSchedule } from '../util/executeSchedule'; +export function scheduleIterable(input, scheduler) { + return new Observable((subscriber) => { + let iterator; + executeSchedule(subscriber, scheduler, () => { + iterator = input[Symbol_iterator](); + executeSchedule(subscriber, scheduler, () => { + let value; + let done; + try { + ({ value, done } = iterator.next()); + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + } + }, 0, true); + }); + return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); + }); +} +//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map new file mode 100644 index 0000000..16ebd84 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,MAAM,UAAU,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACtC,IAAI,QAAwB,CAAC;QAK7B,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;YAE1C,QAAQ,GAAI,KAAa,CAAC,eAAe,CAAC,EAAE,CAAC;YAE7C,eAAe,CACb,UAAU,EACV,SAAS,EACT,GAAG,EAAE;gBACH,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js new file mode 100644 index 0000000..979b009 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js @@ -0,0 +1,7 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +export function scheduleObservable(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} +//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map new file mode 100644 index 0000000..2010050 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js new file mode 100644 index 0000000..287c986 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js @@ -0,0 +1,7 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +export function schedulePromise(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} +//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map new file mode 100644 index 0000000..8da74ad --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js new file mode 100644 index 0000000..4bfbfc2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js @@ -0,0 +1,6 @@ +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; +export function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); +} +//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map new file mode 100644 index 0000000..6026c90 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,UAAU,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js new file mode 100644 index 0000000..3ed1085 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js @@ -0,0 +1,37 @@ +import { scheduleObservable } from './scheduleObservable'; +import { schedulePromise } from './schedulePromise'; +import { scheduleArray } from './scheduleArray'; +import { scheduleIterable } from './scheduleIterable'; +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isPromise } from '../util/isPromise'; +import { isArrayLike } from '../util/isArrayLike'; +import { isIterable } from '../util/isIterable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isReadableStreamLike } from '../util/isReadableStreamLike'; +import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; +export function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable(input)) { + return scheduleObservable(input, scheduler); + } + if (isArrayLike(input)) { + return scheduleArray(input, scheduler); + } + if (isPromise(input)) { + return schedulePromise(input, scheduler); + } + if (isAsyncIterable(input)) { + return scheduleAsyncIterable(input, scheduler); + } + if (isIterable(input)) { + return scheduleIterable(input, scheduler); + } + if (isReadableStreamLike(input)) { + return scheduleReadableStreamLike(input, scheduler); + } + } + throw createInvalidObservableTypeError(input); +} +//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map new file mode 100644 index 0000000..6355931 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAa1E,MAAM,UAAU,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js new file mode 100644 index 0000000..4ded474 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js @@ -0,0 +1,10 @@ +import { Subscription } from '../Subscription'; +export class Action extends Subscription { + constructor(scheduler, work) { + super(); + } + schedule(state, delay = 0) { + return this; + } +} +//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map new file mode 100644 index 0000000..811a949 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiB/C,MAAM,OAAO,MAAU,SAAQ,YAAY;IACzC,YAAY,SAAoB,EAAE,IAAmD;QACnF,KAAK,EAAE,CAAC;IACV,CAAC;IAWM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js new file mode 100644 index 0000000..3e550af --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js @@ -0,0 +1,29 @@ +import { AsyncAction } from './AsyncAction'; +import { animationFrameProvider } from './animationFrameProvider'; +export class AnimationFrameAction extends AsyncAction { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + } + requestAsyncId(scheduler, id, delay = 0) { + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined))); + } + recycleAsyncId(scheduler, id, delay = 0) { + var _a; + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + const { actions } = scheduler; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + } +} +//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map new file mode 100644 index 0000000..fbef604 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC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at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js new file mode 100644 index 0000000..3bcf48c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js @@ -0,0 +1,24 @@ +import { AsyncScheduler } from './AsyncScheduler'; +export class AnimationFrameScheduler extends AsyncScheduler { + flush(action) { + this._active = true; + const flushId = this._scheduled; + this._scheduled = undefined; + const { actions } = this; + let error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} +//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map new file mode 100644 index 0000000..d7042ce --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IAClD,KAAK,CAAC,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js new file mode 100644 index 0000000..8a2ba77 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js @@ -0,0 +1,31 @@ +import { AsyncAction } from './AsyncAction'; +import { immediateProvider } from './immediateProvider'; +export class AsapAction extends AsyncAction { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + } + requestAsyncId(scheduler, id, delay = 0) { + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + } + recycleAsyncId(scheduler, id, delay = 0) { + var _a; + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + const { actions } = scheduler; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + } +} +//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map new file mode 100644 index 0000000..9491c08 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,OAAO,UAAc,SAAQ,WAAc;IAC/C,YAAsB,SAAwB,EAAY,IAAmD;QAC3G,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAe;QAAY,SAAI,GAAJ,IAAI,CAA+C;IAE7G,CAAC;IAES,cAAc,CAAC,SAAwB,EAAE,EAAgB,EAAE,QAAgB,CAAC;QAEpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrI,CAAC;IAES,cAAc,CAAC,SAAwB,EAAE,EAAgB,EAAE,QAAgB,CAAC;;QAIpF,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAID,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;aAClC;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js new file mode 100644 index 0000000..2aa86c9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js @@ -0,0 +1,24 @@ +import { AsyncScheduler } from './AsyncScheduler'; +export class AsapScheduler extends AsyncScheduler { + flush(action) { + this._active = true; + const flushId = this._scheduled; + this._scheduled = undefined; + const { actions } = this; + let error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} +//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map new file mode 100644 index 0000000..4d4d92c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,aAAc,SAAQ,cAAc;IACxC,KAAK,CAAC,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js new file mode 100644 index 0000000..e0774f3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js @@ -0,0 +1,82 @@ +import { Action } from './Action'; +import { intervalProvider } from './intervalProvider'; +import { arrRemove } from '../util/arrRemove'; +export class AsyncAction extends Action { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + this.pending = false; + } + schedule(state, delay = 0) { + var _a; + if (this.closed) { + return this; + } + this.state = state; + const id = this.id; + const scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + } + requestAsyncId(scheduler, _id, delay = 0) { + return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + } + recycleAsyncId(_scheduler, id, delay = 0) { + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + intervalProvider.clearInterval(id); + } + return undefined; + } + execute(state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + const error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + } + _execute(state, _delay) { + let errored = false; + let errorValue; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + } + unsubscribe() { + if (!this.closed) { + const { id, scheduler } = this; + const { actions } = scheduler; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + super.unsubscribe(); + } + } +} +//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map new file mode 100644 index 0000000..a10b180 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names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C;YACnB,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;IAED,WAAW;QACT,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;YAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;YAE9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAK,CAAC;YAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YAErB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzB,IAAI,EAAE,IAAI,IAAI,EAAE;gBACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,KAAK,GAAG,IAAK,CAAC;YACnB,KAAK,CAAC,WAAW,EAAE,CAAC;SACrB;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js new file mode 100644 index 0000000..c57668c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js @@ -0,0 +1,30 @@ +import { Scheduler } from '../Scheduler'; +export class AsyncScheduler extends Scheduler { + constructor(SchedulerAction, now = Scheduler.now) { + super(SchedulerAction, now); + this.actions = []; + this._active = false; + } + flush(action) { + const { actions } = this; + if (this._active) { + actions.push(action); + return; + } + let error; + this._active = true; + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift())); + this._active = false; + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + } +} +//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map new file mode 100644 index 0000000..2c6d790 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,MAAM,OAAO,cAAe,SAAQ,SAAS;IAkB3C,YAAY,eAA8B,EAAE,MAAoB,SAAS,CAAC,GAAG;QAC3E,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAlBvB,YAAO,GAA4B,EAAE,CAAC;QAOtC,YAAO,GAAY,KAAK,CAAC;IAYhC,CAAC;IAEM,KAAK,CAAC,MAAwB;QACnC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js new file mode 100644 index 0000000..002b94a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js @@ -0,0 +1,28 @@ +import { AsyncAction } from './AsyncAction'; +export class QueueAction extends AsyncAction { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + } + schedule(state, delay = 0) { + if (delay > 0) { + return super.schedule(state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + } + execute(state, delay) { + return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay); + } + requestAsyncId(scheduler, id, delay = 0) { + if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { + return super.requestAsyncId(scheduler, id, delay); + } + scheduler.flush(this); + return 0; + } +} +//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map new file mode 100644 index 0000000..91db28e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,MAAM,OAAO,WAAe,SAAQ,WAAc;IAChD,YAAsB,SAAyB,EAAY,IAAmD;QAC5G,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAgB;QAAY,SAAI,GAAJ,IAAI,CAA+C;IAE9G,CAAC;IAEM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,OAAO,CAAC,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,cAAc,CAAC,SAAyB,EAAE,EAAgB,EAAE,QAAgB,CAAC;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js new file mode 100644 index 0000000..cc1fb4d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js @@ -0,0 +1,4 @@ +import { AsyncScheduler } from './AsyncScheduler'; +export class QueueScheduler extends AsyncScheduler { +} +//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map new file mode 100644 index 0000000..3cad8d8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,cAAe,SAAQ,cAAc;CACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js new file mode 100644 index 0000000..607ced6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js @@ -0,0 +1,89 @@ +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +export class VirtualTimeScheduler extends AsyncScheduler { + constructor(schedulerActionCtor = VirtualAction, maxFrames = Infinity) { + super(schedulerActionCtor, () => this.frame); + this.maxFrames = maxFrames; + this.frame = 0; + this.index = -1; + } + flush() { + const { actions, maxFrames } = this; + let error; + let action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + } +} +VirtualTimeScheduler.frameTimeFactor = 10; +export class VirtualAction extends AsyncAction { + constructor(scheduler, work, index = (scheduler.index += 1)) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + this.index = index; + this.active = true; + this.index = scheduler.index = index; + } + schedule(state, delay = 0) { + if (Number.isFinite(delay)) { + if (!this.id) { + return super.schedule(state, delay); + } + this.active = false; + const action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } + else { + return Subscription.EMPTY; + } + } + requestAsyncId(scheduler, id, delay = 0) { + this.delay = scheduler.frame + delay; + const { actions } = scheduler; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return 1; + } + recycleAsyncId(scheduler, id, delay = 0) { + return undefined; + } + _execute(state, delay) { + if (this.active === true) { + return super._execute(state, delay); + } + } + static sortActions(a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + } +} +//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map new file mode 100644 index 0000000..c4d75be --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAyBtD,YAAY,sBAA0C,aAAoB,EAAS,YAAoB,QAAQ;QAC7G,KAAK,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QADoC,cAAS,GAAT,SAAS,CAAmB;QAfxG,UAAK,GAAW,CAAC,CAAC;QAMlB,UAAK,GAAW,CAAC,CAAC,CAAC;IAW1B,CAAC;IAOM,KAAK;QACV,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,MAAoC,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KA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O,YAAY,CAAC,KAAK,CAAC;SAC3B;IACH,CAAC;IAES,cAAc,CAAC,SAA+B,EAAE,EAAQ,EAAE,QAAgB,CAAC;QACnF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;QACrC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,OAAmC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACrE,OAAO,CAAC,CAAC;IACX,CAAC;IAES,cAAc,CAAC,SAA+B,EAAE,EAAQ,EAAE,QAAgB,CAAC;QACnF,OAAO,SAAS,CAAC;IACnB,CAAC;IAES,QAAQ,CAAC,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEO,MAAM,CAAC,WAAW,CAAI,CAAmB,EAAE,CAAmB;QACpE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js new file mode 100644 index 0000000..6575d95 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js @@ -0,0 +1,5 @@ +import { AnimationFrameAction } from './AnimationFrameAction'; +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; +export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); +export const animationFrame = animationFrameScheduler; +//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map new file mode 100644 index 0000000..0105171 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkCpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAKzF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js new file mode 100644 index 0000000..6bf861b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js @@ -0,0 +1,27 @@ +import { Subscription } from '../Subscription'; +export const animationFrameProvider = { + schedule(callback) { + let request = requestAnimationFrame; + let cancel = cancelAnimationFrame; + const { delegate } = animationFrameProvider; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + const handle = request((timestamp) => { + cancel = undefined; + callback(timestamp); + }); + return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle)); + }, + requestAnimationFrame(...args) { + const { delegate } = animationFrameProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args); + }, + cancelAnimationFrame(...args) { + const { delegate } = animationFrameProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args); + }, + delegate: undefined, +}; +//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map new file mode 100644 index 0000000..635cc93 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C,MAAM,CAAC,MAAM,sBAAsB,GAA2B;IAG5D,QAAQ,CAAC,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QAC3E,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAInC,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB,CAAC,GAAG,IAAI;QAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7E,CAAC;IACD,oBAAoB,CAAC,GAAG,IAAI;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js new file mode 100644 index 0000000..29ae3a8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js @@ -0,0 +1,5 @@ +import { AsapAction } from './AsapAction'; +import { AsapScheduler } from './AsapScheduler'; +export const asapScheduler = new AsapScheduler(AsapAction); +export const asap = asapScheduler; +//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map new file mode 100644 index 0000000..a38738a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqChD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AAK3D,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/async.js b/node_modules/rxjs/dist/esm/internal/scheduler/async.js new file mode 100644 index 0000000..8d0283e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/async.js @@ -0,0 +1,5 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; +export const asyncScheduler = new AsyncScheduler(AsyncAction); +export const async = asyncScheduler; +//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map new file mode 100644 index 0000000..f14b80d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map @@ -0,0 +1 @@ +{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDlD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js new file mode 100644 index 0000000..085f1cf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js @@ -0,0 +1,7 @@ +export const dateTimestampProvider = { + now() { + return (dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map new file mode 100644 index 0000000..7b947fe --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js new file mode 100644 index 0000000..1825ab0 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js @@ -0,0 +1,14 @@ +import { Immediate } from '../util/Immediate'; +const { setImmediate, clearImmediate } = Immediate; +export const immediateProvider = { + setImmediate(...args) { + const { delegate } = immediateProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args); + }, + clearImmediate(handle) { + const { delegate } = immediateProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map new file mode 100644 index 0000000..22ad319 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;AAgBnD,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAGlD,YAAY,CAAC,GAAG,IAAI;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,cAAc,CAAC,MAAM;QACnB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js new file mode 100644 index 0000000..3e528f1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js @@ -0,0 +1,15 @@ +export const intervalProvider = { + setInterval(handler, timeout, ...args) { + const { delegate } = intervalProvider; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval(handler, timeout, ...args); + } + return setInterval(handler, timeout, ...args); + }, + clearInterval(handle) { + const { delegate } = intervalProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map new file mode 100644 index 0000000..7daf0dc --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAGhD,WAAW,CAAC,OAAmB,EAAE,OAAgB,EAAE,GAAG,IAAI;QACxD,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;SACxD;QACD,OAAO,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,aAAa,CAAC,MAAM;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js new file mode 100644 index 0000000..e82dfb7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js @@ -0,0 +1,7 @@ +export const performanceTimestampProvider = { + now() { + return (performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map new file mode 100644 index 0000000..79585a7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,4BAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js new file mode 100644 index 0000000..cb4f218 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js @@ -0,0 +1,5 @@ +import { QueueAction } from './QueueAction'; +import { QueueScheduler } from './QueueScheduler'; +export const queueScheduler = new QueueScheduler(QueueAction); +export const queue = queueScheduler; +//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map new file mode 100644 index 0000000..d4b5e44 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiElD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js new file mode 100644 index 0000000..56f8bbb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js @@ -0,0 +1,15 @@ +export const timeoutProvider = { + setTimeout(handler, timeout, ...args) { + const { delegate } = timeoutProvider; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout(handler, timeout, ...args); + } + return setTimeout(handler, timeout, ...args); + }, + clearTimeout(handle) { + const { delegate } = timeoutProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map new file mode 100644 index 0000000..dfc06f5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,eAAe,GAAoB;IAG9C,UAAU,CAAC,OAAmB,EAAE,OAAgB,EAAE,GAAG,IAAI;QACvD,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;SACvD;QACD,OAAO,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,YAAY,CAAC,MAAM;QACjB,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js new file mode 100644 index 0000000..40cf606 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map new file mode 100644 index 0000000..8efd320 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js new file mode 100644 index 0000000..6f2c37d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js @@ -0,0 +1,8 @@ +export function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +export const iterator = getSymbolIterator(); +//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map new file mode 100644 index 0000000..c9fb6e7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/observable.js b/node_modules/rxjs/dist/esm/internal/symbol/observable.js new file mode 100644 index 0000000..bf38e06 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/symbol/observable.js @@ -0,0 +1,2 @@ +export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')(); +//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map b/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map new file mode 100644 index 0000000..da070ab --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,UAAU,GAAoB,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js new file mode 100644 index 0000000..0733e6e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js @@ -0,0 +1,34 @@ +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { observeNotification } from '../Notification'; +export class ColdObservable extends Observable { + constructor(messages, scheduler) { + super(function (subscriber) { + const observable = this; + const index = observable.logSubscribedFrame(); + const subscription = new Subscription(); + subscription.add(new Subscription(() => { + observable.logUnsubscribedFrame(index); + })); + observable.scheduleMessages(subscriber); + return subscription; + }); + this.messages = messages; + this.subscriptions = []; + this.scheduler = scheduler; + } + scheduleMessages(subscriber) { + const messagesLength = this.messages.length; + for (let i = 0; i < messagesLength; i++) { + const message = this.messages[i]; + subscriber.add(this.scheduler.schedule((state) => { + const { message: { notification }, subscriber: destination } = state; + observeNotification(notification, destination); + }, message.frame, { message, subscriber })); + } + } +} +applyMixins(ColdObservable, [SubscriptionLoggable]); +//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map new file mode 100644 index 0000000..d573dee --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,cAAkB,SAAQ,UAAa;IAQlD,YAAmB,QAAuB,EAAE,SAAoB;QAC9D,KAAK,CAAC,UAA+B,UAA2B;YAC9D,MAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC,GAAG,EAAE;gBACpB,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CAAC;QAZc,aAAQ,GAAR,QAAQ,CAAe;QAPnC,kBAAa,GAAsB,EAAE,CAAC;QAoB3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,UAA2B;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,CAAC,KAAK,EAAE,EAAE;gBACR,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,KAAM,CAAC;gBACtE,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,EAAE,UAAU,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;CACF;AACD,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js new file mode 100644 index 0000000..403247e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js @@ -0,0 +1,37 @@ +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { observeNotification } from '../Notification'; +export class HotObservable extends Subject { + constructor(messages, scheduler) { + super(); + this.messages = messages; + this.subscriptions = []; + this.scheduler = scheduler; + } + _subscribe(subscriber) { + const subject = this; + const index = subject.logSubscribedFrame(); + const subscription = new Subscription(); + subscription.add(new Subscription(() => { + subject.logUnsubscribedFrame(index); + })); + subscription.add(super._subscribe(subscriber)); + return subscription; + } + setup() { + const subject = this; + const messagesLength = subject.messages.length; + for (let i = 0; i < messagesLength; i++) { + (() => { + const { notification, frame } = subject.messages[i]; + subject.scheduler.schedule(() => { + observeNotification(notification, subject); + }, frame); + })(); + } + } +} +applyMixins(HotObservable, [SubscriptionLoggable]); +//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map new file mode 100644 index 0000000..a549885 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,aAAiB,SAAQ,OAAU;IAQ9C,YAAmB,QAAuB,EAAE,SAAoB;QAC9D,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAe;QAPnC,kBAAa,GAAsB,EAAE,CAAC;QAS3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAGS,UAAU,CAAC,UAA2B;QAC9C,MAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC,GAAG,EAAE;YACpB,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,KAAK;QACH,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,CAAC,GAAG,EAAE;gBACJ,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAEpD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE;oBAC9B,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC7C,CAAC,EAAE,KAAK,CAAC,CAAC;YACZ,CAAC,CAAC,EAAE,CAAC;SACN;IACH,CAAC;CACF;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js new file mode 100644 index 0000000..56eb690 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js @@ -0,0 +1,7 @@ +export class SubscriptionLog { + constructor(subscribedFrame, unsubscribedFrame = Infinity) { + this.subscribedFrame = subscribedFrame; + this.unsubscribedFrame = unsubscribedFrame; + } +} +//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map new file mode 100644 index 0000000..c4d842c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,YAAmB,eAAuB,EACvB,oBAA4B,QAAQ;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js new file mode 100644 index 0000000..08a00d7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js @@ -0,0 +1,16 @@ +import { SubscriptionLog } from './SubscriptionLog'; +export class SubscriptionLoggable { + constructor() { + this.subscriptions = []; + } + logSubscribedFrame() { + this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); + return this.subscriptions.length - 1; + } + logUnsubscribedFrame(index) { + const subscriptionLogs = this.subscriptions; + const oldSubscriptionLog = subscriptionLogs[index]; + subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); + } +} +//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map new file mode 100644 index 0000000..6dbcb63 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,OAAO,oBAAoB;IAAjC;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,kBAAkB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,oBAAoB,CAAC,KAAa;QAChC,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js new file mode 100644 index 0000000..47c15db --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map new file mode 100644 index 0000000..f91e8da --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js new file mode 100644 index 0000000..90419db --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js @@ -0,0 +1,505 @@ +import { Observable } from '../Observable'; +import { ColdObservable } from './ColdObservable'; +import { HotObservable } from './HotObservable'; +import { SubscriptionLog } from './SubscriptionLog'; +import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; +import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../scheduler/animationFrameProvider'; +import { immediateProvider } from '../scheduler/immediateProvider'; +import { intervalProvider } from '../scheduler/intervalProvider'; +import { timeoutProvider } from '../scheduler/timeoutProvider'; +const defaultMaxFrame = 750; +export class TestScheduler extends VirtualTimeScheduler { + constructor(assertDeepEqual) { + super(VirtualAction, defaultMaxFrame); + this.assertDeepEqual = assertDeepEqual; + this.hotObservables = []; + this.coldObservables = []; + this.flushTests = []; + this.runMode = false; + } + createTime(marbles) { + const indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + if (indexOf === -1) { + throw new Error('marble diagram for time should have a completion marker "|"'); + } + return indexOf * TestScheduler.frameTimeFactor; + } + createColdObservable(marbles, values, error) { + if (marbles.indexOf('^') !== -1) { + throw new Error('cold observable cannot have subscription offset "^"'); + } + if (marbles.indexOf('!') !== -1) { + throw new Error('cold observable cannot have unsubscription marker "!"'); + } + const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const cold = new ColdObservable(messages, this); + this.coldObservables.push(cold); + return cold; + } + createHotObservable(marbles, values, error) { + if (marbles.indexOf('!') !== -1) { + throw new Error('hot observable cannot have unsubscription marker "!"'); + } + const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const subject = new HotObservable(messages, this); + this.hotObservables.push(subject); + return subject; + } + materializeInnerObservable(observable, outerFrame) { + const messages = []; + observable.subscribe({ + next: (value) => { + messages.push({ frame: this.frame - outerFrame, notification: nextNotification(value) }); + }, + error: (error) => { + messages.push({ frame: this.frame - outerFrame, notification: errorNotification(error) }); + }, + complete: () => { + messages.push({ frame: this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); + }, + }); + return messages; + } + expectObservable(observable, subscriptionMarbles = null) { + const actual = []; + const flushTest = { actual, ready: false }; + const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); + const subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + const unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; + let subscription; + this.schedule(() => { + subscription = observable.subscribe({ + next: (x) => { + const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; + actual.push({ frame: this.frame, notification: nextNotification(value) }); + }, + error: (error) => { + actual.push({ frame: this.frame, notification: errorNotification(error) }); + }, + complete: () => { + actual.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + if (unsubscriptionFrame !== Infinity) { + this.schedule(() => subscription.unsubscribe(), unsubscriptionFrame); + } + this.flushTests.push(flushTest); + const { runMode } = this; + return { + toBe(marbles, values, errorValue) { + flushTest.ready = true; + flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + }, + toEqual: (other) => { + flushTest.ready = true; + flushTest.expected = []; + this.schedule(() => { + subscription = other.subscribe({ + next: (x) => { + const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; + flushTest.expected.push({ frame: this.frame, notification: nextNotification(value) }); + }, + error: (error) => { + flushTest.expected.push({ frame: this.frame, notification: errorNotification(error) }); + }, + complete: () => { + flushTest.expected.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + }, + }; + } + expectSubscriptions(actualSubscriptionLogs) { + const flushTest = { actual: actualSubscriptionLogs, ready: false }; + this.flushTests.push(flushTest); + const { runMode } = this; + return { + toBe(marblesOrMarblesArray) { + const marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + flushTest.ready = true; + flushTest.expected = marblesArray + .map((marbles) => TestScheduler.parseMarblesAsSubscriptions(marbles, runMode)) + .filter((marbles) => marbles.subscribedFrame !== Infinity); + }, + }; + } + flush() { + const hotObservables = this.hotObservables; + while (hotObservables.length > 0) { + hotObservables.shift().setup(); + } + super.flush(); + this.flushTests = this.flushTests.filter((test) => { + if (test.ready) { + this.assertDeepEqual(test.actual, test.expected); + return false; + } + return true; + }); + } + static parseMarblesAsSubscriptions(marbles, runMode = false) { + if (typeof marbles !== 'string') { + return new SubscriptionLog(Infinity); + } + const characters = [...marbles]; + const len = characters.length; + let groupStart = -1; + let subscriptionFrame = Infinity; + let unsubscriptionFrame = Infinity; + let frame = 0; + for (let i = 0; i < len; i++) { + let nextFrame = frame; + const advanceFrameBy = (count) => { + nextFrame += count * this.frameTimeFactor; + }; + const c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '^': + if (subscriptionFrame !== Infinity) { + throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + } + subscriptionFrame = groupStart > -1 ? groupStart : frame; + advanceFrameBy(1); + break; + case '!': + if (unsubscriptionFrame !== Infinity) { + throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + } + unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + const buffer = characters.slice(i).join(''); + const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + const duration = parseFloat(match[1]); + const unit = match[2]; + let durationInMs; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this.frameTimeFactor); + break; + } + } + } + throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + } + frame = nextFrame; + } + if (unsubscriptionFrame < 0) { + return new SubscriptionLog(subscriptionFrame); + } + else { + return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } + } + static parseMarbles(marbles, values, errorValue, materializeInnerObservables = false, runMode = false) { + if (marbles.indexOf('!') !== -1) { + throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + } + const characters = [...marbles]; + const len = characters.length; + const testMessages = []; + const subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + let frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; + const getValue = typeof values !== 'object' + ? (x) => x + : (x) => { + if (materializeInnerObservables && values[x] instanceof ColdObservable) { + return values[x].messages; + } + return values[x]; + }; + let groupStart = -1; + for (let i = 0; i < len; i++) { + let nextFrame = frame; + const advanceFrameBy = (count) => { + nextFrame += count * this.frameTimeFactor; + }; + let notification; + const c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '|': + notification = COMPLETE_NOTIFICATION; + advanceFrameBy(1); + break; + case '^': + advanceFrameBy(1); + break; + case '#': + notification = errorNotification(errorValue || 'error'); + advanceFrameBy(1); + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + const buffer = characters.slice(i).join(''); + const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + const duration = parseFloat(match[1]); + const unit = match[2]; + let durationInMs; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this.frameTimeFactor); + break; + } + } + } + notification = nextNotification(getValue(c)); + advanceFrameBy(1); + break; + } + if (notification) { + testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification }); + } + frame = nextFrame; + } + return testMessages; + } + createAnimator() { + if (!this.runMode) { + throw new Error('animate() must only be used in run mode'); + } + let lastHandle = 0; + let map; + const delegate = { + requestAnimationFrame(callback) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + const handle = ++lastHandle; + map.set(handle, callback); + return handle; + }, + cancelAnimationFrame(handle) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + map.delete(handle); + }, + }; + const animate = (marbles) => { + if (map) { + throw new Error('animate() must not be called more than once within run()'); + } + if (/[|#]/.test(marbles)) { + throw new Error('animate() must not complete or error'); + } + map = new Map(); + const messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + for (const message of messages) { + this.schedule(() => { + const now = this.now(); + const callbacks = Array.from(map.values()); + map.clear(); + for (const callback of callbacks) { + callback(now); + } + }, message.frame); + } + }; + return { animate, delegate }; + } + createDelegates() { + let lastHandle = 0; + const scheduleLookup = new Map(); + const run = () => { + const now = this.now(); + const scheduledRecords = Array.from(scheduleLookup.values()); + const scheduledRecordsDue = scheduledRecords.filter(({ due }) => due <= now); + const dueImmediates = scheduledRecordsDue.filter(({ type }) => type === 'immediate'); + if (dueImmediates.length > 0) { + const { handle, handler } = dueImmediates[0]; + scheduleLookup.delete(handle); + handler(); + return; + } + const dueIntervals = scheduledRecordsDue.filter(({ type }) => type === 'interval'); + if (dueIntervals.length > 0) { + const firstDueInterval = dueIntervals[0]; + const { duration, handler } = firstDueInterval; + firstDueInterval.due = now + duration; + firstDueInterval.subscription = this.schedule(run, duration); + handler(); + return; + } + const dueTimeouts = scheduledRecordsDue.filter(({ type }) => type === 'timeout'); + if (dueTimeouts.length > 0) { + const { handle, handler } = dueTimeouts[0]; + scheduleLookup.delete(handle); + handler(); + return; + } + throw new Error('Expected a due immediate or interval'); + }; + const immediate = { + setImmediate: (handler) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now(), + duration: 0, + handle, + handler, + subscription: this.schedule(run, 0), + type: 'immediate', + }); + return handle; + }, + clearImmediate: (handle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + const interval = { + setInterval: (handler, duration = 0) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now() + duration, + duration, + handle, + handler, + subscription: this.schedule(run, duration), + type: 'interval', + }); + return handle; + }, + clearInterval: (handle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + const timeout = { + setTimeout: (handler, duration = 0) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now() + duration, + duration, + handle, + handler, + subscription: this.schedule(run, duration), + type: 'timeout', + }); + return handle; + }, + clearTimeout: (handle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + return { immediate, interval, timeout }; + } + run(callback) { + const prevFrameTimeFactor = TestScheduler.frameTimeFactor; + const prevMaxFrames = this.maxFrames; + TestScheduler.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = true; + const animator = this.createAnimator(); + const delegates = this.createDelegates(); + animationFrameProvider.delegate = animator.delegate; + dateTimestampProvider.delegate = this; + immediateProvider.delegate = delegates.immediate; + intervalProvider.delegate = delegates.interval; + timeoutProvider.delegate = delegates.timeout; + performanceTimestampProvider.delegate = this; + const helpers = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: animator.animate, + }; + try { + const ret = callback(helpers); + this.flush(); + return ret; + } + finally { + TestScheduler.frameTimeFactor = prevFrameTimeFactor; + this.maxFrames = prevMaxFrames; + this.runMode = false; + animationFrameProvider.delegate = undefined; + dateTimestampProvider.delegate = undefined; + immediateProvider.delegate = undefined; + intervalProvider.delegate = undefined; + timeoutProvider.delegate = undefined; + performanceTimestampProvider.delegate = undefined; + } + } +} +TestScheduler.frameTimeFactor = 10; +//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map new file mode 100644 index 0000000..6691fa4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,eAAe,GAAW,GAAG,CAAC;AAqBpC,MAAM,OAAO,aAAc,SAAQ,oBAAoB;IAkCrD,YAAmB,eAA+D;QAChF,KAAK,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QADrB,oBAAe,GAAf,eAAe,CAAgD;QAtBlE,mBAAc,GAAyB,EAAE,CAAC;QAK1C,oBAAe,GAA0B,EAAE,CAAC;QAKpD,eAAU,GAAoB,EAAE,CAAC;QAMjC,YAAO,GAAG,KAAK,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modules/rxjs/dist/esm/internal/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/types.js.map b/node_modules/rxjs/dist/esm/internal/types.js.map new file mode 100644 index 0000000..493d291 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/umd.js b/node_modules/rxjs/dist/esm/internal/umd.js new file mode 100644 index 0000000..25c05ff --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/umd.js @@ -0,0 +1,12 @@ +export * from '../index'; +import * as _operators from '../operators/index'; +export const operators = _operators; +import * as _testing from '../testing/index'; +export const testing = _testing; +import * as _ajax from '../ajax/index'; +export const ajax = _ajax; +import * as _webSocket from '../webSocket/index'; +export const webSocket = _webSocket; +import * as _fetch from '../fetch/index'; +export const fetch = _fetch; +//# sourceMappingURL=umd.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/umd.js.map b/node_modules/rxjs/dist/esm/internal/umd.js.map new file mode 100644 index 0000000..a9cfe28 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"umd.js","sourceRoot":"","sources":["../../../src/internal/umd.ts"],"names":[],"mappings":"AAKA,cAAc,UAAU,CAAC;AAGzB,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAGpC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAGhC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;AAG1B,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAGpC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js new file mode 100644 index 0000000..da0d113 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export const ArgumentOutOfRangeError = createErrorClass((_super) => function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; +}); +//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map new file mode 100644 index 0000000..ba59cfb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAsBtD,MAAM,CAAC,MAAM,uBAAuB,GAAgC,gBAAgB,CAClF,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,2BAA2B;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;AACzC,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js new file mode 100644 index 0000000..de16998 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}); +//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map new file mode 100644 index 0000000..a820606 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwBtD,MAAM,CAAC,MAAM,UAAU,GAAmB,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,cAAc;IAC5F,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;AAC3C,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/Immediate.js b/node_modules/rxjs/dist/esm/internal/util/Immediate.js new file mode 100644 index 0000000..8633e1d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/Immediate.js @@ -0,0 +1,30 @@ +let nextHandle = 1; +let resolved; +const activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +export const Immediate = { + setImmediate(cb) { + const handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(() => findAndClearHandle(handle) && cb()); + return handle; + }, + clearImmediate(handle) { + findAndClearHandle(handle); + }, +}; +export const TestTools = { + pending() { + return Object.keys(activeHandles).length; + } +}; +//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map b/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map new file mode 100644 index 0000000..9716813 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,MAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,YAAY,CAAC,EAAc;QACzB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js new file mode 100644 index 0000000..f3f523b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export const NotFoundError = createErrorClass((_super) => function NotFoundErrorImpl(message) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; +}); +//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map new file mode 100644 index 0000000..02d2097 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,MAAM,aAAa,GAAsB,gBAAgB,CAC9D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,iBAAiB,CAAY,OAAe;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACzB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js new file mode 100644 index 0000000..4f04e58 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; +}); +//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map new file mode 100644 index 0000000..ac07cee --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqBtD,MAAM,CAAC,MAAM,uBAAuB,GAAgC,gBAAgB,CAClF,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,2BAA2B;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;AACvC,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js new file mode 100644 index 0000000..a1558ff --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export const SequenceError = createErrorClass((_super) => function SequenceErrorImpl(message) { + _super(this); + this.name = 'SequenceError'; + this.message = message; +}); +//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map new file mode 100644 index 0000000..550f93d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,MAAM,aAAa,GAAsB,gBAAgB,CAC9D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,iBAAiB,CAAY,OAAe;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACzB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js new file mode 100644 index 0000000..e46ca56 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js @@ -0,0 +1,11 @@ +import { createErrorClass } from './createErrorClass'; +export const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors + ? `${errors.length} errors occurred during unsubscription: +${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; +}); +//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map new file mode 100644 index 0000000..bbfad22 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,MAAM,mBAAmB,GAA4B,gBAAgB,CAC1E,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,uBAAuB,CAAY,MAA0B;IACpE,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,GAAG,MAAM;QACnB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM;EACxB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QAC9D,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACvB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js new file mode 100644 index 0000000..dfbeb91 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js @@ -0,0 +1,11 @@ +export function applyMixins(derivedCtor, baseCtors) { + for (let i = 0, len = baseCtors.length; i < len; i++) { + const baseCtor = baseCtors[i]; + const propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); + for (let j = 0, len2 = propertyKeys.length; j < len2; j++) { + const name = propertyKeys[j]; + derivedCtor.prototype[name] = baseCtor.prototype[name]; + } + } +} +//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map new file mode 100644 index 0000000..99a61fa --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/args.js b/node_modules/rxjs/dist/esm/internal/util/args.js new file mode 100644 index 0000000..ead7fc5 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/args.js @@ -0,0 +1,15 @@ +import { isFunction } from './isFunction'; +import { isScheduler } from './isScheduler'; +function last(arr) { + return arr[arr.length - 1]; +} +export function popResultSelector(args) { + return isFunction(last(args)) ? args.pop() : undefined; +} +export function popScheduler(args) { + return isScheduler(last(args)) ? args.pop() : undefined; +} +export function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; +} +//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/args.js.map b/node_modules/rxjs/dist/esm/internal/util/args.js.map new file mode 100644 index 0000000..707c54c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/args.js.map @@ -0,0 +1 @@ +{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAW;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAW;IACtC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js new file mode 100644 index 0000000..210cec7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js @@ -0,0 +1,22 @@ +const { isArray } = Array; +const { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object; +export function argsArgArrayOrObject(args) { + if (args.length === 1) { + const first = args[0]; + if (isArray(first)) { + return { args: first, keys: null }; + } + if (isPOJO(first)) { + const keys = getKeys(first); + return { + args: keys.map((key) => first[key]), + keys, + }; + } + } + return { args: args, keys: null }; +} +function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} +//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map new file mode 100644 index 0000000..76c7949 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;AAQzE,MAAM,UAAU,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;YACjB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnC,IAAI;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js new file mode 100644 index 0000000..7f4cccf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js @@ -0,0 +1,5 @@ +const { isArray } = Array; +export function argsOrArgArray(args) { + return args.length === 1 && isArray(args[0]) ? args[0] : args; +} +//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map new file mode 100644 index 0000000..25584e9 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAM1B,MAAM,UAAU,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js new file mode 100644 index 0000000..c1909a3 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js @@ -0,0 +1,7 @@ +export function arrRemove(arr, item) { + if (arr) { + const index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} +//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map new file mode 100644 index 0000000..0359146 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map @@ -0,0 +1 @@ +{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js new file mode 100644 index 0000000..1d2112e --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js @@ -0,0 +1,11 @@ +export function createErrorClass(createImpl) { + const _super = (instance) => { + Error.call(instance); + instance.stack = new Error().stack; + }; + const ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} +//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map new file mode 100644 index 0000000..23869e4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,gBAAgB,CAAI,UAAgC;IAClE,MAAM,MAAM,GAAG,CAAC,QAAa,EAAE,EAAE;QAC/B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createObject.js b/node_modules/rxjs/dist/esm/internal/util/createObject.js new file mode 100644 index 0000000..d61c5d2 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/createObject.js @@ -0,0 +1,4 @@ +export function createObject(keys, values) { + return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {}); +} +//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createObject.js.map b/node_modules/rxjs/dist/esm/internal/util/createObject.js.map new file mode 100644 index 0000000..a7d24c1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/createObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/errorContext.js b/node_modules/rxjs/dist/esm/internal/util/errorContext.js new file mode 100644 index 0000000..e0a92d1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/errorContext.js @@ -0,0 +1,28 @@ +import { config } from '../config'; +let context = null; +export function errorContext(cb) { + if (config.useDeprecatedSynchronousErrorHandling) { + const isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + const { errorThrown, error } = context; + context = null; + if (errorThrown) { + throw error; + } + } + } + else { + cb(); + } +} +export function captureError(err) { + if (config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} +//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map b/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map new file mode 100644 index 0000000..4eb66de --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACV,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,OAAQ,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js new file mode 100644 index 0000000..c823fcd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js @@ -0,0 +1,16 @@ +export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) { + const scheduleSubscription = scheduler.schedule(function () { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } + else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } +} +//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map new file mode 100644 index 0000000..beaccd1 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,KAAK;IAEd,MAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/identity.js b/node_modules/rxjs/dist/esm/internal/util/identity.js new file mode 100644 index 0000000..1084d77 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/identity.js @@ -0,0 +1,4 @@ +export function identity(x) { + return x; +} +//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/identity.js.map b/node_modules/rxjs/dist/esm/internal/util/identity.js.map new file mode 100644 index 0000000..28a2f40 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/identity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AA0CA,MAAM,UAAU,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js new file mode 100644 index 0000000..393c8b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js @@ -0,0 +1,2 @@ +export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function'); +//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map new file mode 100644 index 0000000..49b464d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAI,CAAM,EAAqB,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js new file mode 100644 index 0000000..99da2eb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js @@ -0,0 +1,5 @@ +import { isFunction } from './isFunction'; +export function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); +} +//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map new file mode 100644 index 0000000..2e736bd --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isDate.js b/node_modules/rxjs/dist/esm/internal/util/isDate.js new file mode 100644 index 0000000..74ddf32 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isDate.js @@ -0,0 +1,4 @@ +export function isValidDate(value) { + return value instanceof Date && !isNaN(value); +} +//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isDate.js.map b/node_modules/rxjs/dist/esm/internal/util/isDate.js.map new file mode 100644 index 0000000..9e2ef13 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isDate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isFunction.js b/node_modules/rxjs/dist/esm/internal/util/isFunction.js new file mode 100644 index 0000000..558eec7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isFunction.js @@ -0,0 +1,4 @@ +export function isFunction(value) { + return typeof value === 'function'; +} +//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map b/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map new file mode 100644 index 0000000..452906c --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js new file mode 100644 index 0000000..da58ece --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js @@ -0,0 +1,6 @@ +import { observable as Symbol_observable } from '../symbol/observable'; +import { isFunction } from './isFunction'; +export function isInteropObservable(input) { + return isFunction(input[Symbol_observable]); +} +//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map new file mode 100644 index 0000000..f5ddd94 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,mBAAmB,CAAC,KAAU;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isIterable.js b/node_modules/rxjs/dist/esm/internal/util/isIterable.js new file mode 100644 index 0000000..20c52a6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isIterable.js @@ -0,0 +1,6 @@ +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from './isFunction'; +export function isIterable(input) { + return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]); +} +//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map b/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map new file mode 100644 index 0000000..3532931 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,eAAe,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isObservable.js b/node_modules/rxjs/dist/esm/internal/util/isObservable.js new file mode 100644 index 0000000..cc149c6 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isObservable.js @@ -0,0 +1,6 @@ +import { Observable } from '../Observable'; +import { isFunction } from './isFunction'; +export function isObservable(obj) { + return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); +} +//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map b/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map new file mode 100644 index 0000000..b82f961 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isPromise.js b/node_modules/rxjs/dist/esm/internal/util/isPromise.js new file mode 100644 index 0000000..5114f67 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isPromise.js @@ -0,0 +1,5 @@ +import { isFunction } from "./isFunction"; +export function isPromise(value) { + return isFunction(value === null || value === void 0 ? void 0 : value.then); +} +//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map b/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map new file mode 100644 index 0000000..bb81d60 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js new file mode 100644 index 0000000..bc75c6d --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js @@ -0,0 +1,23 @@ +import { __asyncGenerator, __await } from "tslib"; +import { isFunction } from './isFunction'; +export function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() { + const reader = readableStream.getReader(); + try { + while (true) { + const { value, done } = yield __await(reader.read()); + if (done) { + return yield __await(void 0); + } + yield yield __await(value); + } + } + finally { + reader.releaseLock(); + } + }); +} +export function isReadableStreamLike(obj) { + return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); +} +//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map new file mode 100644 index 0000000..9635f70 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAiB,kCAAkC,CAAI,cAAqC;;QAChG,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI;YACF,OAAO,IAAI,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,cAAM,MAAM,CAAC,IAAI,EAAE,CAAA,CAAC;gBAC5C,IAAI,IAAI,EAAE;oBACR,6BAAO;iBACR;gBACD,oBAAM,KAAM,CAAA,CAAC;aACd;SACF;gBAAS;YACR,MAAM,CAAC,WAAW,EAAE,CAAC;SACtB;IACH,CAAC;CAAA;AAED,MAAM,UAAU,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js new file mode 100644 index 0000000..05b4f3f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js @@ -0,0 +1,5 @@ +import { isFunction } from './isFunction'; +export function isScheduler(value) { + return value && isFunction(value.schedule); +} +//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map new file mode 100644 index 0000000..33c0d90 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/lift.js b/node_modules/rxjs/dist/esm/internal/util/lift.js new file mode 100644 index 0000000..280b95f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/lift.js @@ -0,0 +1,20 @@ +import { isFunction } from './isFunction'; +export function hasLift(source) { + return isFunction(source === null || source === void 0 ? void 0 : source.lift); +} +export function operate(init) { + return (source) => { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } + catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; +} +//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/lift.js.map b/node_modules/rxjs/dist/esm/internal/util/lift.js.map new file mode 100644 index 0000000..a4a2869 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/lift.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,UAAU,OAAO,CAAC,MAAW;IACjC,OAAO,UAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAMD,MAAM,UAAU,OAAO,CACrB,IAAqF;IAErF,OAAO,CAAC,MAAqB,EAAE,EAAE;QAC/B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js new file mode 100644 index 0000000..faf7dc7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js @@ -0,0 +1,9 @@ +import { map } from "../operators/map"; +const { isArray } = Array; +function callOrApply(fn, args) { + return isArray(args) ? fn(...args) : fn(args); +} +export function mapOneOrManyArgs(fn) { + return map(args => callOrApply(fn, args)); +} +//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map new file mode 100644 index 0000000..be9763f --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,MAAM,UAAU,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAA;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/noop.js b/node_modules/rxjs/dist/esm/internal/util/noop.js new file mode 100644 index 0000000..1a78a54 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/noop.js @@ -0,0 +1,2 @@ +export function noop() { } +//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/noop.js.map b/node_modules/rxjs/dist/esm/internal/util/noop.js.map new file mode 100644 index 0000000..05e521a --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/noop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,IAAI,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/not.js b/node_modules/rxjs/dist/esm/internal/util/not.js new file mode 100644 index 0000000..a388b0b --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/not.js @@ -0,0 +1,4 @@ +export function not(pred, thisArg) { + return (value, index) => !pred.call(thisArg, value, index); +} +//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/not.js.map b/node_modules/rxjs/dist/esm/internal/util/not.js.map new file mode 100644 index 0000000..7062664 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/not.js.map @@ -0,0 +1 @@ +{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,CAAC,KAAQ,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACxE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/pipe.js b/node_modules/rxjs/dist/esm/internal/util/pipe.js new file mode 100644 index 0000000..fb1cccf --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/pipe.js @@ -0,0 +1,16 @@ +import { identity } from './identity'; +export function pipe(...fns) { + return pipeFromArray(fns); +} +export function pipeFromArray(fns) { + if (fns.length === 0) { + return identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce((prev, fn) => fn(prev), input); + }; +} +//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/pipe.js.map b/node_modules/rxjs/dist/esm/internal/util/pipe.js.map new file mode 100644 index 0000000..c910717 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/pipe.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6EtC,MAAM,UAAU,IAAI,CAAC,GAAG,GAAmC;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAGD,MAAM,UAAU,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,QAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAuB,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js new file mode 100644 index 0000000..9ce5f56 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js @@ -0,0 +1,14 @@ +import { config } from '../config'; +import { timeoutProvider } from '../scheduler/timeoutProvider'; +export function reportUnhandledError(err) { + timeoutProvider.setTimeout(() => { + const { onUnhandledError } = config; + if (onUnhandledError) { + onUnhandledError(err); + } + else { + throw err; + } + }); +} +//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map new file mode 100644 index 0000000..f76d2eb --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAW/D,MAAM,UAAU,oBAAoB,CAAC,GAAQ;IAC3C,eAAe,CAAC,UAAU,CAAC,GAAG,EAAE;QAC9B,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js new file mode 100644 index 0000000..2693661 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js @@ -0,0 +1,7 @@ +export const subscribeToArray = (array) => (subscriber) => { + for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); +}; +//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map new file mode 100644 index 0000000..cb13aea --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,KAAmB,EAAE,EAAE,CAAC,CAAC,UAAyB,EAAE,EAAE;IACxF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js new file mode 100644 index 0000000..dedd667 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js @@ -0,0 +1,4 @@ +export function createInvalidObservableTypeError(input) { + return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`); +} +//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map new file mode 100644 index 0000000..24684b4 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,gBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,KAAK,GAC/E,0HAA0H,CAC3H,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/workarounds.js b/node_modules/rxjs/dist/esm/internal/util/workarounds.js new file mode 100644 index 0000000..380c6e7 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/workarounds.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map b/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map new file mode 100644 index 0000000..75e7271 --- /dev/null +++ b/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/operators/index.js b/node_modules/rxjs/dist/esm/operators/index.js new file mode 100644 index 0000000..79bbd88 --- /dev/null +++ b/node_modules/rxjs/dist/esm/operators/index.js @@ -0,0 +1,114 @@ +export { audit } from '../internal/operators/audit'; +export { auditTime } from '../internal/operators/auditTime'; +export { buffer } from '../internal/operators/buffer'; +export { bufferCount } from '../internal/operators/bufferCount'; +export { bufferTime } from '../internal/operators/bufferTime'; +export { bufferToggle } from '../internal/operators/bufferToggle'; +export { bufferWhen } from '../internal/operators/bufferWhen'; +export { catchError } from '../internal/operators/catchError'; +export { combineAll } from '../internal/operators/combineAll'; +export { combineLatestAll } from '../internal/operators/combineLatestAll'; +export { combineLatest } from '../internal/operators/combineLatest'; +export { combineLatestWith } from '../internal/operators/combineLatestWith'; +export { concat } from '../internal/operators/concat'; +export { concatAll } from '../internal/operators/concatAll'; +export { concatMap } from '../internal/operators/concatMap'; +export { concatMapTo } from '../internal/operators/concatMapTo'; +export { concatWith } from '../internal/operators/concatWith'; +export { connect } from '../internal/operators/connect'; +export { count } from '../internal/operators/count'; +export { debounce } from '../internal/operators/debounce'; +export { debounceTime } from '../internal/operators/debounceTime'; +export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; +export { delay } from '../internal/operators/delay'; +export { delayWhen } from '../internal/operators/delayWhen'; +export { dematerialize } from '../internal/operators/dematerialize'; +export { distinct } from '../internal/operators/distinct'; +export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; +export { elementAt } from '../internal/operators/elementAt'; +export { endWith } from '../internal/operators/endWith'; +export { every } from '../internal/operators/every'; +export { exhaust } from '../internal/operators/exhaust'; +export { exhaustAll } from '../internal/operators/exhaustAll'; +export { exhaustMap } from '../internal/operators/exhaustMap'; +export { expand } from '../internal/operators/expand'; +export { filter } from '../internal/operators/filter'; +export { finalize } from '../internal/operators/finalize'; +export { find } from '../internal/operators/find'; +export { findIndex } from '../internal/operators/findIndex'; +export { first } from '../internal/operators/first'; +export { groupBy } from '../internal/operators/groupBy'; +export { ignoreElements } from '../internal/operators/ignoreElements'; +export { isEmpty } from '../internal/operators/isEmpty'; +export { last } from '../internal/operators/last'; +export { map } from '../internal/operators/map'; +export { mapTo } from '../internal/operators/mapTo'; +export { materialize } from '../internal/operators/materialize'; +export { max } from '../internal/operators/max'; +export { merge } from '../internal/operators/merge'; +export { mergeAll } from '../internal/operators/mergeAll'; +export { flatMap } from '../internal/operators/flatMap'; +export { mergeMap } from '../internal/operators/mergeMap'; +export { mergeMapTo } from '../internal/operators/mergeMapTo'; +export { mergeScan } from '../internal/operators/mergeScan'; +export { mergeWith } from '../internal/operators/mergeWith'; +export { min } from '../internal/operators/min'; +export { multicast } from '../internal/operators/multicast'; +export { observeOn } from '../internal/operators/observeOn'; +export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; +export { pairwise } from '../internal/operators/pairwise'; +export { partition } from '../internal/operators/partition'; +export { pluck } from '../internal/operators/pluck'; +export { publish } from '../internal/operators/publish'; +export { publishBehavior } from '../internal/operators/publishBehavior'; +export { publishLast } from '../internal/operators/publishLast'; +export { publishReplay } from '../internal/operators/publishReplay'; +export { race } from '../internal/operators/race'; +export { raceWith } from '../internal/operators/raceWith'; +export { reduce } from '../internal/operators/reduce'; +export { repeat } from '../internal/operators/repeat'; +export { repeatWhen } from '../internal/operators/repeatWhen'; +export { retry } from '../internal/operators/retry'; +export { retryWhen } from '../internal/operators/retryWhen'; +export { refCount } from '../internal/operators/refCount'; +export { sample } from '../internal/operators/sample'; +export { sampleTime } from '../internal/operators/sampleTime'; +export { scan } from '../internal/operators/scan'; +export { sequenceEqual } from '../internal/operators/sequenceEqual'; +export { share } from '../internal/operators/share'; +export { shareReplay } from '../internal/operators/shareReplay'; +export { single } from '../internal/operators/single'; +export { skip } from '../internal/operators/skip'; +export { skipLast } from '../internal/operators/skipLast'; +export { skipUntil } from '../internal/operators/skipUntil'; +export { skipWhile } from '../internal/operators/skipWhile'; +export { startWith } from '../internal/operators/startWith'; +export { subscribeOn } from '../internal/operators/subscribeOn'; +export { switchAll } from '../internal/operators/switchAll'; +export { switchMap } from '../internal/operators/switchMap'; +export { switchMapTo } from '../internal/operators/switchMapTo'; +export { switchScan } from '../internal/operators/switchScan'; +export { take } from '../internal/operators/take'; +export { takeLast } from '../internal/operators/takeLast'; +export { takeUntil } from '../internal/operators/takeUntil'; +export { takeWhile } from '../internal/operators/takeWhile'; +export { tap } from '../internal/operators/tap'; +export { throttle } from '../internal/operators/throttle'; +export { throttleTime } from '../internal/operators/throttleTime'; +export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; +export { timeInterval } from '../internal/operators/timeInterval'; +export { timeout } from '../internal/operators/timeout'; +export { timeoutWith } from '../internal/operators/timeoutWith'; +export { timestamp } from '../internal/operators/timestamp'; +export { toArray } from '../internal/operators/toArray'; +export { window } from '../internal/operators/window'; +export { windowCount } from '../internal/operators/windowCount'; +export { windowTime } from '../internal/operators/windowTime'; +export { windowToggle } from '../internal/operators/windowToggle'; +export { windowWhen } from '../internal/operators/windowWhen'; +export { withLatestFrom } from '../internal/operators/withLatestFrom'; +export { zip } from '../internal/operators/zip'; +export { zipAll } from '../internal/operators/zipAll'; +export { zipWith } from '../internal/operators/zipWith'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/operators/index.js.map b/node_modules/rxjs/dist/esm/operators/index.js.map new file mode 100644 index 0000000..9028717 --- /dev/null +++ b/node_modules/rxjs/dist/esm/operators/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OA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,OAAO,EAAE,QAAQ,EAAkB,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,OAAO,EAA8B,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/testing/index.js b/node_modules/rxjs/dist/esm/testing/index.js new file mode 100644 index 0000000..f0f7b53 --- /dev/null +++ b/node_modules/rxjs/dist/esm/testing/index.js @@ -0,0 +1,2 @@ +export { TestScheduler } from '../internal/testing/TestScheduler'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/testing/index.js.map b/node_modules/rxjs/dist/esm/testing/index.js.map new file mode 100644 index 0000000..bc7fd0d --- /dev/null +++ b/node_modules/rxjs/dist/esm/testing/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/webSocket/index.js b/node_modules/rxjs/dist/esm/webSocket/index.js new file mode 100644 index 0000000..a4bb4ea --- /dev/null +++ b/node_modules/rxjs/dist/esm/webSocket/index.js @@ -0,0 +1,3 @@ +export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; +export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/webSocket/index.js.map b/node_modules/rxjs/dist/esm/webSocket/index.js.map new file mode 100644 index 0000000..0912982 --- /dev/null +++ b/node_modules/rxjs/dist/esm/webSocket/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/ajax/index.js b/node_modules/rxjs/dist/esm5/ajax/index.js new file mode 100644 index 0000000..e387b2b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/ajax/index.js @@ -0,0 +1,4 @@ +export { ajax } from '../internal/ajax/ajax'; +export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; +export { AjaxResponse } from '../internal/ajax/AjaxResponse'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/ajax/index.js.map b/node_modules/rxjs/dist/esm5/ajax/index.js.map new file mode 100644 index 0000000..d45ff17 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/ajax/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/fetch/index.js b/node_modules/rxjs/dist/esm5/fetch/index.js new file mode 100644 index 0000000..e851987 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/fetch/index.js @@ -0,0 +1,2 @@ +export { fromFetch } from '../internal/observable/dom/fetch'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/fetch/index.js.map b/node_modules/rxjs/dist/esm5/fetch/index.js.map new file mode 100644 index 0000000..75fe99b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/fetch/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/index.js b/node_modules/rxjs/dist/esm5/index.js new file mode 100644 index 0000000..cda695d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/index.js @@ -0,0 +1,169 @@ +export { Observable } from './internal/Observable'; +export { ConnectableObservable } from './internal/observable/ConnectableObservable'; +export { observable } from './internal/symbol/observable'; +export { animationFrames } from './internal/observable/dom/animationFrames'; +export { Subject } from './internal/Subject'; +export { BehaviorSubject } from './internal/BehaviorSubject'; +export { ReplaySubject } from './internal/ReplaySubject'; +export { AsyncSubject } from './internal/AsyncSubject'; +export { asap, asapScheduler } from './internal/scheduler/asap'; +export { async, asyncScheduler } from './internal/scheduler/async'; +export { queue, queueScheduler } from './internal/scheduler/queue'; +export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; +export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; +export { Scheduler } from './internal/Scheduler'; +export { Subscription } from './internal/Subscription'; +export { Subscriber } from './internal/Subscriber'; +export { Notification, NotificationKind } from './internal/Notification'; +export { pipe } from './internal/util/pipe'; +export { noop } from './internal/util/noop'; +export { identity } from './internal/util/identity'; +export { isObservable } from './internal/util/isObservable'; +export { lastValueFrom } from './internal/lastValueFrom'; +export { firstValueFrom } from './internal/firstValueFrom'; +export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; +export { EmptyError } from './internal/util/EmptyError'; +export { NotFoundError } from './internal/util/NotFoundError'; +export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; +export { SequenceError } from './internal/util/SequenceError'; +export { TimeoutError } from './internal/operators/timeout'; +export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; +export { bindCallback } from './internal/observable/bindCallback'; +export { bindNodeCallback } from './internal/observable/bindNodeCallback'; +export { combineLatest } from './internal/observable/combineLatest'; +export { concat } from './internal/observable/concat'; +export { connectable } from './internal/observable/connectable'; +export { defer } from './internal/observable/defer'; +export { empty } from './internal/observable/empty'; +export { forkJoin } from './internal/observable/forkJoin'; +export { from } from './internal/observable/from'; +export { fromEvent } from './internal/observable/fromEvent'; +export { fromEventPattern } from './internal/observable/fromEventPattern'; +export { generate } from './internal/observable/generate'; +export { iif } from './internal/observable/iif'; +export { interval } from './internal/observable/interval'; +export { merge } from './internal/observable/merge'; +export { never } from './internal/observable/never'; +export { of } from './internal/observable/of'; +export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; +export { pairs } from './internal/observable/pairs'; +export { partition } from './internal/observable/partition'; +export { race } from './internal/observable/race'; +export { range } from './internal/observable/range'; +export { throwError } from './internal/observable/throwError'; +export { timer } from './internal/observable/timer'; +export { using } from './internal/observable/using'; +export { zip } from './internal/observable/zip'; +export { scheduled } from './internal/scheduled/scheduled'; +export { EMPTY } from './internal/observable/empty'; +export { NEVER } from './internal/observable/never'; +export * from './internal/types'; +export { config } from './internal/config'; +export { audit } from './internal/operators/audit'; +export { auditTime } from './internal/operators/auditTime'; +export { buffer } from './internal/operators/buffer'; +export { bufferCount } from './internal/operators/bufferCount'; +export { bufferTime } from './internal/operators/bufferTime'; +export { bufferToggle } from './internal/operators/bufferToggle'; +export { bufferWhen } from './internal/operators/bufferWhen'; +export { catchError } from './internal/operators/catchError'; +export { combineAll } from './internal/operators/combineAll'; +export { combineLatestAll } from './internal/operators/combineLatestAll'; +export { combineLatestWith } from './internal/operators/combineLatestWith'; +export { concatAll } from './internal/operators/concatAll'; +export { concatMap } from './internal/operators/concatMap'; +export { concatMapTo } from './internal/operators/concatMapTo'; +export { concatWith } from './internal/operators/concatWith'; +export { connect } from './internal/operators/connect'; +export { count } from './internal/operators/count'; +export { debounce } from './internal/operators/debounce'; +export { debounceTime } from './internal/operators/debounceTime'; +export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; +export { delay } from './internal/operators/delay'; +export { delayWhen } from './internal/operators/delayWhen'; +export { dematerialize } from './internal/operators/dematerialize'; +export { distinct } from './internal/operators/distinct'; +export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; +export { elementAt } from './internal/operators/elementAt'; +export { endWith } from './internal/operators/endWith'; +export { every } from './internal/operators/every'; +export { exhaust } from './internal/operators/exhaust'; +export { exhaustAll } from './internal/operators/exhaustAll'; +export { exhaustMap } from './internal/operators/exhaustMap'; +export { expand } from './internal/operators/expand'; +export { filter } from './internal/operators/filter'; +export { finalize } from './internal/operators/finalize'; +export { find } from './internal/operators/find'; +export { findIndex } from './internal/operators/findIndex'; +export { first } from './internal/operators/first'; +export { groupBy } from './internal/operators/groupBy'; +export { ignoreElements } from './internal/operators/ignoreElements'; +export { isEmpty } from './internal/operators/isEmpty'; +export { last } from './internal/operators/last'; +export { map } from './internal/operators/map'; +export { mapTo } from './internal/operators/mapTo'; +export { materialize } from './internal/operators/materialize'; +export { max } from './internal/operators/max'; +export { mergeAll } from './internal/operators/mergeAll'; +export { flatMap } from './internal/operators/flatMap'; +export { mergeMap } from './internal/operators/mergeMap'; +export { mergeMapTo } from './internal/operators/mergeMapTo'; +export { mergeScan } from './internal/operators/mergeScan'; +export { mergeWith } from './internal/operators/mergeWith'; +export { min } from './internal/operators/min'; +export { multicast } from './internal/operators/multicast'; +export { observeOn } from './internal/operators/observeOn'; +export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; +export { pairwise } from './internal/operators/pairwise'; +export { pluck } from './internal/operators/pluck'; +export { publish } from './internal/operators/publish'; +export { publishBehavior } from './internal/operators/publishBehavior'; +export { publishLast } from './internal/operators/publishLast'; +export { publishReplay } from './internal/operators/publishReplay'; +export { raceWith } from './internal/operators/raceWith'; +export { reduce } from './internal/operators/reduce'; +export { repeat } from './internal/operators/repeat'; +export { repeatWhen } from './internal/operators/repeatWhen'; +export { retry } from './internal/operators/retry'; +export { retryWhen } from './internal/operators/retryWhen'; +export { refCount } from './internal/operators/refCount'; +export { sample } from './internal/operators/sample'; +export { sampleTime } from './internal/operators/sampleTime'; +export { scan } from './internal/operators/scan'; +export { sequenceEqual } from './internal/operators/sequenceEqual'; +export { share } from './internal/operators/share'; +export { shareReplay } from './internal/operators/shareReplay'; +export { single } from './internal/operators/single'; +export { skip } from './internal/operators/skip'; +export { skipLast } from './internal/operators/skipLast'; +export { skipUntil } from './internal/operators/skipUntil'; +export { skipWhile } from './internal/operators/skipWhile'; +export { startWith } from './internal/operators/startWith'; +export { subscribeOn } from './internal/operators/subscribeOn'; +export { switchAll } from './internal/operators/switchAll'; +export { switchMap } from './internal/operators/switchMap'; +export { switchMapTo } from './internal/operators/switchMapTo'; +export { switchScan } from './internal/operators/switchScan'; +export { take } from './internal/operators/take'; +export { takeLast } from './internal/operators/takeLast'; +export { takeUntil } from './internal/operators/takeUntil'; +export { takeWhile } from './internal/operators/takeWhile'; +export { tap } from './internal/operators/tap'; +export { throttle } from './internal/operators/throttle'; +export { throttleTime } from './internal/operators/throttleTime'; +export { throwIfEmpty } from './internal/operators/throwIfEmpty'; +export { timeInterval } from './internal/operators/timeInterval'; +export { timeout } from './internal/operators/timeout'; +export { timeoutWith } from './internal/operators/timeoutWith'; +export { timestamp } from './internal/operators/timestamp'; +export { toArray } from './internal/operators/toArray'; +export { window } from './internal/operators/window'; +export { windowCount } from './internal/operators/windowCount'; +export { windowTime } from './internal/operators/windowTime'; +export { windowToggle } from './internal/operators/windowToggle'; +export { windowWhen } from './internal/operators/windowWhen'; +export { withLatestFrom } from './internal/operators/withLatestFrom'; +export { zipAll } from './internal/operators/zipAll'; +export { zipWith } from './internal/operators/zipWith'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/index.js.map b/node_modules/rxjs/dist/esm5/index.js.map new file mode 100644 index 0000000..c8082be --- /dev/null +++ b/node_modules/rxjs/dist/esm5/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGpF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,c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,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,OAAO,EAA8B,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js new file mode 100644 index 0000000..4bc63fd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=AnyCatcher.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map new file mode 100644 index 0000000..83e9e18 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnyCatcher.js","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js new file mode 100644 index 0000000..0513c21 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js @@ -0,0 +1,39 @@ +import { __extends } from "tslib"; +import { Subject } from './Subject'; +var AsyncSubject = (function (_super) { + __extends(AsyncSubject, _super); + function AsyncSubject() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject.prototype.next = function (value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject.prototype.complete = function () { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject; +}(Subject)); +export { AsyncSubject }; +//# sourceMappingURL=AsyncSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map new file mode 100644 index 0000000..be1ba99 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncSubject.js","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC;IAAqC,gCAAU;IAA/C;QAAA,qEA+BC;QA9BS,YAAM,GAAa,IAAI,CAAC;QACxB,eAAS,GAAG,KAAK,CAAC;QAClB,iBAAW,GAAG,KAAK,CAAC;;IA4B9B,CAAC;IAzBW,8CAAuB,GAAjC,UAAkC,UAAyB;QACnD,IAAA,KAAuE,IAAI,EAAzE,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAS,CAAC;QAClF,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,IAAI,WAAW,EAAE;YACnC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACtC,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;IACH,CAAC;IAED,+BAAQ,GAAR;QACQ,IAAA,KAAqC,IAAI,EAAvC,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAS,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,SAAS,IAAI,iBAAM,IAAI,YAAC,MAAO,CAAC,CAAC;YACjC,iBAAM,QAAQ,WAAE,CAAC;SAClB;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA/BD,CAAqC,OAAO,GA+B3C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js new file mode 100644 index 0000000..b74e7e2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js @@ -0,0 +1,36 @@ +import { __extends } from "tslib"; +import { Subject } from './Subject'; +var BehaviorSubject = (function (_super) { + __extends(BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject.prototype._subscribe = function (subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject.prototype.getValue = function () { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, (this._value = value)); + }; + return BehaviorSubject; +}(Subject)); +export { BehaviorSubject }; +//# sourceMappingURL=BehaviorSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map new file mode 100644 index 0000000..8851019 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BehaviorSubject.js","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;IAAwC,mCAAU;IAChD,yBAAoB,MAAS;QAA7B,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAG;;IAE7B,CAAC;IAED,sBAAI,kCAAK;aAAT;YACE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;;;OAAA;IAGS,oCAAU,GAApB,UAAqB,UAAyB;QAC5C,IAAM,YAAY,GAAG,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;QAClD,CAAC,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,kCAAQ,GAAR;QACQ,IAAA,KAAoC,IAAI,EAAtC,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,MAAM,YAAS,CAAC;QAC/C,IAAI,QAAQ,EAAE;YACZ,MAAM,WAAW,CAAC;SACnB;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,8BAAI,GAAJ,UAAK,KAAQ;QACX,iBAAM,IAAI,YAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;IACH,sBAAC;AAAD,CAAC,AA5BD,CAAwC,OAAO,GA4B9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Notification.js b/node_modules/rxjs/dist/esm5/internal/Notification.js new file mode 100644 index 0000000..8670ae5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Notification.js @@ -0,0 +1,72 @@ +import { EMPTY } from './observable/empty'; +import { of } from './observable/of'; +import { throwError } from './observable/throwError'; +import { isFunction } from './util/isFunction'; +export var NotificationKind; +(function (NotificationKind) { + NotificationKind["NEXT"] = "N"; + NotificationKind["ERROR"] = "E"; + NotificationKind["COMPLETE"] = "C"; +})(NotificationKind || (NotificationKind = {})); +var Notification = (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + Notification.prototype.observe = function (observer) { + return observeNotification(this, observer); + }; + Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification.prototype.accept = function (nextOrObserver, error, complete) { + var _a; + return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) + ? this.observe(nextOrObserver) + : this.do(nextOrObserver, error, complete); + }; + Notification.prototype.toObservable = function () { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + var result = kind === 'N' + ? + of(value) + : + kind === 'E' + ? + throwError(function () { return error; }) + : + kind === 'C' + ? + EMPTY + : + 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification.createNext = function (value) { + return new Notification('N', value); + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + return Notification; +}()); +export { Notification }; +export function observeNotification(notification, observer) { + var _a, _b, _c; + var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + if (typeof kind !== 'string') { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); +} +//# sourceMappingURL=Notification.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Notification.js.map b/node_modules/rxjs/dist/esm5/internal/Notification.js.map new file mode 100644 index 0000000..60c5a7a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Notification.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,8BAAU,CAAA;IACV,+BAAW,CAAA;IACX,kCAAc,CAAA;AAChB,CAAC,EAJW,g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AAQ,CAAC,QAAQ,+CAAjB,QAAQ,CAAa,CAAC;AAC1G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js new file mode 100644 index 0000000..6a3de7f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js @@ -0,0 +1,15 @@ +export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); +export function errorNotification(error) { + return createNotification('E', undefined, error); +} +export function nextNotification(value) { + return createNotification('N', value, undefined); +} +export function createNotification(kind, value, error) { + return { + kind: kind, + value: value, + error: error, + }; +} +//# sourceMappingURL=NotificationFactories.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map new file mode 100644 index 0000000..4b7775d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotificationFactories.js","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,qBAAqB,GAAG,CAAC,cAAM,OAAA,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAyB,EAArE,CAAqE,CAAC,EAAE,CAAC;AAOrH,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAQ,CAAC;AAC1D,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAwB,CAAC;AAC1E,CAAC;AAQD,MAAM,UAAU,kBAAkB,CAAC,IAAqB,EAAE,KAAU,EAAE,KAAU;IAC9E,OAAO;QACL,IAAI,MAAA;QACJ,KAAK,OAAA;QACL,KAAK,OAAA;KACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Observable.js b/node_modules/rxjs/dist/esm5/internal/Observable.js new file mode 100644 index 0000000..28a041f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Observable.js @@ -0,0 +1,102 @@ +import { SafeSubscriber, Subscriber } from './Subscriber'; +import { isSubscription } from './Subscription'; +import { observable as Symbol_observable } from './symbol/observable'; +import { pipeFromArray } from './util/pipe'; +import { config } from './config'; +import { isFunction } from './util/isFunction'; +import { errorContext } from './util/errorContext'; +var Observable = (function () { + function Observable(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); + errorContext(function () { + var _a = _this, operator = _a.operator, source = _a.source; + subscriber.add(operator + ? + operator.call(subscriber, source) + : source + ? + _this._subscribe(subscriber) + : + _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + sink.error(err); + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscriber = new SafeSubscriber({ + next: function (value) { + try { + next(value); + } + catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + _this.subscribe(subscriber); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + }; + Observable.prototype[Symbol_observable] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipeFromArray(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); +export { Observable }; +function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; +} +function isObserver(value) { + return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); +} +function isSubscriber(value) { + return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); +} +//# sourceMappingURL=Observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Observable.js.map b/node_modules/rxjs/dist/esm5/internal/Observable.js.map new file mode 100644 index 0000000..741b849 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Observable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Observable.js","sourceRoot":"","sources":["../../../src/internal/Observable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAgB,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQnD;IAkBE,oBAAY,SAA6E;QACvF,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;IACH,CAAC;IA4BD,yBAAI,GAAJ,UAAQ,QAAyB;QAC/B,IAAM,UAAU,GAAG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iBAAC;CAAA,AA9cD,IA8cC;SA9cY,UAAU;AAudvB,SAAS,cAAc,CAAC,WAA+C;;IACrE,OAAO,MAAA,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,MAAM,CAAC,OAAO,mCAAI,OAAO,CAAC;AAClD,CAAC;AAED,SAAS,UAAU,CAAI,KAAU;IAC/B,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,SAAS,YAAY,CAAI,KAAU;IACjC,OAAO,CAAC,KAAK,IAAI,KAAK,YAAY,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Operator.js b/node_modules/rxjs/dist/esm5/internal/Operator.js new file mode 100644 index 0000000..b9b664f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Operator.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Operator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Operator.js.map b/node_modules/rxjs/dist/esm5/internal/Operator.js.map new file mode 100644 index 0000000..7401e0c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Operator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js new file mode 100644 index 0000000..0cf238d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js @@ -0,0 +1,58 @@ +import { __extends } from "tslib"; +import { Subject } from './Subject'; +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; +var ReplaySubject = (function (_super) { + __extends(ReplaySubject, _super); + function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { _bufferSize = Infinity; } + if (_windowTime === void 0) { _windowTime = Infinity; } + if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject.prototype.next = function (value) { + var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject.prototype._trimBuffer = function () { + var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject; +}(Subject)); +export { ReplaySubject }; +//# sourceMappingURL=ReplaySubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map new file mode 100644 index 0000000..4d64919 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ReplaySubject.js","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAgC1E;IAAsC,iCAAU;IAU9C,uBACU,WAAsB,EACtB,WAAsB,EACtB,kBAA6D;QAF7D,4BAAA,EAAA,sBAAsB;QACtB,4BAAA,EAAA,sBAAsB;QACtB,mCAAA,EAAA,0CAA6D;QAHvE,YAKE,iBAAO,SAIR;QARS,iBAAW,GAAX,WAAW,CAAW;QACtB,iBAAW,GAAX,WAAW,CAAW;QACtB,wBAAkB,GAAlB,kBAAkB,CAA2C;QAZ/D,aAAO,GAAmB,EAAE,CAAC;QAC7B,yBAAmB,GAAG,IAAI,CAAC;QAcjC,KAAI,CAAC,mBAAmB,GAAG,WAAW,KAAK,QAAQ,CAAC;QACpD,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC5C,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;;IAC9C,CAAC;IAED,4BAAI,GAAJ,UAAK,KAAQ;QACL,IAAA,KAA+E,IAAI,EAAjF,SAAS,eAAA,EAAE,OAAO,aAAA,EAAE,mBAAmB,yBAAA,EAAE,kBAAkB,wBAAA,EAAE,WAAW,iBAAS,CAAC;QAC1F,IA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AAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;QAIxH,IAAI,CAAC,mBAAmB,EAAE;YACxB,IAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,IAAI,GAAG,CAAC,CAAC;YAGb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAK,OAAO,CAAC,CAAC,CAAY,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;gBAC3E,IAAI,GAAG,CAAC,CAAC;aACV;YACD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;SACrC;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzED,CAAsC,OAAO,GAyE5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Scheduler.js b/node_modules/rxjs/dist/esm5/internal/Scheduler.js new file mode 100644 index 0000000..4c7d5ed --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Scheduler.js @@ -0,0 +1,16 @@ +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; +var Scheduler = (function () { + function Scheduler(schedulerActionCtor, now) { + if (now === void 0) { now = Scheduler.now; } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + Scheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { delay = 0; } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler.now = dateTimestampProvider.now; + return Scheduler; +}()); +export { Scheduler }; +//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map b/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map new file mode 100644 index 0000000..5ee908f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAqB1E;IAGE,mBAAoB,mBAAkC,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QAArE,wBAAmB,GAAnB,mBAAmB,CAAe;QACpD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA6BM,4BAAQ,GAAf,UAAmB,IAAmD,EAAE,KAAiB,EAAE,KAAS;QAA5B,sBAAA,EAAA,SAAiB;QACvF,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;IAnCa,aAAG,GAAiB,qBAAqB,CAAC,GAAG,CAAC;IAoC9D,gBAAC;CAAA,AArCD,IAqCC;SArCY,SAAS"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subject.js b/node_modules/rxjs/dist/esm5/internal/Subject.js new file mode 100644 index 0000000..b29d8f6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subject.js @@ -0,0 +1,162 @@ +import { __extends, __values } from "tslib"; +import { Observable } from './Observable'; +import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; +import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; +import { arrRemove } from './util/arrRemove'; +import { errorContext } from './util/errorContext'; +var Subject = (function (_super) { + __extends(Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype._throwIfClosed = function () { + if (this.closed) { + throw new ObjectUnsubscribedError(); + } + }; + Subject.prototype.next = function (value) { + var _this = this; + errorContext(function () { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { + var observer = _c.value; + observer.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + }); + }; + Subject.prototype.error = function (err) { + var _this = this; + errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject.prototype.complete = function () { + var _this = this; + errorContext(function () { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject.prototype, "observed", { + get: function () { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject.prototype._trySubscribe = function (subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject.prototype._subscribe = function (subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject.prototype._innerSubscribe = function (subscriber) { + var _this = this; + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + if (hasError || isStopped) { + return EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription(function () { + _this.currentObservers = null; + arrRemove(observers, subscriber); + }); + }; + Subject.prototype._checkFinalizedStatuses = function (subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } + else if (isStopped) { + subscriber.complete(); + } + }; + Subject.prototype.asObservable = function () { + var observable = new Observable(); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(Observable)); +export { Subject }; +var AnonymousSubject = (function (_super) { + __extends(AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject.prototype.error = function (err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject.prototype.complete = function () { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject; +}(Subject)); +export { AnonymousSubject }; +//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subject.js.map b/node_modules/rxjs/dist/esm5/internal/Subject.js.map new file mode 100644 index 0000000..a9421c6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE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iBAAO,SAER;QALQ,iBAAW,GAAX,WAAW,CAAc;QAIhC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACvB,CAAC;IAED,+BAAI,GAAJ,UAAK,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,mCAAQ,GAAR;;QACE,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,kBAAkB,CAAC;IAClE,CAAC;IACH,uBAAC;AAAD,CAAC,AA1BD,CAAyC,OAAO,GA0B/C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscriber.js b/node_modules/rxjs/dist/esm5/internal/Subscriber.js new file mode 100644 index 0000000..c14778e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subscriber.js @@ -0,0 +1,184 @@ +import { __extends } from "tslib"; +import { isFunction } from './util/isFunction'; +import { isSubscription, Subscription } from './Subscription'; +import { config } from './config'; +import { reportUnhandledError } from './util/reportUnhandledError'; +import { noop } from './util/noop'; +import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; +import { timeoutProvider } from './scheduler/timeoutProvider'; +import { captureError } from './util/errorContext'; +var Subscriber = (function (_super) { + __extends(Subscriber, _super); + function Subscriber(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (isSubscription(destination)) { + destination.add(_this); + } + } + else { + _this.destination = EMPTY_OBSERVER; + } + return _this; + } + Subscriber.create = function (next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber.prototype.next = function (value) { + if (this.isStopped) { + handleStoppedNotification(nextNotification(value), this); + } + else { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (this.isStopped) { + handleStoppedNotification(errorNotification(err), this); + } + else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (this.isStopped) { + handleStoppedNotification(COMPLETE_NOTIFICATION, this); + } + else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + try { + this.destination.error(err); + } + finally { + this.unsubscribe(); + } + }; + Subscriber.prototype._complete = function () { + try { + this.destination.complete(); + } + finally { + this.unsubscribe(); + } + }; + return Subscriber; +}(Subscription)); +export { Subscriber }; +var _bind = Function.prototype.bind; +function bind(fn, thisArg) { + return _bind.call(fn, thisArg); +} +var ConsumerObserver = (function () { + function ConsumerObserver(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver.prototype.next = function (value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + ConsumerObserver.prototype.error = function (err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } + catch (error) { + handleUnhandledError(error); + } + } + else { + handleUnhandledError(err); + } + }; + ConsumerObserver.prototype.complete = function () { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } + catch (error) { + handleUnhandledError(error); + } + } + }; + return ConsumerObserver; +}()); +var SafeSubscriber = (function (_super) { + __extends(SafeSubscriber, _super); + function SafeSubscriber(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var partialObserver; + if (isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), + error: error !== null && error !== void 0 ? error : undefined, + complete: complete !== null && complete !== void 0 ? complete : undefined, + }; + } + else { + var context_1; + if (_this && config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function () { return _this.unsubscribe(); }; + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context_1), + error: observerOrNext.error && bind(observerOrNext.error, context_1), + complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), + }; + } + else { + partialObserver = observerOrNext; + } + } + _this.destination = new ConsumerObserver(partialObserver); + return _this; + } + return SafeSubscriber; +}(Subscriber)); +export { SafeSubscriber }; +function handleUnhandledError(error) { + if (config.useDeprecatedSynchronousErrorHandling) { + captureError(error); + } + else { + reportUnhandledError(error); + } +} +function defaultErrorHandler(err) { + throw err; +} +function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config.onStoppedNotification; + onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); +} +export var EMPTY_OBSERVER = { + closed: true, + next: noop, + error: defaultErrorHandler, + complete: noop, +}; +//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map b/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map new file mode 100644 index 0000000..730473d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,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/esm5/internal/Subscription.js b/node_modules/rxjs/dist/esm5/internal/Subscription.js new file mode 100644 index 0000000..867b4b0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subscription.js @@ -0,0 +1,143 @@ +import { __read, __spreadArray, __values } from "tslib"; +import { isFunction } from './util/isFunction'; +import { UnsubscriptionError } from './util/UnsubscriptionError'; +import { arrRemove } from './util/arrRemove'; +var Subscription = (function () { + function Subscription(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription.prototype.unsubscribe = function () { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } + catch (e) { + errors = e instanceof UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer(finalizer); + } + catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError) { + errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); + } + else { + errors.push(err); + } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); + } + finally { if (e_2) throw e_2.error; } + } + } + if (errors) { + throw new UnsubscriptionError(errors); + } + } + }; + Subscription.prototype.add = function (teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } + else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription.prototype._hasParent = function (parent) { + var _parentage = this._parentage; + return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + }; + Subscription.prototype._addParent = function (parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription.prototype._removeParent = function (parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } + else if (Array.isArray(_parentage)) { + arrRemove(_parentage, parent); + } + }; + Subscription.prototype.remove = function (teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + }; + Subscription.EMPTY = (function () { + var empty = new Subscription(); + empty.closed = true; + return empty; + })(); + return Subscription; +}()); +export { Subscription }; +export var EMPTY_SUBSCRIPTION = Subscription.EMPTY; +export function isSubscription(value) { + return (value instanceof Subscription || + (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); +} +function execFinalizer(finalizer) { + if (isFunction(finalizer)) { + finalizer(); + } + else { + finalizer.unsubscribe(); + } +} +//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscription.js.map b/node_modules/rxjs/dist/esm5/internal/Subscription.js.map new file mode 100644 index 0000000..e0e0325 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/Subscription.js.map @@ -0,0 +1 @@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AM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js new file mode 100644 index 0000000..b6c75d1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js @@ -0,0 +1,29 @@ +import { getXHRResponse } from './getXHRResponse'; +var AjaxResponse = (function () { + function AjaxResponse(originalEvent, xhr, request, type) { + if (type === void 0) { type = 'download_load'; } + this.originalEvent = originalEvent; + this.xhr = xhr; + this.request = request; + this.type = type; + var status = xhr.status, responseType = xhr.responseType; + this.status = status !== null && status !== void 0 ? status : 0; + this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; + var allHeaders = xhr.getAllResponseHeaders(); + this.responseHeaders = allHeaders + ? + allHeaders.split('\n').reduce(function (headers, line) { + var index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) + : {}; + this.response = getXHRResponse(xhr); + var loaded = originalEvent.loaded, total = originalEvent.total; + this.loaded = loaded; + this.total = total; + } + return AjaxResponse; +}()); +export { AjaxResponse }; +//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map new file mode 100644 index 0000000..9327396 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBlD;IA+CE,sBAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,IAAwC;QAAxC,qBAAA,EAAA,sBAAwC;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAEhD,IAAA,MAAM,GAAmB,GAAG,OAAtB,EAAE,YAAY,GAAK,GAAG,aAAR,CAAS;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,IAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,OAA+B,EAAE,IAAI;oBAIlE,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAA,MAAM,GAAY,aAAa,OAAzB,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACH,mBAAC;AAAD,CAAC,AA1GD,IA0GC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js new file mode 100644 index 0000000..6b07b85 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js @@ -0,0 +1,239 @@ +import { __assign } from "tslib"; +import { map } from '../operators/map'; +import { Observable } from '../Observable'; +import { AjaxResponse } from './AjaxResponse'; +import { AjaxTimeoutError, AjaxError } from './errors'; +function ajaxGet(url, headers) { + return ajax({ method: 'GET', url: url, headers: headers }); +} +function ajaxPost(url, body, headers) { + return ajax({ method: 'POST', url: url, body: body, headers: headers }); +} +function ajaxDelete(url, headers) { + return ajax({ method: 'DELETE', url: url, headers: headers }); +} +function ajaxPut(url, body, headers) { + return ajax({ method: 'PUT', url: url, body: body, headers: headers }); +} +function ajaxPatch(url, body, headers) { + return ajax({ method: 'PATCH', url: url, body: body, headers: headers }); +} +var mapResponse = map(function (x) { return x.response; }); +function ajaxGetJSON(url, headers) { + return mapResponse(ajax({ + method: 'GET', + url: url, + headers: headers, + })); +} +export var ajax = (function () { + var create = function (urlOrConfig) { + var config = typeof urlOrConfig === 'string' + ? { + url: urlOrConfig, + } + : urlOrConfig; + return fromAjax(config); + }; + create.get = ajaxGet; + create.post = ajaxPost; + create.delete = ajaxDelete; + create.put = ajaxPut; + create.patch = ajaxPatch; + create.getJSON = ajaxGetJSON; + return create; +})(); +var UPLOAD = 'upload'; +var DOWNLOAD = 'download'; +var LOADSTART = 'loadstart'; +var PROGRESS = 'progress'; +var LOAD = 'load'; +export function fromAjax(init) { + return new Observable(function (destination) { + var _a, _b; + var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); + var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; + var url = config.url; + if (!url) { + throw new TypeError('url is required'); + } + if (queryParams) { + var searchParams_1; + if (url.includes('?')) { + var parts = url.split('?'); + if (2 < parts.length) { + throw new TypeError('invalid url'); + } + searchParams_1 = new URLSearchParams(parts[1]); + new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); + url = parts[0] + '?' + searchParams_1; + } + else { + searchParams_1 = new URLSearchParams(queryParams); + url = url + '?' + searchParams_1; + } + } + var headers = {}; + if (configuredHeaders) { + for (var key in configuredHeaders) { + if (configuredHeaders.hasOwnProperty(key)) { + headers[key.toLowerCase()] = configuredHeaders[key]; + } + } + } + var crossDomain = config.crossDomain; + if (!crossDomain && !('x-requested-with' in headers)) { + headers['x-requested-with'] = 'XMLHttpRequest'; + } + var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; + if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { + var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; + if (xsrfCookie) { + headers[xsrfHeaderName] = xsrfCookie; + } + } + var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); + var _request = __assign(__assign({}, config), { url: url, + headers: headers, + body: body }); + var xhr; + xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); + { + var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; + var addErrorEvent = function (type, errorFactory) { + xhr.addEventListener(type, function () { + var _a; + var error = errorFactory(); + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); + destination.error(error); + }); + }; + addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); }); + addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); }); + var createResponse_1 = function (direction, event) { + return new AjaxResponse(event, xhr, _request, direction + "_" + event.type); + }; + var addProgressEvent_1 = function (target, type, direction) { + target.addEventListener(type, function (event) { + destination.next(createResponse_1(direction, event)); + }); + }; + if (includeUploadProgress) { + [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); + } + if (progressSubscriber_1) { + [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); + } + if (includeDownloadProgress) { + [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); + } + var emitError_1 = function (status) { + var msg = 'ajax error' + (status ? ' ' + status : ''); + destination.error(new AjaxError(msg, xhr, _request)); + }; + xhr.addEventListener('error', function (e) { + var _a; + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); + emitError_1(); + }); + xhr.addEventListener(LOAD, function (event) { + var _a, _b; + var status = xhr.status; + if (status < 400) { + (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); + var response = void 0; + try { + response = createResponse_1(DOWNLOAD, event); + } + catch (err) { + destination.error(err); + return; + } + destination.next(response); + destination.complete(); + } + else { + (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); + emitError_1(status); + } + }); + } + var user = _request.user, method = _request.method, async = _request.async; + if (user) { + xhr.open(method, url, async, user, _request.password); + } + else { + xhr.open(method, url, async); + } + if (async) { + xhr.timeout = _request.timeout; + xhr.responseType = _request.responseType; + } + if ('withCredentials' in xhr) { + xhr.withCredentials = _request.withCredentials; + } + for (var key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + if (body) { + xhr.send(body); + } + else { + xhr.send(); + } + return function () { + if (xhr && xhr.readyState !== 4) { + xhr.abort(); + } + }; + }); +} +function extractContentTypeAndMaybeSerializeBody(body, headers) { + var _a; + if (!body || + typeof body === 'string' || + isFormData(body) || + isURLSearchParams(body) || + isArrayBuffer(body) || + isFile(body) || + isBlob(body) || + isReadableStream(body)) { + return body; + } + if (isArrayBufferView(body)) { + return body.buffer; + } + if (typeof body === 'object') { + headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; + return JSON.stringify(body); + } + throw new TypeError('Unknown body type'); +} +var _toString = Object.prototype.toString; +function toStringCheck(obj, name) { + return _toString.call(obj) === "[object " + name + "]"; +} +function isArrayBuffer(body) { + return toStringCheck(body, 'ArrayBuffer'); +} +function isFile(body) { + return toStringCheck(body, 'File'); +} +function isBlob(body) { + return toStringCheck(body, 'Blob'); +} +function isArrayBufferView(body) { + return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); +} +function isFormData(body) { + return typeof FormData !== 'undefined' && body instanceof FormData; +} +function isURLSearchParams(body) { + return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; +} +function isReadableStream(body) { + return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; +} +//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map new file mode 100644 index 0000000..a8fc73e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqIvD,SAAS,OAAO,CAAI,GAAW,EAAE,OAAgC;IAC/D,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC5E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CAAI,GAAW,EAAE,OAAgC;IAClE,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC3E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,SAAS,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC7E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAA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,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js new file mode 100644 index 0000000..ce4dd09 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js @@ -0,0 +1,30 @@ +import { getXHRResponse } from './getXHRResponse'; +import { createErrorClass } from '../util/createErrorClass'; +export var AjaxError = createErrorClass(function (_super) { + return function AjaxErrorImpl(message, xhr, request) { + this.message = message; + this.name = 'AjaxError'; + this.xhr = xhr; + this.request = request; + this.status = xhr.status; + this.responseType = xhr.responseType; + var response; + try { + response = getXHRResponse(xhr); + } + catch (err) { + response = xhr.responseText; + } + this.response = response; + }; +}); +export var AjaxTimeoutError = (function () { + function AjaxTimeoutErrorImpl(xhr, request) { + AjaxError.call(this, 'ajax timeout', xhr, request); + this.name = 'AjaxTimeoutError'; + return this; + } + AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); + return AjaxTimeoutErrorImpl; +})(); +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map new file mode 100644 index 0000000..290ce68 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAsD5D,MAAM,CAAC,IAAM,SAAS,GAAkB,gBAAgB,CACtD,UAAC,MAAM;IACL,OAAA,SAAS,aAAa,CAAY,OAAe,EAAE,GAAmB,EAAE,OAAoB;QAC1F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;QACrC,IAAI,QAAa,CAAC;QAClB,IAAI;YAGF,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;AAhBD,CAgBC,CACJ,CAAC;AAsBF,MAAM,CAAC,IAAM,gBAAgB,GAAyB,CAAC;IACrD,SAAS,oBAAoB,CAAY,GAAmB,EAAE,OAAoB;QAChF,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC,EAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js new file mode 100644 index 0000000..6d59712 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js @@ -0,0 +1,26 @@ +export function getXHRResponse(xhr) { + switch (xhr.responseType) { + case 'json': { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return JSON.parse(ieXHR.responseText); + } + } + case 'document': + return xhr.responseXML; + case 'text': + default: { + if ('response' in xhr) { + return xhr.response; + } + else { + var ieXHR = xhr; + return ieXHR.responseText; + } + } + } +} +//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map new file mode 100644 index 0000000..f3bac35 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/types.js b/node_modules/rxjs/dist/esm5/internal/ajax/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map new file mode 100644 index 0000000..f08bdb1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/config.js b/node_modules/rxjs/dist/esm5/internal/config.js new file mode 100644 index 0000000..c993d28 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/config.js @@ -0,0 +1,8 @@ +export var config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, +}; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/config.js.map b/node_modules/rxjs/dist/esm5/internal/config.js.map new file mode 100644 index 0000000..8c91260 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js new file mode 100644 index 0000000..4734676 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js @@ -0,0 +1,24 @@ +import { EmptyError } from './util/EmptyError'; +import { SafeSubscriber } from './Subscriber'; +export function firstValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var subscriber = new SafeSubscriber({ + next: function (value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function () { + if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); +} +//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map new file mode 100644 index 0000000..11ec1e7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,UAAC,KAAK;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js new file mode 100644 index 0000000..5d77915 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js @@ -0,0 +1,27 @@ +import { EmptyError } from './util/EmptyError'; +export function lastValueFrom(source, config) { + var hasConfig = typeof config === 'object'; + return new Promise(function (resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function (value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function () { + if (_hasValue) { + resolve(_value); + } + else if (hasConfig) { + resolve(config.defaultValue); + } + else { + reject(new EmptyError()); + } + }, + }); + }); +} +//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map new file mode 100644 index 0000000..2bc02a0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoD/C,MAAM,UAAU,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,UAAC,KAAK;gBACV,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js new file mode 100644 index 0000000..e51b47d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js @@ -0,0 +1,63 @@ +import { __extends } from "tslib"; +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { refCount as higherOrderRefCount } from '../operators/refCount'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { hasLift } from '../util/lift'; +var ConnectableObservable = (function (_super) { + __extends(ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable.prototype._teardown = function () { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable.prototype.connect = function () { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () { + _this._teardown(); + subject_1.complete(); + }, function (err) { + _this._teardown(); + subject_1.error(err); + }, function () { return _this._teardown(); }))); + if (connection.closed) { + this._connection = null; + connection = Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable.prototype.refCount = function () { + return higherOrderRefCount()(this); + }; + return ConnectableObservable; +}(Observable)); +export { ConnectableObservable }; +//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map new file mode 100644 index 0000000..54d9446 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAA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AU,EAAE,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,MAAM,CAAC,SAAS,CACnB,wBAAwB,CACtB,SAAc,EACd,SAAS,EACT;gBACE,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,CAAC,EACD,UAAC,GAAG;gBACF,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,EACD,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CACvB,CACF,CACF,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;aACjC;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAMD,wCAAQ,GAAR;QACE,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAkB,CAAC;IACtD,CAAC;IACH,4BAAC;AAAD,CAAC,AAxFD,CAA8C,UAAU,GAwFvD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js new file mode 100644 index 0000000..0f730ac --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js @@ -0,0 +1,5 @@ +import { bindCallbackInternals } from './bindCallbackInternals'; +export function bindCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); +} +//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map new file mode 100644 index 0000000..5b6af6f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAuIhE,MAAM,UAAU,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js new file mode 100644 index 0000000..659f5f3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js @@ -0,0 +1,79 @@ +import { __read, __spreadArray } from "tslib"; +import { isScheduler } from '../util/isScheduler'; +import { Observable } from '../Observable'; +import { subscribeOn } from '../operators/subscribeOn'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { observeOn } from '../operators/observeOn'; +import { AsyncSubject } from '../AsyncSubject'; +export function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { + if (resultSelector) { + if (isScheduler(resultSelector)) { + scheduler = resultSelector; + } + else { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) + .apply(this, args) + .pipe(mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler) { + return function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc) + .apply(this, args) + .pipe(subscribeOn(scheduler), observeOn(scheduler)); + }; + } + return function () { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var subject = new AsyncSubject(); + var uninitialized = true; + return new Observable(function (subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ + function () { + var results = []; + for (var _i = 0; _i < arguments.length; _i++) { + results[_i] = arguments[_i]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + }, + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; +} +//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map new file mode 100644 index 0000000..cc1fc69 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,qBAAqB,CACnC,WAAoB,EACpB,YAAiB,EACjB,cAAoB,EACpB,SAAyB;IAEzB,IAAI,cAAc,EAAE;QAClB,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO;gBAAqB,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBACxC,OA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O;6BACR;yBACF;wBAKD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,YAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,SAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;mBAEJ,CAAC;gBAIF,IAAI,YAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,SAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js new file mode 100644 index 0000000..e8fbf53 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js @@ -0,0 +1,5 @@ +import { bindCallbackInternals } from './bindCallbackInternals'; +export function bindNodeCallback(callbackFunc, resultSelector, scheduler) { + return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); +} +//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map new file mode 100644 index 0000000..81e4887 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAsHhE,MAAM,UAAU,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js new file mode 100644 index 0000000..35a4ec8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js @@ -0,0 +1,70 @@ +import { Observable } from '../Observable'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { from } from './from'; +import { identity } from '../util/identity'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { popResultSelector, popScheduler } from '../util/args'; +import { createObject } from '../util/createObject'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { executeSchedule } from '../util/executeSchedule'; +export function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var resultSelector = popResultSelector(args); + var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from([], scheduler); + } + var result = new Observable(combineLatestInit(observables, scheduler, keys + ? + function (values) { return createObject(keys, values); } + : + identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; +} +export function combineLatestInit(observables, scheduler, valueTransform) { + if (valueTransform === void 0) { valueTransform = identity; } + return function (subscriber) { + maybeSchedule(scheduler, function () { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function (i) { + maybeSchedule(scheduler, function () { + var source = from(observables[i], scheduler); + var hasFirstValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function () { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; +} +function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + executeSchedule(subscription, scheduler, execute); + } + else { + execute(); + } +} +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map new file mode 100644 index 0000000..c8b3bdf --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4L1D,MAAM,UAAU,aAAa;IAAoC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAC7E,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,KAA8B,oBAAoB,CAAC,IAAI,CAAC,EAAhD,WAAW,UAAA,EAAE,IAAI,UAA+B,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,IAAI,CAAC,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H,CAAC,EACD;wBACE,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;;YAlCJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;wBAAtB,CAAC;aAmCT;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/concat.js b/node_modules/rxjs/dist/esm5/internal/observable/concat.js new file mode 100644 index 0000000..4fc8e8d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/concat.js @@ -0,0 +1,11 @@ +import { concatAll } from '../operators/concatAll'; +import { popScheduler } from '../util/args'; +import { from } from './from'; +export function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return concatAll()(from(args, popScheduler(args))); +} +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map b/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map new file mode 100644 index 0000000..bd20f15 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4G9B,MAAM,UAAU,MAAM;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACnC,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js new file mode 100644 index 0000000..3600641 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js @@ -0,0 +1,27 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { defer } from './defer'; +var DEFAULT_CONFIG = { + connector: function () { return new Subject(); }, + resetOnDisconnect: true, +}; +export function connectable(source, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable(function (subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function () { + if (!connection || connection.closed) { + connection = defer(function () { return source; }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function () { return (subject = connector()); }); + } + } + return connection; + }; + return result; +} +//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map new file mode 100644 index 0000000..596f951 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAsBhC,IAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,cAAM,OAAA,IAAI,OAAO,EAAW,EAAtB,CAAsB;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,MAAM,UAAU,WAAW,CAAI,MAA0B,EAAE,MAA6C;IAA7C,uBAAA,EAAA,uBAA6C;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IACnC,IAAA,SAAS,GAA+B,MAAM,UAArC,EAAE,KAA6B,MAAM,kBAAX,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,CAAY;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,IAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,UAAC,UAAU;QAC/C,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,KAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,EAAvB,CAAuB,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/defer.js b/node_modules/rxjs/dist/esm5/internal/observable/defer.js new file mode 100644 index 0000000..b0a600e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/defer.js @@ -0,0 +1,8 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +export function defer(observableFactory) { + return new Observable(function (subscriber) { + innerFrom(observableFactory()).subscribe(subscriber); + }); +} +//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map b/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map new file mode 100644 index 0000000..eb02dda --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkDxC,MAAM,UAAU,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,UAAU,CAAqB,UAAC,UAAU;QACnD,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js new file mode 100644 index 0000000..cbce16e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js @@ -0,0 +1,221 @@ +import { __assign, __extends } from "tslib"; +import { Subject, AnonymousSubject } from '../../Subject'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { ReplaySubject } from '../../ReplaySubject'; +var DEFAULT_WEBSOCKET_CONFIG = { + url: '', + deserializer: function (e) { return JSON.parse(e.data); }, + serializer: function (value) { return JSON.stringify(value); }, +}; +var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; +var WebSocketSubject = (function (_super) { + __extends(WebSocketSubject, _super); + function WebSocketSubject(urlConfigOrSource, destination) { + var _this = _super.call(this) || this; + _this._socket = null; + if (urlConfigOrSource instanceof Observable) { + _this.destination = destination; + _this.source = urlConfigOrSource; + } + else { + var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); + _this._output = new Subject(); + if (typeof urlConfigOrSource === 'string') { + config.url = urlConfigOrSource; + } + else { + for (var key in urlConfigOrSource) { + if (urlConfigOrSource.hasOwnProperty(key)) { + config[key] = urlConfigOrSource[key]; + } + } + } + if (!config.WebSocketCtor && WebSocket) { + config.WebSocketCtor = WebSocket; + } + else if (!config.WebSocketCtor) { + throw new Error('no WebSocket constructor can be found'); + } + _this.destination = new ReplaySubject(); + } + return _this; + } + WebSocketSubject.prototype.lift = function (operator) { + var sock = new WebSocketSubject(this._config, this.destination); + sock.operator = operator; + sock.source = this; + return sock; + }; + WebSocketSubject.prototype._resetState = function () { + this._socket = null; + if (!this.source) { + this.destination = new ReplaySubject(); + } + this._output = new Subject(); + }; + WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { + var self = this; + return new Observable(function (observer) { + try { + self.next(subMsg()); + } + catch (err) { + observer.error(err); + } + var subscription = self.subscribe({ + next: function (x) { + try { + if (messageFilter(x)) { + observer.next(x); + } + } + catch (err) { + observer.error(err); + } + }, + error: function (err) { return observer.error(err); }, + complete: function () { return observer.complete(); }, + }); + return function () { + try { + self.next(unsubMsg()); + } + catch (err) { + observer.error(err); + } + subscription.unsubscribe(); + }; + }); + }; + WebSocketSubject.prototype._connectSocket = function () { + var _this = this; + var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; + var observer = this._output; + var socket = null; + try { + socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); + this._socket = socket; + if (binaryType) { + this._socket.binaryType = binaryType; + } + } + catch (e) { + observer.error(e); + return; + } + var subscription = new Subscription(function () { + _this._socket = null; + if (socket && socket.readyState === 1) { + socket.close(); + } + }); + socket.onopen = function (evt) { + var _socket = _this._socket; + if (!_socket) { + socket.close(); + _this._resetState(); + return; + } + var openObserver = _this._config.openObserver; + if (openObserver) { + openObserver.next(evt); + } + var queue = _this.destination; + _this.destination = Subscriber.create(function (x) { + if (socket.readyState === 1) { + try { + var serializer = _this._config.serializer; + socket.send(serializer(x)); + } + catch (e) { + _this.destination.error(e); + } + } + }, function (err) { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + if (err && err.code) { + socket.close(err.code, err.reason); + } + else { + observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); + } + _this._resetState(); + }, function () { + var closingObserver = _this._config.closingObserver; + if (closingObserver) { + closingObserver.next(undefined); + } + socket.close(); + _this._resetState(); + }); + if (queue && queue instanceof ReplaySubject) { + subscription.add(queue.subscribe(_this.destination)); + } + }; + socket.onerror = function (e) { + _this._resetState(); + observer.error(e); + }; + socket.onclose = function (e) { + if (socket === _this._socket) { + _this._resetState(); + } + var closeObserver = _this._config.closeObserver; + if (closeObserver) { + closeObserver.next(e); + } + if (e.wasClean) { + observer.complete(); + } + else { + observer.error(e); + } + }; + socket.onmessage = function (e) { + try { + var deserializer = _this._config.deserializer; + observer.next(deserializer(e)); + } + catch (err) { + observer.error(err); + } + }; + }; + WebSocketSubject.prototype._subscribe = function (subscriber) { + var _this = this; + var source = this.source; + if (source) { + return source.subscribe(subscriber); + } + if (!this._socket) { + this._connectSocket(); + } + this._output.subscribe(subscriber); + subscriber.add(function () { + var _socket = _this._socket; + if (_this._output.observers.length === 0) { + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + _this._resetState(); + } + }); + return subscriber; + }; + WebSocketSubject.prototype.unsubscribe = function () { + var _socket = this._socket; + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + _super.prototype.unsubscribe.call(this); + }; + return WebSocketSubject; +}(AnonymousSubject)); +export { WebSocketSubject }; +//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map new file mode 100644 index 0000000..005a2c3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4IpD,IAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,UAAC,CAAe,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAlB,CAAkB;IACrD,UAAU,EAAE,UAAC,KAAU,IAAK,OAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAArB,CAAqB;CAClD,CAAC;AAEF,IAAM,qCAAqC,GACzC,mIAAmI,CAAC;AAItI;IAAyC,oCAAmB;IAU1D,0BAAY,iBAAqE,EAAE,WAAyB;QAA5G,YACE,iBAAO,SAwBR;QA3BO,aAAO,GAAqB,IAAI,CAAC;QAIvC,IAAI,iBAAiB,YAAY,UAAU,EAAE;YAC3C,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,KAAI,CAAC,MAAM,GAAG,iBAAkC,CAAC;SAClD;aAAM;YACL,IAAM,MAAM,GAAG,CAAC,KAAI,CAAC,OAAO,gBAAQ,wBAAwB,CAAE,CAAC,CAAC;YAChE,KAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;YAChC,IAAI,OAAO,iBAAiB,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AI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,iBAAM,WAAW,WAAE,CAAC;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AAhPD,CAAyC,gBAAgB,GAgPxD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js new file mode 100644 index 0000000..8fec6cd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js @@ -0,0 +1,34 @@ +import { Observable } from '../../Observable'; +import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; +export function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; +} +function animationFramesFactory(timestampProvider) { + return new Observable(function (subscriber) { + var provider = timestampProvider || performanceTimestampProvider; + var start = provider.now(); + var id = 0; + var run = function () { + if (!subscriber.closed) { + id = animationFrameProvider.requestAnimationFrame(function (timestamp) { + id = 0; + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + run(); + return function () { + if (id) { + animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); +} +var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); +//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map new file mode 100644 index 0000000..e5af4e4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrames.js","sourceRoot":"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G,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js new file mode 100644 index 0000000..ff9361e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js @@ -0,0 +1,54 @@ +import { __assign, __rest } from "tslib"; +import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; +import { Observable } from '../../Observable'; +import { innerFrom } from '../../observable/innerFrom'; +export function fromFetch(input, initWithSelector) { + if (initWithSelector === void 0) { initWithSelector = {}; } + var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); + return new Observable(function (subscriber) { + var controller = new AbortController(); + var signal = controller.signal; + var abortable = true; + var outerSignal = init.signal; + if (outerSignal) { + if (outerSignal.aborted) { + controller.abort(); + } + else { + var outerSignalHandler_1 = function () { + if (!signal.aborted) { + controller.abort(); + } + }; + outerSignal.addEventListener('abort', outerSignalHandler_1); + subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); + } + } + var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); + var handleError = function (err) { + abortable = false; + subscriber.error(err); + }; + fetch(input, perSubscriberInit) + .then(function (response) { + if (selector) { + innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () { + abortable = false; + subscriber.complete(); + }, handleError)); + } + else { + abortable = false; + subscriber.next(response); + subscriber.complete(); + } + }) + .catch(handleError); + return function () { + if (abortable) { + controller.abort(); + } + }; + }); +} +//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map new file mode 100644 index 0000000..c402c03 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.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EAAE,iBAAiB,CAAC;aAC5B,IAAI,CAAC,UAAC,QAAQ;YACb,IAAI,QAAQ,EAAE;gBAIZ,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CACrC,wBAAwB,CACtB,UAAU,EAEV,SAAS,EAET;oBACE,SAAS,GAAG,KAAK,CAAC;oBAClB,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,EACD,WAAW,CACZ,CACF,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,KAAK,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO;YACL,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js new file mode 100644 index 0000000..73a51ab --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js @@ -0,0 +1,5 @@ +import { WebSocketSubject } from './WebSocketSubject'; +export function webSocket(urlConfigOrSource) { + return new WebSocketSubject(urlConfigOrSource); +} +//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map new file mode 100644 index 0000000..ab58e40 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map @@ -0,0 +1 @@ +{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AA+J9E,MAAM,UAAU,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,gBAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/empty.js b/node_modules/rxjs/dist/esm5/internal/observable/empty.js new file mode 100644 index 0000000..7d889fc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/empty.js @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +export var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); }); +export function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; +} +function emptyScheduled(scheduler) { + return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); +} +//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map b/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map new file mode 100644 index 0000000..c29b948 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiE3C,MAAM,CAAC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAOlF,MAAM,UAAU,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,UAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js new file mode 100644 index 0000000..3337e2c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js @@ -0,0 +1,47 @@ +import { Observable } from '../Observable'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { innerFrom } from './innerFrom'; +import { popResultSelector } from '../util/args'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { createObject } from '../util/createObject'; +export function forkJoin() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var result = new Observable(function (subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function (sourceIndex) { + var hasValue = false; + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, function () { return remainingCompletions--; }, undefined, function () { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; +} +//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map new file mode 100644 index 0000000..48cd3ac --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map @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AChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAC5B,SAAS,EACT;gBACE,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;;QAvBJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE;oBAApD,WAAW;SAwBnB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/from.js b/node_modules/rxjs/dist/esm5/internal/observable/from.js new file mode 100644 index 0000000..2b61be4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/from.js @@ -0,0 +1,6 @@ +import { scheduled } from '../scheduled/scheduled'; +import { innerFrom } from './innerFrom'; +export function from(input, scheduler) { + return scheduler ? scheduled(input, scheduler) : innerFrom(input); +} +//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/from.js.map b/node_modules/rxjs/dist/esm5/internal/observable/from.js.map new file mode 100644 index 0000000..baf621f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/from.js.map @@ -0,0 +1 @@ +{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkGxC,MAAM,UAAU,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js new file mode 100644 index 0000000..a6835d7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js @@ -0,0 +1,59 @@ +import { __read } from "tslib"; +import { innerFrom } from '../observable/innerFrom'; +import { Observable } from '../Observable'; +import { mergeMap } from '../operators/mergeMap'; +import { isArrayLike } from '../util/isArrayLike'; +import { isFunction } from '../util/isFunction'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +var nodeEventEmitterMethods = ['addListener', 'removeListener']; +var eventTargetMethods = ['addEventListener', 'removeEventListener']; +var jqueryMethods = ['on', 'off']; +export function fromEvent(target, eventName, options, resultSelector) { + if (isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); + } + var _a = __read(isEventTarget(target) + ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) + : + isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike(target)) { + return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new Observable(function (subscriber) { + var handler = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add(handler); + return function () { return remove(handler); }; + }); +} +function toCommonHandlerRegistry(target, eventName) { + return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; +} +function isNodeStyleEventEmitter(target) { + return isFunction(target.addListener) && isFunction(target.removeListener); +} +function isJQueryStyleEventEmitter(target) { + return isFunction(target.on) && isFunction(target.off); +} +function isEventTarget(target) { + return isFunction(target.addEventListener) && isFunction(target.removeEventListener); +} +//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map new file mode 100644 index 0000000..8cd08bd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,IAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAC3E,IAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAU,CAAC;AAChF,IAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAkO7C,MAAM,UAAU,SAAS,CACvB,MAAW,EACX,SAAiB,EACj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AIlC,IAAM,OAAO,GAAG;YAAC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAjD,CAAiD,CAAC;QAEtF,GAAG,CAAC,OAAO,CAAC,CAAC;QAEb,OAAO,cAAM,OAAA,MAAO,CAAC,OAAO,CAAC,EAAhB,CAAgB,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AASD,SAAS,uBAAuB,CAAC,MAAW,EAAE,SAAiB;IAC7D,OAAO,UAAC,UAAkB,IAAK,OAAA,UAAC,OAAY,IAAK,OAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,EAAtC,CAAsC,EAAxD,CAAwD,CAAC;AAC1F,CAAC;AAOD,SAAS,uBAAuB,CAAC,MAAW;IAC1C,OAAO,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7E,CAAC;AAOD,SAAS,yBAAyB,CAAC,MAAW;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC;AAOD,SAAS,aAAa,CAAC,MAAW;IAChC,OAAO,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js new file mode 100644 index 0000000..9c16f5f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js @@ -0,0 +1,20 @@ +import { Observable } from '../Observable'; +import { isFunction } from '../util/isFunction'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +export function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); + } + return new Observable(function (subscriber) { + var handler = function () { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; + }); +} +//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map new file mode 100644 index 0000000..de6d4c7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAyI5D,MAAM,UAAU,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,UAAU,CAAU,UAAC,UAAU;QACxC,IAAM,OAAO,GAAG;YAAC,WAAS;iBAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;gBAAT,sBAAS;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAA1C,CAA0C,CAAC;QAC1E,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js new file mode 100644 index 0000000..5e8a5f1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +export function fromSubscribable(subscribable) { + return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); +} +//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map new file mode 100644 index 0000000..b594a6c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB,IAAK,OAAA,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,EAAlC,CAAkC,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/generate.js b/node_modules/rxjs/dist/esm5/internal/observable/generate.js new file mode 100644 index 0000000..d6f93b1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/generate.js @@ -0,0 +1,49 @@ +import { __generator } from "tslib"; +import { identity } from '../util/identity'; +import { isScheduler } from '../util/isScheduler'; +import { defer } from './defer'; +import { scheduleIterable } from '../scheduled/scheduleIterable'; +export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler); + } + else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity; + scheduler = resultSelectorOrScheduler; + } + else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + state = initialState; + _a.label = 1; + case 1: + if (!(!condition || condition(state))) return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a.sent(); + _a.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: return [2]; + } + }); + } + return defer((scheduler + ? + function () { return scheduleIterable(gen(), scheduler); } + : + gen)); +} +//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map b/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map new file mode 100644 index 0000000..4636256 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAuUjE,MAAM,UAAU,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC,KAMG,qBAA8C,EALhD,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,OAAO,aAAA,EACP,sBAA6C,EAA7C,cAAc,mBAAG,QAA4B,KAAA,EAC7C,SAAS,eAAA,CACwC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,WAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,QAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,SAAU,GAAG;;;;;oBACF,KAAK,GAAG,YAAY;;;yBAAE,CAAA,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAA;oBAC3D,WAAM,cAAc,CAAC,KAAK,CAAC,EAAA;;oBAA3B,SAA2B,CAAC;;;oBADiC,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,CAAA;;;;;KAGvF;IAGD,OAAO,KAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,cAAM,OAAA,gBAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC,EAAnC,CAAmC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/iif.js b/node_modules/rxjs/dist/esm5/internal/observable/iif.js new file mode 100644 index 0000000..0e5425a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/iif.js @@ -0,0 +1,5 @@ +import { defer } from './defer'; +export function iif(condition, trueResult, falseResult) { + return defer(function () { return (condition() ? trueResult : falseResult); }); +} +//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map b/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map new file mode 100644 index 0000000..df79d31 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiFhC,MAAM,UAAU,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,KAAK,CAAC,cAAM,OAAA,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,EAAxC,CAAwC,CAAC,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js new file mode 100644 index 0000000..ac77ca7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js @@ -0,0 +1,143 @@ +import { __asyncValues, __awaiter, __generator, __values } from "tslib"; +import { isArrayLike } from '../util/isArrayLike'; +import { isPromise } from '../util/isPromise'; +import { Observable } from '../Observable'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isIterable } from '../util/isIterable'; +import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; +import { isFunction } from '../util/isFunction'; +import { reportUnhandledError } from '../util/reportUnhandledError'; +import { observable as Symbol_observable } from '../symbol/observable'; +export function innerFrom(input) { + if (input instanceof Observable) { + return input; + } + if (input != null) { + if (isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw createInvalidObservableTypeError(input); +} +export function fromInteropObservable(obj) { + return new Observable(function (subscriber) { + var obs = obj[Symbol_observable](); + if (isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} +export function fromArrayLike(array) { + return new Observable(function (subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} +export function fromPromise(promise) { + return new Observable(function (subscriber) { + promise + .then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, reportUnhandledError); + }); +} +export function fromIterable(iterable) { + return new Observable(function (subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }); +} +export function fromAsyncIterable(asyncIterable) { + return new Observable(function (subscriber) { + process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); + }); +} +export function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); +} +function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter(this, void 0, void 0, function () { + var value, e_2_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues(asyncIterable); + _b.label = 1; + case 1: return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: return [3, 1]; + case 4: return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: return [3, 10]; + case 9: + if (e_2) throw e_2.error; + return [7]; + case 10: return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); +} +//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map new file mode 100644 index 0000000..2044d76 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAA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ClE,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;;;;;oBACxD,kBAAA,cAAA,aAAa,CAAA;;;;;oBAAtB,KAAK,0BAAA,CAAA;oBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;wBACrB,WAAO;qBACR;;;;;;;;;;;;;;;;;;;;;oBAEH,UAAU,CAAC,QAAQ,EAAE,CAAC;;;;;CACvB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/interval.js b/node_modules/rxjs/dist/esm5/internal/observable/interval.js new file mode 100644 index 0000000..6944be4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/interval.js @@ -0,0 +1,11 @@ +import { asyncScheduler } from '../scheduler/async'; +import { timer } from './timer'; +export function interval(period, scheduler) { + if (period === void 0) { period = 0; } + if (scheduler === void 0) { scheduler = asyncScheduler; } + if (period < 0) { + period = 0; + } + return timer(period, period, scheduler); +} +//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map b/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map new file mode 100644 index 0000000..c542e9c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+ChC,MAAM,UAAU,QAAQ,CAAC,MAAU,EAAE,SAAyC;IAArD,uBAAA,EAAA,UAAU;IAAE,0BAAA,EAAA,0BAAyC;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/merge.js b/node_modules/rxjs/dist/esm5/internal/observable/merge.js new file mode 100644 index 0000000..99f4ab9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/merge.js @@ -0,0 +1,23 @@ +import { mergeAll } from '../operators/mergeAll'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from './from'; +export function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var concurrent = popNumber(args, Infinity); + var sources = args; + return !sources.length + ? + EMPTY + : sources.length === 1 + ? + innerFrom(sources[0]) + : + mergeAll(concurrent)(from(sources, scheduler)); +} +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map b/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map new file mode 100644 index 0000000..3be8053 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAmF9B,MAAM,UAAU,KAAK;IAAC,cAA8D;SAA9D,UAA8D,EAA9D,qBAA8D,EAA9D,IAA8D;QAA9D,yBAA8D;;IAClF,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,KAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/never.js b/node_modules/rxjs/dist/esm5/internal/observable/never.js new file mode 100644 index 0000000..376b030 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/never.js @@ -0,0 +1,7 @@ +import { Observable } from '../Observable'; +import { noop } from '../util/noop'; +export var NEVER = new Observable(noop); +export function never() { + return NEVER; +} +//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/never.js.map b/node_modules/rxjs/dist/esm5/internal/observable/never.js.map new file mode 100644 index 0000000..63f161c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/never.js.map @@ -0,0 +1 @@ +{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAmCpC,MAAM,CAAC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,IAAI,CAAC,CAAC;AAKjD,MAAM,UAAU,KAAK;IACnB,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/of.js b/node_modules/rxjs/dist/esm5/internal/observable/of.js new file mode 100644 index 0000000..11e56e4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/of.js @@ -0,0 +1,11 @@ +import { popScheduler } from '../util/args'; +import { from } from './from'; +export function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + return from(args, scheduler); +} +//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/of.js.map b/node_modules/rxjs/dist/esm5/internal/observable/of.js.map new file mode 100644 index 0000000..f72c4de --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/of.js.map @@ -0,0 +1 @@ +{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4E9B,MAAM,UAAU,EAAE;IAAI,cAAiC;SAAjC,UAAiC,EAAjC,qBAAiC,EAAjC,IAAiC;QAAjC,yBAAiC;;IACrD,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js new file mode 100644 index 0000000..b47af23 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js @@ -0,0 +1,35 @@ +import { Observable } from '../Observable'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { OperatorSubscriber } from '../operators/OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from './innerFrom'; +export function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray(sources); + return new Observable(function (subscriber) { + var sourceIndex = 0; + var subscribeNext = function () { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom(nextSources[sourceIndex++]); + } + catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } + else { + subscriber.complete(); + } + }; + subscribeNext(); + }); +} +//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map new file mode 100644 index 0000000..f03e095 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsExC,MAAM,UAAU,iBAAiB;IAC/B,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAEzE,IAAM,WAAW,GAA4B,cAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,UAAU,CAAC,UAAC,UAAU;QAC/B,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAM,aAAa,GAAG;YACpB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAU,SAAuB,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,IAAM,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js new file mode 100644 index 0000000..77cc110 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js @@ -0,0 +1,5 @@ +import { from } from './from'; +export function pairs(obj, scheduler) { + return from(Object.entries(obj), scheduler); +} +//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map new file mode 100644 index 0000000..50c158e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6E9B,MAAM,UAAU,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/partition.js b/node_modules/rxjs/dist/esm5/internal/observable/partition.js new file mode 100644 index 0000000..a5a7d48 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/partition.js @@ -0,0 +1,7 @@ +import { not } from '../util/not'; +import { filter } from '../operators/filter'; +import { innerFrom } from './innerFrom'; +export function partition(source, predicate, thisArg) { + return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; +} +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map b/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map new file mode 100644 index 0000000..7466104 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0ExC,MAAM,UAAU,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/race.js b/node_modules/rxjs/dist/esm5/internal/observable/race.js new file mode 100644 index 0000000..d1b0fd6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/race.js @@ -0,0 +1,32 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +export function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray(sources); + return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); +} +export function raceInit(sources) { + return function (subscriber) { + var subscriptions = []; + var _loop_1 = function (i) { + subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; +} +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/race.js.map b/node_modules/rxjs/dist/esm5/internal/observable/race.js.map new file mode 100644 index 0000000..5cc4b88 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AA6C3E,MAAM,UAAU,IAAI;IAAI,iBAAyD;SAAzD,UAAyD,EAAzD,qBAAyD,EAAzD,IAAyD;QAAzD,4BAAyD;;IAC/E,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAOD,MAAM,UAAU,QAAQ,CAAI,OAA6B;IACvD,OAAO,UAAC,UAAyB;QAC/B,IAAI,aAAa,GAAmB,EAAE,CAAC;gCAM9B,CAAC;YACR,aAAa,CAAC,IAAI,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBACzC,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;;QAfJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;oBAArE,CAAC;SAgBT;IACH,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/range.js b/node_modules/rxjs/dist/esm5/internal/observable/range.js new file mode 100644 index 0000000..23c7343 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/range.js @@ -0,0 +1,35 @@ +import { Observable } from '../Observable'; +import { EMPTY } from './empty'; +export function range(start, count, scheduler) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return EMPTY; + } + var end = count + start; + return new Observable(scheduler + ? + function (subscriber) { + var n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } + else { + subscriber.complete(); + } + }); + } + : + function (subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); +} +//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/range.js.map b/node_modules/rxjs/dist/esm5/internal/observable/range.js.map new file mode 100644 index 0000000..8c8227c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/range.js.map @@ -0,0 +1 @@ +{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAqDhC,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,KAAK,CAAC;KACd;IAGD,IAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,UAAU,CACnB,SAAS;QACP,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js new file mode 100644 index 0000000..1498dde --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js @@ -0,0 +1,8 @@ +import { Observable } from '../Observable'; +import { isFunction } from '../util/isFunction'; +export function throwError(errorOrErrorFactory, scheduler) { + var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; + var init = function (subscriber) { return subscriber.error(errorFactory()); }; + return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); +} +//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map new file mode 100644 index 0000000..e9606c1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAqHhD,MAAM,UAAU,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,IAAM,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAM,OAAA,mBAAmB,EAAnB,CAAmB,CAAC;IACvG,IAAM,IAAI,GAAG,UAAC,UAA6B,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAhC,CAAgC,CAAC;IACjF,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,EAA9C,CAA8C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/timer.js b/node_modules/rxjs/dist/esm5/internal/observable/timer.js new file mode 100644 index 0000000..8caa9bc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/timer.js @@ -0,0 +1,36 @@ +import { Observable } from '../Observable'; +import { async as asyncScheduler } from '../scheduler/async'; +import { isScheduler } from '../util/isScheduler'; +import { isValidDate } from '../util/isDate'; +export function timer(dueTime, intervalOrScheduler, scheduler) { + if (dueTime === void 0) { dueTime = 0; } + if (scheduler === void 0) { scheduler = asyncScheduler; } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } + else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable(function (subscriber) { + var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } + else { + subscriber.complete(); + } + } + }, due); + }); +} +//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map b/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map new file mode 100644 index 0000000..00e0f58 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map @@ -0,0 +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ACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/using.js b/node_modules/rxjs/dist/esm5/internal/observable/using.js new file mode 100644 index 0000000..6e244cc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/using.js @@ -0,0 +1,17 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; +export function using(resourceFactory, observableFactory) { + return new Observable(function (subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom(result) : EMPTY; + source.subscribe(subscriber); + return function () { + if (resource) { + resource.unsubscribe(); + } + }; + }); +} +//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/using.js.map b/node_modules/rxjs/dist/esm5/internal/observable/using.js.map new file mode 100644 index 0000000..a1b6c84 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/using.js.map @@ -0,0 +1 @@ +{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8BhC,MAAM,UAAU,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,UAAU,CAAqB,UAAC,UAAU;QACnD,IAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,IAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO;YAGL,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/zip.js b/node_modules/rxjs/dist/esm5/internal/observable/zip.js new file mode 100644 index 0000000..a3b2b24 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/zip.js @@ -0,0 +1,46 @@ +import { __read, __spreadArray } from "tslib"; +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { EMPTY } from './empty'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { popResultSelector } from '../util/args'; +export function zip() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + var sources = argsOrArgArray(args); + return sources.length + ? new Observable(function (subscriber) { + var buffers = sources.map(function () { return []; }); + var completed = sources.map(function () { return false; }); + subscriber.add(function () { + buffers = completed = null; + }); + var _loop_1 = function (sourceIndex) { + innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { + buffers[sourceIndex].push(value); + if (buffers.every(function (buffer) { return buffer.length; })) { + var result = buffers.map(function (buffer) { return buffer.shift(); }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); + if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { + subscriber.complete(); + } + } + }, function () { + completed[sourceIndex] = true; + !buffers[sourceIndex].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function () { + buffers = completed = null; + }; + }) + : EMPTY; +} +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map b/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map new file mode 100644 index 0000000..f445757 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA4CjD,MAAM,UAAU,GAAG;IAAC,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACpC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAA0B,CAAC;IAE9D,OAAO,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC,IAAI,UAAU,CAAY,UAAC,UAAU;YAGnC,IAAI,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC;YAKjD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;YAGzC,UAAU,CAAC,GAAG,CAAC;gBACb,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC,CAAC;oCAKM,WAAW;gBAClB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBACJ,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIjC,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,MAAM,EAAb,CAAa,CAAC,EAAE;wBAC5C,IAAM,MAAM,GAAQ,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,KAAK,EAAG,EAAf,CAAe,CAAC,CAAC;wBAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM,EAAE,CAAC,IAAK,OAAA,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD;oBAGE,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;;YA/BJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE;wBAAlF,WAAW;aAgCnB;YAGD,OAAO;gBACL,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js new file mode 100644 index 0000000..55d9321 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js @@ -0,0 +1,61 @@ +import { __extends } from "tslib"; +import { Subscriber } from '../Subscriber'; +export function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} +var OperatorSubscriber = (function (_super) { + __extends(OperatorSubscriber, _super); + function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; + _this._next = onNext + ? function (value) { + try { + onNext(value); + } + catch (err) { + destination.error(err); + } + } + : _super.prototype._next; + _this._error = onError + ? function (err) { + try { + onError(err); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._error; + _this._complete = onComplete + ? function () { + try { + onComplete(); + } + catch (err) { + destination.error(err); + } + finally { + this.unsubscribe(); + } + } + : _super.prototype._complete; + return _this; + } + OperatorSubscriber.prototype.unsubscribe = function () { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + }; + return OperatorSubscriber; +}(Subscriber)); +export { OperatorSubscriber }; +//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map new file mode 100644 index 0000000..ba9ebaa --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,wBAAwB,CACtC,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EAC5B,UAAuB;IAEvB,OAAO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AI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC/C,IAAA,QAAM,GAAK,IAAI,OAAT,CAAU;YACxB,iBAAM,WAAW,WAAE,CAAC;YAEpB,CAAC,QAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AAnFD,CAA2C,UAAU,GAmFpD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/audit.js b/node_modules/rxjs/dist/esm5/internal/operators/audit.js new file mode 100644 index 0000000..cb6dd12 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/audit.js @@ -0,0 +1,37 @@ +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function audit(durationSelector) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function () { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); + } + }, function () { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map b/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map new file mode 100644 index 0000000..2b5ad4f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map @@ -0,0 +1 @@ +{"version":3,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AE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js new file mode 100644 index 0000000..5d3b5de --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js @@ -0,0 +1,8 @@ +import { asyncScheduler } from '../scheduler/async'; +import { audit } from './audit'; +import { timer } from '../observable/timer'; +export function auditTime(duration, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return audit(function () { return timer(duration, scheduler); }); +} +//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map new file mode 100644 index 0000000..bed4a8b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkD5C,MAAM,UAAU,SAAS,CAAI,QAAgB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACtF,OAAO,KAAK,CAAC,cAAM,OAAA,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js new file mode 100644 index 0000000..a8d2327 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js @@ -0,0 +1,22 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function buffer(closingNotifier) { + return operate(function (source, subscriber) { + var currentBuffer = []; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop)); + return function () { + currentBuffer = null; + }; + }); +} +//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map new file mode 100644 index 0000000..b181112 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,MAAM,CAAI,eAAqC;IAC7D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAzB,CAAyB,EACpC;YACE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,SAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,wBAAwB,CACtB,UAAU,EACV;YAEE,IAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js new file mode 100644 index 0000000..69eb3ed --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js @@ -0,0 +1,71 @@ +import { __values } from "tslib"; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +export function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { startBufferEvery = null; } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return operate(function (source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + if (toEmit) { + try { + for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + } + finally { if (e_2) throw e_2.error; } + } + } + }, function () { + var e_3, _a; + try { + for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + } + finally { if (e_3) throw e_3.error; } + } + subscriber.complete(); + }, undefined, function () { + buffers = null; + })); + }); +} +//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map new file mode 100644 index 0000000..045b2e8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAqD9C,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,gBAAsC;IAAtC,iCAAA,EAAA,uBAAsC;I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CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js new file mode 100644 index 0000000..b8f2715 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js @@ -0,0 +1,77 @@ +import { __values } from "tslib"; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { asyncScheduler } from '../scheduler/async'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; +export function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return operate(function (source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function (record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function () { + if (bufferRecords) { + var subs = new Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer: buffer, + subs: subs, + }; + bufferRecords.push(record_1); + executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } + else { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, undefined, function () { return (bufferRecords = null); }); + source.subscribe(bufferTimeSubscriber); + }); +} +//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map new file mode 100644 index 0000000..26455f1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAsE1D,MAAM,UAAU,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;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AAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,aAAa,GAAG,IAAI,CAAC;SACtB;QAED,WAAW,EAAE,CAAC;QAEd,IAAM,oBAAoB,GAAG,wBAAwB,CACnD,UAAU,EACV,UAAC,KAAQ;;YAKP,IAAM,WAAW,GAAG,aAAc,CAAC,KAAK,EAAE,CAAC;;gBAC3C,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,MAAM,wBAAA;oBAEP,IAAA,MAAM,GAAK,MAAM,OAAX,CAAY;oBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAEnB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;iBAChD;;;;;;;;;QACH,CAAC,EACD;YAGE,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC,MAAM,CAAC,CAAC;aAChD;YACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,aAAa,GAAG,IAAI,CAAC,EAAtB,CAAsB,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js new file mode 100644 index 0000000..d18359b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js @@ -0,0 +1,45 @@ +import { __values } from "tslib"; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; +export function bufferToggle(openings, closingSelector) { + return operate(function (source, subscriber) { + var buffers = []; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription(); + var emitBuffer = function () { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map new file mode 100644 index 0000000..65d0cbc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,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C,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js new file mode 100644 index 0000000..019fb52 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js @@ -0,0 +1,23 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function bufferWhen(closingSelector) { + return operate(function (source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); + }; + openBuffer(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, undefined, function () { return (buffer = closingSubscriber = null); })); + }); +} +//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map new file mode 100644 index 0000000..3adee4c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,MAAM,GAAe,IAAI,CAAC;QAI9B,IAAI,iBAAiB,GAAyB,IAAI,CAAC;QAMnD,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAEjC,IAAM,CAAC,GAAG,MAAM,CAAC;YACjB,MAAM,GAAG,EAAE,CAAC;YACZ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAGxB,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACvH,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAEV,UAAC,KAAK,IAAK,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAG9B;YACE,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,MAAM,GAAG,iBAAiB,GAAG,IAAK,CAAC,EAApC,CAAoC,CAC3C,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js new file mode 100644 index 0000000..646352f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js @@ -0,0 +1,27 @@ +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { operate } from '../util/lift'; +export function catchError(selector) { + return operate(function (source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + handledResult = innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); +} +//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map new file mode 100644 index 0000000..98b5411 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAoGvC,MAAM,UAAU,UAAU,CACxB,QAAgD;IAEhD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;YAC7D,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js new file mode 100644 index 0000000..4db17c2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js @@ -0,0 +1,3 @@ +import { combineLatestAll } from './combineLatestAll'; +export var combineAll = combineLatestAll; +//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map new file mode 100644 index 0000000..da39afa --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,MAAM,CAAC,IAAM,UAAU,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js new file mode 100644 index 0000000..68b4c59 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js @@ -0,0 +1,20 @@ +import { __read, __spreadArray } from "tslib"; +import { combineLatestInit } from '../observable/combineLatest'; +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { popResultSelector } from '../util/args'; +export function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = popResultSelector(args); + return resultSelector + ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) + : operate(function (source, subscriber) { + combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); + }); +} +//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map new file mode 100644 index 0000000..c9ef6ed --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoBjD,MAAM,UAAU,aAAa;IAAO,cAA6D;SAA7D,UAA6D,EAA7D,qBAA6D,EAA7D,IAA6D;QAA7D,yBAA6D;;IAC/F,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,IAAI,CAAC,aAAa,wCAAK,IAAoC,KAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,iBAAiB,gBAAE,MAAM,UAAK,cAAc,CAAC,IAAI,CAAC,GAAE,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js new file mode 100644 index 0000000..3af3909 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js @@ -0,0 +1,6 @@ +import { combineLatest } from '../observable/combineLatest'; +import { joinAllInternals } from './joinAllInternals'; +export function combineLatestAll(project) { + return joinAllInternals(combineLatest, project); +} +//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map new file mode 100644 index 0000000..2adf9b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6CtD,MAAM,UAAU,gBAAgB,CAAI,OAAsC;IACxE,OAAO,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js new file mode 100644 index 0000000..30e3761 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js @@ -0,0 +1,10 @@ +import { __read, __spreadArray } from "tslib"; +import { combineLatest } from './combineLatest'; +export function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); +} +//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map new file mode 100644 index 0000000..2e30fb9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ChD,MAAM,UAAU,iBAAiB;IAC/B,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,aAAa,wCAAI,YAAY,IAAE;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concat.js b/node_modules/rxjs/dist/esm5/internal/operators/concat.js new file mode 100644 index 0000000..b31a393 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concat.js @@ -0,0 +1,16 @@ +import { __read, __spreadArray } from "tslib"; +import { operate } from '../util/lift'; +import { concatAll } from './concatAll'; +import { popScheduler } from '../util/args'; +import { from } from '../observable/from'; +export function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + return operate(function (source, subscriber) { + concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map new file mode 100644 index 0000000..0e9abef --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAY1C,MAAM,UAAU,MAAM;IAAO,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACzC,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,EAAE,CAAC,IAAI,gBAAE,MAAM,UAAK,IAAI,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js new file mode 100644 index 0000000..9ef0022 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js @@ -0,0 +1,5 @@ +import { mergeAll } from './mergeAll'; +export function concatAll() { + return mergeAll(1); +} +//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map new file mode 100644 index 0000000..0231f3f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2DtC,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js new file mode 100644 index 0000000..bdacda3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js @@ -0,0 +1,6 @@ +import { mergeMap } from './mergeMap'; +import { isFunction } from '../util/isFunction'; +export function concatMap(project, resultSelector) { + return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); +} +//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map new file mode 100644 index 0000000..cc84ef6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA4EhD,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js new file mode 100644 index 0000000..44a5eb3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js @@ -0,0 +1,6 @@ +import { concatMap } from './concatMap'; +import { isFunction } from '../util/isFunction'; +export function concatMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; }); +} +//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map new file mode 100644 index 0000000..23617e9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuEhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js new file mode 100644 index 0000000..c1d0bf6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js @@ -0,0 +1,10 @@ +import { __read, __spreadArray } from "tslib"; +import { concat } from './concat'; +export function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat.apply(void 0, __spreadArray([], __read(otherSources))); +} +//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map new file mode 100644 index 0000000..0f7613c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA0ClC,MAAM,UAAU,UAAU;IACxB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,MAAM,wCAAI,YAAY,IAAE;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/connect.js b/node_modules/rxjs/dist/esm5/internal/operators/connect.js new file mode 100644 index 0000000..3ffd469 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/connect.js @@ -0,0 +1,17 @@ +import { Subject } from '../Subject'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { fromSubscribable } from '../observable/fromSubscribable'; +var DEFAULT_CONFIG = { + connector: function () { return new Subject(); }, +}; +export function connect(selector, config) { + if (config === void 0) { config = DEFAULT_CONFIG; } + var connector = config.connector; + return operate(function (source, subscriber) { + var subject = connector(); + innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} +//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map b/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map new file mode 100644 index 0000000..bdc6b7a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,IAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,cAAM,OAAA,IAAI,OAAO,EAAW,EAAtB,CAAsB;CACxC,CAAC;AA2EF,MAAM,UAAU,OAAO,CACrB,QAAsC,EACtC,MAAyC;IAAzC,uBAAA,EAAA,uBAAyC;IAEjC,IAAA,SAAS,GAAK,MAAM,UAAX,CAAY;IAC7B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/count.js b/node_modules/rxjs/dist/esm5/internal/operators/count.js new file mode 100644 index 0000000..73511a9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/count.js @@ -0,0 +1,5 @@ +import { reduce } from './reduce'; +export function count(predicate) { + return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); +} +//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/count.js.map b/node_modules/rxjs/dist/esm5/internal/operators/count.js.map new file mode 100644 index 0000000..ebec8cd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/count.js.map @@ -0,0 +1 @@ +{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAyDlC,MAAM,UAAU,KAAK,CAAI,SAAgD;IACvE,OAAO,MAAM,CAAC,UAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAvD,CAAuD,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js new file mode 100644 index 0000000..7c0d289 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js @@ -0,0 +1,34 @@ +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function debounce(durationSelector) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function () { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); + innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = durationSubscriber = null; + })); + }); +} +//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map new file mode 100644 index 0000000..889ae7f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings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AkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js new file mode 100644 index 0000000..7e4f96c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js @@ -0,0 +1,44 @@ +import { asyncScheduler } from '../scheduler/async'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function debounceTime(dueTime, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return operate(function (source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function () { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function () { + emit(); + subscriber.complete(); + }, undefined, function () { + lastValue = activeTask = null; + })); + }); +} +//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map new file mode 100644 index 0000000..f94e482 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,OAAO,EAAE,MAAM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D;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js new file mode 100644 index 0000000..bf46020 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js @@ -0,0 +1,17 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function defaultIfEmpty(defaultValue) { + return operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map new file mode 100644 index 0000000..248518e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqChE,MAAM,UAAU,cAAc,CAAO,YAAe;IAClD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD;YACE,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delay.js b/node_modules/rxjs/dist/esm5/internal/operators/delay.js new file mode 100644 index 0000000..cd2bfd0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/delay.js @@ -0,0 +1,9 @@ +import { asyncScheduler } from '../scheduler/async'; +import { delayWhen } from './delayWhen'; +import { timer } from '../observable/timer'; +export function delay(due, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + var duration = timer(due, scheduler); + return delayWhen(function () { return duration; }); +} +//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map new file mode 100644 index 0000000..444b1fe --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA0D5C,MAAM,UAAU,KAAK,CAAI,GAAkB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACpF,IAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,SAAS,CAAC,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js new file mode 100644 index 0000000..60869ef --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js @@ -0,0 +1,15 @@ +import { concat } from '../observable/concat'; +import { take } from './take'; +import { ignoreElements } from './ignoreElements'; +import { mapTo } from './mapTo'; +import { mergeMap } from './mergeMap'; +import { innerFrom } from '../observable/innerFrom'; +export function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function (source) { + return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); }); +} +//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map new file mode 100644 index 0000000..a1dbf6b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoFpD,MAAM,UAAU,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,UAAC,MAAqB;YAC3B,OAAA,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAAxG,CAAwG,CAAC;KAC5G;IAED,OAAO,QAAQ,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAA1E,CAA0E,CAAC,CAAC;AAChH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js new file mode 100644 index 0000000..afcd092 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js @@ -0,0 +1,9 @@ +import { observeNotification } from '../Notification'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function dematerialize() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); + }); +} +//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map new file mode 100644 index 0000000..01d72f5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAC,YAAY,IAAK,OAAA,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA7C,CAA6C,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js new file mode 100644 index 0000000..f8503f3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js @@ -0,0 +1,18 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; +export function distinct(keySelector, flushes) { + return operate(function (source, subscriber) { + var distinctKeys = new Set(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); + }); +} +//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map new file mode 100644 index 0000000..0cf50e8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,EAAE,EAApB,CAAoB,EAAE,IAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js new file mode 100644 index 0000000..3094442 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js @@ -0,0 +1,23 @@ +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { keySelector = identity; } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return operate(function (source, subscriber) { + var previousKey; + var first = true; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); +} +function defaultCompare(a, b) { + return a === b; +} +//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map new file mode 100644 index 0000000..5652b1d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAuIhE,MAAM,UAAU,oBAAoB,CAClC,UAAiD,EACjD,WAA0D;IAA1D,4BAAA,EAAA,cAA+B,QAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YAEzC,IAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js new file mode 100644 index 0000000..64c7a50 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js @@ -0,0 +1,5 @@ +import { distinctUntilChanged } from './distinctUntilChanged'; +export function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; }); +} +//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map new file mode 100644 index 0000000..e3aa612 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAoE9D,MAAM,UAAU,uBAAuB,CAAuB,GAAM,EAAE,OAAuC;IAC3G,OAAO,oBAAoB,CAAC,UAAC,CAAI,EAAE,CAAI,IAAK,OAAA,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAArD,CAAqD,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js new file mode 100644 index 0000000..4d53c66 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js @@ -0,0 +1,15 @@ +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; +import { filter } from './filter'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { take } from './take'; +export function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); })); + }; +} +//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map new file mode 100644 index 0000000..7c802cd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAkD9B,MAAM,UAAU,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,uBAAuB,EAAE,CAAC;KACrC;IACD,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,KAAK,EAAX,CAAW,CAAC,EAC7B,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,uBAAuB,EAAE,EAA7B,CAA6B,CAAC,CACpG;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js new file mode 100644 index 0000000..81f6808 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js @@ -0,0 +1,11 @@ +import { __read, __spreadArray } from "tslib"; +import { concat } from '../observable/concat'; +import { of } from '../observable/of'; +export function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); }; +} +//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map new file mode 100644 index 0000000..6e406b3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AA8DtC,MAAM,UAAU,OAAO;IAAI,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IAC5D,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,MAAM,EAAE,EAAE,wCAAI,MAAM,IAAmB,EAA9C,CAA8C,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/every.js b/node_modules/rxjs/dist/esm5/internal/operators/every.js new file mode 100644 index 0000000..579ffb7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/every.js @@ -0,0 +1,17 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function every(predicate, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/every.js.map b/node_modules/rxjs/dist/esm5/internal/operators/every.js.map new file mode 100644 index 0000000..c94bfc6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/every.js.map @@ -0,0 +1 @@ +{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwChE,MAAM,UAAU,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js new file mode 100644 index 0000000..90f8c75 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js @@ -0,0 +1,3 @@ +import { exhaustAll } from './exhaustAll'; +export var exhaust = exhaustAll; +//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map new file mode 100644 index 0000000..a490626 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,IAAM,OAAO,GAAG,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js new file mode 100644 index 0000000..c61b4f8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js @@ -0,0 +1,6 @@ +import { exhaustMap } from './exhaustMap'; +import { identity } from '../util/identity'; +export function exhaustAll() { + return exhaustMap(identity); +} +//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map new file mode 100644 index 0000000..9d961b0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8C5C,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js new file mode 100644 index 0000000..ad922ab --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js @@ -0,0 +1,29 @@ +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function (source) { + return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); + }; + } + return operate(function (source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) { + if (!innerSub) { + innerSub = createOperatorSubscriber(subscriber, undefined, function () { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function () { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map new file mode 100644 index 0000000..ae34dc2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB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C,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/expand.js b/node_modules/rxjs/dist/esm5/internal/operators/expand.js new file mode 100644 index 0000000..4bdc753 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/expand.js @@ -0,0 +1,10 @@ +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +export function expand(project, concurrent, scheduler) { + if (concurrent === void 0) { concurrent = Infinity; } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return operate(function (source, subscriber) { + return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); + }); +} +//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map b/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map new file mode 100644 index 0000000..950b1d3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map @@ -0,0 +1 @@ +{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuElD,MAAM,UAAU,MAAM,CACpB,OAAuC,EACvC,UAAqB,EACrB,SAAyB;IADzB,2BAAA,EAAA,qBAAqB;IAGrB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,OAAA,cAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV;IAbD,CAaC,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/filter.js b/node_modules/rxjs/dist/esm5/internal/operators/filter.js new file mode 100644 index 0000000..273fa5b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/filter.js @@ -0,0 +1,9 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function filter(predicate, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); + }); +} +//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map b/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map new file mode 100644 index 0000000..4e2ba5a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAjE,CAAiE,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js new file mode 100644 index 0000000..f86b285 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js @@ -0,0 +1,12 @@ +import { operate } from '../util/lift'; +export function finalize(callback) { + return operate(function (source, subscriber) { + try { + source.subscribe(subscriber); + } + finally { + subscriber.add(callback); + } + }); +} +//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map new file mode 100644 index 0000000..5ccebb0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+DvC,MAAM,UAAU,QAAQ,CAAI,QAAoB;IAC9C,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/find.js b/node_modules/rxjs/dist/esm5/internal/operators/find.js new file mode 100644 index 0000000..2ea8da7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/find.js @@ -0,0 +1,22 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function find(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'value')); +} +export function createFind(predicate, thisArg, emit) { + var findIndex = emit === 'index'; + return function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function () { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + })); + }; +} +//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/find.js.map b/node_modules/rxjs/dist/esm5/internal/operators/find.js.map new file mode 100644 index 0000000..4d7d9b5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/find.js.map @@ -0,0 +1 @@ +{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,IAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js new file mode 100644 index 0000000..d59c5f8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js @@ -0,0 +1,6 @@ +import { operate } from '../util/lift'; +import { createFind } from './find'; +export function findIndex(predicate, thisArg) { + return operate(createFind(predicate, thisArg, 'index')); +} +//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map new file mode 100644 index 0000000..c4d30fc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map @@ -0,0 +1 @@ +{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAuDpC,MAAM,UAAU,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/first.js b/node_modules/rxjs/dist/esm5/internal/operators/first.js new file mode 100644 index 0000000..2718af9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/first.js @@ -0,0 +1,13 @@ +import { EmptyError } from '../util/EmptyError'; +import { filter } from './filter'; +import { take } from './take'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { throwIfEmpty } from './throwIfEmpty'; +import { identity } from '../util/identity'; +export function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + }; +} +//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/first.js.map b/node_modules/rxjs/dist/esm5/internal/operators/first.js.map new file mode 100644 index 0000000..13e76ff --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/first.js.map @@ -0,0 +1 @@ +{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAyE5C,MAAM,UAAU,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js new file mode 100644 index 0000000..937d334 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js @@ -0,0 +1,3 @@ +import { mergeMap } from './mergeMap'; +export var flatMap = mergeMap; +//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map new file mode 100644 index 0000000..6fd4c84 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js new file mode 100644 index 0000000..3d721a4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js @@ -0,0 +1,63 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; +export function groupBy(keySelector, elementOrOptions, duration, connector) { + return operate(function (source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === 'function') { + element = elementOrOptions; + } + else { + (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); + } + var groups = new Map(); + var notify = function (cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, (group_1 = connector ? connector() : new Subject())); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = createOperatorSubscriber(group_1, function () { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, undefined, undefined, function () { return groups.delete(key_1); }); + groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } + catch (err) { + handleError(err); + } + }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable(function (groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function () { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); +} +//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map new file mode 100644 index 0000000..b4a4285 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAuIpF,MAAM,UAAU,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,OA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oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js new file mode 100644 index 0000000..e590c33 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js @@ -0,0 +1,9 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +export function ignoreElements() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, noop)); + }); +} +//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map new file mode 100644 index 0000000..66249f8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAqCpC,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js new file mode 100644 index 0000000..8a140b5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js @@ -0,0 +1,14 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function isEmpty() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function () { + subscriber.next(false); + subscriber.complete(); + }, function () { + subscriber.next(true); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map new file mode 100644 index 0000000..68b5d63 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,OAAO;IACrB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV;YACE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js new file mode 100644 index 0000000..62a00fc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js @@ -0,0 +1,9 @@ +import { identity } from '../util/identity'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { mergeMap } from './mergeMap'; +import { toArray } from './toArray'; +export function joinAllInternals(joinFn, project) { + return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity); +} +//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map new file mode 100644 index 0000000..fb6cc39 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,UAAU,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,IAAI,CAGT,OAAO,EAAgE,EAEvE,QAAQ,CAAC,UAAC,OAAO,IAAK,OAAA,MAAM,CAAC,OAAO,CAAC,EAAf,CAAe,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,QAAgB,CACxD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/last.js b/node_modules/rxjs/dist/esm5/internal/operators/last.js new file mode 100644 index 0000000..b77d792 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/last.js @@ -0,0 +1,13 @@ +import { EmptyError } from '../util/EmptyError'; +import { filter } from './filter'; +import { takeLast } from './takeLast'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { identity } from '../util/identity'; +export function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function (source) { + return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); + }; +} +//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/last.js.map b/node_modules/rxjs/dist/esm5/internal/operators/last.js.map new file mode 100644 index 0000000..8c87fcd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/last.js.map @@ -0,0 +1 @@ +{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAuE5C,MAAM,UAAU,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,QAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/map.js b/node_modules/rxjs/dist/esm5/internal/operators/map.js new file mode 100644 index 0000000..84d27b4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/map.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function map(project, thisArg) { + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); +} +//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/map.js.map b/node_modules/rxjs/dist/esm5/internal/operators/map.js.map new file mode 100644 index 0000000..85b7e29 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/map.js.map @@ -0,0 +1 @@ +{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js new file mode 100644 index 0000000..da6eaa2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js @@ -0,0 +1,5 @@ +import { map } from './map'; +export function mapTo(value) { + return map(function () { return value; }); +} +//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map new file mode 100644 index 0000000..bc5313c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA4C5B,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js new file mode 100644 index 0000000..f2c4839 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js @@ -0,0 +1,17 @@ +import { Notification } from '../Notification'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function materialize() { + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + subscriber.next(Notification.createNext(value)); + }, function () { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, function (err) { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + })); + }); +} +//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map new file mode 100644 index 0000000..786d980 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map @@ -0,0 +1 @@ +{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/max.js b/node_modules/rxjs/dist/esm5/internal/operators/max.js new file mode 100644 index 0000000..5e16431 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/max.js @@ -0,0 +1,6 @@ +import { reduce } from './reduce'; +import { isFunction } from '../util/isFunction'; +export function max(comparer) { + return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); +} +//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/max.js.map b/node_modules/rxjs/dist/esm5/internal/operators/max.js.map new file mode 100644 index 0000000..250492b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/max.js.map @@ -0,0 +1 @@ +{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/merge.js b/node_modules/rxjs/dist/esm5/internal/operators/merge.js new file mode 100644 index 0000000..6491054 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/merge.js @@ -0,0 +1,19 @@ +import { __read, __spreadArray } from "tslib"; +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mergeAll } from './mergeAll'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from '../observable/from'; +export function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = popScheduler(args); + var concurrent = popNumber(args, Infinity); + args = argsOrArgArray(args); + return operate(function (source, subscriber) { + mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); + }); +} +//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map b/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map new file mode 100644 index 0000000..dc3960d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAiB1C,MAAM,UAAU,KAAK;IAAI,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACzC,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,gBAAE,MAAM,UAAM,IAA6B,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js new file mode 100644 index 0000000..7a1ca26 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js @@ -0,0 +1,7 @@ +import { mergeMap } from './mergeMap'; +import { identity } from '../util/identity'; +export function mergeAll(concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return mergeMap(identity, concurrent); +} +//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map new file mode 100644 index 0000000..2d24b82 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8D5C,MAAM,UAAU,QAAQ,CAAiC,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IACpF,OAAO,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js new file mode 100644 index 0000000..e91f04e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js @@ -0,0 +1,61 @@ +import { innerFrom } from '../observable/innerFrom'; +import { executeSchedule } from '../util/executeSchedule'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function () { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; + var doInnerSub = function (value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } + else { + subscriber.next(innerValue); + } + }, function () { + innerComplete = true; + }, undefined, function () { + if (innerComplete) { + try { + active--; + var _loop_1 = function () { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); + } + else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } + catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () { + isComplete = true; + checkComplete(); + })); + return function () { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; +} +//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map new file mode 100644 index 0000000..13a2a50 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAehE,MAAM,UAAU,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,IAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAA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AzB,CAAyB,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;;oBATH,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU;;qBAU1C;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;QAE9C,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO;QACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js new file mode 100644 index 0000000..9eb2c26 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js @@ -0,0 +1,16 @@ +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +import { isFunction } from '../util/isFunction'; +export function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction(resultSelector)) { + return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent); + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); }); +} +//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map new file mode 100644 index 0000000..5885bf6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA6EhD,MAAM,UAAU,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,GAAG,CAAC,UAAC,CAAM,EAAE,EAAU,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAlF,CAAkF,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU,IAAK,OAAA,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAvD,CAAuD,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js new file mode 100644 index 0000000..4f06e2b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js @@ -0,0 +1,13 @@ +import { mergeMap } from './mergeMap'; +import { isFunction } from '../util/isFunction'; +export function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + if (isFunction(resultSelector)) { + return mergeMap(function () { return innerObservable; }, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap(function () { return innerObservable; }, concurrent); +} +//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map new file mode 100644 index 0000000..d3df6ee --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2DhD,MAAM,UAAU,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,QAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,QAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js new file mode 100644 index 0000000..a8d7bc7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js @@ -0,0 +1,12 @@ +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +export function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { concurrent = Infinity; } + return operate(function (source, subscriber) { + var state = seed; + return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { + state = value; + }, false, undefined, function () { return (state = null); }); + }); +} +//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map new file mode 100644 index 0000000..5adde5e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoElD,MAAM,UAAU,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAqB;IAArB,2BAAA,EAAA,qBAAqB;IAErB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,cAAc,CACnB,MAAM,EACN,UAAU,EACV,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAClD,UAAU,EACV,UAAC,KAAK;YACJ,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,cAAM,OAAA,CAAC,KAAK,GAAG,IAAK,CAAC,EAAf,CAAe,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js new file mode 100644 index 0000000..037ea38 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js @@ -0,0 +1,10 @@ +import { __read, __spreadArray } from "tslib"; +import { merge } from './merge'; +export function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge.apply(void 0, __spreadArray([], __read(otherSources))); +} +//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map new file mode 100644 index 0000000..1ce77ea --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2ChC,MAAM,UAAU,SAAS;IACvB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,KAAK,wCAAI,YAAY,IAAE;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/min.js b/node_modules/rxjs/dist/esm5/internal/operators/min.js new file mode 100644 index 0000000..5eedf33 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/min.js @@ -0,0 +1,6 @@ +import { reduce } from './reduce'; +import { isFunction } from '../util/isFunction'; +export function min(comparer) { + return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); +} +//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/min.js.map b/node_modules/rxjs/dist/esm5/internal/operators/min.js.map new file mode 100644 index 0000000..48a79f0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js new file mode 100644 index 0000000..9bea366 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js @@ -0,0 +1,13 @@ +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { isFunction } from '../util/isFunction'; +import { connect } from './connect'; +export function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; + if (isFunction(selector)) { + return connect(selector, { + connector: subjectFactory, + }); + } + return function (source) { return new ConnectableObservable(source, subjectFactory); }; +} +//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map new file mode 100644 index 0000000..d7533c8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC,MAAM,UAAU,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,IAAM,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IAErH,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,IAAI,qBAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,EAAtD,CAAsD,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js new file mode 100644 index 0000000..ab3028a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js @@ -0,0 +1,10 @@ +import { executeSchedule } from '../util/executeSchedule'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function observeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return operate(function (source, subscriber) { + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); + }); +} +//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map new file mode 100644 index 0000000..b6537a9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsDhE,MAAM,UAAU,SAAS,CAAI,SAAwB,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;IAC9D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAtB,CAAsB,EAAE,KAAK,CAAC,EAA3E,CAA2E,EACtF,cAAM,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,EAChF,UAAC,GAAG,IAAK,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js new file mode 100644 index 0000000..2981576 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js @@ -0,0 +1,13 @@ +import { __read, __spreadArray } from "tslib"; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; +export function onErrorResumeNextWith() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray(sources); + return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); }; +} +export var onErrorResumeNext = onErrorResumeNextWith; +//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map new file mode 100644 index 0000000..ab95682 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAiFlF,MAAM,UAAU,qBAAqB;IACnC,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAMzE,IAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,UAAC,MAAM,IAAK,OAAA,UAAU,8BAAC,MAAM,UAAK,WAAW,KAAjC,CAAkC,CAAC;AACxD,CAAC;AAKD,MAAM,CAAC,IAAM,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js new file mode 100644 index 0000000..2130442 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js @@ -0,0 +1,15 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function pairwise() { + return operate(function (source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); +} +//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map new file mode 100644 index 0000000..7419532 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/partition.js b/node_modules/rxjs/dist/esm5/internal/operators/partition.js new file mode 100644 index 0000000..f5deaa0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/partition.js @@ -0,0 +1,8 @@ +import { not } from '../util/not'; +import { filter } from './filter'; +export function partition(predicate, thisArg) { + return function (source) { + return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; + }; +} +//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map b/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map new file mode 100644 index 0000000..ece5de5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuDlC,MAAM,UAAU,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,UAAC,MAAqB;QAC3B,OAAA,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC;IAA/G,CAA+G,CAAC;AACpH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js new file mode 100644 index 0000000..ea59337 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js @@ -0,0 +1,25 @@ +import { map } from './map'; +export function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map(function (x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } + else { + return undefined; + } + } + return currentProp; + }); +} +//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map new file mode 100644 index 0000000..10087b1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwF5B,MAAM,UAAU,KAAK;IAAO,oBAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,+BAA8C;;IACxE,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,GAAG,CAAC,UAAC,CAAC;QACX,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publish.js b/node_modules/rxjs/dist/esm5/internal/operators/publish.js new file mode 100644 index 0000000..8d003f9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publish.js @@ -0,0 +1,7 @@ +import { Subject } from '../Subject'; +import { multicast } from './multicast'; +import { connect } from './connect'; +export function publish(selector) { + return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); }; +} +//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map new file mode 100644 index 0000000..377db20 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqFpC,MAAM,UAAU,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,SAAS,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC;AAC5G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js new file mode 100644 index 0000000..42ae70c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js @@ -0,0 +1,9 @@ +import { BehaviorSubject } from '../BehaviorSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +export function publishBehavior(initialValue) { + return function (source) { + var subject = new BehaviorSubject(initialValue); + return new ConnectableObservable(source, function () { return subject; }); + }; +} +//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map new file mode 100644 index 0000000..6a7b85a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAiB5E,MAAM,UAAU,eAAe,CAAI,YAAe;IAEhD,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,eAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js new file mode 100644 index 0000000..c312d86 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js @@ -0,0 +1,9 @@ +import { AsyncSubject } from '../AsyncSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +export function publishLast() { + return function (source) { + var subject = new AsyncSubject(); + return new ConnectableObservable(source, function () { return subject; }); + }; +} +//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map new file mode 100644 index 0000000..e173ca7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAmE5E,MAAM,UAAU,WAAW;IAEzB,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,YAAY,EAAK,CAAC;QACtC,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js new file mode 100644 index 0000000..4f7325d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js @@ -0,0 +1,11 @@ +import { ReplaySubject } from '../ReplaySubject'; +import { multicast } from './multicast'; +import { isFunction } from '../util/isFunction'; +export function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; +} +//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map new file mode 100644 index 0000000..71b6776 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA8EhD,MAAM,UAAU,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,IAAM,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,UAAC,MAAqB,IAAK,OAAA,SAAS,CAAC,IAAI,aAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,EAA7F,CAA6F,CAAC;AAClI,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/race.js b/node_modules/rxjs/dist/esm5/internal/operators/race.js new file mode 100644 index 0000000..063ecb3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/race.js @@ -0,0 +1,11 @@ +import { __read, __spreadArray } from "tslib"; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { raceWith } from './raceWith'; +export function race() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args)))); +} +//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/race.js.map b/node_modules/rxjs/dist/esm5/internal/operators/race.js.map new file mode 100644 index 0000000..a2049a5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,MAAM,UAAU,IAAI;IAAI,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACpC,OAAO,QAAQ,wCAAI,cAAc,CAAC,IAAI,CAAC,IAAE;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js new file mode 100644 index 0000000..cff7a6a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js @@ -0,0 +1,16 @@ +import { __read, __spreadArray } from "tslib"; +import { raceInit } from '../observable/race'; +import { operate } from '../util/lift'; +import { identity } from '../util/identity'; +export function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length + ? identity + : operate(function (source, subscriber) { + raceInit(__spreadArray([source], __read(otherSources)))(subscriber); + }); +} +//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map new file mode 100644 index 0000000..5547fed --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4B5C,MAAM,UAAU,QAAQ;IACtB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,QAAQ,gBAAiB,MAAM,UAAK,YAAY,GAAE,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js new file mode 100644 index 0000000..55be35a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js @@ -0,0 +1,6 @@ +import { scanInternals } from './scanInternals'; +import { operate } from '../util/lift'; +export function reduce(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); +} +//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map new file mode 100644 index 0000000..2ec4cdc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAyDvC,MAAM,UAAU,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js new file mode 100644 index 0000000..ee0182d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js @@ -0,0 +1,26 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function refCount() { + return operate(function (source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); +} +//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map new file mode 100644 index 0000000..b7cf3a2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,IAAM,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACvF,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,IAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js new file mode 100644 index 0000000..d5daec0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js @@ -0,0 +1,60 @@ +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { timer } from '../observable/timer'; +export function repeat(countOrConfig) { + var _a; + var count = Infinity; + var delay; + if (countOrConfig != null) { + if (typeof countOrConfig === 'object') { + (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); + } + else { + count = countOrConfig; + } + } + return count <= 0 + ? function () { return EMPTY; } + : operate(function (source, subscriber) { + var soFar = 0; + var sourceSub; + var resubscribe = function () { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); + var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + subscribeToSource(); + } + }; + var subscribeToSource = function () { + var syncUnsub = false; + sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } + else { + syncUnsub = true; + } + } + else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); +} +//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map new file mode 100644 index 0000000..6c78356 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA6G5C,MAAM,UAAU,MAAM,CAAI,aAAqC;;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAG,KAA4B,aAAa,MAAzB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,IAAM,WAAW,GAAG;gBAClB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,IAAM,oBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE;wBAC9D,oBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBAC9C,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js new file mode 100644 index 0000000..5839781 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js @@ -0,0 +1,46 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function repeatWhen(notifier) { + return operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; + var getCompletionSubject = function () { + if (!completions$) { + completions$ = new Subject(); + innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () { + if (innerSub) { + subscribeForRepeatWhen(); + } + else { + syncResub = true; + } + }, function () { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function () { + isMainComplete = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); +} +//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map new file mode 100644 index 0000000..365f486 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoChE,MAAM,UAAU,UAAU,CAAI,QAAmE;IAC/F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;QAC/B,IAAI,cAAc,GAAG,KAAK,CAAC;QAK3B,IAAM,aAAa,GAAG,cAAM,OAAA,cAAc,IAAI,kBAAkB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAArE,CAAqE,CAAC;QAKlG,IAAM,oBAAoB,GAAG;YAC3B,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;gBAI7B,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CACzC,wBAAwB,CACtB,UAAU,EACV;oBACE,IAAI,QAAQ,EAAE;wBACZ,sBAAsB,EAAE,CAAC;qBAC1B;yBAAM;wBAKL,SAAS,GAAG,IAAI,CAAC;qBAClB;gBACH,CAAC,EACD;oBACE,kBAAkB,GAAG,IAAI,CAAC;oBAC1B,aAAa,EAAE,CAAC;gBAClB,CAAC,CACF,CACF,CAAC;aACH;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,IAAM,sBAAsB,GAAG;YAC7B,cAAc,GAAG,KAAK,CAAC;YAEvB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;gBAC9C,cAAc,GAAG,IAAI,CAAC;gBAMtB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retry.js b/node_modules/rxjs/dist/esm5/internal/operators/retry.js new file mode 100644 index 0000000..3ba2a04 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/retry.js @@ -0,0 +1,69 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; +import { timer } from '../observable/timer'; +import { innerFrom } from '../observable/innerFrom'; +export function retry(configOrCount) { + if (configOrCount === void 0) { configOrCount = Infinity; } + var config; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } + else { + config = { + count: configOrCount, + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 + ? identity + : operate(function (source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function () { + var syncUnsub = false; + innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, undefined, function (err) { + if (soFar++ < count) { + var resub_1 = function () { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function () { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } + else { + resub_1(); + } + } + else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); +} +//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map b/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map new file mode 100644 index 0000000..ea2ad16 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"AACA,OAAO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,CAAC,WAAW,EAAE,CAAC;gCACvB,QAAQ,GAAG,IAAI,CAAC;gCAChB,iBAAiB,EAAE,CAAC;6BACrB;iCAAM;gCACL,SAAS,GAAG,IAAI,CAAC;6BAClB;wBACH,CAAC,CAAC;wBAEF,IAAI,KAAK,IAAI,IAAI,EAAE;4BAIjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;4BACzF,IAAM,oBAAkB,GAAG,wBAAwB,CACjD,UAAU,EACV;gCAIE,oBAAkB,CAAC,WAAW,EAAE,CAAC;gCACjC,OAAK,EAAE,CAAC;4BACV,CAAC,EACD;gCAGE,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACxB,CAAC,CACF,CAAC;4BACF,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;yBACxC;6BAAM;4BAEL,OAAK,EAAE,CAAC;yBACT;qBACF;yBAAM;wBAGL,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACvB;gBACH,CAAC,CACF,CACF,CAAC;gBACF,IAAI,SAAS,EAAE;oBACb,QAAQ,CAAC,WAAW,EAAE,CAAC;oBACvB,QAAQ,GAAG,IAAI,CAAC;oBAChB,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js new file mode 100644 index 0000000..e6e1c09 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js @@ -0,0 +1,32 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function retryWhen(notifier) { + return operate(function (source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function () { + innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { + if (!errors$) { + errors$ = new Subject(); + innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () { + return innerSub ? subscribeForRetryWhen() : (syncResub = true); + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); +} +//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map new file mode 100644 index 0000000..7ccab1a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,SAAS,CAAI,QAA2D;IACtF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,IAAM,qBAAqB,GAAG;YAC5B,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;gBAC7D,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;oBACxB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,wBAAwB,CAAC,UAAU,EAAE;wBAMnC,OAAA,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;oBAAvD,CAAuD,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sample.js b/node_modules/rxjs/dist/esm5/internal/operators/sample.js new file mode 100644 index 0000000..feff985 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sample.js @@ -0,0 +1,23 @@ +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function sample(notifier) { + return operate(function (source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + lastValue = value; + })); + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop)); + }); +} +//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map new file mode 100644 index 0000000..34b7662 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0ChE,MAAM,UAAU,MAAM,CAAI,QAA8B;IACtD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV;YACE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,IAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js new file mode 100644 index 0000000..8be13a0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js @@ -0,0 +1,8 @@ +import { asyncScheduler } from '../scheduler/async'; +import { sample } from './sample'; +import { interval } from '../observable/interval'; +export function sampleTime(period, scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return sample(interval(period, scheduler)); +} +//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map new file mode 100644 index 0000000..473a763 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA6ClD,MAAM,UAAU,UAAU,CAAI,MAAc,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACrF,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scan.js b/node_modules/rxjs/dist/esm5/internal/operators/scan.js new file mode 100644 index 0000000..b60b8e0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/scan.js @@ -0,0 +1,6 @@ +import { operate } from '../util/lift'; +import { scanInternals } from './scanInternals'; +export function scan(accumulator, seed) { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); +} +//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map new file mode 100644 index 0000000..dd32f36 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqFhD,MAAM,UAAU,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js new file mode 100644 index 0000000..66eaff6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js @@ -0,0 +1,22 @@ +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function (source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var i = index++; + state = hasState + ? + accumulator(state, value, i) + : + ((hasState = true), value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && + (function () { + hasState && subscriber.next(state); + subscriber.complete(); + }))); + }; +} +//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map new file mode 100644 index 0000000..94e2abb --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAWhE,MAAM,UAAU,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QAIxD,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC;gBACC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js new file mode 100644 index 0000000..2bd7113 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js @@ -0,0 +1,40 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } + return operate(function (source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function (isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function (selfState, otherState) { + var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } + else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function () { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); +} +function createState() { + return { + buffer: [], + complete: false, + }; +} +//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map new file mode 100644 index 0000000..df29e7b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,aAAa,CAC3B,SAA6B,EAC7B,UAAuD;IAAvD,2BAAA,EAAA,uBAAuC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,EAAP,CAAO;IAEvD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAGhC,IAAM,IAAI,GAAG,UAAC,OAAgB;YAC5B,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAOF,IAAM,gBAAgB,GAAG,UAAC,SAA2B,EAAE,UAA4B;YACjF,IAAM,uBAAuB,GAAG,wBAAwB,CACtD,UAAU,EACV,UAAC,CAAI;gBACK,IAAA,MAAM,GAAe,UAAU,OAAzB,EAAE,QAAQ,GAAK,UAAU,SAAf,CAAgB;gBACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBAOvB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnD;qBAAM;oBAIL,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAChD;YACH,CAAC,EACD;gBAEE,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;gBAClB,IAAA,QAAQ,GAAa,UAAU,SAAvB,EAAE,MAAM,GAAK,UAAU,OAAf,CAAgB;gBAKxC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBAEtC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/share.js b/node_modules/rxjs/dist/esm5/internal/operators/share.js new file mode 100644 index 0000000..f2e2c10 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/share.js @@ -0,0 +1,85 @@ +import { __read, __spreadArray } from "tslib"; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { SafeSubscriber } from '../Subscriber'; +import { operate } from '../util/lift'; +export function share(options) { + if (options === void 0) { options = {}; } + var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function (wrapperSource) { + var connection; + var resetConnection; + var subject; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function () { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + var reset = function () { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function () { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return operate(function (source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); + subscriber.add(function () { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && + refCount > 0) { + connection = new SafeSubscriber({ + next: function (value) { return dest.next(value); }, + error: function (err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function () { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; +} +function handleReset(reset, on) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + var onSubscriber = new SafeSubscriber({ + next: function () { + onSubscriber.unsubscribe(); + reset(); + }, + }); + return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); +} +//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/share.js.map b/node_modules/rxjs/dist/esm5/internal/operators/share.js.map new file mode 100644 index 0000000..229a038 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/share.js.map @@ -0,0 +1 @@ +{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwIvC,MAAM,UAAU,KAAK,CAAI,OAA4B;IAA5B,wBAAA,EAAA,YAA4B;IAC3C,IAAA,KAAgH,OAAO,UAArF,EAAlC,SAAS,mBAAG,cAAM,OAAA,IAAI,OAAO,EAAK,EAAhB,CAAgB,KAAA,EAAE,KAA4E,OAAO,aAAhE,EAAnB,YAAY,mBAAG,IAAI,KAAA,EAAE,KAAuD,OAAO,gBAAxC,EAAtB,eAAe,mBAAG,IAAI,KAAA,EAAE,KAA+B,OAAO,oBAAZ,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,CAAa;IAUhI,OAAO,UAAC,aAAa;QACnB,IAAI,UAAyC,CAAC;QAC9C,IAAI,eAAyC,CAAC;QAC9C,IAAI,OAAmC,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,eAAe,aAAf,eAAe,uBAAf,eAAe,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AAE,YAAY,EAAE,GAAG,CAAC,CAAC;wBACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC;oBACD,QAAQ,EAAE;wBACR,YAAY,GAAG,IAAI,CAAC;wBACpB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;wBACtD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,CAAC;iBACF,CAAC,CAAC;gBACH,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD;IACpD,cAAU;SAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;QAAV,6BAAU;;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,IAAM,YAAY,GAAG,IAAI,cAAc,CAAC;QACtC,IAAI,EAAE;YACJ,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js new file mode 100644 index 0000000..857e37b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js @@ -0,0 +1,20 @@ +import { ReplaySubject } from '../ReplaySubject'; +import { share } from './share'; +export function shareReplay(configOrBufferSize, windowTime, scheduler) { + var _a, _b, _c; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); + } + else { + bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); + } + return share({ + connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); +} +//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map new file mode 100644 index 0000000..2408618 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwJhC,MAAM,UAAU,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAG,KAA8E,kBAAkB,WAA3E,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAuD,kBAAkB,WAApD,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAgC,kBAAkB,SAAlC,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,SAAS,GAAK,kBAAkB,UAAvB,CAAwB,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,cAAM,OAAA,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAApD,CAAoD;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/single.js b/node_modules/rxjs/dist/esm5/internal/operators/single.js new file mode 100644 index 0000000..ed324d0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/single.js @@ -0,0 +1,30 @@ +import { EmptyError } from '../util/EmptyError'; +import { SequenceError } from '../util/SequenceError'; +import { NotFoundError } from '../util/NotFoundError'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function single(predicate) { + return operate(function (source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError('Too many matching values')); + hasValue = true; + singleValue = value; + } + }, function () { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } + else { + subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); + } + })); + }); +} +//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/single.js.map b/node_modules/rxjs/dist/esm5/internal/operators/single.js.map new file mode 100644 index 0000000..985c1e0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/single.js.map @@ -0,0 +1 @@ +{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiFhE,MAAM,UAAU,MAAM,CAAI,SAAuE;IAC/F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD;YACE,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skip.js b/node_modules/rxjs/dist/esm5/internal/operators/skip.js new file mode 100644 index 0000000..4804421 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skip.js @@ -0,0 +1,5 @@ +import { filter } from './filter'; +export function skip(count) { + return filter(function (_, index) { return count <= index; }); +} +//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map new file mode 100644 index 0000000..a6aa41c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmClC,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,MAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,IAAI,KAAK,EAAd,CAAc,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js new file mode 100644 index 0000000..8a69d32 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js @@ -0,0 +1,28 @@ +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function skipLast(skipCount) { + return skipCount <= 0 + ? + identity + : operate(function (source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } + else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function () { + ring = null; + }; + }); +} +//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map new file mode 100644 index 0000000..a35e890 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAIzB,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAKzC,IAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,IAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO;gBAEL,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js new file mode 100644 index 0000000..12aa7aa --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js @@ -0,0 +1,16 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; +export function skipUntil(notifier) { + return operate(function (source, subscriber) { + var taking = false; + var skipSubscriber = createOperatorSubscriber(subscriber, function () { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop); + innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); + }); +} +//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map new file mode 100644 index 0000000..b9c47b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA+CpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAM,cAAc,GAAG,wBAAwB,CAC7C,UAAU,EACV;YACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,IAAI,CACL,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js new file mode 100644 index 0000000..4f86f13 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js @@ -0,0 +1,10 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function skipWhile(predicate) { + return operate(function (source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); + }); +} +//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map new file mode 100644 index 0000000..c4e201d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAA3E,CAA2E,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js new file mode 100644 index 0000000..f10bfca --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js @@ -0,0 +1,14 @@ +import { concat } from '../observable/concat'; +import { popScheduler } from '../util/args'; +import { operate } from '../util/lift'; +export function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler = popScheduler(values); + return operate(function (source, subscriber) { + (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); + }); +} +//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map new file mode 100644 index 0000000..f32f49c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuDvC,MAAM,UAAU,SAAS;IAAO,gBAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,2BAAc;;IAC5C,IAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAIhC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js new file mode 100644 index 0000000..d77b949 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js @@ -0,0 +1,8 @@ +import { operate } from '../util/lift'; +export function subscribeOn(scheduler, delay) { + if (delay === void 0) { delay = 0; } + return operate(function (source, subscriber) { + subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); + }); +} +//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map new file mode 100644 index 0000000..c04f344 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6DvC,MAAM,UAAU,WAAW,CAAI,SAAwB,EAAE,KAAiB;IAAjB,sBAAA,EAAA,SAAiB;IACxE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAA5B,CAA4B,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js new file mode 100644 index 0000000..f0db599 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js @@ -0,0 +1,6 @@ +import { switchMap } from './switchMap'; +import { identity } from '../util/identity'; +export function switchAll() { + return switchMap(identity); +} +//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map new file mode 100644 index 0000000..f4b6438 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4D5C,MAAM,UAAU,SAAS;IACvB,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js new file mode 100644 index 0000000..aed4575 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js @@ -0,0 +1,24 @@ +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function switchMap(project, resultSelector) { + return operate(function (source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { + innerSubscriber = null; + checkComplete(); + }))); + }, function () { + isComplete = true; + checkComplete(); + })); + }); +} +//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map new file mode 100644 index 0000000..e6e2aa7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiFhE,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,IAAM,aAAa,GAAG,cAAM,OAAA,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,EAAvD,CAAuD,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,IAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,wBAAwB,CACzC,UAAU,EAIV,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAA1G,CAA0G,EAC1H;gBAIE,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js new file mode 100644 index 0000000..b4eeada --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js @@ -0,0 +1,6 @@ +import { switchMap } from './switchMap'; +import { isFunction } from '../util/isFunction'; +export function switchMapTo(innerObservable, resultSelector) { + return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; }); +} +//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map new file mode 100644 index 0000000..046d5a7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js new file mode 100644 index 0000000..8b28312 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js @@ -0,0 +1,12 @@ +import { switchMap } from './switchMap'; +import { operate } from '../util/lift'; +export function switchScan(accumulator, seed) { + return operate(function (source, subscriber) { + var state = seed; + switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); + return function () { + state = null; + }; + }); +} +//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map new file mode 100644 index 0000000..31a4022 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAqBvC,MAAM,UAAU,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,SAAS,CAGP,UAAC,KAAQ,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAGrD,UAAC,CAAC,EAAE,UAAU,IAAK,OAAA,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,EAAlC,CAAkC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO;YAEL,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/take.js b/node_modules/rxjs/dist/esm5/internal/operators/take.js new file mode 100644 index 0000000..e2c24c0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/take.js @@ -0,0 +1,20 @@ +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function take(count) { + return count <= 0 + ? + function () { return EMPTY; } + : operate(function (source, subscriber) { + var seen = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); +} +//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/take.js.map b/node_modules/rxjs/dist/esm5/internal/operators/take.js.map new file mode 100644 index 0000000..fd2e22b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/take.js.map @@ -0,0 +1 @@ +{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAIzC,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js new file mode 100644 index 0000000..9de2aa3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js @@ -0,0 +1,34 @@ +import { __values } from "tslib"; +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function takeLast(count) { + return count <= 0 + ? function () { return EMPTY; } + : operate(function (source, subscriber) { + var buffer = []; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function () { + var e_1, _a; + try { + for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); + } + finally { if (e_1) throw e_1.error; } + } + subscriber.complete(); + }, undefined, function () { + buffer = null; + })); + }); +} +//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map new file mode 100644 index 0000000..615173f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAKzB,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBAEJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD;;;oBAGE,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAvB,IAAM,KAAK,mBAAA;wBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT;gBAEE,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js new file mode 100644 index 0000000..d9e3351 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js @@ -0,0 +1,11 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; +export function takeUntil(notifier) { + return operate(function (source, subscriber) { + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} +//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map new file mode 100644 index 0000000..427d102 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAyCpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,IAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js new file mode 100644 index 0000000..855c606 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js @@ -0,0 +1,14 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { inclusive = false; } + return operate(function (source, subscriber) { + var index = 0; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map new file mode 100644 index 0000000..e93b344 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoDhE,MAAM,UAAU,SAAS,CAAI,SAA+C,EAAE,SAAiB;IAAjB,0BAAA,EAAA,iBAAiB;IAC7F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/tap.js b/node_modules/rxjs/dist/esm5/internal/operators/tap.js new file mode 100644 index 0000000..868735a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/tap.js @@ -0,0 +1,40 @@ +import { isFunction } from '../util/isFunction'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; +export function tap(observerOrNext, error, complete) { + var tapObserver = isFunction(observerOrNext) || error || complete + ? + { next: observerOrNext, error: error, complete: complete } + : observerOrNext; + return tapObserver + ? operate(function (source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var _a; + (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); + subscriber.next(value); + }, function () { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + subscriber.complete(); + }, function (err) { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); + subscriber.error(err); + }, function () { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) + : + identity; +} +//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map new file mode 100644 index 0000000..6347038 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkK5C,MAAM,UAAU,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,IAAM,WAAW,GACf,UAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;;YACzB,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;gBACJ,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD;;gBACE,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,UAAC,GAAG;;gBACF,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD;;gBACE,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,QAAQ,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js new file mode 100644 index 0000000..9fac6aa --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js @@ -0,0 +1,45 @@ +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function throttle(durationSelector, config) { + return operate(function (source, subscriber) { + var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function () { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function () { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function (value) { + return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + }; + var send = function () { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function () { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); +} +//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map new file mode 100644 index 0000000..66877b7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttle.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8EpD,MA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AC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAMV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js new file mode 100644 index 0000000..95b0a39 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js @@ -0,0 +1,9 @@ +import { asyncScheduler } from '../scheduler/async'; +import { throttle } from './throttle'; +import { timer } from '../observable/timer'; +export function throttleTime(duration, scheduler, config) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + var duration$ = timer(duration, scheduler); + return throttle(function () { return duration$; }, config); +} +//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map new file mode 100644 index 0000000..c5b9cda --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAmD5C,MAAM,UAAU,YAAY,CAC1B,QAAgB,EAChB,SAAyC,EACzC,MAAuB;IADvB,0BAAA,EAAA,0BAAyC;IAGzC,IAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,cAAM,OAAA,SAAS,EAAT,CAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js new file mode 100644 index 0000000..e3179a3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js @@ -0,0 +1,17 @@ +import { EmptyError } from '../util/EmptyError'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } + return operate(function (source, subscriber) { + var hasValue = false; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + hasValue = true; + subscriber.next(value); + }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); + }); +} +function defaultErrorFactory() { + return new EmptyError(); +} +//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map new file mode 100644 index 0000000..724b008 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsChE,MAAM,UAAU,YAAY,CAAI,YAA6C;IAA7C,6BAAA,EAAA,kCAA6C;IAC3E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,cAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,EAArE,CAAqE,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,UAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js new file mode 100644 index 0000000..a0f655e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js @@ -0,0 +1,24 @@ +import { asyncScheduler } from '../scheduler/async'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function timeInterval(scheduler) { + if (scheduler === void 0) { scheduler = asyncScheduler; } + return operate(function (source, subscriber) { + var last = scheduler.now(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var now = scheduler.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); +} +var TimeInterval = (function () { + function TimeInterval(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval; +}()); +export { TimeInterval }; +//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map new file mode 100644 index 0000000..40f9179 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,YAAY,CAAI,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAKD;IAIE,sBAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAC1D,mBAAC;AAAD,CAAC,AALD,IAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js new file mode 100644 index 0000000..e508e02 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js @@ -0,0 +1,59 @@ +import { asyncScheduler } from '../scheduler/async'; +import { isValidDate } from '../util/isDate'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createErrorClass } from '../util/createErrorClass'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { executeSchedule } from '../util/executeSchedule'; +export var TimeoutError = createErrorClass(function (_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { info = null; } + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + }; +}); +export function timeout(config, schedulerArg) { + var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return operate(function (source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function (delay) { + timerSubscription = executeSchedule(subscriber, scheduler, function () { + try { + originalSourceSubscription.unsubscribe(); + innerFrom(_with({ + meta: meta, + lastValue: lastValue, + seen: seen, + })).subscribe(subscriber); + } + catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next((lastValue = value)); + each > 0 && startTimer(each); + }, undefined, undefined, function () { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); + }); +} +function timeoutErrorFactory(info) { + throw new TimeoutError(info); +} +//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map new file mode 100644 index 0000000..807cd32 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA8E1D,MAAM,CAAC,IAAM,YAAY,GAAqB,gBAAgB,CAC5D,UAAC,MAAM;IACL,OAAA,SAAS,gBAAgB,CAAY,IAAoC;QAApC,qBAAA,EAAA,WAAoC;QACvE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;AALD,CAKC,CACJ,CAAC;AA6MF,MAAM,UAAU,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAStB,IAAA,KAMF,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,I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AAC,CAAC;YAErC,IAAK,GAAG,CAAC,IAAI,UAAU,CAAC,IAAK,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EACT,SAAS,EACT;YACE,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js new file mode 100644 index 0000000..de633b6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js @@ -0,0 +1,31 @@ +import { async } from '../scheduler/async'; +import { isValidDate } from '../util/isDate'; +import { timeout } from './timeout'; +export function timeoutWith(due, withObservable, scheduler) { + var first; + var each; + var _with; + scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; + if (isValidDate(due)) { + first = due; + } + else if (typeof due === 'number') { + each = due; + } + if (withObservable) { + _with = function () { return withObservable; }; + } + else { + throw new TypeError('No observable provided to switch to'); + } + if (first == null && each == null) { + throw new TypeError('No timeout provided.'); + } + return timeout({ + first: first, + each: each, + scheduler: scheduler, + with: _with, + }); +} +//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map new file mode 100644 index 0000000..fff73ca --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,MAAM,UAAU,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC;IAE/B,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,cAAM,OAAA,cAAc,EAAd,CAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAwB;QACpC,KAAK,OAAA;QACL,IAAI,MAAA;QACJ,SAAS,WAAA;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js new file mode 100644 index 0000000..413265e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js @@ -0,0 +1,7 @@ +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { map } from './map'; +export function timestamp(timestampProvider) { + if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; } + return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); +} +//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map new file mode 100644 index 0000000..7dde5f0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkC5B,MAAM,UAAU,SAAS,CAAI,iBAA4D;IAA5D,kCAAA,EAAA,yCAA4D;IACvF,OAAO,GAAG,CAAC,UAAC,KAAQ,IAAK,OAAA,CAAC,EAAE,KAAK,OAAA,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC5E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js new file mode 100644 index 0000000..5f7855d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js @@ -0,0 +1,9 @@ +import { reduce } from './reduce'; +import { operate } from '../util/lift'; +var arrReducer = function (arr, value) { return (arr.push(value), arr); }; +export function toArray() { + return operate(function (source, subscriber) { + reduce(arrReducer, [])(source).subscribe(subscriber); + }); +} +//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map new file mode 100644 index 0000000..a1e2224 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,IAAM,UAAU,GAAG,UAAC,GAAU,EAAE,KAAU,IAAK,OAAA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAtB,CAAsB,CAAC;AAgCtE,MAAM,UAAU,OAAO;IAIrB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/window.js b/node_modules/rxjs/dist/esm5/internal/operators/window.js new file mode 100644 index 0000000..657c944 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/window.js @@ -0,0 +1,28 @@ +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; +export function window(windowBoundaries) { + return operate(function (source, subscriber) { + var windowSubject = new Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function (err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, noop, errorHandler)); + return function () { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); +} +//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/window.js.map b/node_modules/rxjs/dist/esm5/internal/operators/window.js.map new file mode 100644 index 0000000..52e6e34 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/window.js.map @@ -0,0 +1 @@ +{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,MAAM,CAAI,gBAAsC;IAC9D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,aAAa,GAAe,IAAI,OAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,IAAM,YAAY,GAAG,UAAC,GAAQ;YAC5B,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EAA1B,CAA0B,EACrC;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,wBAAwB,CACtB,UAAU,EACV;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,IAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO;YAIL,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js new file mode 100644 index 0000000..e10cd4a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js @@ -0,0 +1,53 @@ +import { __values } from "tslib"; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +export function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { startWindowEvery = 0; } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return operate(function (source, subscriber) { + var windows = [new Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + try { + for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + } + finally { if (e_1) throw e_1.error; } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function () { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function (err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function () { + starts = null; + windows = null; + })); + }); +} +//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map new file mode 100644 index 0000000..13b6baa --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAgEhE,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,gBAA4B;IAA5B,iCAAA,EAAA,oBAA4B;IAC7E,IAAM,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAExE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC;QACjC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;;gBAIP,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,QAAM,oBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;YAMD,IAAM,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;gBAClC,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YAOD,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;gBAC9B,IAAM,QAAM,GAAG,IAAI,OAAO,EAAK,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBACrB,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;aACxC;QACH,CAAC,EACD;YACE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js new file mode 100644 index 0000000..6c16342 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js @@ -0,0 +1,70 @@ +import { Subject } from '../Subject'; +import { asyncScheduler } from '../scheduler/async'; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; +export function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return operate(function (source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function (record) { + var window = record.window, subs = record.subs; + window.complete(); + subs.unsubscribe(); + arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function () { + if (windowRecords) { + var subs = new Subscription(); + subscriber.add(subs); + var window_1 = new Subject(); + var record_1 = { + window: window_1, + subs: subs, + seen: 0, + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } + else { + restartOnClose = true; + } + startWindow(); + var loop = function (cb) { return windowRecords.slice().forEach(cb); }; + var terminate = function (cb) { + loop(function (_a) { + var window = _a.window; + return cb(window); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + loop(function (record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); + return function () { + windowRecords = null; + }; + }); +} +//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map new file mode 100644 index 0000000..484ab83 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgG1D,MAAM,UAAU,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,YAAY,CAAC,SAAS,CAAC,mCAAI,cAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAA6B,EAAE,CAAC;QAGjD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAM,WAAW,GAAG,UAAC,MAAkD;YAC7D,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,C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jC,EAAE,CAAC,UAAU,CAAC,CAAC;YACf,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,IAAI,CAAC,UAAC,MAAM;gBACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAE1B,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC,EAED,cAAM,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,EAElD,UAAC,GAAG,IAAK,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,CACtD,CACF,CAAC;QAKF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js new file mode 100644 index 0000000..43ad335 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js @@ -0,0 +1,66 @@ +import { __values } from "tslib"; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; +export function windowToggle(openings, closingSelector) { + return operate(function (source, subscriber) { + var windows = []; + var handleError = function (err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { + var window = new Subject(); + windows.push(window); + var closingSubscription = new Subscription(); + var closeWindow = function () { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } + catch (err) { + handleError(err); + return; + } + subscriber.next(window.asObservable()); + closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); + }, noop)); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + } + finally { if (e_1) throw e_1.error; } + } + }, function () { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function () { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); +} +//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map new file mode 100644 index 0000000..309eb72 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO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wB,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;YAGP,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;;gBACpC,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,QAAM,wBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAME,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,WAAW,EAAE,CAAC;aAChC;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js new file mode 100644 index 0000000..a078bb2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js @@ -0,0 +1,38 @@ +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +export function windowWhen(closingSelector) { + return operate(function (source, subscriber) { + var window; + var closingSubscriber; + var handleError = function (err) { + window.error(err); + subscriber.error(err); + }; + var openWindow = function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window === null || window === void 0 ? void 0 : window.complete(); + window = new Subject(); + subscriber.next(window.asObservable()); + var closingNotifier; + try { + closingNotifier = innerFrom(closingSelector()); + } + catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + openWindow(); + source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { + window.complete(); + subscriber.complete(); + }, handleError, function () { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window = null; + })); + }); +} +//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map new file mode 100644 index 0000000..badaa64 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map @@ -0,0 +1 @@ +{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAyB,CAAC;QAC9B,IAAI,iBAA8C,CAAC;QAMnD,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAQF,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAGjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,CAAC;YAGnB,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAGvC,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAMD,eAAe,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,MAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAC9B;YAEE,MAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAGE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js new file mode 100644 index 0000000..6240899 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js @@ -0,0 +1,39 @@ +import { __read, __spreadArray } from "tslib"; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { identity } from '../util/identity'; +import { noop } from '../util/noop'; +import { popResultSelector } from '../util/args'; +export function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = popResultSelector(inputs); + return operate(function (source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function () { return false; }); + var ready = false; + var _loop_1 = function (i) { + innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + hasValue[i] = true; + (ready = hasValue.every(identity)) && (hasValue = null); + } + }, noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(createOperatorSubscriber(subscriber, function (value) { + if (ready) { + var values = __spreadArray([value], __read(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); + } + })); + }); +} +//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map new file mode 100644 index 0000000..3abdcec --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map @@ -0,0 +1 @@ +{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAmDjD,MAAM,UAAU,cAAc;IAAO,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IACnD,IAAM,OAA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xjs/dist/esm5/internal/operators/zip.js b/node_modules/rxjs/dist/esm5/internal/operators/zip.js new file mode 100644 index 0000000..044095f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zip.js @@ -0,0 +1,13 @@ +import { __read, __spreadArray } from "tslib"; +import { zip as zipStatic } from '../observable/zip'; +import { operate } from '../util/lift'; +export function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return operate(function (source, subscriber) { + zipStatic.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); + }); +} +//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map new file mode 100644 index 0000000..f9dced7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmBvC,MAAM,UAAU,GAAG;IAAO,iBAAwE;SAAxE,UAAwE,EAAxE,qBAAwE,EAAxE,IAAwE;QAAxE,4BAAwE;;IAChG,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,8BAAC,MAA8B,UAAM,OAAuC,IAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js new file mode 100644 index 0000000..c3faf7e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js @@ -0,0 +1,6 @@ +import { zip } from '../observable/zip'; +import { joinAllInternals } from './joinAllInternals'; +export function zipAll(project) { + return joinAllInternals(zip, project); +} +//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map new file mode 100644 index 0000000..92c858e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAetD,MAAM,UAAU,MAAM,CAAO,OAA+B;IAC1D,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js new file mode 100644 index 0000000..07c60d5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js @@ -0,0 +1,10 @@ +import { __read, __spreadArray } from "tslib"; +import { zip } from './zip'; +export function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip.apply(void 0, __spreadArray([], __read(otherInputs))); +} +//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map new file mode 100644 index 0000000..9633894 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map @@ -0,0 +1 @@ +{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAyB5B,MAAM,UAAU,OAAO;IAAkC,qBAA4C;SAA5C,UAA4C,EAA5C,qBAA4C,EAA5C,IAA4C;QAA5C,gCAA4C;;IACnG,OAAO,GAAG,wCAAI,WAAW,IAAE;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js new file mode 100644 index 0000000..a409116 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js @@ -0,0 +1,18 @@ +import { Observable } from '../Observable'; +export function scheduleArray(input, scheduler) { + return new Observable(function (subscriber) { + var i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } + else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} +//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map new file mode 100644 index 0000000..e1e42e7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAElC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js new file mode 100644 index 0000000..c5d5e21 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js @@ -0,0 +1,23 @@ +import { Observable } from '../Observable'; +import { executeSchedule } from '../util/executeSchedule'; +export function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable(function (subscriber) { + executeSchedule(subscriber, scheduler, function () { + var iterator = input[Symbol.asyncIterator](); + executeSchedule(subscriber, scheduler, function () { + iterator.next().then(function (result) { + if (result.done) { + subscriber.complete(); + } + else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); +} +//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map new file mode 100644 index 0000000..0b0413e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,UAAU,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAClC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YACrC,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,eAAe,CACb,UAAU,EACV,SAAS,EACT;gBACE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,UAAC,MAAM;oBAC1B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js new file mode 100644 index 0000000..20b9345 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js @@ -0,0 +1,32 @@ +import { Observable } from '../Observable'; +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from '../util/isFunction'; +import { executeSchedule } from '../util/executeSchedule'; +export function scheduleIterable(input, scheduler) { + return new Observable(function (subscriber) { + var iterator; + executeSchedule(subscriber, scheduler, function () { + iterator = input[Symbol_iterator](); + executeSchedule(subscriber, scheduler, function () { + var _a; + var value; + var done; + try { + (_a = iterator.next(), value = _a.value, done = _a.done); + } + catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } + else { + subscriber.next(value); + } + }, 0, true); + }); + return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; + }); +} +//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map new file mode 100644 index 0000000..e970e5b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,MAAM,UAAU,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAClC,IAAI,QAAwB,CAAC;QAK7B,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YAErC,QAAQ,GAAI,KAAa,CAAC,eAAe,CAAC,EAAE,CAAC;YAE7C,eAAe,CACb,UAAU,EACV,SAAS,EACT;;gBACE,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,KAAkB,QAAQ,CAAC,IAAI,EAAE,EAA/B,KAAK,WAAA,EAAE,IAAI,UAAA,CAAqB,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,cAAM,OAAA,UAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAjD,CAAiD,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js new file mode 100644 index 0000000..979b009 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js @@ -0,0 +1,7 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +export function scheduleObservable(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} +//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map new file mode 100644 index 0000000..2010050 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js new file mode 100644 index 0000000..287c986 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js @@ -0,0 +1,7 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +export function schedulePromise(input, scheduler) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} +//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map new file mode 100644 index 0000000..8da74ad --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js new file mode 100644 index 0000000..4bfbfc2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js @@ -0,0 +1,6 @@ +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; +export function scheduleReadableStreamLike(input, scheduler) { + return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); +} +//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map new file mode 100644 index 0000000..6026c90 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,UAAU,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js new file mode 100644 index 0000000..3ed1085 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js @@ -0,0 +1,37 @@ +import { scheduleObservable } from './scheduleObservable'; +import { schedulePromise } from './schedulePromise'; +import { scheduleArray } from './scheduleArray'; +import { scheduleIterable } from './scheduleIterable'; +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isPromise } from '../util/isPromise'; +import { isArrayLike } from '../util/isArrayLike'; +import { isIterable } from '../util/isIterable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isReadableStreamLike } from '../util/isReadableStreamLike'; +import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; +export function scheduled(input, scheduler) { + if (input != null) { + if (isInteropObservable(input)) { + return scheduleObservable(input, scheduler); + } + if (isArrayLike(input)) { + return scheduleArray(input, scheduler); + } + if (isPromise(input)) { + return schedulePromise(input, scheduler); + } + if (isAsyncIterable(input)) { + return scheduleAsyncIterable(input, scheduler); + } + if (isIterable(input)) { + return scheduleIterable(input, scheduler); + } + if (isReadableStreamLike(input)) { + return scheduleReadableStreamLike(input, scheduler); + } + } + throw createInvalidObservableTypeError(input); +} +//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map new file mode 100644 index 0000000..6355931 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAa1E,MAAM,UAAU,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js new file mode 100644 index 0000000..5a8874b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js @@ -0,0 +1,15 @@ +import { __extends } from "tslib"; +import { Subscription } from '../Subscription'; +var Action = (function (_super) { + __extends(Action, _super); + function Action(scheduler, work) { + return _super.call(this) || this; + } + Action.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + return this; + }; + return Action; +}(Subscription)); +export { Action }; +//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map new file mode 100644 index 0000000..a6aca69 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiB/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,YAAY,GAiB1C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js new file mode 100644 index 0000000..dd98ec2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js @@ -0,0 +1,36 @@ +import { __extends } from "tslib"; +import { AsyncAction } from './AsyncAction'; +import { animationFrameProvider } from './animationFrameProvider'; +var AnimationFrameAction = (function (_super) { + __extends(AnimationFrameAction, _super); + function AnimationFrameAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); + }; + AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + }; + return AnimationFrameAction; +}(AsyncAction)); +export { AnimationFrameAction }; +//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map new file mode 100644 index 0000000..49a101b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;IAA6C,wCAAc;IACzD,8BAAsB,SAAkC,EAAY,IAAmD;QAAvH,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAyB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAEvH,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,sBAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,CAA6C,WAAW,GAoCvD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js new file mode 100644 index 0000000..6730805 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js @@ -0,0 +1,31 @@ +import { __extends } from "tslib"; +import { AsyncScheduler } from './AsyncScheduler'; +var AnimationFrameScheduler = (function (_super) { + __extends(AnimationFrameScheduler, _super); + function AnimationFrameScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler; +}(AsyncScheduler)); +export { AnimationFrameScheduler }; +//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map new file mode 100644 index 0000000..8617a96 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAA6C,2CAAc;IAA3D;;IAkCA,CAAC;IAjCQ,uCAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAlCD,CAA6C,cAAc,GAkC1D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js new file mode 100644 index 0000000..ba5d2a1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js @@ -0,0 +1,38 @@ +import { __extends } from "tslib"; +import { AsyncAction } from './AsyncAction'; +import { immediateProvider } from './immediateProvider'; +var AsapAction = (function (_super) { + __extends(AsapAction, _super); + function AsapAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + }; + AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); + } + var actions = scheduler.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + }; + return AsapAction; +}(AsyncAction)); +export { AsapAction }; +//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map new file mode 100644 index 0000000..fe3c314 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;IAAmC,8BAAc;IAC/C,oBAAsB,SAAwB,EAAY,IAAmD;QAA7G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAe;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE7G,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAEpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrI,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAIpF,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;aAClC;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,iBAAC;AAAD,CAAC,AAtCD,CAAmC,WAAW,GAsC7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js new file mode 100644 index 0000000..180fbde --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js @@ -0,0 +1,31 @@ +import { __extends } from "tslib"; +import { AsyncScheduler } from './AsyncScheduler'; +var AsapScheduler = (function (_super) { + __extends(AsapScheduler, _super); + function AsapScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler.prototype.flush = function (action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = undefined; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler; +}(AsyncScheduler)); +export { AsapScheduler }; +//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map new file mode 100644 index 0000000..a42f27c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAAmC,iCAAc;IAAjD;;IAkCA,CAAC;IAjCQ,6BAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAlCD,CAAmC,cAAc,GAkChD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js new file mode 100644 index 0000000..1844b98 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js @@ -0,0 +1,90 @@ +import { __extends } from "tslib"; +import { Action } from './Action'; +import { intervalProvider } from './intervalProvider'; +import { arrRemove } from '../util/arrRemove'; +var AsyncAction = (function (_super) { + __extends(AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + var _a; + if (delay === void 0) { delay = 0; } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { + if (delay === void 0) { delay = 0; } + return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + intervalProvider.clearInterval(id); + } + return undefined; + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype.unsubscribe = function () { + if (!this.closed) { + var _a = this, id = _a.id, scheduler = _a.scheduler; + var actions = scheduler.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction; +}(Action)); +export { AsyncAction }; +//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map new file mode 100644 index 0000000..f50e5d2 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C;IAAoC,+BAAS;IAO3C,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;QAFpG,aAAO,GAAY,KAAK,CAAC;;IAInC,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAGD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAuBjC,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAA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 No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js new file mode 100644 index 0000000..01b08ee --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js @@ -0,0 +1,36 @@ +import { __extends } from "tslib"; +import { Scheduler } from '../Scheduler'; +var AsyncScheduler = (function (_super) { + __extends(AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { now = Scheduler.now; } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift())); + this._active = false; + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(Scheduler)); +export { AsyncScheduler }; +//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map new file mode 100644 index 0000000..2f7cf2f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC;IAAoC,kCAAS;IAkB3C,wBAAY,eAA8B,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QAA7E,YACE,kBAAM,eAAe,EAAE,GAAG,CAAC,SAC5B;QAnBM,aAAO,GAA4B,EAAE,CAAC;QAOtC,aAAO,GAAY,KAAK,CAAC;;IAYhC,CAAC;IAEM,8BAAK,GAAZ,UAAa,MAAwB;QAC3B,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAhDD,CAAoC,SAAS,GAgD5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js new file mode 100644 index 0000000..dd7ccbf --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js @@ -0,0 +1,35 @@ +import { __extends } from "tslib"; +import { AsyncAction } from './AsyncAction'; +var QueueAction = (function (_super) { + __extends(QueueAction, _super); + function QueueAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + return _this; + } + QueueAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction.prototype.execute = function (state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { + return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); + } + scheduler.flush(this); + return 0; + }; + return QueueAction; +}(AsyncAction)); +export { QueueAction }; +//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map new file mode 100644 index 0000000..0fdf216 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C;IAAoC,+BAAc;IAChD,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE9G,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAM,OAAO,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;IACH,kBAAC;AAAD,CAAC,AArCD,CAAoC,WAAW,GAqC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js new file mode 100644 index 0000000..735a46f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js @@ -0,0 +1,11 @@ +import { __extends } from "tslib"; +import { AsyncScheduler } from './AsyncScheduler'; +var QueueScheduler = (function (_super) { + __extends(QueueScheduler, _super); + function QueueScheduler() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler; +}(AsyncScheduler)); +export { QueueScheduler }; +//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map new file mode 100644 index 0000000..0d8874a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAAoC,kCAAc;IAAlD;;IACA,CAAC;IAAD,qBAAC;AAAD,CAAC,AADD,CAAoC,cAAc,GACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js new file mode 100644 index 0000000..47890a4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js @@ -0,0 +1,104 @@ +import { __extends } from "tslib"; +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +var VirtualTimeScheduler = (function (_super) { + __extends(VirtualTimeScheduler, _super); + function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } + if (maxFrames === void 0) { maxFrames = Infinity; } + var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler.prototype.flush = function () { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler.frameTimeFactor = 10; + return VirtualTimeScheduler; +}(AsyncScheduler)); +export { VirtualTimeScheduler }; +var VirtualAction = (function (_super) { + __extends(VirtualAction, _super); + function VirtualAction(scheduler, work, index) { + if (index === void 0) { index = (scheduler.index += 1); } + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler.index = index; + return _this; + } + VirtualAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { delay = 0; } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } + else { + return Subscription.EMPTY; + } + }; + VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + this.delay = scheduler.frame + delay; + var actions = scheduler.actions; + actions.push(this); + actions.sort(VirtualAction.sortActions); + return 1; + }; + VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { delay = 0; } + return undefined; + }; + VirtualAction.prototype._execute = function (state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction.sortActions = function (a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } + else if (a.index > b.index) { + return 1; + } + else { + return -1; + } + } + else if (a.delay > b.delay) { + return 1; + } + else { + return -1; + } + }; + return VirtualAction; +}(AsyncAction)); +export { VirtualAction }; +//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map new file mode 100644 index 0000000..603ec36 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;IAA0C,wCAAc;IAyBtD,8BAAY,mBAA8D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,UAAmB,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEc,yBAAW,GAA1B,UAA8B,CAAmB,EAAE,CAAmB;QACpE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjED,CAAsC,WAAW,GAiEhD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js new file mode 100644 index 0000000..470f513 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js @@ -0,0 +1,5 @@ +import { AnimationFrameAction } from './AnimationFrameAction'; +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; +export var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); +export var animationFrame = animationFrameScheduler; +//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map new file mode 100644 index 0000000..f733f45 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkCpE,MAAM,CAAC,IAAM,uBAAuB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAKzF,MAAM,CAAC,IAAM,cAAc,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js new file mode 100644 index 0000000..7c6ede7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js @@ -0,0 +1,36 @@ +import { __read, __spreadArray } from "tslib"; +import { Subscription } from '../Subscription'; +export var animationFrameProvider = { + schedule: function (callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function (timestamp) { + cancel = undefined; + callback(timestamp); + }); + return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); + }, + requestAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + cancelAnimationFrame: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); + }, + delegate: undefined, +}; +//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map new file mode 100644 index 0000000..3d68b59 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C,MAAM,CAAC,IAAM,sBAAsB,GAA2B;IAG5D,QAAQ,EAAR,UAAS,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QACnE,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,IAAM,MAAM,GAAG,OAAO,CAAC,UAAC,SAAS;YAI/B,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,cAAM,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,EAAhB,CAAgB,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnB,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,wCAAI,IAAI,IAAE;IAC7E,CAAC;IACD,oBAAoB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAClB,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,wCAAI,IAAI,IAAE;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js new file mode 100644 index 0000000..9c69dc3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js @@ -0,0 +1,5 @@ +import { AsapAction } from './AsapAction'; +import { AsapScheduler } from './AsapScheduler'; +export var asapScheduler = new AsapScheduler(AsapAction); +export var asap = asapScheduler; +//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map new file mode 100644 index 0000000..c0ac616 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqChD,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AAK3D,MAAM,CAAC,IAAM,IAAI,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js new file mode 100644 index 0000000..a045d43 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js @@ -0,0 +1,5 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; +export var asyncScheduler = new AsyncScheduler(AsyncAction); +export var async = asyncScheduler; +//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map new file mode 100644 index 0000000..7346859 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map @@ -0,0 +1 @@ +{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDlD,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,IAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js new file mode 100644 index 0000000..74c668c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js @@ -0,0 +1,7 @@ +export var dateTimestampProvider = { + now: function () { + return (dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map new file mode 100644 index 0000000..8d77651 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js new file mode 100644 index 0000000..de02e9e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js @@ -0,0 +1,19 @@ +import { __read, __spreadArray } from "tslib"; +import { Immediate } from '../util/Immediate'; +var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate; +export var immediateProvider = { + setImmediate: function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); + }, + clearImmediate: function (handle) { + var delegate = immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map new file mode 100644 index 0000000..fba5681 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtC,IAAA,YAAY,GAAqB,SAAS,aAA9B,EAAE,cAAc,GAAK,SAAS,eAAd,CAAe;AAgBnD,MAAM,CAAC,IAAM,iBAAiB,GAAsB;IAGlD,YAAY;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACV,IAAA,QAAQ,GAAK,iBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,wCAAI,IAAI,IAAE;IAC3D,CAAC;IACD,cAAc,EAAd,UAAe,MAAM;QACX,IAAA,QAAQ,GAAK,iBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js new file mode 100644 index 0000000..9c9c00d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js @@ -0,0 +1,20 @@ +import { __read, __spreadArray } from "tslib"; +export var intervalProvider = { + setInterval: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearInterval: function (handle) { + var delegate = intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map new file mode 100644 index 0000000..f5e73ab --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":";AAeA,MAAM,CAAC,IAAM,gBAAgB,GAAqB;IAGhD,WAAW,EAAX,UAAY,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAChD,IAAA,QAAQ,GAAK,gBAAgB,SAArB,CAAsB;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,OAApB,QAAQ,iBAAa,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACxD;QACD,OAAO,WAAW,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAChD,CAAC;IACD,aAAa,EAAb,UAAc,MAAM;QACV,IAAA,QAAQ,GAAK,gBAAgB,SAArB,CAAsB;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js new file mode 100644 index 0000000..7efdca7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js @@ -0,0 +1,7 @@ +export var performanceTimestampProvider = { + now: function () { + return (performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, +}; +//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map new file mode 100644 index 0000000..0eb8871 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,4BAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js new file mode 100644 index 0000000..e7a4846 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js @@ -0,0 +1,5 @@ +import { QueueAction } from './QueueAction'; +import { QueueScheduler } from './QueueScheduler'; +export var queueScheduler = new QueueScheduler(QueueAction); +export var queue = queueScheduler; +//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map new file mode 100644 index 0000000..42488a6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiElD,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,IAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js new file mode 100644 index 0000000..6000218 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js @@ -0,0 +1,20 @@ +import { __read, __spreadArray } from "tslib"; +export var timeoutProvider = { + setTimeout: function (handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); + } + return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); + }, + clearTimeout: function (handle) { + var delegate = timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined, +}; +//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map new file mode 100644 index 0000000..cd6b79b --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":";AAeA,MAAM,CAAC,IAAM,eAAe,GAAoB;IAG9C,UAAU,EAAV,UAAW,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC/C,IAAA,QAAQ,GAAK,eAAe,SAApB,CAAqB;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,OAAnB,QAAQ,iBAAY,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACvD;QACD,OAAO,UAAU,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAC/C,CAAC;IACD,YAAY,EAAZ,UAAa,MAAM;QACT,IAAA,QAAQ,GAAK,eAAe,SAApB,CAAqB;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js new file mode 100644 index 0000000..40cf606 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map new file mode 100644 index 0000000..8efd320 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js new file mode 100644 index 0000000..982edbc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js @@ -0,0 +1,8 @@ +export function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +export var iterator = getSymbolIterator(); +//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map new file mode 100644 index 0000000..8476db3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,IAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js new file mode 100644 index 0000000..a539338 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js @@ -0,0 +1,2 @@ +export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); +//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map new file mode 100644 index 0000000..0eec0d5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,UAAU,GAAoB,CAAC,cAAM,OAAA,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,EAArE,CAAqE,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js new file mode 100644 index 0000000..2225888 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js @@ -0,0 +1,39 @@ +import { __extends } from "tslib"; +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { observeNotification } from '../Notification'; +var ColdObservable = (function (_super) { + __extends(ColdObservable, _super); + function ColdObservable(messages, scheduler) { + var _this = _super.call(this, function (subscriber) { + var observable = this; + var index = observable.logSubscribedFrame(); + var subscription = new Subscription(); + subscription.add(new Subscription(function () { + observable.logUnsubscribedFrame(index); + })); + observable.scheduleMessages(subscriber); + return subscription; + }) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + ColdObservable.prototype.scheduleMessages = function (subscriber) { + var messagesLength = this.messages.length; + for (var i = 0; i < messagesLength; i++) { + var message = this.messages[i]; + subscriber.add(this.scheduler.schedule(function (state) { + var _a = state, notification = _a.message.notification, destination = _a.subscriber; + observeNotification(notification, destination); + }, message.frame, { message: message, subscriber: subscriber })); + } + }; + return ColdObservable; +}(Observable)); +export { ColdObservable }; +applyMixins(ColdObservable, [SubscriptionLoggable]); +//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map new file mode 100644 index 0000000..df8c8de --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;IAAuC,kCAAa;IAQlD,wBAAmB,QAAuB,EAAE,SAAoB;QAAh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xjs/dist/esm5/internal/testing/HotObservable.js b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js new file mode 100644 index 0000000..e019898 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js @@ -0,0 +1,45 @@ +import { __extends } from "tslib"; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { observeNotification } from '../Notification'; +var HotObservable = (function (_super) { + __extends(HotObservable, _super); + function HotObservable(messages, scheduler) { + var _this = _super.call(this) || this; + _this.messages = messages; + _this.subscriptions = []; + _this.scheduler = scheduler; + return _this; + } + HotObservable.prototype._subscribe = function (subscriber) { + var subject = this; + var index = subject.logSubscribedFrame(); + var subscription = new Subscription(); + subscription.add(new Subscription(function () { + subject.logUnsubscribedFrame(index); + })); + subscription.add(_super.prototype._subscribe.call(this, subscriber)); + return subscription; + }; + HotObservable.prototype.setup = function () { + var subject = this; + var messagesLength = subject.messages.length; + var _loop_1 = function (i) { + (function () { + var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; + subject.scheduler.schedule(function () { + observeNotification(notification, subject); + }, frame); + })(); + }; + for (var i = 0; i < messagesLength; i++) { + _loop_1(i); + } + }; + return HotObservable; +}(Subject)); +export { HotObservable }; +applyMixins(HotObservable, [SubscriptionLoggable]); +//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map new file mode 100644 index 0000000..f5364c3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAi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,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE;oBAA9B,CAAC;SAQT;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzCD,CAAsC,OAAO,GAyC5C;;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js new file mode 100644 index 0000000..f8fa0d5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js @@ -0,0 +1,10 @@ +var SubscriptionLog = (function () { + function SubscriptionLog(subscribedFrame, unsubscribedFrame) { + if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } + this.subscribedFrame = subscribedFrame; + this.unsubscribedFrame = unsubscribedFrame; + } + return SubscriptionLog; +}()); +export { SubscriptionLog }; +//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map new file mode 100644 index 0000000..547ec44 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoC;QAApC,kCAAA,EAAA,4BAAoC;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js new file mode 100644 index 0000000..80d1f3f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js @@ -0,0 +1,18 @@ +import { SubscriptionLog } from './SubscriptionLog'; +var SubscriptionLoggable = (function () { + function SubscriptionLoggable() { + this.subscriptions = []; + } + SubscriptionLoggable.prototype.logSubscribedFrame = function () { + this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); + return this.subscriptions.length - 1; + }; + SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { + var subscriptionLogs = this.subscriptions; + var oldSubscriptionLog = subscriptionLogs[index]; + subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); + }; + return SubscriptionLoggable; +}()); +export { SubscriptionLoggable }; +//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map new file mode 100644 index 0000000..6fbcce3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js new file mode 100644 index 0000000..47c15db --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map new file mode 100644 index 0000000..f91e8da --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js new file mode 100644 index 0000000..22855ff --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js @@ -0,0 +1,569 @@ +import { __extends, __read, __spreadArray, __values } from "tslib"; +import { Observable } from '../Observable'; +import { ColdObservable } from './ColdObservable'; +import { HotObservable } from './HotObservable'; +import { SubscriptionLog } from './SubscriptionLog'; +import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; +import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../scheduler/animationFrameProvider'; +import { immediateProvider } from '../scheduler/immediateProvider'; +import { intervalProvider } from '../scheduler/intervalProvider'; +import { timeoutProvider } from '../scheduler/timeoutProvider'; +var defaultMaxFrame = 750; +var TestScheduler = (function (_super) { + __extends(TestScheduler, _super); + function TestScheduler(assertDeepEqual) { + var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this; + _this.assertDeepEqual = assertDeepEqual; + _this.hotObservables = []; + _this.coldObservables = []; + _this.flushTests = []; + _this.runMode = false; + return _this; + } + TestScheduler.prototype.createTime = function (marbles) { + var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + if (indexOf === -1) { + throw new Error('marble diagram for time should have a completion marker "|"'); + } + return indexOf * TestScheduler.frameTimeFactor; + }; + TestScheduler.prototype.createColdObservable = function (marbles, values, error) { + if (marbles.indexOf('^') !== -1) { + throw new Error('cold observable cannot have subscription offset "^"'); + } + if (marbles.indexOf('!') !== -1) { + throw new Error('cold observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var cold = new ColdObservable(messages, this); + this.coldObservables.push(cold); + return cold; + }; + TestScheduler.prototype.createHotObservable = function (marbles, values, error) { + if (marbles.indexOf('!') !== -1) { + throw new Error('hot observable cannot have unsubscription marker "!"'); + } + var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + var subject = new HotObservable(messages, this); + this.hotObservables.push(subject); + return subject; + }; + TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { + var _this = this; + var messages = []; + observable.subscribe({ + next: function (value) { + messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); + }, + error: function (error) { + messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); + }, + complete: function () { + messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); + }, + }); + return messages; + }; + TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { + var _this = this; + if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } + var actual = []; + var flushTest = { actual: actual, ready: false }; + var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); + var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; + var subscription; + this.schedule(function () { + subscription = observable.subscribe({ + next: function (x) { + var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + actual.push({ frame: _this.frame, notification: nextNotification(value) }); + }, + error: function (error) { + actual.push({ frame: _this.frame, notification: errorNotification(error) }); + }, + complete: function () { + actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + if (unsubscriptionFrame !== Infinity) { + this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); + } + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marbles, values, errorValue) { + flushTest.ready = true; + flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + }, + toEqual: function (other) { + flushTest.ready = true; + flushTest.expected = []; + _this.schedule(function () { + subscription = other.subscribe({ + next: function (x) { + var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; + flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); + }, + error: function (error) { + flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); + }, + complete: function () { + flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + }, + }; + }; + TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { + var flushTest = { actual: actualSubscriptionLogs, ready: false }; + this.flushTests.push(flushTest); + var runMode = this.runMode; + return { + toBe: function (marblesOrMarblesArray) { + var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + flushTest.ready = true; + flushTest.expected = marblesArray + .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) + .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); + }, + }; + }; + TestScheduler.prototype.flush = function () { + var _this = this; + var hotObservables = this.hotObservables; + while (hotObservables.length > 0) { + hotObservables.shift().setup(); + } + _super.prototype.flush.call(this); + this.flushTests = this.flushTests.filter(function (test) { + if (test.ready) { + _this.assertDeepEqual(test.actual, test.expected); + return false; + } + return true; + }); + }; + TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { + var _this = this; + if (runMode === void 0) { runMode = false; } + if (typeof marbles !== 'string') { + return new SubscriptionLog(Infinity); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var groupStart = -1; + var subscriptionFrame = Infinity; + var unsubscriptionFrame = Infinity; + var frame = 0; + var _loop_1 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '^': + if (subscriptionFrame !== Infinity) { + throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + } + subscriptionFrame = groupStart > -1 ? groupStart : frame; + advanceFrameBy(1); + break; + case '!': + if (unsubscriptionFrame !== Infinity) { + throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + } + unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_1.frameTimeFactor); + break; + } + } + } + throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + } + frame = nextFrame; + out_i_1 = i; + }; + var this_1 = this, out_i_1; + for (var i = 0; i < len; i++) { + _loop_1(i); + i = out_i_1; + } + if (unsubscriptionFrame < 0) { + return new SubscriptionLog(subscriptionFrame); + } + else { + return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } + }; + TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { + var _this = this; + if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } + if (runMode === void 0) { runMode = false; } + if (marbles.indexOf('!') !== -1) { + throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + } + var characters = __spreadArray([], __read(marbles)); + var len = characters.length; + var testMessages = []; + var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; + var getValue = typeof values !== 'object' + ? function (x) { return x; } + : function (x) { + if (materializeInnerObservables && values[x] instanceof ColdObservable) { + return values[x].messages; + } + return values[x]; + }; + var groupStart = -1; + var _loop_2 = function (i) { + var nextFrame = frame; + var advanceFrameBy = function (count) { + nextFrame += count * _this.frameTimeFactor; + }; + var notification = void 0; + var c = characters[i]; + switch (c) { + case ' ': + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '|': + notification = COMPLETE_NOTIFICATION; + advanceFrameBy(1); + break; + case '^': + advanceFrameBy(1); + break; + case '#': + notification = errorNotification(errorValue || 'error'); + advanceFrameBy(1); + break; + default: + if (runMode && c.match(/^[0-9]$/)) { + if (i === 0 || characters[i - 1] === ' ') { + var buffer = characters.slice(i).join(''); + var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + var duration = parseFloat(match[1]); + var unit = match[2]; + var durationInMs = void 0; + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + advanceFrameBy(durationInMs / this_2.frameTimeFactor); + break; + } + } + } + notification = nextNotification(getValue(c)); + advanceFrameBy(1); + break; + } + if (notification) { + testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); + } + frame = nextFrame; + out_i_2 = i; + }; + var this_2 = this, out_i_2; + for (var i = 0; i < len; i++) { + _loop_2(i); + i = out_i_2; + } + return testMessages; + }; + TestScheduler.prototype.createAnimator = function () { + var _this = this; + if (!this.runMode) { + throw new Error('animate() must only be used in run mode'); + } + var lastHandle = 0; + var map; + var delegate = { + requestAnimationFrame: function (callback) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + var handle = ++lastHandle; + map.set(handle, callback); + return handle; + }, + cancelAnimationFrame: function (handle) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + map.delete(handle); + }, + }; + var animate = function (marbles) { + var e_1, _a; + if (map) { + throw new Error('animate() must not be called more than once within run()'); + } + if (/[|#]/.test(marbles)) { + throw new Error('animate() must not complete or error'); + } + map = new Map(); + var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + try { + for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { + var message = messages_1_1.value; + _this.schedule(function () { + var e_2, _a; + var now = _this.now(); + var callbacks = Array.from(map.values()); + map.clear(); + try { + for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { + var callback = callbacks_1_1.value; + callback(now); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); + } + finally { if (e_2) throw e_2.error; } + } + }, message.frame); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + return { animate: animate, delegate: delegate }; + }; + TestScheduler.prototype.createDelegates = function () { + var _this = this; + var lastHandle = 0; + var scheduleLookup = new Map(); + var run = function () { + var now = _this.now(); + var scheduledRecords = Array.from(scheduleLookup.values()); + var scheduledRecordsDue = scheduledRecords.filter(function (_a) { + var due = _a.due; + return due <= now; + }); + var dueImmediates = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'immediate'; + }); + if (dueImmediates.length > 0) { + var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + var dueIntervals = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'interval'; + }); + if (dueIntervals.length > 0) { + var firstDueInterval = dueIntervals[0]; + var duration = firstDueInterval.duration, handler = firstDueInterval.handler; + firstDueInterval.due = now + duration; + firstDueInterval.subscription = _this.schedule(run, duration); + handler(); + return; + } + var dueTimeouts = scheduledRecordsDue.filter(function (_a) { + var type = _a.type; + return type === 'timeout'; + }); + if (dueTimeouts.length > 0) { + var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; + scheduleLookup.delete(handle); + handler(); + return; + } + throw new Error('Expected a due immediate or interval'); + }; + var immediate = { + setImmediate: function (handler) { + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now(), + duration: 0, + handle: handle, + handler: handler, + subscription: _this.schedule(run, 0), + type: 'immediate', + }); + return handle; + }, + clearImmediate: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var interval = { + setInterval: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'interval', + }); + return handle; + }, + clearInterval: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + var timeout = { + setTimeout: function (handler, duration) { + if (duration === void 0) { duration = 0; } + var handle = ++lastHandle; + scheduleLookup.set(handle, { + due: _this.now() + duration, + duration: duration, + handle: handle, + handler: handler, + subscription: _this.schedule(run, duration), + type: 'timeout', + }); + return handle; + }, + clearTimeout: function (handle) { + var value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + return { immediate: immediate, interval: interval, timeout: timeout }; + }; + TestScheduler.prototype.run = function (callback) { + var prevFrameTimeFactor = TestScheduler.frameTimeFactor; + var prevMaxFrames = this.maxFrames; + TestScheduler.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = true; + var animator = this.createAnimator(); + var delegates = this.createDelegates(); + animationFrameProvider.delegate = animator.delegate; + dateTimestampProvider.delegate = this; + immediateProvider.delegate = delegates.immediate; + intervalProvider.delegate = delegates.interval; + timeoutProvider.delegate = delegates.timeout; + performanceTimestampProvider.delegate = this; + var helpers = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: animator.animate, + }; + try { + var ret = callback(helpers); + this.flush(); + return ret; + } + finally { + TestScheduler.frameTimeFactor = prevFrameTimeFactor; + this.maxFrames = prevMaxFrames; + this.runMode = false; + animationFrameProvider.delegate = undefined; + dateTimestampProvider.delegate = undefined; + immediateProvider.delegate = undefined; + intervalProvider.delegate = undefined; + timeoutProvider.delegate = undefined; + performanceTimestampProvider.delegate = undefined; + } + }; + TestScheduler.frameTimeFactor = 10; + return TestScheduler; +}(VirtualTimeScheduler)); +export { TestScheduler }; +//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map new file mode 100644 index 0000000..f28c4b4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,IAAM,eAAe,GAAW,GAAG,CAAC;AAqBpC;IAAmC,iCAAoB;IAkCrD,uBAAmB,eAA+D;QAAlF,YACE,kBAAM,aAAa,EAAE,eAAe,CAAC,SACtC;QAFkB,qBAAe,GAAf,eAAe,CAAgD;QAtBlE,oBAAc,GAAyB,EAAE,CAAC;QAK1C,qBAAe,GAA0B,EAAE,CAAC;QAKpD,gBAAU,GAAoB,EAAE,CAAC;QAMjC,aAAO,GAAG,KAAK,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C;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,sBAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5C,qBAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC3C,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACvC,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACtC,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;YACrC,4BAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;SACnD;IACH,CAAC;IAtoBM,6BAAe,GAAG,EAAE,CAAC;IAuoB9B,oBAAC;CAAA,AA9oBD,CAAmC,oBAAoB,GA8oBtD;SA9oBY,aAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/types.js b/node_modules/rxjs/dist/esm5/internal/types.js new file mode 100644 index 0000000..718fd38 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/types.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/types.js.map b/node_modules/rxjs/dist/esm5/internal/types.js.map new file mode 100644 index 0000000..493d291 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js new file mode 100644 index 0000000..49e3be7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js @@ -0,0 +1,9 @@ +import { createErrorClass } from './createErrorClass'; +export var ArgumentOutOfRangeError = createErrorClass(function (_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + }; +}); +//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map new file mode 100644 index 0000000..fa38910 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAsBtD,MAAM,CAAC,IAAM,uBAAuB,GAAgC,gBAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;IACzC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js new file mode 100644 index 0000000..d6eddca --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js @@ -0,0 +1,7 @@ +import { createErrorClass } from './createErrorClass'; +export var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}; }); +//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map new file mode 100644 index 0000000..4320783 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwBtD,MAAM,CAAC,IAAM,UAAU,GAAmB,gBAAgB,CAAC,UAAC,MAAM,IAAK,OAAA,SAAS,cAAc;IAC5F,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;AAC3C,CAAC,EAJsE,CAItE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js new file mode 100644 index 0000000..c601bff --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js @@ -0,0 +1,30 @@ +var nextHandle = 1; +var resolved; +var activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +export var Immediate = { + setImmediate: function (cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function () { return findAndClearHandle(handle) && cb(); }); + return handle; + }, + clearImmediate: function (handle) { + findAndClearHandle(handle); + }, +}; +export var TestTools = { + pending: function () { + return Object.keys(activeHandles).length; + } +}; +//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map new file mode 100644 index 0000000..c45eecc --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,IAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,YAAY,EAAZ,UAAa,EAAc;QACzB,IAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,cAAM,OAAA,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAlC,CAAkC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,EAAd,UAAe,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKF,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js new file mode 100644 index 0000000..2accd86 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js @@ -0,0 +1,9 @@ +import { createErrorClass } from './createErrorClass'; +export var NotFoundError = createErrorClass(function (_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; + }; +}); +//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map new file mode 100644 index 0000000..b3dc903 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,IAAM,aAAa,GAAsB,gBAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js new file mode 100644 index 0000000..3289aa0 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js @@ -0,0 +1,9 @@ +import { createErrorClass } from './createErrorClass'; +export var ObjectUnsubscribedError = createErrorClass(function (_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + }; +}); +//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map new file mode 100644 index 0000000..d980ac1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqBtD,MAAM,CAAC,IAAM,uBAAuB,GAAgC,gBAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;IACvC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js new file mode 100644 index 0000000..d2ec9ac --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js @@ -0,0 +1,9 @@ +import { createErrorClass } from './createErrorClass'; +export var SequenceError = createErrorClass(function (_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = 'SequenceError'; + this.message = message; + }; +}); +//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map new file mode 100644 index 0000000..98ac195 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,IAAM,aAAa,GAAsB,gBAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js new file mode 100644 index 0000000..99a3ee3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js @@ -0,0 +1,12 @@ +import { createErrorClass } from './createErrorClass'; +export var UnsubscriptionError = createErrorClass(function (_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors + ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + }; +}); +//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map new file mode 100644 index 0000000..4b1948d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,IAAM,mBAAmB,GAA4B,gBAAgB,CAC1E,UAAC,MAAM;IACL,OAAA,SAAS,uBAAuB,CAAY,MAA0B;QACpE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,MAAM;YACnB,CAAC,CAAI,MAAM,CAAC,MAAM,iDACxB,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG,EAAE,CAAC,IAAK,OAAG,CAAC,GAAG,CAAC,UAAK,GAAG,CAAC,QAAQ,EAAI,EAA7B,CAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAG;YAC9D,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;AARD,CAQC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js new file mode 100644 index 0000000..96eb49a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js @@ -0,0 +1,11 @@ +export function applyMixins(derivedCtor, baseCtors) { + for (var i = 0, len = baseCtors.length; i < len; i++) { + var baseCtor = baseCtors[i]; + var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); + for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { + var name_1 = propertyKeys[j]; + derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; + } + } +} +//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map new file mode 100644 index 0000000..cab2079 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,IAAM,MAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,MAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/args.js b/node_modules/rxjs/dist/esm5/internal/util/args.js new file mode 100644 index 0000000..ead7fc5 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/args.js @@ -0,0 +1,15 @@ +import { isFunction } from './isFunction'; +import { isScheduler } from './isScheduler'; +function last(arr) { + return arr[arr.length - 1]; +} +export function popResultSelector(args) { + return isFunction(last(args)) ? args.pop() : undefined; +} +export function popScheduler(args) { + return isScheduler(last(args)) ? args.pop() : undefined; +} +export function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; +} +//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/args.js.map b/node_modules/rxjs/dist/esm5/internal/util/args.js.map new file mode 100644 index 0000000..707c54c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/args.js.map @@ -0,0 +1 @@ +{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAW;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAW;IACtC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js new file mode 100644 index 0000000..66ffb09 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js @@ -0,0 +1,22 @@ +var isArray = Array.isArray; +var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; +export function argsArgArrayOrObject(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function (key) { return first_1[key]; }), + keys: keys, + }; + } + } + return { args: args, keys: null }; +} +function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} +//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map new file mode 100644 index 0000000..baf2e0f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAClB,IAAA,cAAc,GAA4C,MAAM,eAAlD,EAAa,WAAW,GAAoB,MAAM,UAA1B,EAAQ,OAAO,GAAK,MAAM,KAAX,CAAY;AAQzE,MAAM,UAAU,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,IAAM,OAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,OAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,OAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,OAAK,CAAC,EAAE;YACjB,IAAM,IAAI,GAAG,OAAO,CAAC,OAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAK,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC;gBACnC,IAAI,MAAA;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js new file mode 100644 index 0000000..58c482c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js @@ -0,0 +1,5 @@ +var isArray = Array.isArray; +export function argsOrArgArray(args) { + return args.length === 1 && isArray(args[0]) ? args[0] : args; +} +//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map new file mode 100644 index 0000000..c789b98 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAM1B,MAAM,UAAU,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js new file mode 100644 index 0000000..dc6306d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js @@ -0,0 +1,7 @@ +export function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} +//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map new file mode 100644 index 0000000..513cb14 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map @@ -0,0 +1 @@ +{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,IAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js new file mode 100644 index 0000000..3236fb3 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js @@ -0,0 +1,11 @@ +export function createErrorClass(createImpl) { + var _super = function (instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} +//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map new file mode 100644 index 0000000..619908d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,gBAAgB,CAAI,UAAgC;IAClE,IAAM,MAAM,GAAG,UAAC,QAAa;QAC3B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createObject.js b/node_modules/rxjs/dist/esm5/internal/util/createObject.js new file mode 100644 index 0000000..0908ef4 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/createObject.js @@ -0,0 +1,4 @@ +export function createObject(keys, values) { + return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); +} +//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map b/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map new file mode 100644 index 0000000..5c3f075 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAnC,CAAmC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js new file mode 100644 index 0000000..a61d486 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js @@ -0,0 +1,28 @@ +import { config } from '../config'; +var context = null; +export function errorContext(cb) { + if (config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } + else { + cb(); + } +} +export function captureError(err) { + if (config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} +//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map new file mode 100644 index 0000000..98671b7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,IAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACJ,IAAA,KAAyB,OAAQ,EAA/B,WAAW,iBAAA,EAAE,KAAK,WAAa,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js new file mode 100644 index 0000000..6ac5329 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js @@ -0,0 +1,18 @@ +export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { + if (delay === void 0) { delay = 0; } + if (repeat === void 0) { repeat = false; } + var scheduleSubscription = scheduler.schedule(function () { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } + else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } +} +//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map new file mode 100644 index 0000000..ae5d559 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAS,EACT,MAAc;IADd,sBAAA,EAAA,SAAS;IACT,uBAAA,EAAA,cAAc;IAEd,IAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/identity.js b/node_modules/rxjs/dist/esm5/internal/util/identity.js new file mode 100644 index 0000000..1084d77 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/identity.js @@ -0,0 +1,4 @@ +export function identity(x) { + return x; +} +//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/identity.js.map b/node_modules/rxjs/dist/esm5/internal/util/identity.js.map new file mode 100644 index 0000000..28a2f40 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/identity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AA0CA,MAAM,UAAU,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js new file mode 100644 index 0000000..743a46f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js @@ -0,0 +1,2 @@ +export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); +//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map new file mode 100644 index 0000000..954a3f6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js new file mode 100644 index 0000000..99da2eb --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js @@ -0,0 +1,5 @@ +import { isFunction } from './isFunction'; +export function isAsyncIterable(obj) { + return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); +} +//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map new file mode 100644 index 0000000..2e736bd --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isDate.js b/node_modules/rxjs/dist/esm5/internal/util/isDate.js new file mode 100644 index 0000000..74ddf32 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isDate.js @@ -0,0 +1,4 @@ +export function isValidDate(value) { + return value instanceof Date && !isNaN(value); +} +//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map b/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map new file mode 100644 index 0000000..9e2ef13 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js new file mode 100644 index 0000000..558eec7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js @@ -0,0 +1,4 @@ +export function isFunction(value) { + return typeof value === 'function'; +} +//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map new file mode 100644 index 0000000..452906c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js new file mode 100644 index 0000000..da58ece --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js @@ -0,0 +1,6 @@ +import { observable as Symbol_observable } from '../symbol/observable'; +import { isFunction } from './isFunction'; +export function isInteropObservable(input) { + return isFunction(input[Symbol_observable]); +} +//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map new file mode 100644 index 0000000..f5ddd94 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,mBAAmB,CAAC,KAAU;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js new file mode 100644 index 0000000..20c52a6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js @@ -0,0 +1,6 @@ +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from './isFunction'; +export function isIterable(input) { + return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]); +} +//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map new file mode 100644 index 0000000..3532931 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,eAAe,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js new file mode 100644 index 0000000..cc149c6 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js @@ -0,0 +1,6 @@ +import { Observable } from '../Observable'; +import { isFunction } from './isFunction'; +export function isObservable(obj) { + return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); +} +//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map new file mode 100644 index 0000000..b82f961 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js new file mode 100644 index 0000000..5114f67 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js @@ -0,0 +1,5 @@ +import { isFunction } from "./isFunction"; +export function isPromise(value) { + return isFunction(value === null || value === void 0 ? void 0 : value.then); +} +//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map new file mode 100644 index 0000000..bb81d60 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js new file mode 100644 index 0000000..08e18ea --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js @@ -0,0 +1,39 @@ +import { __asyncGenerator, __await, __generator } from "tslib"; +import { isFunction } from './isFunction'; +export function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + if (!true) return [3, 8]; + return [4, __await(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) return [3, 5]; + return [4, __await(void 0)]; + case 4: return [2, _b.sent()]; + case 5: return [4, __await(value)]; + case 6: return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: return [2]; + } + }); + }); +} +export function isReadableStreamLike(obj) { + return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); +} +//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map new file mode 100644 index 0000000..fff796e --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAiB,kCAAkC,CAAI,cAAqC;;;;;;oBAC1F,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;;;;;;yBAEjC,IAAI;oBACe,mBAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,KAAK,WAAA,EAAE,IAAI,UAAA;yBACf,IAAI,EAAJ,cAAI;;wBACN,sBAAO;2CAEH,KAAM;wBAAZ,sBAAY;;oBAAZ,SAAY,CAAC;;;;oBAGf,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAED,MAAM,UAAU,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js new file mode 100644 index 0000000..05b4f3f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js @@ -0,0 +1,5 @@ +import { isFunction } from './isFunction'; +export function isScheduler(value) { + return value && isFunction(value.schedule); +} +//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map new file mode 100644 index 0000000..33c0d90 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/lift.js b/node_modules/rxjs/dist/esm5/internal/util/lift.js new file mode 100644 index 0000000..558a88c --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/lift.js @@ -0,0 +1,20 @@ +import { isFunction } from './isFunction'; +export function hasLift(source) { + return isFunction(source === null || source === void 0 ? void 0 : source.lift); +} +export function operate(init) { + return function (source) { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } + catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; +} +//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/lift.js.map b/node_modules/rxjs/dist/esm5/internal/util/lift.js.map new file mode 100644 index 0000000..27e0eef --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/lift.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,UAAU,OAAO,CAAC,MAAW;IACjC,OAAO,UAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAMD,MAAM,UAAU,OAAO,CACrB,IAAqF;IAErF,OAAO,UAAC,MAAqB;QAC3B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js new file mode 100644 index 0000000..706add1 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js @@ -0,0 +1,10 @@ +import { __read, __spreadArray } from "tslib"; +import { map } from "../operators/map"; +var isArray = Array.isArray; +function callOrApply(fn, args) { + return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); +} +export function mapOneOrManyArgs(fn) { + return map(function (args) { return callOrApply(fn, args); }); +} +//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map new file mode 100644 index 0000000..be157b9 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE/B,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,MAAM,UAAU,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAA;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/noop.js b/node_modules/rxjs/dist/esm5/internal/util/noop.js new file mode 100644 index 0000000..1a78a54 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/noop.js @@ -0,0 +1,2 @@ +export function noop() { } +//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/noop.js.map b/node_modules/rxjs/dist/esm5/internal/util/noop.js.map new file mode 100644 index 0000000..05e521a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/noop.js.map @@ -0,0 +1 @@ +{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,IAAI,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/not.js b/node_modules/rxjs/dist/esm5/internal/util/not.js new file mode 100644 index 0000000..ac1f235 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/not.js @@ -0,0 +1,4 @@ +export function not(pred, thisArg) { + return function (value, index) { return !pred.call(thisArg, value, index); }; +} +//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/not.js.map b/node_modules/rxjs/dist/esm5/internal/util/not.js.map new file mode 100644 index 0000000..cd686b8 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/not.js.map @@ -0,0 +1 @@ +{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,UAAC,KAAQ,EAAE,KAAa,IAAK,OAAA,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,EAAjC,CAAiC,CAAC;AACxE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/pipe.js b/node_modules/rxjs/dist/esm5/internal/util/pipe.js new file mode 100644 index 0000000..4db150f --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/pipe.js @@ -0,0 +1,20 @@ +import { identity } from './identity'; +export function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +export function pipeFromArray(fns) { + if (fns.length === 0) { + return identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map b/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map new file mode 100644 index 0000000..5f24260 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6EtC,MAAM,UAAU,IAAI;IAAC,aAAsC;SAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;QAAtC,wBAAsC;;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAGD,MAAM,UAAU,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,QAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,IAAS,EAAE,EAAuB,IAAK,OAAA,EAAE,CAAC,IAAI,CAAC,EAAR,CAAQ,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js new file mode 100644 index 0000000..def5430 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js @@ -0,0 +1,14 @@ +import { config } from '../config'; +import { timeoutProvider } from '../scheduler/timeoutProvider'; +export function reportUnhandledError(err) { + timeoutProvider.setTimeout(function () { + var onUnhandledError = config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } + else { + throw err; + } + }); +} +//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map new file mode 100644 index 0000000..fa87b43 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAW/D,MAAM,UAAU,oBAAoB,CAAC,GAAQ;IAC3C,eAAe,CAAC,UAAU,CAAC;QACjB,IAAA,gBAAgB,GAAK,MAAM,iBAAX,CAAY;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js new file mode 100644 index 0000000..2cb9f1d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js @@ -0,0 +1,7 @@ +export var subscribeToArray = function (array) { return function (subscriber) { + for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); +}; }; +//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map new file mode 100644 index 0000000..8c1c042 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAI,KAAmB,IAAK,OAAA,UAAC,UAAyB;IACpF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,EAL2D,CAK3D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js new file mode 100644 index 0000000..99d7269 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js @@ -0,0 +1,4 @@ +export function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); +} +//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map new file mode 100644 index 0000000..811c90a --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,mBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAI,KAAK,MAAG,8HACwC,CAC3H,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js new file mode 100644 index 0000000..380c6e7 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map new file mode 100644 index 0000000..75e7271 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/operators/index.js b/node_modules/rxjs/dist/esm5/operators/index.js new file mode 100644 index 0000000..79bbd88 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/operators/index.js @@ -0,0 +1,114 @@ +export { audit } from '../internal/operators/audit'; +export { auditTime } from '../internal/operators/auditTime'; +export { buffer } from '../internal/operators/buffer'; +export { bufferCount } from '../internal/operators/bufferCount'; +export { bufferTime } from '../internal/operators/bufferTime'; +export { bufferToggle } from '../internal/operators/bufferToggle'; +export { bufferWhen } from '../internal/operators/bufferWhen'; +export { catchError } from '../internal/operators/catchError'; +export { combineAll } from '../internal/operators/combineAll'; +export { combineLatestAll } from '../internal/operators/combineLatestAll'; +export { combineLatest } from '../internal/operators/combineLatest'; +export { combineLatestWith } from '../internal/operators/combineLatestWith'; +export { concat } from '../internal/operators/concat'; +export { concatAll } from '../internal/operators/concatAll'; +export { concatMap } from '../internal/operators/concatMap'; +export { concatMapTo } from '../internal/operators/concatMapTo'; +export { concatWith } from '../internal/operators/concatWith'; +export { connect } from '../internal/operators/connect'; +export { count } from '../internal/operators/count'; +export { debounce } from '../internal/operators/debounce'; +export { debounceTime } from '../internal/operators/debounceTime'; +export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; +export { delay } from '../internal/operators/delay'; +export { delayWhen } from '../internal/operators/delayWhen'; +export { dematerialize } from '../internal/operators/dematerialize'; +export { distinct } from '../internal/operators/distinct'; +export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; +export { elementAt } from '../internal/operators/elementAt'; +export { endWith } from '../internal/operators/endWith'; +export { every } from '../internal/operators/every'; +export { exhaust } from '../internal/operators/exhaust'; +export { exhaustAll } from '../internal/operators/exhaustAll'; +export { exhaustMap } from '../internal/operators/exhaustMap'; +export { expand } from '../internal/operators/expand'; +export { filter } from '../internal/operators/filter'; +export { finalize } from '../internal/operators/finalize'; +export { find } from '../internal/operators/find'; +export { findIndex } from '../internal/operators/findIndex'; +export { first } from '../internal/operators/first'; +export { groupBy } from '../internal/operators/groupBy'; +export { ignoreElements } from '../internal/operators/ignoreElements'; +export { isEmpty } from '../internal/operators/isEmpty'; +export { last } from '../internal/operators/last'; +export { map } from '../internal/operators/map'; +export { mapTo } from '../internal/operators/mapTo'; +export { materialize } from '../internal/operators/materialize'; +export { max } from '../internal/operators/max'; +export { merge } from '../internal/operators/merge'; +export { mergeAll } from '../internal/operators/mergeAll'; +export { flatMap } from '../internal/operators/flatMap'; +export { mergeMap } from '../internal/operators/mergeMap'; +export { mergeMapTo } from '../internal/operators/mergeMapTo'; +export { mergeScan } from '../internal/operators/mergeScan'; +export { mergeWith } from '../internal/operators/mergeWith'; +export { min } from '../internal/operators/min'; +export { multicast } from '../internal/operators/multicast'; +export { observeOn } from '../internal/operators/observeOn'; +export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; +export { pairwise } from '../internal/operators/pairwise'; +export { partition } from '../internal/operators/partition'; +export { pluck } from '../internal/operators/pluck'; +export { publish } from '../internal/operators/publish'; +export { publishBehavior } from '../internal/operators/publishBehavior'; +export { publishLast } from '../internal/operators/publishLast'; +export { publishReplay } from '../internal/operators/publishReplay'; +export { race } from '../internal/operators/race'; +export { raceWith } from '../internal/operators/raceWith'; +export { reduce } from '../internal/operators/reduce'; +export { repeat } from '../internal/operators/repeat'; +export { repeatWhen } from '../internal/operators/repeatWhen'; +export { retry } from '../internal/operators/retry'; +export { retryWhen } from '../internal/operators/retryWhen'; +export { refCount } from '../internal/operators/refCount'; +export { sample } from '../internal/operators/sample'; +export { sampleTime } from '../internal/operators/sampleTime'; +export { scan } from '../internal/operators/scan'; +export { sequenceEqual } from '../internal/operators/sequenceEqual'; +export { share } from '../internal/operators/share'; +export { shareReplay } from '../internal/operators/shareReplay'; +export { single } from '../internal/operators/single'; +export { skip } from '../internal/operators/skip'; +export { skipLast } from '../internal/operators/skipLast'; +export { skipUntil } from '../internal/operators/skipUntil'; +export { skipWhile } from '../internal/operators/skipWhile'; +export { startWith } from '../internal/operators/startWith'; +export { subscribeOn } from '../internal/operators/subscribeOn'; +export { switchAll } from '../internal/operators/switchAll'; +export { switchMap } from '../internal/operators/switchMap'; +export { switchMapTo } from '../internal/operators/switchMapTo'; +export { switchScan } from '../internal/operators/switchScan'; +export { take } from '../internal/operators/take'; +export { takeLast } from '../internal/operators/takeLast'; +export { takeUntil } from '../internal/operators/takeUntil'; +export { takeWhile } from '../internal/operators/takeWhile'; +export { tap } from '../internal/operators/tap'; +export { throttle } from '../internal/operators/throttle'; +export { throttleTime } from '../internal/operators/throttleTime'; +export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; +export { timeInterval } from '../internal/operators/timeInterval'; +export { timeout } from '../internal/operators/timeout'; +export { timeoutWith } from '../internal/operators/timeoutWith'; +export { timestamp } from '../internal/operators/timestamp'; +export { toArray } from '../internal/operators/toArray'; +export { window } from '../internal/operators/window'; +export { windowCount } from '../internal/operators/windowCount'; +export { windowTime } from '../internal/operators/windowTime'; +export { windowToggle } from '../internal/operators/windowToggle'; +export { windowWhen } from '../internal/operators/windowWhen'; +export { withLatestFrom } from '../internal/operators/withLatestFrom'; +export { zip } from '../internal/operators/zip'; +export { zipAll } from '../internal/operators/zipAll'; +export { zipWith } from '../internal/operators/zipWith'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/operators/index.js.map b/node_modules/rxjs/dist/esm5/operators/index.js.map new file mode 100644 index 0000000..9028717 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/operators/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC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 No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/testing/index.js b/node_modules/rxjs/dist/esm5/testing/index.js new file mode 100644 index 0000000..f0f7b53 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/testing/index.js @@ -0,0 +1,2 @@ +export { TestScheduler } from '../internal/testing/TestScheduler'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/testing/index.js.map b/node_modules/rxjs/dist/esm5/testing/index.js.map new file mode 100644 index 0000000..bc7fd0d --- /dev/null +++ b/node_modules/rxjs/dist/esm5/testing/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/webSocket/index.js b/node_modules/rxjs/dist/esm5/webSocket/index.js new file mode 100644 index 0000000..a4bb4ea --- /dev/null +++ b/node_modules/rxjs/dist/esm5/webSocket/index.js @@ -0,0 +1,3 @@ +export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; +export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/webSocket/index.js.map b/node_modules/rxjs/dist/esm5/webSocket/index.js.map new file mode 100644 index 0000000..0912982 --- /dev/null +++ b/node_modules/rxjs/dist/esm5/webSocket/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/ajax/index.d.ts b/node_modules/rxjs/dist/types/ajax/index.d.ts new file mode 100644 index 0000000..862c9e0 --- /dev/null +++ b/node_modules/rxjs/dist/types/ajax/index.d.ts @@ -0,0 +1,5 @@ +export { ajax } from '../internal/ajax/ajax'; +export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; +export { AjaxResponse } from '../internal/ajax/AjaxResponse'; +export { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/ajax/index.d.ts.map b/node_modules/rxjs/dist/types/ajax/index.d.ts.map new file mode 100644 index 0000000..f65dd62 --- /dev/null +++ b/node_modules/rxjs/dist/types/ajax/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/fetch/index.d.ts b/node_modules/rxjs/dist/types/fetch/index.d.ts new file mode 100644 index 0000000..44a6e90 --- /dev/null +++ b/node_modules/rxjs/dist/types/fetch/index.d.ts @@ -0,0 +1,2 @@ +export { fromFetch } from '../internal/observable/dom/fetch'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/fetch/index.d.ts.map b/node_modules/rxjs/dist/types/fetch/index.d.ts.map new file mode 100644 index 0000000..1345944 --- /dev/null +++ b/node_modules/rxjs/dist/types/fetch/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/index.d.ts b/node_modules/rxjs/dist/types/index.d.ts new file mode 100644 index 0000000..fd64039 --- /dev/null +++ b/node_modules/rxjs/dist/types/index.d.ts @@ -0,0 +1,173 @@ +/// +/// +export { Observable } from './internal/Observable'; +export { ConnectableObservable } from './internal/observable/ConnectableObservable'; +export { GroupedObservable } from './internal/operators/groupBy'; +export { Operator } from './internal/Operator'; +export { observable } from './internal/symbol/observable'; +export { animationFrames } from './internal/observable/dom/animationFrames'; +export { Subject } from './internal/Subject'; +export { BehaviorSubject } from './internal/BehaviorSubject'; +export { ReplaySubject } from './internal/ReplaySubject'; +export { AsyncSubject } from './internal/AsyncSubject'; +export { asap, asapScheduler } from './internal/scheduler/asap'; +export { async, asyncScheduler } from './internal/scheduler/async'; +export { queue, queueScheduler } from './internal/scheduler/queue'; +export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; +export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; +export { Scheduler } from './internal/Scheduler'; +export { Subscription } from './internal/Subscription'; +export { Subscriber } from './internal/Subscriber'; +export { Notification, NotificationKind } from './internal/Notification'; +export { pipe } from './internal/util/pipe'; +export { noop } from './internal/util/noop'; +export { identity } from './internal/util/identity'; +export { isObservable } from './internal/util/isObservable'; +export { lastValueFrom } from './internal/lastValueFrom'; +export { firstValueFrom } from './internal/firstValueFrom'; +export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; +export { EmptyError } from './internal/util/EmptyError'; +export { NotFoundError } from './internal/util/NotFoundError'; +export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; +export { SequenceError } from './internal/util/SequenceError'; +export { TimeoutError } from './internal/operators/timeout'; +export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; +export { bindCallback } from './internal/observable/bindCallback'; +export { bindNodeCallback } from './internal/observable/bindNodeCallback'; +export { combineLatest } from './internal/observable/combineLatest'; +export { concat } from './internal/observable/concat'; +export { connectable } from './internal/observable/connectable'; +export { defer } from './internal/observable/defer'; +export { empty } from './internal/observable/empty'; +export { forkJoin } from './internal/observable/forkJoin'; +export { from } from './internal/observable/from'; +export { fromEvent } from './internal/observable/fromEvent'; +export { fromEventPattern } from './internal/observable/fromEventPattern'; +export { generate } from './internal/observable/generate'; +export { iif } from './internal/observable/iif'; +export { interval } from './internal/observable/interval'; +export { merge } from './internal/observable/merge'; +export { never } from './internal/observable/never'; +export { of } from './internal/observable/of'; +export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; +export { pairs } from './internal/observable/pairs'; +export { partition } from './internal/observable/partition'; +export { race } from './internal/observable/race'; +export { range } from './internal/observable/range'; +export { throwError } from './internal/observable/throwError'; +export { timer } from './internal/observable/timer'; +export { using } from './internal/observable/using'; +export { zip } from './internal/observable/zip'; +export { scheduled } from './internal/scheduled/scheduled'; +export { EMPTY } from './internal/observable/empty'; +export { NEVER } from './internal/observable/never'; +export * from './internal/types'; +export { config, GlobalConfig } from './internal/config'; +export { audit } from './internal/operators/audit'; +export { auditTime } from './internal/operators/auditTime'; +export { buffer } from './internal/operators/buffer'; +export { bufferCount } from './internal/operators/bufferCount'; +export { bufferTime } from './internal/operators/bufferTime'; +export { bufferToggle } from './internal/operators/bufferToggle'; +export { bufferWhen } from './internal/operators/bufferWhen'; +export { catchError } from './internal/operators/catchError'; +export { combineAll } from './internal/operators/combineAll'; +export { combineLatestAll } from './internal/operators/combineLatestAll'; +export { combineLatestWith } from './internal/operators/combineLatestWith'; +export { concatAll } from './internal/operators/concatAll'; +export { concatMap } from './internal/operators/concatMap'; +export { concatMapTo } from './internal/operators/concatMapTo'; +export { concatWith } from './internal/operators/concatWith'; +export { connect, ConnectConfig } from './internal/operators/connect'; +export { count } from './internal/operators/count'; +export { debounce } from './internal/operators/debounce'; +export { debounceTime } from './internal/operators/debounceTime'; +export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; +export { delay } from './internal/operators/delay'; +export { delayWhen } from './internal/operators/delayWhen'; +export { dematerialize } from './internal/operators/dematerialize'; +export { distinct } from './internal/operators/distinct'; +export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; +export { elementAt } from './internal/operators/elementAt'; +export { endWith } from './internal/operators/endWith'; +export { every } from './internal/operators/every'; +export { exhaust } from './internal/operators/exhaust'; +export { exhaustAll } from './internal/operators/exhaustAll'; +export { exhaustMap } from './internal/operators/exhaustMap'; +export { expand } from './internal/operators/expand'; +export { filter } from './internal/operators/filter'; +export { finalize } from './internal/operators/finalize'; +export { find } from './internal/operators/find'; +export { findIndex } from './internal/operators/findIndex'; +export { first } from './internal/operators/first'; +export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy'; +export { ignoreElements } from './internal/operators/ignoreElements'; +export { isEmpty } from './internal/operators/isEmpty'; +export { last } from './internal/operators/last'; +export { map } from './internal/operators/map'; +export { mapTo } from './internal/operators/mapTo'; +export { materialize } from './internal/operators/materialize'; +export { max } from './internal/operators/max'; +export { mergeAll } from './internal/operators/mergeAll'; +export { flatMap } from './internal/operators/flatMap'; +export { mergeMap } from './internal/operators/mergeMap'; +export { mergeMapTo } from './internal/operators/mergeMapTo'; +export { mergeScan } from './internal/operators/mergeScan'; +export { mergeWith } from './internal/operators/mergeWith'; +export { min } from './internal/operators/min'; +export { multicast } from './internal/operators/multicast'; +export { observeOn } from './internal/operators/observeOn'; +export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; +export { pairwise } from './internal/operators/pairwise'; +export { pluck } from './internal/operators/pluck'; +export { publish } from './internal/operators/publish'; +export { publishBehavior } from './internal/operators/publishBehavior'; +export { publishLast } from './internal/operators/publishLast'; +export { publishReplay } from './internal/operators/publishReplay'; +export { raceWith } from './internal/operators/raceWith'; +export { reduce } from './internal/operators/reduce'; +export { repeat, RepeatConfig } from './internal/operators/repeat'; +export { repeatWhen } from './internal/operators/repeatWhen'; +export { retry, RetryConfig } from './internal/operators/retry'; +export { retryWhen } from './internal/operators/retryWhen'; +export { refCount } from './internal/operators/refCount'; +export { sample } from './internal/operators/sample'; +export { sampleTime } from './internal/operators/sampleTime'; +export { scan } from './internal/operators/scan'; +export { sequenceEqual } from './internal/operators/sequenceEqual'; +export { share, ShareConfig } from './internal/operators/share'; +export { shareReplay, ShareReplayConfig } from './internal/operators/shareReplay'; +export { single } from './internal/operators/single'; +export { skip } from './internal/operators/skip'; +export { skipLast } from './internal/operators/skipLast'; +export { skipUntil } from './internal/operators/skipUntil'; +export { skipWhile } from './internal/operators/skipWhile'; +export { startWith } from './internal/operators/startWith'; +export { subscribeOn } from './internal/operators/subscribeOn'; +export { switchAll } from './internal/operators/switchAll'; +export { switchMap } from './internal/operators/switchMap'; +export { switchMapTo } from './internal/operators/switchMapTo'; +export { switchScan } from './internal/operators/switchScan'; +export { take } from './internal/operators/take'; +export { takeLast } from './internal/operators/takeLast'; +export { takeUntil } from './internal/operators/takeUntil'; +export { takeWhile } from './internal/operators/takeWhile'; +export { tap, TapObserver } from './internal/operators/tap'; +export { throttle, ThrottleConfig } from './internal/operators/throttle'; +export { throttleTime } from './internal/operators/throttleTime'; +export { throwIfEmpty } from './internal/operators/throwIfEmpty'; +export { timeInterval } from './internal/operators/timeInterval'; +export { timeout, TimeoutConfig, TimeoutInfo } from './internal/operators/timeout'; +export { timeoutWith } from './internal/operators/timeoutWith'; +export { timestamp } from './internal/operators/timestamp'; +export { toArray } from './internal/operators/toArray'; +export { window } from './internal/operators/window'; +export { windowCount } from './internal/operators/windowCount'; +export { windowTime } from './internal/operators/windowTime'; +export { windowToggle } from './internal/operators/windowToggle'; +export { windowWhen } from './internal/operators/windowWhen'; +export { withLatestFrom } from './internal/operators/withLatestFrom'; +export { zipAll } from './internal/operators/zipAll'; +export { zipWith } from './internal/operators/zipWith'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/index.d.ts.map b/node_modules/rxjs/dist/types/index.d.ts.map new file mode 100644 index 0000000..5587a1f --- /dev/null +++ b/node_modules/rxjs/dist/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,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AAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts new file mode 100644 index 0000000..2e39a59 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts @@ -0,0 +1,10 @@ +declare const anyCatcherSymbol: unique symbol; +/** + * This is just a type that we're using to identify `any` being passed to + * function overloads. This is used because of situations like {@link forkJoin}, + * where it could return an `Observable` or an `Observable<{ [key: K]: T }>`, + * so `forkJoin(any)` would mean we need to return `Observable`. + */ +export declare type AnyCatcher = typeof anyCatcherSymbol; +export {}; +//# sourceMappingURL=AnyCatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map new file mode 100644 index 0000000..4feb5cc --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AnyCatcher.d.ts","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":"AAKA,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,MAAM,CAAC;AAE9C;;;;;GAKG;AACH,oBAAY,UAAU,GAAG,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts new file mode 100644 index 0000000..dcdc589 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts @@ -0,0 +1,15 @@ +import { Subject } from './Subject'; +/** + * A variant of Subject that only emits a value when it completes. It will emit + * its latest value to all its observers on completion. + * + * @class AsyncSubject + */ +export declare class AsyncSubject extends Subject { + private _value; + private _hasValue; + private _isComplete; + next(value: T): void; + complete(): void; +} +//# sourceMappingURL=AsyncSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map new file mode 100644 index 0000000..650e9ff --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncSubject.d.ts","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC;;;;;GAKG;AACH,qBAAa,YAAY,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAa5B,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAOpB,QAAQ,IAAI,IAAI;CAQjB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts new file mode 100644 index 0000000..fa9db7e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts @@ -0,0 +1,15 @@ +import { Subject } from './Subject'; +/** + * A variant of Subject that requires an initial value and emits its current + * value whenever it is subscribed to. + * + * @class BehaviorSubject + */ +export declare class BehaviorSubject extends Subject { + private _value; + constructor(_value: T); + get value(): T; + getValue(): T; + next(value: T): void; +} +//# sourceMappingURL=BehaviorSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map new file mode 100644 index 0000000..8bd063b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BehaviorSubject.d.ts","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;;;;GAKG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,CAAC;IAI7B,IAAI,KAAK,IAAI,CAAC,CAEb;IASD,QAAQ,IAAI,CAAC;IASb,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CAGrB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Notification.d.ts b/node_modules/rxjs/dist/types/internal/Notification.d.ts new file mode 100644 index 0000000..2097628 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Notification.d.ts @@ -0,0 +1,180 @@ +import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types'; +import { Observable } from './Observable'; +/** + * @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8. + * It will not be replaced with a const enum as those are not compatible with isolated modules. + */ +export declare enum NotificationKind { + NEXT = "N", + ERROR = "E", + COMPLETE = "C" +} +/** + * Represents a push-based event or value that an {@link Observable} can emit. + * This class is particularly useful for operators that manage notifications, + * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and + * others. Besides wrapping the actual delivered value, it also annotates it + * with metadata of, for instance, what type of push message it is (`next`, + * `error`, or `complete`). + * + * @see {@link materialize} + * @see {@link dematerialize} + * @see {@link observeOn} + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ +export declare class Notification { + readonly kind: 'N' | 'E' | 'C'; + readonly value?: T | undefined; + readonly error?: any; + /** + * A value signifying that the notification will "next" if observed. In truth, + * This is really synonymous with just checking `kind === "N"`. + * @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `"N"`. + */ + readonly hasValue: boolean; + /** + * Creates a "Next" notification object. + * @param kind Always `'N'` + * @param value The value to notify with if observed. + * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead. + */ + constructor(kind: 'N', value?: T); + /** + * Creates an "Error" notification object. + * @param kind Always `'E'` + * @param value Always `undefined` + * @param error The error to notify with if observed. + * @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead. + */ + constructor(kind: 'E', value: undefined, error: any); + /** + * Creates a "completion" notification object. + * @param kind Always `'C'` + * @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead. + */ + constructor(kind: 'C'); + /** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param observer The observer to notify. + */ + observe(observer: PartialObserver): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @param complete A complete handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void, error: (err: any) => void): void; + /** + * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise + * this will not error, and it will be a noop. + * @param next The next handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @param complete A complete handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void, error: (err: any) => void): void; + /** + * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise + * this will not error, and it will be a noop. + * @param next The next handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void): void; + /** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param observer The observer to notify. + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(observer: PartialObserver): void; + /** + * Returns a simple Observable that just delivers the notification represented + * by this Notification instance. + * + * @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable}, + * use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`. + */ + toObservable(): Observable; + private static completeNotification; + /** + * A shortcut to create a Notification instance of the type `next` from a + * given value. + * @param {T} value The `next` value. + * @return {Notification} The "next" Notification representing the + * argument. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createNext(value: T): Notification & NextNotification; + /** + * A shortcut to create a Notification instance of the type `error` from a + * given error. + * @param {any} [err] The `error` error. + * @return {Notification} The "error" Notification representing the + * argument. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createError(err?: any): Notification & ErrorNotification; + /** + * A shortcut to create a Notification instance of the type `complete`. + * @return {Notification} The valueless "complete" Notification. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createComplete(): Notification & CompleteNotification; +} +/** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param notification The notification object to observe. + * @param observer The observer to notify. + */ +export declare function observeNotification(notification: ObservableNotification, observer: PartialObserver): void; +//# sourceMappingURL=Notification.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Notification.d.ts.map b/node_modules/rxjs/dist/types/internal/Notification.d.ts.map new file mode 100644 index 0000000..25b7185 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Notification.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC7H,OAAO,E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AAI;IACvF;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IACjE;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAEtC;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAO1C;;;;;;OAMG;IACH,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC;IA0B7B,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAuE;IAC1G;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAI7B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG;IAI5B;;;;;;;;OAQG;IACH,MAAM,CAAC,cAAc,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,oBAAoB;CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,QAM3G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts new file mode 100644 index 0000000..298d4cd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=NotificationFactories.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map new file mode 100644 index 0000000..e3f44d0 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NotificationFactories.d.ts","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Observable.d.ts b/node_modules/rxjs/dist/types/internal/Observable.d.ts new file mode 100644 index 0000000..717e3ed --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Observable.d.ts @@ -0,0 +1,128 @@ +import { Operator } from './Operator'; +import { Subscriber } from './Subscriber'; +import { Subscription } from './Subscription'; +import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types'; +/** + * A representation of any set of values over any amount of time. This is the most basic building block + * of RxJS. + * + * @class Observable + */ +export declare class Observable implements Subscribable { + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + source: Observable | undefined; + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + operator: Operator | undefined; + /** + * @constructor + * @param {Function} subscribe the function that is called when the Observable is + * initially subscribed to. This function is given a Subscriber, to which new values + * can be `next`ed, or an `error` method can be called to raise an error, or + * `complete` can be called to notify of a successful completion. + */ + constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic); + /** + * Creates a new Observable by calling the Observable constructor + * @owner Observable + * @method create + * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor + * @return {Observable} a new observable + * @nocollapse + * @deprecated Use `new Observable()` instead. Will be removed in v8. + */ + static create: (...args: any[]) => any; + /** + * Creates a new Observable, with this Observable instance as the source, and the passed + * operator defined as the new observable's operator. + * @method lift + * @param operator the operator defining the operation to take on the observable + * @return a new observable with the Operator applied + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + * If you have implemented an operator using `lift`, it is recommended that you create an + * operator by simply returning `new Observable()` directly. See "Creating new operators from + * scratch" section here: https://rxjs.dev/guide/operators + */ + lift(operator?: Operator): Observable; + subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; + /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ + subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; + /** + * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with + * APIs that expect promises, like `async/await`. You cannot unsubscribe from this. + * + * **WARNING**: Only use this with observables you *know* will complete. If the source + * observable does not complete, you will end up with a promise that is hung up, and + * potentially all of the state of an async function hanging out in memory. To avoid + * this situation, look into adding something like {@link timeout}, {@link take}, + * {@link takeWhile}, or {@link takeUntil} amongst others. + * + * #### Example + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const source$ = interval(1000).pipe(take(4)); + * + * async function getTotal() { + * let total = 0; + * + * await source$.forEach(value => { + * total += value; + * console.log('observable -> ' + value); + * }); + * + * return total; + * } + * + * getTotal().then( + * total => console.log('Total: ' + total) + * ); + * + * // Expected: + * // 'observable -> 0' + * // 'observable -> 1' + * // 'observable -> 2' + * // 'observable -> 3' + * // 'Total: 6' + * ``` + * + * @param next a handler for each value emitted by the observable + * @return a promise that either resolves on observable completion or + * rejects with the handled error + */ + forEach(next: (value: T) => void): Promise; + /** + * @param next a handler for each value emitted by the observable + * @param promiseCtor a constructor function used to instantiate the Promise + * @return a promise that either resolves on observable completion or + * rejects with the handled error + * @deprecated Passing a Promise constructor will no longer be available + * in upcoming versions of RxJS. This is because it adds weight to the library, for very + * little benefit. If you need this functionality, it is recommended that you either + * polyfill Promise, or you create an adapter to convert the returned native promise + * to whatever promise implementation you wanted. Will be removed in v8. + */ + forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; + pipe(): Observable; + pipe(op1: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction, ...operations: OperatorFunction[]): Observable; + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(): Promise; + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(PromiseCtor: typeof Promise): Promise; + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(PromiseCtor: PromiseConstructorLike): Promise; +} +//# sourceMappingURL=Observable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Observable.d.ts.map b/node_modules/rxjs/dist/types/internal/Observable.d.ts.map new file mode 100644 index 0000000..a54927b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Observable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Observable.d.ts","sourceRoot":"","sources":["../../../src/internal/Observ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,GAAG,SAAS,CAAC;CAiCvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Operator.d.ts b/node_modules/rxjs/dist/types/internal/Operator.d.ts new file mode 100644 index 0000000..d7377ee --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Operator.d.ts @@ -0,0 +1,9 @@ +import { Subscriber } from './Subscriber'; +import { TeardownLogic } from './types'; +/*** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ +export interface Operator { + call(subscriber: Subscriber, source: any): TeardownLogic; +} +//# sourceMappingURL=Operator.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Operator.d.ts.map b/node_modules/rxjs/dist/types/internal/Operator.d.ts.map new file mode 100644 index 0000000..13e2530 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Operator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC5B,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,aAAa,CAAC;CAC7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts new file mode 100644 index 0000000..793963f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts @@ -0,0 +1,49 @@ +import { Subject } from './Subject'; +import { TimestampProvider } from './types'; +/** + * A variant of {@link Subject} that "replays" old values to new subscribers by emitting them when they first subscribe. + * + * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`, + * `ReplaySubject` "observes" values by having them passed to its `next` method. When it observes a value, it will store that + * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor. + * + * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in + * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will + * error if it has observed an error. + * + * There are two main configuration items to be concerned with: + * + * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite. + * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer. + * + * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values + * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`. + * + * ### Differences with BehaviorSubject + * + * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions: + * + * 1. `BehaviorSubject` comes "primed" with a single value upon construction. + * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not. + * + * @see {@link Subject} + * @see {@link BehaviorSubject} + * @see {@link shareReplay} + */ +export declare class ReplaySubject extends Subject { + private _bufferSize; + private _windowTime; + private _timestampProvider; + private _buffer; + private _infiniteTimeWindow; + /** + * @param bufferSize The size of the buffer to replay on subscription + * @param windowTime The amount of time the buffered items will stay buffered + * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to + * calculate the amount of time something has been buffered. + */ + constructor(_bufferSize?: number, _windowTime?: number, _timestampProvider?: TimestampProvider); + next(value: T): void; + private _trimBuffer; +} +//# sourceMappingURL=ReplaySubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map new file mode 100644 index 0000000..a66a0f9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ReplaySubject.d.ts","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAW5C,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,kBAAkB;IAZ5B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,mBAAmB,CAAQ;IAEnC;;;;;OAKG;gBAEO,WAAW,SAAW,EACtB,WAAW,SAAW,EACtB,kBAAkB,GAAE,iBAAyC;IAQvE,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IA8BpB,OAAO,CAAC,WAAW;CAsBpB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts new file mode 100644 index 0000000..5df5e13 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts @@ -0,0 +1,55 @@ +import { Action } from './scheduler/Action'; +import { Subscription } from './Subscription'; +import { SchedulerLike, SchedulerAction } from './types'; +/** + * An execution context and a data structure to order tasks and schedule their + * execution. Provides a notion of (potentially virtual) time, through the + * `now()` getter method. + * + * Each unit of work in a Scheduler is called an `Action`. + * + * ```ts + * class Scheduler { + * now(): number; + * schedule(work, delay?, state?): Subscription; + * } + * ``` + * + * @class Scheduler + * @deprecated Scheduler is an internal implementation detail of RxJS, and + * should not be used directly. Rather, create your own class and implement + * {@link SchedulerLike}. Will be made internal in v8. + */ +export declare class Scheduler implements SchedulerLike { + private schedulerActionCtor; + static now: () => number; + constructor(schedulerActionCtor: typeof Action, now?: () => number); + /** + * A getter method that returns a number representing the current time + * (at the time this function was called) according to the scheduler's own + * internal clock. + * @return {number} A number that represents the current time. May or may not + * have a relation to wall-clock time. May or may not refer to a time unit + * (e.g. milliseconds). + */ + now: () => number; + /** + * Schedules a function, `work`, for execution. May happen at some point in + * the future, according to the `delay` parameter, if specified. May be passed + * some context object, `state`, which will be passed to the `work` function. + * + * The given arguments will be processed an stored as an Action object in a + * queue of actions. + * + * @param {function(state: ?T): ?Subscription} work A function representing a + * task, or some unit of work to be executed by the Scheduler. + * @param {number} [delay] Time to wait before executing the work, where the + * time unit is implicit and defined by the Scheduler itself. + * @param {T} [state] Some contextual data that the `work` function uses when + * called by the Scheduler. + * @return {Subscription} A subscription in order to be able to unsubscribe + * the scheduled work. + */ + schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; +} +//# sourceMappingURL=Scheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map new file mode 100644 index 0000000..5df0ea6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Scheduler.d.ts","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGzD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,SAAU,YAAW,aAAa;IAGjC,OAAO,CAAC,mBAAmB;IAFvC,OAAc,GAAG,EAAE,MAAM,MAAM,CAA6B;gBAExC,mBAAmB,EAAE,OAAO,MAAM,EAAE,GAAG,GAAE,MAAM,MAAsB;IAIzF;;;;;;;OAOG;IACI,GAAG,EAAE,MAAM,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;OAgBG;IACI,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,GAAE,MAAU,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,YAAY;CAGpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subject.d.ts b/node_modules/rxjs/dist/types/internal/Subject.d.ts new file mode 100644 index 0000000..b5ba5f5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subject.d.ts @@ -0,0 +1,58 @@ +import { Operator } from './Operator'; +import { Observable } from './Observable'; +import { Observer, SubscriptionLike } from './types'; +/** + * A Subject is a special type of Observable that allows values to be + * multicasted to many Observers. Subjects are like EventEmitters. + * + * Every Subject is an Observable and an Observer. You can subscribe to a + * Subject, and you can call next to feed values as well as error and complete. + */ +export declare class Subject extends Observable implements SubscriptionLike { + closed: boolean; + private currentObservers; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + observers: Observer[]; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + isStopped: boolean; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + hasError: boolean; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + thrownError: any; + /** + * Creates a "subject" by basically gluing an observer to an observable. + * + * @nocollapse + * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion. + */ + static create: (...args: any[]) => any; + constructor(); + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + lift(operator: Operator): Observable; + next(value: T): void; + error(err: any): void; + complete(): void; + unsubscribe(): void; + get observed(): boolean; + /** + * Creates a new Observable with this Subject as the source. You can do this + * to create custom Observer-side logic of the Subject and conceal it from + * code that uses the Observable. + * @return {Observable} Observable that the Subject casts to + */ + asObservable(): Observable; +} +/** + * @class AnonymousSubject + */ +export declare class AnonymousSubject extends Subject { + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + destination?: Observer | undefined; + constructor( + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + destination?: Observer | undefined, source?: Observable); + next(value: T): void; + error(err: any): void; + complete(): void; +} +//# sourceMappingURL=Subject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subject.d.ts.map b/node_modules/rxjs/dist/types/internal/Subject.d.ts.map new file mode 100644 index 0000000..a6bffc6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AAKpE;;;;;;GAMG;AACH,qBAAa,OAAO,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,gBAAgB;IACvE,MAAM,UAAS;IAEf,OAAO,CAAC,gBAAgB,CAA8B;IAEtD,oGAAoG;IACpG,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAM;IAC9B,oGAAoG;IACpG,SAAS,UAAS;IAClB,oGAAoG;IACpG,QAAQ,UAAS;IACjB,oGAAoG;IACpG,WAAW,EAAE,GAAG,CAAQ;IAExB;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEpC;;IAOF,oGAAoG;IACpG,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAahD,IAAI,CAAC,KAAK,EAAE,CAAC;IAcb,KAAK,CAAC,GAAG,EAAE,GAAG;IAcd,QAAQ;IAaR,WAAW;IAKX,IAAI,QAAQ,YAEX;IAuCD;;;;;OAKG;IACH,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC;CAK9B;AAED;;GAEG;AACH,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAE/C,oGAAoG;IAC7F,WAAW,CAAC;;IADnB,oGAAoG;IAC7F,WAAW,CAAC,yBAAa,EAChC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;IAMxB,IAAI,CAAC,KAAK,EAAE,CAAC;IAIb,KAAK,CAAC,GAAG,EAAE,GAAG;IAId,QAAQ;CAQT"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts new file mode 100644 index 0000000..bbbfec3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts @@ -0,0 +1,78 @@ +import { Observer } from './types'; +import { Subscription } from './Subscription'; +/** + * Implements the {@link Observer} interface and extends the + * {@link Subscription} class. While the {@link Observer} is the public API for + * consuming the values of an {@link Observable}, all Observers get converted to + * a Subscriber, in order to provide Subscription-like capabilities such as + * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for + * implementing operators, but it is rarely used as a public API. + * + * @class Subscriber + */ +export declare class Subscriber extends Subscription implements Observer { + /** + * A static factory for a Subscriber, given a (potentially partial) definition + * of an Observer. + * @param next The `next` callback of an Observer. + * @param error The `error` callback of an + * Observer. + * @param complete The `complete` callback of an + * Observer. + * @return A Subscriber wrapping the (partially defined) + * Observer represented by the given arguments. + * @nocollapse + * @deprecated Do not use. Will be removed in v8. There is no replacement for this + * method, and there is no reason to be creating instances of `Subscriber` directly. + * If you have a specific use case, please file an issue. + */ + static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + protected isStopped: boolean; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + protected destination: Subscriber | Observer; + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons. + */ + constructor(destination?: Subscriber | Observer); + /** + * The {@link Observer} callback to receive notifications of type `next` from + * the Observable, with a value. The Observable may call this method 0 or more + * times. + * @param {T} [value] The `next` value. + * @return {void} + */ + next(value?: T): void; + /** + * The {@link Observer} callback to receive notifications of type `error` from + * the Observable, with an attached `Error`. Notifies the Observer that + * the Observable has experienced an error condition. + * @param {any} [err] The `error` exception. + * @return {void} + */ + error(err?: any): void; + /** + * The {@link Observer} callback to receive a valueless notification of type + * `complete` from the Observable. Notifies the Observer that the Observable + * has finished sending push-based notifications. + * @return {void} + */ + complete(): void; + unsubscribe(): void; + protected _next(value: T): void; + protected _error(err: any): void; + protected _complete(): void; +} +export declare class SafeSubscriber extends Subscriber { + constructor(observerOrNext?: Partial> | ((value: T) => void) | null, error?: ((e?: any) => void) | null, complete?: (() => void) | null); +} +/** + * The observer used as a stub for subscriptions where the user did not + * pass any arguments to `subscribe`. Comes with the default error handling + * behavior. + */ +export declare const EMPTY_OBSERVER: Readonly> & { + closed: true; +}; +//# sourceMappingURL=Subscriber.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map new file mode 100644 index 0000000..8f8fd13 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscriber.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA0B,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAkB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9D;;;;;;;;;GASG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,YAAa,YAAW,QAAQ,CAAC,CAAC,CAAC;IACpE;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,I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G;IAAE,MAAM,EAAE,IAAI,CAAA;CAKpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscription.d.ts b/node_modules/rxjs/dist/types/internal/Subscription.d.ts new file mode 100644 index 0000000..3f22a00 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subscription.d.ts @@ -0,0 +1,96 @@ +import { SubscriptionLike, TeardownLogic } from './types'; +/** + * Represents a disposable resource, such as the execution of an Observable. A + * Subscription has one important method, `unsubscribe`, that takes no argument + * and just disposes the resource held by the subscription. + * + * Additionally, subscriptions may be grouped together through the `add()` + * method, which will attach a child Subscription to the current Subscription. + * When a Subscription is unsubscribed, all its children (and its grandchildren) + * will be unsubscribed as well. + * + * @class Subscription + */ +export declare class Subscription implements SubscriptionLike { + private initialTeardown?; + /** @nocollapse */ + static EMPTY: Subscription; + /** + * A flag to indicate whether this Subscription has already been unsubscribed. + */ + closed: boolean; + private _parentage; + /** + * The list of registered finalizers to execute upon unsubscription. Adding and removing from this + * list occurs in the {@link #add} and {@link #remove} methods. + */ + private _finalizers; + /** + * @param initialTeardown A function executed first as part of the finalization + * process that is kicked off when {@link #unsubscribe} is called. + */ + constructor(initialTeardown?: (() => void) | undefined); + /** + * Disposes the resources held by the subscription. May, for instance, cancel + * an ongoing Observable execution or cancel any other type of work that + * started when the Subscription was created. + * @return {void} + */ + unsubscribe(): void; + /** + * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called + * when this subscription is unsubscribed. If this subscription is already {@link #closed}, + * because it has already been unsubscribed, then whatever finalizer is passed to it + * will automatically be executed (unless the finalizer itself is also a closed subscription). + * + * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed + * subscription to a any subscription will result in no operation. (A noop). + * + * Adding a subscription to itself, or adding `null` or `undefined` will not perform any + * operation at all. (A noop). + * + * `Subscription` instances that are added to this instance will automatically remove themselves + * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove + * will need to be removed manually with {@link #remove} + * + * @param teardown The finalization logic to add to this subscription. + */ + add(teardown: TeardownLogic): void; + /** + * Checks to see if a this subscription already has a particular parent. + * This will signal that this subscription has already been added to the parent in question. + * @param parent the parent to check for + */ + private _hasParent; + /** + * Adds a parent to this subscription so it can be removed from the parent if it + * unsubscribes on it's own. + * + * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED. + * @param parent The parent subscription to add + */ + private _addParent; + /** + * Called on a child when it is removed via {@link #remove}. + * @param parent The parent to remove + */ + private _removeParent; + /** + * Removes a finalizer from this subscription that was previously added with the {@link #add} method. + * + * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves + * from every other `Subscription` they have been added to. This means that using the `remove` method + * is not a common thing and should be used thoughtfully. + * + * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance + * more than once, you will need to call `remove` the same number of times to remove all instances. + * + * All finalizer instances are removed to free up memory upon unsubscription. + * + * @param teardown The finalizer to remove from this subscription + */ + remove(teardown: Exclude): void; +} +export declare const EMPTY_SUBSCRIPTION: Subscription; +export declare function isSubscription(value: any): value is Subscription; +//# sourceMappingURL=Subscription.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map b/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map new file mode 100644 index 0000000..ca8ef59 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscription.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAC;AAG1E;;;;;;;;;;;GAWG;AACH,qBAAa,YAAa,YAAW,gBAAgB;IAyBvC,OAAO,CAAC,eAAe,CAAC;IAxBpC,kBAAkB;IAClB,OAAc,KAAK,eAId;IAEL;;OAEG;IACI,MAAM,UAAS;IAEtB,OAAO,CAAC,UAAU,CAA8C;IAEhE;;;OAGG;IACH,OAAO,CAAC,WAAW,CAA+C;IAElE;;;OAGG;gBACiB,eAAe,CAAC,SAAQ,IAAI,aAAA;IAEhD;;;;;OAKG;IACH,WAAW,IAAI,IAAI;IAmDnB;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAsBlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,OAAO,CAAC,aAAa;IASrB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;CAQrD;AAED,eAAO,MAAM,kBAAkB,cAAqB,CAAC;AAErD,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAKhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts new file mode 100644 index 0000000..79e8270 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts @@ -0,0 +1,115 @@ +import { AjaxRequest, AjaxResponseType } from './types'; +/** + * A normalized response from an AJAX request. To get the data from the response, + * you will want to read the `response` property. + * + * - DO NOT create instances of this class directly. + * - DO NOT subclass this class. + * + * It is advised not to hold this object in memory, as it has a reference to + * the original XHR used to make the request, as well as properties containing + * request and response data. + * + * @see {@link ajax} + * @see {@link AjaxConfig} + */ +export declare class AjaxResponse { + /** + * The original event object from the raw XHR event. + */ + readonly originalEvent: ProgressEvent; + /** + * The XMLHttpRequest object used to make the request. + * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers + * and many other things related to the request. + */ + readonly xhr: XMLHttpRequest; + /** + * The request parameters used to make the HTTP request. + */ + readonly request: AjaxRequest; + /** + * The event type. This can be used to discern between different events + * if you're using progress events with {@link includeDownloadProgress} or + * {@link includeUploadProgress} settings in {@link AjaxConfig}. + * + * The event type consists of two parts: the {@link AjaxDirection} and the + * the event type. Merged with `_`, they form the `type` string. The + * direction can be an `upload` or a `download` direction, while an event can + * be `loadstart`, `progress` or `load`. + * + * `download_load` is the type of event when download has finished and the + * response is available. + */ + readonly type: AjaxResponseType; + /** The HTTP status code */ + readonly status: number; + /** + * The response data, if any. Note that this will automatically be converted to the proper type + */ + readonly response: T; + /** + * The responseType set on the request. (For example: `""`, `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, or `"text"`) + * @deprecated There isn't much reason to examine this. It's the same responseType set (or defaulted) on the ajax config. + * If you really need to examine this value, you can check it on the `request` or the `xhr`. Will be removed in v8. + */ + readonly responseType: XMLHttpRequestResponseType; + /** + * The total number of bytes loaded so far. To be used with {@link total} while + * calculating progress. (You will want to set {@link includeDownloadProgress} or + * {@link includeDownloadProgress}) + */ + readonly loaded: number; + /** + * The total number of bytes to be loaded. To be used with {@link loaded} while + * calculating progress. (You will want to set {@link includeDownloadProgress} or + * {@link includeDownloadProgress}) + */ + readonly total: number; + /** + * A dictionary of the response headers. + */ + readonly responseHeaders: Record; + /** + * A normalized response from an AJAX request. To get the data from the response, + * you will want to read the `response` property. + * + * - DO NOT create instances of this class directly. + * - DO NOT subclass this class. + * + * @param originalEvent The original event object from the XHR `onload` event. + * @param xhr The `XMLHttpRequest` object used to make the request. This is useful for examining status code, etc. + * @param request The request settings used to make the HTTP request. + * @param type The type of the event emitted by the {@link ajax} Observable + */ + constructor( + /** + * The original event object from the raw XHR event. + */ + originalEvent: ProgressEvent, + /** + * The XMLHttpRequest object used to make the request. + * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers + * and many other things related to the request. + */ + xhr: XMLHttpRequest, + /** + * The request parameters used to make the HTTP request. + */ + request: AjaxRequest, + /** + * The event type. This can be used to discern between different events + * if you're using progress events with {@link includeDownloadProgress} or + * {@link includeUploadProgress} settings in {@link AjaxConfig}. + * + * The event type consists of two parts: the {@link AjaxDirection} and the + * the event type. Merged with `_`, they form the `type` string. The + * direction can be an `upload` or a `download` direction, while an event can + * be `loadstart`, `progress` or `load`. + * + * `download_load` is the type of event when download has finished and the + * response is available. + */ + type?: AjaxResponseType); +} +//# sourceMappingURL=AjaxResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map new file mode 100644 index 0000000..6381aa8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AjaxResponse.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGxD;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAY,CAAC,CAAC;IAgDvB;;OAEG;aACa,aAAa,EAAE,aAAa;IAC5C;;;;OAIG;aACa,GAAG,EAAE,cAAc;IACnC;;OAEG;aACa,OAAO,EAAE,WAAW;IACpC;;;;;;;;;;;;OAYG;aACa,IAAI,EAAE,gBAAgB;IA1ExC,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAC;IAElD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjD;;;;;;;;;;;OAWG;;IAED;;OAEG;IACa,aAAa,EAAE,aAAa;IAC5C;;;;OAIG;IACa,GAAG,EAAE,cAAc;IACnC;;OAEG;IACa,OAAO,EAAE,WAAW;IACpC;;;;;;;;;;;;OAYG;IACa,IAAI,GAAE,gBAAkC;CA+B3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts new file mode 100644 index 0000000..4b5d485 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts @@ -0,0 +1,227 @@ +import { Observable } from '../Observable'; +import { AjaxConfig } from './types'; +import { AjaxResponse } from './AjaxResponse'; +export interface AjaxCreationMethod { + /** + * Creates an observable that will perform an AJAX request using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default. + * + * This is the most configurable option, and the basis for all other AJAX calls in the library. + * + * ## Example + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax({ + * method: 'GET', + * url: 'https://api.github.com/users?per_page=5', + * responseType: 'json' + * }).pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * ``` + */ + (config: AjaxConfig): Observable>; + /** + * Perform an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope. Defaults to a `responseType` of `"json"`. + * + * ## Example + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * ``` + */ + (url: string): Observable>; + /** + * Performs an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + get(url: string, headers?: Record): Observable>; + /** + * Performs an HTTP POST using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + post(url: string, body?: any, headers?: Record): Observable>; + /** + * Performs an HTTP PUT using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + put(url: string, body?: any, headers?: Record): Observable>; + /** + * Performs an HTTP PATCH using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + patch(url: string, body?: any, headers?: Record): Observable>; + /** + * Performs an HTTP DELETE using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + delete(url: string, headers?: Record): Observable>; + /** + * Performs an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and returns the hydrated JavaScript object from the + * response. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + getJSON(url: string, headers?: Record): Observable; +} +/** + * There is an ajax operator on the Rx object. + * + * It creates an observable for an Ajax request with either a request object with + * url, headers, etc or a string for a URL. + * + * ## Examples + * + * Using `ajax()` to fetch the response object that is being returned from API + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax.getJSON()` to fetch data from API + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax.getJSON('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax()` with object as argument and method POST with a two seconds delay + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const users = ajax({ + * url: 'https://httpbin.org/delay/2', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'rxjs-custom-header': 'Rxjs' + * }, + * body: { + * rxjs: 'Hello World!' + * } + * }).pipe( + * map(response => console.log('response: ', response)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * users.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax()` to fetch. An error object that is being returned from the request + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/404').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + */ +export declare const ajax: AjaxCreationMethod; +export declare function fromAjax(init: AjaxConfig): Observable>; +//# sourceMappingURL=ajax.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map new file mode 100644 index 0000000..6ccd632 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ajax.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAiD,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnF;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO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d.ts b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts new file mode 100644 index 0000000..6363e8f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts @@ -0,0 +1,69 @@ +import { AjaxRequest } from './types'; +/** + * A normalized AJAX error. + * + * @see {@link ajax} + * + * @class AjaxError + */ +export interface AjaxError extends Error { + /** + * The XHR instance associated with the error. + */ + xhr: XMLHttpRequest; + /** + * The AjaxRequest associated with the error. + */ + request: AjaxRequest; + /** + * The HTTP status code, if the request has completed. If not, + * it is set to `0`. + */ + status: number; + /** + * The responseType (e.g. 'json', 'arraybuffer', or 'xml'). + */ + responseType: XMLHttpRequestResponseType; + /** + * The response data. + */ + response: any; +} +export interface AjaxErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError; +} +/** + * Thrown when an error occurs during an AJAX request. + * This is only exported because it is useful for checking to see if an error + * is an `instanceof AjaxError`. DO NOT create new instances of `AjaxError` with + * the constructor. + * + * @class AjaxError + * @see {@link ajax} + */ +export declare const AjaxError: AjaxErrorCtor; +export interface AjaxTimeoutError extends AjaxError { +} +export interface AjaxTimeoutErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError; +} +/** + * Thrown when an AJAX request times out. Not to be confused with {@link TimeoutError}. + * + * This is exported only because it is useful for checking to see if errors are an + * `instanceof AjaxTimeoutError`. DO NOT use the constructor to create an instance of + * this type. + * + * @class AjaxTimeoutError + * @see {@link ajax} + */ +export declare const AjaxTimeoutError: AjaxTimeoutErrorCtor; +//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map new file mode 100644 index 0000000..7aadf26 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC;;OAEG;IACH,GAAG,EAAE,cAAc,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IAErB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,EAAE,0BAA0B,CAAC;IAEzC;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAC7E;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,aAmBvB,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,SAAS;CAAG;AAEtD,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;CACnE;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBAQpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts new file mode 100644 index 0000000..c33ce59 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts @@ -0,0 +1,14 @@ +/** + * Gets what should be in the `response` property of the XHR. However, + * since we still support the final versions of IE, we need to do a little + * checking here to make sure that we get the right thing back. Consequently, + * we need to do a JSON.parse() in here, which *could* throw if the response + * isn't valid JSON. + * + * This is used both in creating an AjaxResponse, and in creating certain errors + * that we throw, so we can give the user whatever was in the response property. + * + * @param xhr The XHR to examine the response of + */ +export declare function getXHRResponse(xhr: XMLHttpRequest): any; +//# sourceMappingURL=getXHRResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map new file mode 100644 index 0000000..59ddb07 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getXHRResponse.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,OAwBjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts new file mode 100644 index 0000000..2ee2b80 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts @@ -0,0 +1,200 @@ +import { PartialObserver } from '../types'; +/** + * Valid Ajax direction types. Prefixes the event `type` in the + * {@link AjaxResponse} object with "upload_" for events related + * to uploading and "download_" for events related to downloading. + */ +export declare type AjaxDirection = 'upload' | 'download'; +export declare type ProgressEventType = 'loadstart' | 'progress' | 'load'; +export declare type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`; +/** + * The object containing values RxJS used to make the HTTP request. + * + * This is provided in {@link AjaxError} instances as the `request` + * object. + */ +export interface AjaxRequest { + /** + * The URL requested. + */ + url: string; + /** + * The body to send over the HTTP request. + */ + body?: any; + /** + * The HTTP method used to make the HTTP request. + */ + method: string; + /** + * Whether or not the request was made asynchronously. + */ + async: boolean; + /** + * The headers sent over the HTTP request. + */ + headers: Readonly>; + /** + * The timeout value used for the HTTP request. + * Note: this is only honored if the request is asynchronous (`async` is `true`). + */ + timeout: number; + /** + * The user credentials user name sent with the HTTP request. + */ + user?: string; + /** + * The user credentials password sent with the HTTP request. + */ + password?: string; + /** + * Whether or not the request was a CORS request. + */ + crossDomain: boolean; + /** + * Whether or not a CORS request was sent with credentials. + * If `false`, will also ignore cookies in the CORS response. + */ + withCredentials: boolean; + /** + * The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request. + */ + responseType: XMLHttpRequestResponseType; +} +/** + * Configuration for the {@link ajax} creation function. + */ +export interface AjaxConfig { + /** The address of the resource to request via HTTP. */ + url: string; + /** + * The body of the HTTP request to send. + * + * This is serialized, by default, based off of the value of the `"content-type"` header. + * For example, if the `"content-type"` is `"application/json"`, the body will be serialized + * as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed + * to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object. + * In all other cases, the body will be passed directly. + */ + body?: any; + /** + * Whether or not to send the request asynchronously. Defaults to `true`. + * If set to `false`, this will block the thread until the AJAX request responds. + */ + async?: boolean; + /** + * The HTTP Method to use for the request. Defaults to "GET". + */ + method?: string; + /** + * The HTTP headers to apply. + * + * Note that, by default, RxJS will add the following headers under certain conditions: + * + * 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData), + * a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically. + * 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`, + * (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically. + * This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests. + */ + headers?: Readonly>; + /** + * The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the + * `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout". + */ + timeout?: number; + /** The user credentials user name to send with the HTTP request */ + user?: string; + /** The user credentials password to send with the HTTP request*/ + password?: string; + /** + * Whether or not to send the HTTP request as a CORS request. + * Defaults to `false`. + * + * @deprecated Will be removed in version 8. Cross domain requests and what creates a cross + * domain request, are dictated by the browser, and a boolean that forces it to be cross domain + * does not make sense. If you need to force cross domain, make sure you're making a secure request, + * then add a custom header to the request or use `withCredentials`. For more information on what + * triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials). + * In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful + * for understanding when CORS will not be used. + */ + crossDomain?: boolean; + /** + * To send user credentials in a CORS request, set to `true`. To exclude user credentials from + * a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`. + * + * Defaults to `false`. + */ + withCredentials?: boolean; + /** + * The name of your site's XSRF cookie. + */ + xsrfCookieName?: string; + /** + * The name of a custom header that you can use to send your XSRF cookie. + */ + xsrfHeaderName?: string; + /** + * Can be set to change the response type. + * Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`. + * Note that the type of `"document"` (such as an XML document) is ignored if the global context is + * not `Window`. + * + * Defaults to `"json"`. + */ + responseType?: XMLHttpRequestResponseType; + /** + * An optional factory used to create the XMLHttpRequest object used to make the AJAX request. + * This is useful in environments that lack `XMLHttpRequest`, or in situations where you + * wish to override the default `XMLHttpRequest` for some reason. + * + * If not provided, the `XMLHttpRequest` in global scope will be used. + * + * NOTE: This AJAX implementation relies on the built-in serialization and setting + * of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations, + * be sure any implementation you use meets that standard. + */ + createXHR?: () => XMLHttpRequest; + /** + * An observer for watching the upload progress of an HTTP request. Will + * emit progress events, and completes on the final upload load event, will error for + * any XHR error or timeout. + * + * This will **not** error for errored status codes. Rather, it will always _complete_ when + * the HTTP response comes back. + * + * @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and + * {@link includeUploadProgress} instead. Will be removed in v8. + */ + progressSubscriber?: PartialObserver; + /** + * If `true`, will emit all download progress and load complete events as {@link AjaxResponse} + * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. + * + * If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will + * be emitted from the resulting observable. + */ + includeDownloadProgress?: boolean; + /** + * If `true`, will emit all upload progress and load complete events as {@link AjaxResponse} + * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. + * + * If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will + * be emitted from the resulting observable. + */ + includeUploadProgress?: boolean; + /** + * Query string parameters to add to the URL in the request. + * This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer! + * + * Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an + * array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take). + * + * If, for some reason you have a query string in the `url` argument, this will append to the query string in the url, + * but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`, + * with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`. + */ + queryParams?: string | URLSearchParams | Record | [string, string | number | boolean | string[] | number[] | boolean[]][]; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map new file mode 100644 index 0000000..f80f877 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;GAIG;AACH,oBAAY,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD,oBAAY,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAElE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Ae,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAE1C;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,cAAc,CAAC;IAEjC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAEpD;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EACR,MAAM,GACN,eAAe,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,GAC3E,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,EAAE,CAAC;CAC7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/config.d.ts b/node_modules/rxjs/dist/types/internal/config.d.ts new file mode 100644 index 0000000..30fd30b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/config.d.ts @@ -0,0 +1,73 @@ +import { Subscriber } from './Subscriber'; +import { ObservableNotification } from './types'; +/** + * The {@link GlobalConfig} object for RxJS. It is used to configure things + * like how to react on unhandled errors. + */ +export declare const config: GlobalConfig; +/** + * The global configuration object for RxJS, used to configure things + * like how to react on unhandled errors. Accessible via {@link config} + * object. + */ +export interface GlobalConfig { + /** + * A registration point for unhandled errors from RxJS. These are errors that + * cannot were not handled by consuming code in the usual subscription path. For + * example, if you have this configured, and you subscribe to an observable without + * providing an error handler, errors from that subscription will end up here. This + * will _always_ be called asynchronously on another job in the runtime. This is because + * we do not want errors thrown in this user-configured handler to interfere with the + * behavior of the library. + */ + onUnhandledError: ((err: any) => void) | null; + /** + * A registration point for notifications that cannot be sent to subscribers because they + * have completed, errored or have been explicitly unsubscribed. By default, next, complete + * and error notifications sent to stopped subscribers are noops. However, sometimes callers + * might want a different behavior. For example, with sources that attempt to report errors + * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead. + * This will _always_ be called asynchronously on another job in the runtime. This is because + * we do not want errors thrown in this user-configured handler to interfere with the + * behavior of the library. + */ + onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null; + /** + * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach} + * methods. + * + * @deprecated As of version 8, RxJS will no longer support this sort of injection of a + * Promise constructor. If you need a Promise implementation other than native promises, + * please polyfill/patch Promise as you see appropriate. Will be removed in v8. + */ + Promise?: PromiseConstructorLike; + /** + * If true, turns on synchronous error rethrowing, which is a deprecated behavior + * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe + * call in a try/catch block. It also enables producer interference, a nasty bug + * where a multicast can be broken for all observers by a downstream consumer with + * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME + * FOR MIGRATION REASONS. + * + * @deprecated As of version 8, RxJS will no longer support synchronous throwing + * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad + * behaviors described above. Will be removed in v8. + */ + useDeprecatedSynchronousErrorHandling: boolean; + /** + * If true, enables an as-of-yet undocumented feature from v5: The ability to access + * `unsubscribe()` via `this` context in `next` functions created in observers passed + * to `subscribe`. + * + * This is being removed because the performance was severely problematic, and it could also cause + * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have + * their `this` context overwritten. + * + * @deprecated As of version 8, RxJS will no longer support altering the + * context of next functions provided as part of an observer to Subscribe. Instead, + * you will have access to a subscription or a signal or token that will allow you to do things like + * unsubscribe and test closed status. Will be removed in v8. + */ + useDeprecatedNextContext: boolean; +} +//# sourceMappingURL=config.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/config.d.ts.map b/node_modules/rxjs/dist/types/internal/config.d.ts.map new file mode 100644 index 0000000..d18c18f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/config.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,YAMpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAE9C;;;;;;;;;OASG;IACH,qBAAqB,EAAE,CAAC,CAAC,YAAY,EAAE,sBAAsB,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAEjH;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,qCAAqC,EAAE,OAAO,CAAC;IAE/C;;;;;;;;;;;;;OAaG;IACH,wBAAwB,EAAE,OAAO,CAAC;CACnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts new file mode 100644 index 0000000..fb72678 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts @@ -0,0 +1,7 @@ +import { Observable } from './Observable'; +export interface FirstValueFromConfig { + defaultValue: T; +} +export declare function firstValueFrom(source: Observable, config: FirstValueFromConfig): Promise; +export declare function firstValueFrom(source: Observable): Promise; +//# sourceMappingURL=firstValueFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map new file mode 100644 index 0000000..35a6fbc --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"firstValueFrom.d.ts","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7G,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts new file mode 100644 index 0000000..415d601 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts @@ -0,0 +1,7 @@ +import { Observable } from './Observable'; +export interface LastValueFromConfig { + defaultValue: T; +} +export declare function lastValueFrom(source: Observable, config: LastValueFromConfig): Promise; +export declare function lastValueFrom(source: Observable): Promise; +//# sourceMappingURL=lastValueFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map new file mode 100644 index 0000000..70c2cf9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lastValueFrom.d.ts","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3G,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts new file mode 100644 index 0000000..321d1d5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts @@ -0,0 +1,42 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +/** + * @class ConnectableObservable + * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. + * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator + * instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare class ConnectableObservable extends Observable { + source: Observable; + protected subjectFactory: () => Subject; + protected _subject: Subject | null; + protected _refCount: number; + protected _connection: Subscription | null; + /** + * @param source The source observable + * @param subjectFactory The factory that creates the subject used internally. + * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. + * `new ConnectableObservable(source, factory)` is equivalent to + * `connectable(source, { connector: factory })`. + * When the `refCount()` method is needed, the {@link share} operator should be used instead: + * `new ConnectableObservable(source, factory).refCount()` is equivalent to + * `source.pipe(share({ connector: factory }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ + constructor(source: Observable, subjectFactory: () => Subject); + protected getSubject(): Subject; + protected _teardown(): void; + /** + * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ + connect(): Subscription; + /** + * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ + refCount(): Observable; +} +//# sourceMappingURL=ConnectableObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map new file mode 100644 index 0000000..b2d33a6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ConnectableObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAK/C;;;;;;GAMG;AACH,qBAAa,qBAAqB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAgBtC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAAE,SAAS,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;IAfpF,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAQ;IAC7C,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAChC,SAAS,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAQ;IAElD;;;;;;;;;;OAUG;gBACgB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAY,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;IAepF,SAAS,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC;IAQlC,SAAS,CAAC,SAAS;IAOnB;;;OAGG;IACH,OAAO,IAAI,YAAY;IA+BvB;;;OAGG;IACH,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC;CAG1B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts new file mode 100644 index 0000000..a2b8235 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts @@ -0,0 +1,5 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +export declare function bindCallback(callbackFunc: (...args: any[]) => void, resultSelector: (...args: any[]) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable; +export declare function bindCallback(callbackFunc: (...args: [...A, (...res: R) => void]) => void, schedulerLike?: SchedulerLike): (...arg: A) => Observable; +//# sourceMappingURL=bindCallback.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map new file mode 100644 index 0000000..d4f6854 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallback.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,YAAY,CAC1B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACtC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvC,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAGvC,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACrF,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,EAC5D,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts new file mode 100644 index 0000000..52aed49 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts @@ -0,0 +1,4 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +export declare function bindCallbackInternals(isNodeStyle: boolean, callbackFunc: any, resultSelector?: any, scheduler?: SchedulerLike): (...args: any[]) => Observable; +//# sourceMappingURL=bindCallbackInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map new file mode 100644 index 0000000..2803f25 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bindCallbackInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,GAAG,EACjB,cAAc,CAAC,EAAE,GAAG,EACpB,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,OAAO,CAAC,CAyGzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts new file mode 100644 index 0000000..1ecb72c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +export declare function bindNodeCallback(callbackFunc: (...args: any[]) => void, resultSelector: (...args: any[]) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable; +export declare function bindNodeCallback(callbackFunc: (...args: [...A, (err: any, ...res: R) => void]) => void, schedulerLike?: SchedulerLike): (...arg: A) => Observable; +//# sourceMappingURL=bindNodeCallback.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map new file mode 100644 index 0000000..05a49d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bindNodeCallback.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACtC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvC,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAGvC,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACzF,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,EACtE,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts new file mode 100644 index 0000000..d3623b5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts @@ -0,0 +1,33 @@ +import { Observable } from '../Observable'; +import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types'; +import { Subscriber } from '../Subscriber'; +import { AnyCatcher } from '../AnyCatcher'; +/** + * You have passed `any` here, we can't figure out if it is + * an array or an object, so you're getting `unknown`. Use better types. + * @param arg Something typed as `any` + */ +export declare function combineLatest(arg: T): Observable; +export declare function combineLatest(sources: []): Observable; +export declare function combineLatest(sources: readonly [...ObservableInputTuple]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function combineLatest(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R, scheduler: SchedulerLike): Observable; +export declare function combineLatest(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function combineLatest(sources: readonly [...ObservableInputTuple], scheduler: SchedulerLike): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export declare function combineLatest(...sources: [...ObservableInputTuple]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function combineLatest(...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple, (...values: A) => R, SchedulerLike]): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export declare function combineLatest(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function combineLatest(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): Observable; +export declare function combineLatest(sourcesObject: { + [K in any]: never; +}): Observable; +export declare function combineLatest>>(sourcesObject: T): Observable<{ + [K in keyof T]: ObservedValueOf; +}>; +export declare function combineLatestInit(observables: ObservableInput[], scheduler?: SchedulerLike, valueTransform?: (values: any[]) => any): (subscriber: Subscriber) => void; +//# sourceMappingURL=combineLatest.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map new file mode 100644 index 0000000..f144af4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE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,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,EACnC,SAAS,CAAC,EAAE,aAAa,EACzB,cAAc,GAAE,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,GAAc,gBAE7B,WAAW,GAAG,CAAC,UA0DpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts new file mode 100644 index 0000000..9fce40b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple, SchedulerLike } from '../types'; +export declare function concat(...inputs: [...ObservableInputTuple]): Observable; +export declare function concat(...inputsAndScheduler: [...ObservableInputTuple, SchedulerLike]): Observable; +//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map new file mode 100644 index 0000000..5b193c4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK/D,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrH,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EACjD,GAAG,kBAAkB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GACjE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts new file mode 100644 index 0000000..fca54b4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts @@ -0,0 +1,27 @@ +import { Connectable, ObservableInput, SubjectLike } from '../types'; +export interface ConnectableConfig { + /** + * A factory function used to create the Subject through which the source + * is multicast. By default this creates a {@link Subject}. + */ + connector: () => SubjectLike; + /** + * If true, the resulting observable will reset internal state upon disconnection + * and return to a "cold" state. This allows the resulting observable to be + * reconnected. + * If false, upon disconnection, the connecting subject will remain the + * connecting subject, meaning the resulting observable will not go "cold" again, + * and subsequent repeats or resubscriptions will resubscribe to that same subject. + */ + resetOnDisconnect?: boolean; +} +/** + * Creates an observable that multicasts once `connect()` is called on it. + * + * @param source The observable source to make connectable. + * @param config The configuration object for `connectable`. + * @returns A "connectable" observable, that has a `connect()` method, that you must call to + * connect the source to all consumers through the subject provided as the connector. + */ +export declare function connectable(source: ObservableInput, config?: ConnectableConfig): Connectable; +//# sourceMappingURL=connectable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map new file mode 100644 index 0000000..110fd5e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"connectable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMrE,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,GAAE,iBAAiB,CAAC,CAAC,CAAkB,GAAG,WAAW,CAAC,CAAC,CAAC,CAwBxH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts new file mode 100644 index 0000000..db8e8be --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts @@ -0,0 +1,52 @@ +import { Observable } from '../Observable'; +import { ObservedValueOf, ObservableInput } from '../types'; +/** + * Creates an Observable that, on subscribe, calls an Observable factory to + * make an Observable for each new Observer. + * + * Creates the Observable lazily, that is, only when it + * is subscribed. + * + * + * ![](defer.png) + * + * `defer` allows you to create an Observable only when the Observer + * subscribes. It waits until an Observer subscribes to it, calls the given + * factory function to get an Observable -- where a factory function typically + * generates a new Observable -- and subscribes the Observer to this Observable. + * In case the factory function returns a falsy value, then EMPTY is used as + * Observable instead. Last but not least, an exception during the factory + * function call is transferred to the Observer by calling `error`. + * + * ## Example + * + * Subscribe to either an Observable of clicks or an Observable of interval, at random + * + * ```ts + * import { defer, fromEvent, interval } from 'rxjs'; + * + * const clicksOrInterval = defer(() => { + * return Math.random() > 0.5 + * ? fromEvent(document, 'click') + * : interval(1000); + * }); + * clicksOrInterval.subscribe(x => console.log(x)); + * + * // Results in the following behavior: + * // If the result of Math.random() is greater than 0.5 it will listen + * // for clicks anywhere on the "document"; when document is clicked it + * // will log a MouseEvent object to the console. If the result is less + * // than 0.5 it will emit ascending numbers, one every second(1000ms). + * ``` + * + * @see {@link Observable} + * + * @param {function(): ObservableInput} observableFactory The Observable + * factory function to invoke for each Observer that subscribes to the output + * Observable. May also return a Promise, which will be converted on the fly + * to an Observable. + * @return {Observable} An Observable whose Observers' subscriptions trigger + * an invocation of the given Observable factory function. + */ +export declare function defer>(observableFactory: () => R): Observable>; +//# sourceMappingURL=defer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map new file mode 100644 index 0000000..38eff35 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defer.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAIhH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts new file mode 100644 index 0000000..d0f48c2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts @@ -0,0 +1,173 @@ +import { AnonymousSubject } from '../../Subject'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Observer, NextObserver } from '../../types'; +/** + * WebSocketSubjectConfig is a plain Object that allows us to make our + * webSocket configurable. + * + * Provides flexibility to {@link webSocket} + * + * It defines a set of properties to provide custom behavior in specific + * moments of the socket's lifecycle. When the connection opens we can + * use `openObserver`, when the connection is closed `closeObserver`, if we + * are interested in listening for data coming from server: `deserializer`, + * which allows us to customize the deserialization strategy of data before passing it + * to the socket client. By default, `deserializer` is going to apply `JSON.parse` to each message coming + * from the Server. + * + * ## Examples + * + * **deserializer**, the default for this property is `JSON.parse` but since there are just two options + * for incoming data, either be text or binary data. We can apply a custom deserialization strategy + * or just simply skip the default behaviour. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * //Apply any transformation of your choice. + * deserializer: ({ data }) => data + * }); + * + * wsSubject.subscribe(console.log); + * + * // Let's suppose we have this on the Server: ws.send('This is a msg from the server') + * //output + * // + * // This is a msg from the server + * ``` + * + * **serializer** allows us to apply custom serialization strategy but for the outgoing messages. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * // Apply any transformation of your choice. + * serializer: msg => JSON.stringify({ channel: 'webDevelopment', msg: msg }) + * }); + * + * wsSubject.subscribe(() => subject.next('msg to the server')); + * + * // Let's suppose we have this on the Server: + * // ws.on('message', msg => console.log); + * // ws.send('This is a msg from the server'); + * // output at server side: + * // + * // {"channel":"webDevelopment","msg":"msg to the server"} + * ``` + * + * **closeObserver** allows us to set a custom error when an error raises up. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * closeObserver: { + * next() { + * const customError = { code: 6666, reason: 'Custom evil reason' } + * console.log(`code: ${ customError.code }, reason: ${ customError.reason }`); + * } + * } + * }); + * + * // output + * // code: 6666, reason: Custom evil reason + * ``` + * + * **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the + * webSocket or sending notification that the connection was successful, this is when + * openObserver is useful for. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * openObserver: { + * next: () => { + * console.log('Connection ok'); + * } + * } + * }); + * + * // output + * // Connection ok + * ``` + */ +export interface WebSocketSubjectConfig { + /** The url of the socket server to connect to */ + url: string; + /** The protocol to use to connect */ + protocol?: string | Array; + /** @deprecated Will be removed in v8. Use {@link deserializer} instead. */ + resultSelector?: (e: MessageEvent) => T; + /** + * A serializer used to create messages from passed values before the + * messages are sent to the server. Defaults to JSON.stringify. + */ + serializer?: (value: T) => WebSocketMessage; + /** + * A deserializer used for messages arriving on the socket from the + * server. Defaults to JSON.parse. + */ + deserializer?: (e: MessageEvent) => T; + /** + * An Observer that watches when open events occur on the underlying web socket. + */ + openObserver?: NextObserver; + /** + * An Observer that watches when close events occur on the underlying web socket + */ + closeObserver?: NextObserver; + /** + * An Observer that watches when a close is about to occur due to + * unsubscription. + */ + closingObserver?: NextObserver; + /** + * A WebSocket constructor to use. This is useful for situations like using a + * WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket + * for testing purposes + */ + WebSocketCtor?: { + new (url: string, protocols?: string | string[]): WebSocket; + }; + /** Sets the `binaryType` property of the underlying WebSocket. */ + binaryType?: 'blob' | 'arraybuffer'; +} +export declare type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView; +export declare class WebSocketSubject extends AnonymousSubject { + private _config; + private _socket; + constructor(urlConfigOrSource: string | WebSocketSubjectConfig | Observable, destination?: Observer); + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + lift(operator: Operator): WebSocketSubject; + private _resetState; + /** + * Creates an {@link Observable}, that when subscribed to, sends a message, + * defined by the `subMsg` function, to the server over the socket to begin a + * subscription to data over that socket. Once data arrives, the + * `messageFilter` argument will be used to select the appropriate data for + * the resulting Observable. When finalization occurs, either due to + * unsubscription, completion, or error, a message defined by the `unsubMsg` + * argument will be sent to the server over the WebSocketSubject. + * + * @param subMsg A function to generate the subscription message to be sent to + * the server. This will still be processed by the serializer in the + * WebSocketSubject's config. (Which defaults to JSON serialization) + * @param unsubMsg A function to generate the unsubscription message to be + * sent to the server at finalization. This will still be processed by the + * serializer in the WebSocketSubject's config. + * @param messageFilter A predicate for selecting the appropriate messages + * from the server for the output stream. + */ + multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean): Observable; + private _connectSocket; + unsubscribe(): void; +} +//# sourceMappingURL=WebSocketSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map new file mode 100644 index 0000000..173c4d4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WebSocketSubject.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,2EAA2E;IAC3E,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,gBAAgB,CAAC;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,CAAC,CAAC;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACzC;;;OAGG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE;QAAE,KAAK,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAC;IAChF,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CACrC;AAWD,oBAAY,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI,GAAG,eAAe,CAAC;AAE7E,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAE1D,OAAO,CAAC,OAAO,CAA4B;IAM3C,OAAO,CAAC,OAAO,CAA0B;gBAE7B,iBAAiB,EAAE,MAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IA2B5G,oGAAoG;IACpG,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAOtD,OAAO,CAAC,WAAW;IAQnB;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO;IAkCtF,OAAO,CAAC,cAAc;IA+HtB,WAAW;CAQZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts new file mode 100644 index 0000000..2f7659f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts @@ -0,0 +1,76 @@ +import { Observable } from '../../Observable'; +import { TimestampProvider } from '../../types'; +/** + * An observable of animation frames + * + * Emits the amount of time elapsed since subscription and the timestamp on each animation frame. + * Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own. + * + * Every subscription will start a separate animation loop. Since animation frames are always scheduled + * by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously + * should not be much different or have more overhead than looping over an array of events during + * a single animation frame. However, if for some reason the developer would like to ensure the + * execution of animation-related handlers are all executed during the same task by the engine, + * the `share` operator can be used. + * + * This is useful for setting up animations with RxJS. + * + * ## Examples + * + * Tweening a div to move it on the screen + * + * ```ts + * import { animationFrames, map, takeWhile, endWith } from 'rxjs'; + * + * function tween(start: number, end: number, duration: number) { + * const diff = end - start; + * return animationFrames().pipe( + * // Figure out what percentage of time has passed + * map(({ elapsed }) => elapsed / duration), + * // Take the vector while less than 100% + * takeWhile(v => v < 1), + * // Finish with 100% + * endWith(1), + * // Calculate the distance traveled between start and end + * map(v => v * diff + start) + * ); + * } + * + * // Setup a div for us to move around + * const div = document.createElement('div'); + * document.body.appendChild(div); + * div.style.position = 'absolute'; + * div.style.width = '40px'; + * div.style.height = '40px'; + * div.style.backgroundColor = 'lime'; + * div.style.transform = 'translate3d(10px, 0, 0)'; + * + * tween(10, 200, 4000).subscribe(x => { + * div.style.transform = `translate3d(${ x }px, 0, 0)`; + * }); + * ``` + * + * Providing a custom timestamp provider + * + * ```ts + * import { animationFrames, TimestampProvider } from 'rxjs'; + * + * // A custom timestamp provider + * let now = 0; + * const customTSProvider: TimestampProvider = { + * now() { return now++; } + * }; + * + * const source$ = animationFrames(customTSProvider); + * + * // Log increasing numbers 0...1...2... on every animation frame. + * source$.subscribe(({ elapsed }) => console.log(elapsed)); + * ``` + * + * @param timestampProvider An object with a `now` method that provides a numeric timestamp + */ +export declare function animationFrames(timestampProvider?: TimestampProvider): Observable<{ + timestamp: number; + elapsed: number; +}>; +//# sourceMappingURL=animationFrames.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map new file mode 100644 index 0000000..cf0f7a2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrames.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAgB,eAAe,CAAC,iBAAiB,CAAC,EAAE,iBAAiB;;;GAEpE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts new file mode 100644 index 0000000..f2ded40 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts @@ -0,0 +1,7 @@ +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; +export declare function fromFetch(input: string | Request, init: RequestInit & { + selector: (response: Response) => ObservableInput; +}): Observable; +export declare function fromFetch(input: string | Request, init?: RequestInit): Observable; +//# sourceMappingURL=fetch.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map new file mode 100644 index 0000000..19a860b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,MAAM,GAAG,OAAO,EACvB,IAAI,EAAE,WAAW,GAAG;IAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC;CACtD,GACA,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts new file mode 100644 index 0000000..ed35315 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts @@ -0,0 +1,160 @@ +import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject'; +/** + * Wrapper around the w3c-compatible WebSocket object provided by the browser. + * + * {@link Subject} that communicates with a server via WebSocket + * + * `webSocket` is a factory function that produces a `WebSocketSubject`, + * which can be used to make WebSocket connection with an arbitrary endpoint. + * `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an + * {@link WebSocketSubjectConfig} object for providing additional configuration, as + * well as Observers for tracking lifecycle of WebSocket connection. + * + * When `WebSocketSubject` is subscribed, it attempts to make a socket connection, + * unless there is one made already. This means that many subscribers will always listen + * on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`, + * even if these two were provided with the same url, they will attempt to make separate + * connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed, + * only if there are no more subscribers still listening. If after some time a consumer starts + * subscribing again, connection is reestablished. + * + * Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that + * message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you + * want to customize how deserialization is handled (if at all), you can provide custom `resultSelector` + * function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without + * any errors. If at any point (starting, maintaining or closing a connection) there is an error, + * stream will also error with whatever WebSocket API has thrown. + * + * By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order + * to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind + * that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand, + * before calling `next` with a result. Note also that if at the moment of nexting value + * there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection + * is finally established. `complete` method closes socket connection. `error` does the same, + * as well as notifying the server that something went wrong via status code and string with details of what happened. + * Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`, + * arbitrary values being passed to the `error` method. It needs to be called with an object that has `code` + * property with status code number and optional `reason` property with string describing details + * of an error. + * + * Calling `next` does not affect subscribers of `WebSocketSubject` - they have no + * information that something was sent to the server (unless of course the server + * responds somehow to a message). On the other hand, since calling `complete` triggers + * an attempt to close socket connection. If that connection is closed without any errors, stream will + * complete, thus notifying all subscribers. And since calling `error` closes + * socket connection as well, just with a different status code for the server, if closing itself proceeds + * without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases + * (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream + * will error. + * + * **Multiplexing** + * + * `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is + * used to simulate opening several socket connections, while in reality maintaining only one. + * For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions, + * it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket + * endpoints, running on separate machines with only GUI combining them together. Having a socket connection + * for each functionality could become too resource expensive. It is a common pattern to have single + * WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services). + * Even though there is a single connection in a client app, having the ability to manipulate streams as if it + * were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for + * given service and filter out messages of interest. This is exactly what `multiplex` method is for. + * + * Method accepts three parameters. First two are functions returning subscription and unsubscription messages + * respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable + * subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop + * being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier, + * gateway server can decide that it should connect to real sport news service and start forwarding messages from it. + * Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just + * as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and + * unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server + * might stop sending messages, since it got unsubscription message. This needs to be handled + * on the server or using {@link publish} on a Observable returned from 'multiplex'. + * + * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages + * sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these + * messages with some kind of string identifier on a message object and `messageFilter` would return `true` + * if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped, + * and are not passed down the stream. + * + * Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this + * is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the + * server, use root `WebSocketSubject`. + * + * ## Examples + * + * Listening for messages from the server + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * subject.subscribe({ + * next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server. + * error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error. + * complete: () => console.log('complete') // Called when connection is closed (for whatever reason). + * }); + * ``` + * + * Pushing messages to the server + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * subject.subscribe(); + * // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent, + * // since no connection was established! + * + * subject.next({ message: 'some message' }); + * // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default! + * + * subject.complete(); // Closes the connection. + * + * subject.error({ code: 4000, reason: 'I think our app just broke!' }); + * // Also closes the connection, but let's the server know that this closing is caused by some error. + * ``` + * + * Multiplexing WebSocket + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * const observableA = subject.multiplex( + * () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'... + * () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop. + * message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false. + * ); + * + * const observableB = subject.multiplex( // And the same goes for 'B'. + * () => ({ subscribe: 'B' }), + * () => ({ unsubscribe: 'B' }), + * message => message.type === 'B' + * ); + * + * const subA = observableA.subscribe(messageForA => console.log(messageForA)); + * // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A', + * // which we log here. + * + * const subB = observableB.subscribe(messageForB => console.log(messageForB)); + * // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B', + * // which we log here. + * + * subB.unsubscribe(); + * // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages. + * + * subA.unsubscribe(); + * // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject, + * // socket connection closes. + * ``` + * + * @param {string|WebSocketSubjectConfig} urlConfigOrSource The WebSocket endpoint as an url or an object with + * configuration and additional Observers. + * @return {WebSocketSubject} Subject which allows to both send and receive messages via WebSocket connection. + */ +export declare function webSocket(urlConfigOrSource: string | WebSocketSubjectConfig): WebSocketSubject; +//# sourceMappingURL=webSocket.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map new file mode 100644 index 0000000..e7c38d2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"webSocket.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4JG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAEvG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts new file mode 100644 index 0000000..accaa5b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts @@ -0,0 +1,72 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * A simple Observable that emits no items to the Observer and immediately + * emits a complete notification. + * + * Just emits 'complete', and nothing else. + * + * ![](empty.png) + * + * A simple Observable that only emits the complete notification. It can be used + * for composing with other Observables, such as in a {@link mergeMap}. + * + * ## Examples + * + * Log complete notification + * + * ```ts + * import { EMPTY } from 'rxjs'; + * + * EMPTY.subscribe({ + * next: () => console.log('Next'), + * complete: () => console.log('Complete!') + * }); + * + * // Outputs + * // Complete! + * ``` + * + * Emit the number 7, then complete + * + * ```ts + * import { EMPTY, startWith } from 'rxjs'; + * + * const result = EMPTY.pipe(startWith(7)); + * result.subscribe(x => console.log(x)); + * + * // Outputs + * // 7 + * ``` + * + * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'` + * + * ```ts + * import { interval, mergeMap, of, EMPTY } from 'rxjs'; + * + * const interval$ = interval(1000); + * const result = interval$.pipe( + * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY), + * ); + * result.subscribe(x => console.log(x)); + * + * // Results in the following to the console: + * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...) + * // x will occur every 1000ms + * // if x % 2 is equal to 1, print a, b, c (each on its own) + * // if x % 2 is not equal to 1, nothing will be output + * ``` + * + * @see {@link Observable} + * @see {@link NEVER} + * @see {@link of} + * @see {@link throwError} + */ +export declare const EMPTY: Observable; +/** + * @param scheduler A {@link SchedulerLike} to use for scheduling + * the emission of the complete notification. + * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8. + */ +export declare function empty(scheduler?: SchedulerLike): Observable; +//# sourceMappingURL=empty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map new file mode 100644 index 0000000..0192112 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,KAAK,mBAA+D,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,SAAS,CAAC,EAAE,aAAa,qBAE9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts new file mode 100644 index 0000000..e36c9a4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts @@ -0,0 +1,24 @@ +import { Observable } from '../Observable'; +import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types'; +import { AnyCatcher } from '../AnyCatcher'; +/** + * You have passed `any` here, we can't figure out if it is + * an array or an object, so you're getting `unknown`. Use better types. + * @param arg Something typed as `any` + */ +export declare function forkJoin(arg: T): Observable; +export declare function forkJoin(scheduler: null | undefined): Observable; +export declare function forkJoin(sources: readonly []): Observable; +export declare function forkJoin(sources: readonly [...ObservableInputTuple]): Observable; +export declare function forkJoin(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export declare function forkJoin(...sources: [...ObservableInputTuple]): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export declare function forkJoin(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; +export declare function forkJoin(sourcesObject: { + [K in any]: never; +}): Observable; +export declare function forkJoin>>(sourcesObject: T): Observable<{ + [K in keyof T]: ObservedValueOf; +}>; +//# sourceMappingURL=forkJoin.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map new file mode 100644 index 0000000..540b349 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"forkJoin.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOlF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AAG5E,wBAAgB,QAAQ,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAG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AAC;CAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/from.d.ts b/node_modules/rxjs/dist/types/internal/observable/from.d.ts new file mode 100644 index 0000000..f9fd3ff --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/from.d.ts @@ -0,0 +1,6 @@ +import { Observable } from '../Observable'; +import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types'; +export declare function from>(input: O): Observable>; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function from>(input: O, scheduler: SchedulerLike | undefined): Observable>; +//# sourceMappingURL=from.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map new file mode 100644 index 0000000..c891cc0 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"from.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3E,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,8IAA8I;AAC9I,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts new file mode 100644 index 0000000..bbc397d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts @@ -0,0 +1,45 @@ +import { Observable } from '../Observable'; +export interface NodeStyleEventEmitter { + addListener(eventName: string | symbol, handler: NodeEventHandler): this; + removeListener(eventName: string | symbol, handler: NodeEventHandler): this; +} +export declare type NodeEventHandler = (...args: any[]) => void; +export interface NodeCompatibleEventEmitter { + addListener(eventName: string, handler: NodeEventHandler): void | {}; + removeListener(eventName: string, handler: NodeEventHandler): void | {}; +} +export interface JQueryStyleEventEmitter { + on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; + off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; +} +export interface EventListenerObject { + handleEvent(evt: E): void; +} +export interface HasEventTargetAddRemove { + addEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject | null, options?: EventListenerOptions | boolean): void; +} +export interface EventListenerOptions { + capture?: boolean; + passive?: boolean; + once?: boolean; +} +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean; + passive?: boolean; +} +export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string): Observable; +export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, resultSelector: (event: T) => R): Observable; +export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, options: EventListenerOptions): Observable; +export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, options: EventListenerOptions, resultSelector: (event: T) => R): Observable; +export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; +export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string, resultSelector: (...args: any[]) => R): Observable; +export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; +export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string, resultSelector: (...args: any[]) => R): Observable; +export declare function fromEvent(target: JQueryStyleEventEmitter | ArrayLike>, eventName: string): Observable; +export declare function fromEvent(target: JQueryStyleEventEmitter | ArrayLike>, eventName: string, resultSelector: (value: T, ...args: any[]) => R): Observable; +//# sourceMappingURL=fromEvent.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map new file mode 100644 index 0000000..4e07aa1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEvent.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC7E;AAED,oBAAY,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAKxD,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;IACrE,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,EAAE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I,EAAE,GAAG,EAAE,KAAK,CAAC,GAC9C,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts new file mode 100644 index 0000000..027d12f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +import { NodeEventHandler } from './fromEvent'; +export declare function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable; +export declare function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable; +//# sourceMappingURL=fromEventPattern.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map new file mode 100644 index 0000000..4f20f46 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fromEventPattern.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,UAAU,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,GAAG,EAC9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,GAChE,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,UAAU,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,GAAG,EAC9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,EACjE,cAAc,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GACrC,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts new file mode 100644 index 0000000..71ec6f5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts @@ -0,0 +1,14 @@ +import { Observable } from '../Observable'; +import { Subscribable } from '../types'; +/** + * Used to convert a subscribable to an observable. + * + * Currently, this is only used within internals. + * + * TODO: Discuss ObservableInput supporting "Subscribable". + * https://github.com/ReactiveX/rxjs/issues/5909 + * + * @param subscribable A subscribable + */ +export declare function fromSubscribable(subscribable: Subscribable): Observable; +//# sourceMappingURL=fromSubscribable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map new file mode 100644 index 0000000..e9ab68c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fromSubscribable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,iBAEhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts new file mode 100644 index 0000000..903b8ea --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts @@ -0,0 +1,311 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +declare type ConditionFunc = (state: S) => boolean; +declare type IterateFunc = (state: S) => S; +declare type ResultFunc = (state: S) => T; +export interface GenerateBaseOptions { + /** + * Initial state. + */ + initialState: S; + /** + * Condition function that accepts state and returns boolean. + * When it returns false, the generator stops. + * If not specified, a generator never stops. + */ + condition?: ConditionFunc; + /** + * Iterate function that accepts state and returns new state. + */ + iterate: IterateFunc; + /** + * SchedulerLike to use for generation process. + * By default, a generator starts immediately. + */ + scheduler?: SchedulerLike; +} +export interface GenerateOptions extends GenerateBaseOptions { + /** + * Result selection function that accepts state and returns a value to emit. + */ + resultSelector: ResultFunc; +} +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * + * ![](generate.png) + * + * ## Examples + * + * Produces sequence of numbers + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1, x => x); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * ``` + * + * Use `asapScheduler` + * + * ```ts + * import { generate, asapScheduler } from 'rxjs'; + * + * const result = generate(1, x => x < 5, x => x * 2, x => x + 1, asapScheduler); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 2 + * // 3 + * // 5 + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {S} initialState Initial state. + * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false). + * @param {function (state: S): S} iterate Iteration step function. + * @param {function (state: S): T} resultSelector Selector function for results produced in the sequence. (deprecated) + * @param {SchedulerLike} [scheduler] A {@link SchedulerLike} on which to run the generator loop. If not provided, defaults to emit immediately. + * @returns {Observable} The generated sequence. + * @deprecated Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8. + */ +export declare function generate(initialState: S, condition: ConditionFunc, iterate: IterateFunc, resultSelector: ResultFunc, scheduler?: SchedulerLike): Observable; +/** + * Generates an Observable by running a state-driven loop + * that emits an element on each iteration. + * + * Use it instead of nexting values in a for loop. + * + * ![](generate.png) + * + * `generate` allows you to create a stream of values generated with a loop very similar to + * a traditional for loop. The first argument of `generate` is a beginning value. The second argument + * is a function that accepts this value and tests if some condition still holds. If it does, + * then the loop continues, if not, it stops. The third value is a function which takes the + * previously defined value and modifies it in some way on each iteration. Note how these three parameters + * are direct equivalents of three expressions in a traditional for loop: the first expression + * initializes some state (for example, a numeric index), the second tests if the loop can perform the next + * iteration (for example, if the index is lower than 10) and the third states how the defined value + * will be modified on every step (for example, the index will be incremented by one). + * + * Return value of a `generate` operator is an Observable that on each loop iteration + * emits a value. First of all, the condition function is ran. If it returns true, then the Observable + * emits the currently stored value (initial value at the first iteration) and finally updates + * that value with iterate function. If at some point the condition returns false, then the Observable + * completes at that moment. + * + * Optionally you can pass a fourth parameter to `generate` - a result selector function which allows you + * to immediately map the value that would normally be emitted by an Observable. + * + * If you find three anonymous functions in `generate` call hard to read, you can provide + * a single object to the operator instead where the object has the properties: `initialState`, + * `condition`, `iterate` and `resultSelector`, which should have respective values that you + * would normally pass to `generate`. `resultSelector` is still optional, but that form + * of calling `generate` allows you to omit `condition` as well. If you omit it, that means + * condition always holds, or in other words the resulting Observable will never complete. + * + * Both forms of `generate` can optionally accept a scheduler. In case of a multi-parameter call, + * scheduler simply comes as a last argument (no matter if there is a `resultSelector` + * function or not). In case of a single-parameter call, you can provide it as a + * `scheduler` property on the object passed to the operator. In both cases, a scheduler decides when + * the next iteration of the loop will happen and therefore when the next value will be emitted + * by the Observable. For example, to ensure that each value is pushed to the Observer + * on a separate task in the event loop, you could use the `async` scheduler. Note that + * by default (when no scheduler is passed) values are simply emitted synchronously. + * + * + * ## Examples + * + * Use with condition and iterate functions + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * Use with condition, iterate and resultSelector functions + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1, x => x * 1000); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 'Complete!' + * ``` + * + * Use with options object + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition(value) { return value < 3; }, + * iterate(value) { return value + 1; }, + * resultSelector(value) { return value * 1000; } + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 'Complete!' + * ``` + * + * Use options object without condition function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * iterate(value) { return value + 1; }, + * resultSelector(value) { return value * 1000; } + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') // This will never run + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 3000 + * // ...and never stops. + * ``` + * + * @see {@link from} + * + * @param {S} initialState Initial state. + * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false). + * @param {function (state: S): S} iterate Iteration step function. + * @param {function (state: S): T} [resultSelector] Selector function for results produced in the sequence. + * @param {Scheduler} [scheduler] A {@link Scheduler} on which to run the generator loop. If not provided, defaults to emitting immediately. + * @return {Observable} The generated sequence. + * @deprecated Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8. + */ +export declare function generate(initialState: S, condition: ConditionFunc, iterate: IterateFunc, scheduler?: SchedulerLike): Observable; +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * The overload accepts options object that might contain initial state, iterate, + * condition and scheduler. + * + * ![](generate.png) + * + * ## Examples + * + * Use options object with condition function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition: x => x < 3, + * iterate: x => x + 1 + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {GenerateBaseOptions} options Object that must contain initialState, iterate and might contain condition and scheduler. + * @returns {Observable} The generated sequence. + */ +export declare function generate(options: GenerateBaseOptions): Observable; +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * The overload accepts options object that might contain initial state, iterate, + * condition, result selector and scheduler. + * + * ![](generate.png) + * + * ## Examples + * + * Use options object with condition and iterate function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition: x => x < 3, + * iterate: x => x + 1, + * resultSelector: x => x + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {GenerateOptions} options Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler. + * @returns {Observable} The generated sequence. + */ +export declare function generate(options: GenerateOptions): Observable; +export {}; +//# sourceMappingURL=generate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map new file mode 100644 index 0000000..74351c1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAK1D,aAAK,aAAa,CAAC,CAAC,IAAI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,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EACvB,SAAS,CAAC,EAAE,aAAa,GACxB,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts new file mode 100644 index 0000000..cc04914 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts @@ -0,0 +1,82 @@ +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; +/** + * Checks a boolean at subscription time, and chooses between one of two observable sources + * + * `iif` expects a function that returns a boolean (the `condition` function), and two sources, + * the `trueResult` and the `falseResult`, and returns an Observable. + * + * At the moment of subscription, the `condition` function is called. If the result is `true`, the + * subscription will be to the source passed as the `trueResult`, otherwise, the subscription will be + * to the source passed as the `falseResult`. + * + * If you need to check more than two options to choose between more than one observable, have a look at the {@link defer} creation method. + * + * ## Examples + * + * Change at runtime which Observable will be subscribed + * + * ```ts + * import { iif, of } from 'rxjs'; + * + * let subscribeToFirst; + * const firstOrSecond = iif( + * () => subscribeToFirst, + * of('first'), + * of('second') + * ); + * + * subscribeToFirst = true; + * firstOrSecond.subscribe(value => console.log(value)); + * + * // Logs: + * // 'first' + * + * subscribeToFirst = false; + * firstOrSecond.subscribe(value => console.log(value)); + * + * // Logs: + * // 'second' + * ``` + * + * Control access to an Observable + * + * ```ts + * import { iif, of, EMPTY } from 'rxjs'; + * + * let accessGranted; + * const observableIfYouHaveAccess = iif( + * () => accessGranted, + * of('It seems you have an access...'), + * EMPTY + * ); + * + * accessGranted = true; + * observableIfYouHaveAccess.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('The end') + * }); + * + * // Logs: + * // 'It seems you have an access...' + * // 'The end' + * + * accessGranted = false; + * observableIfYouHaveAccess.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('The end') + * }); + * + * // Logs: + * // 'The end' + * ``` + * + * @see {@link defer} + * + * @param condition Condition which Observable should be chosen. + * @param trueResult An Observable that will be subscribed if condition is true. + * @param falseResult An Observable that will be subscribed if condition is false. + * @return An observable that proxies to `trueResult` or `falseResult`, depending on the result of the `condition` function. + */ +export declare function iif(condition: () => boolean, trueResult: ObservableInput, falseResult: ObservableInput): Observable; +//# sourceMappingURL=iif.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map new file mode 100644 index 0000000..bc076de --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"iif.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAEtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts new file mode 100644 index 0000000..1cd0239 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts @@ -0,0 +1,21 @@ +import { Observable } from '../Observable'; +import { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types'; +export declare function innerFrom>(input: O): Observable>; +/** + * Creates an RxJS Observable from an object that implements `Symbol.observable`. + * @param obj An object that properly implements `Symbol.observable`. + */ +export declare function fromInteropObservable(obj: any): Observable; +/** + * Synchronously emits the values of an array like and completes. + * This is exported because there are creation functions and operators that need to + * make direct use of the same logic, and there's no reason to make them run through + * `from` conditionals because we *know* they're dealing with an array. + * @param array The array to emit values from + */ +export declare function fromArrayLike(array: ArrayLike): Observable; +export declare function fromPromise(promise: PromiseLike): Observable; +export declare function fromIterable(iterable: Iterable): Observable; +export declare function fromAsyncIterable(asyncIterable: AsyncIterable): Observable; +export declare function fromReadableStreamLike(readableStream: ReadableStreamLike): Observable; +//# sourceMappingURL=innerFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map new file mode 100644 index 0000000..e6c03b7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"innerFrom.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAWhF,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AA6BpG;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,iBAShD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,iBAgBnD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,iBAcrD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAUpD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,iBAInE;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC,iBAE9E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts new file mode 100644 index 0000000..1f499b5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts @@ -0,0 +1,49 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * Creates an Observable that emits sequential numbers every specified + * interval of time, on a specified {@link SchedulerLike}. + * + * Emits incremental numbers periodically in time. + * + * ![](interval.png) + * + * `interval` returns an Observable that emits an infinite sequence of + * ascending integers, with a constant interval of time of your choosing + * between those emissions. The first emission is not sent immediately, but + * only after the first period has passed. By default, this operator uses the + * `async` {@link SchedulerLike} to provide a notion of time, but you may pass any + * {@link SchedulerLike} to it. + * + * ## Example + * + * Emits ascending numbers, one every second (1000ms) up to the number 3 + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const numbers = interval(1000); + * + * const takeFourNumbers = numbers.pipe(take(4)); + * + * takeFourNumbers.subscribe(x => console.log('Next: ', x)); + * + * // Logs: + * // Next: 0 + * // Next: 1 + * // Next: 2 + * // Next: 3 + * ``` + * + * @see {@link timer} + * @see {@link delay} + * + * @param {number} [period=0] The interval size in milliseconds (by default) + * or the time unit determined by the scheduler's clock. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for scheduling + * the emission of values, and providing a notion of "time". + * @return {Observable} An Observable that emits a sequential number each time + * interval. + */ +export declare function interval(period?: number, scheduler?: SchedulerLike): Observable; +//# sourceMappingURL=interval.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map new file mode 100644 index 0000000..9bf6450 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interval.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAI,EAAE,SAAS,GAAE,aAA8B,GAAG,UAAU,CAAC,MAAM,CAAC,CAOlG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts new file mode 100644 index 0000000..a1ca048 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple, SchedulerLike } from '../types'; +export declare function merge(...sources: [...ObservableInputTuple]): Observable; +export declare function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number?]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function merge(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike?]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function merge(...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number?, SchedulerLike?]): Observable; +//# sourceMappingURL=merge.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map new file mode 100644 index 0000000..e6d79d2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAmB,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOhF,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrH,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5I,6JAA6J;AAC7J,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAChD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,GACnE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACzB,6JAA6J;AAC7J,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAChD,GAAG,iCAAiC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC,GAC1F,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/never.d.ts b/node_modules/rxjs/dist/types/internal/observable/never.d.ts new file mode 100644 index 0000000..ba889e1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/never.d.ts @@ -0,0 +1,40 @@ +import { Observable } from '../Observable'; +/** + * An Observable that emits no items to the Observer and never completes. + * + * ![](never.png) + * + * A simple Observable that emits neither values nor errors nor the completion + * notification. It can be used for testing purposes or for composing with other + * Observables. Please note that by never emitting a complete notification, this + * Observable keeps the subscription from being disposed automatically. + * Subscriptions need to be manually disposed. + * + * ## Example + * + * Emit the number 7, then never emit anything else (not even complete) + * + * ```ts + * import { NEVER, startWith } from 'rxjs'; + * + * const info = () => console.log('Will not be called'); + * + * const result = NEVER.pipe(startWith(7)); + * result.subscribe({ + * next: x => console.log(x), + * error: info, + * complete: info + * }); + * ``` + * + * @see {@link Observable} + * @see {@link EMPTY} + * @see {@link of} + * @see {@link throwError} + */ +export declare const NEVER: Observable; +/** + * @deprecated Replaced with the {@link NEVER} constant. Will be removed in v8. + */ +export declare function never(): Observable; +//# sourceMappingURL=never.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map new file mode 100644 index 0000000..1adf3d4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"never.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,KAAK,mBAA8B,CAAC;AAEjD;;GAEG;AACH,wBAAgB,KAAK,sBAEpB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/of.d.ts b/node_modules/rxjs/dist/types/internal/observable/of.d.ts new file mode 100644 index 0000000..29faae9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/of.d.ts @@ -0,0 +1,14 @@ +import { SchedulerLike, ValueFromArray } from '../types'; +import { Observable } from '../Observable'; +export declare function of(value: null): Observable; +export declare function of(value: undefined): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function of(scheduler: SchedulerLike): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function of(...valuesAndScheduler: [...A, SchedulerLike]): Observable>; +export declare function of(): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export declare function of(): Observable; +export declare function of(value: T): Observable; +export declare function of(...values: A): Observable>; +//# sourceMappingURL=of.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map new file mode 100644 index 0000000..f949aec --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"of.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,wBAAgB,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AAClD,wBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5D,8IAA8I;AAC9I,wBAAgB,EAAE,CAAC,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAChE,8IAA8I;AAC9I,wBAAgB,EAAE,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9H,wBAAgB,EAAE,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;AACxC,0IAA0I;AAC1I,wBAAgB,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;AACvC,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/C,wBAAgB,EAAE,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts new file mode 100644 index 0000000..503ba42 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple } from '../types'; +export declare function onErrorResumeNext(sources: [...ObservableInputTuple]): Observable; +export declare function onErrorResumeNext(...sources: [...ObservableInputTuple]): Observable; +//# sourceMappingURL=onErrorResumeNext.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map new file mode 100644 index 0000000..2886c57 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNext.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9H,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts new file mode 100644 index 0000000..35ba244 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts @@ -0,0 +1,19 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export declare function pairs(arr: readonly T[], scheduler?: SchedulerLike): Observable<[string, T]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export declare function pairs>(obj: O, scheduler?: SchedulerLike): Observable<[keyof O, O[keyof O]]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export declare function pairs(iterable: Iterable, scheduler?: SchedulerLike): Observable<[string, T]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export declare function pairs(n: number | bigint | boolean | ((...args: any[]) => any) | symbol, scheduler?: SchedulerLike): Observable<[never, never]>; +//# sourceMappingURL=pairs.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map new file mode 100644 index 0000000..b808386 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pairs.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAChG;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/H;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AACpG;;GAEG;AACH,wBAAgB,KAAK,CACnB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,MAAM,EACjE,SAAS,CAAC,EAAE,aAAa,GACxB,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts new file mode 100644 index 0000000..d19c26d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts @@ -0,0 +1,9 @@ +import { ObservableInput } from '../types'; +import { Observable } from '../Observable'; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function partition(source: ObservableInput, predicate: (this: A, value: T, index: number) => value is U, thisArg: A): [Observable, Observable>]; +export declare function partition(source: ObservableInput, predicate: (value: T, index: number) => value is U): [Observable, Observable>]; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function partition(source: ObservableInput, predicate: (this: A, value: T, index: number) => boolean, thisArg: A): [Observable, Observable]; +export declare function partition(source: ObservableInput, predicate: (value: T, index: number) => boolean): [Observable, Observable]; +//# sourceMappingURL=partition.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map new file mode 100644 index 0000000..3fd8d68 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACzC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAC3D,OAAO,EAAE,CAAC,GACT,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GACjD,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EACxD,OAAO,EAAE,CAAC,GACT,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/race.d.ts b/node_modules/rxjs/dist/types/internal/observable/race.d.ts new file mode 100644 index 0000000..a1ed4aa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/race.d.ts @@ -0,0 +1,12 @@ +import { Observable } from '../Observable'; +import { ObservableInput, ObservableInputTuple } from '../types'; +import { Subscriber } from '../Subscriber'; +export declare function race(inputs: [...ObservableInputTuple]): Observable; +export declare function race(...inputs: [...ObservableInputTuple]): Observable; +/** + * An observable initializer function for both the static version and the + * operator version of race. + * @param sources The sources to race + */ +export declare function raceInit(sources: ObservableInput[]): (subscriber: Subscriber) => void; +//# sourceMappingURL=race.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map new file mode 100644 index 0000000..344f52d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"race.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAChH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AA+CnH;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,gBACnC,WAAW,CAAC,CAAC,UAyBlC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/range.d.ts b/node_modules/rxjs/dist/types/internal/observable/range.d.ts new file mode 100644 index 0000000..87fcbb1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/range.d.ts @@ -0,0 +1,8 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +export declare function range(start: number, count?: number): Observable; +/** + * @deprecated The `scheduler` parameter will be removed in v8. Use `range(start, count).pipe(observeOn(scheduler))` instead. Details: Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export declare function range(start: number, count: number | undefined, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=range.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map new file mode 100644 index 0000000..489b6dd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEzE;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts new file mode 100644 index 0000000..cd26716 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts @@ -0,0 +1,115 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * Creates an observable that will create an error instance and push it to the consumer as an error + * immediately upon subscription. + * + * Just errors and does nothing else + * + * ![](throw.png) + * + * This creation function is useful for creating an observable that will create an error and error every + * time it is subscribed to. Generally, inside of most operators when you might want to return an errored + * observable, this is unnecessary. In most cases, such as in the inner return of {@link concatMap}, + * {@link mergeMap}, {@link defer}, and many others, you can simply throw the error, and RxJS will pick + * that up and notify the consumer of the error. + * + * ## Example + * + * Create a simple observable that will create a new error with a timestamp and log it + * and the message every time you subscribe to it + * + * ```ts + * import { throwError } from 'rxjs'; + * + * let errorCount = 0; + * + * const errorWithTimestamp$ = throwError(() => { + * const error: any = new Error(`This is error number ${ ++errorCount }`); + * error.timestamp = Date.now(); + * return error; + * }); + * + * errorWithTimestamp$.subscribe({ + * error: err => console.log(err.timestamp, err.message) + * }); + * + * errorWithTimestamp$.subscribe({ + * error: err => console.log(err.timestamp, err.message) + * }); + * + * // Logs the timestamp and a new error message for each subscription + * ``` + * + * ### Unnecessary usage + * + * Using `throwError` inside of an operator or creation function + * with a callback, is usually not necessary + * + * ```ts + * import { of, concatMap, timer, throwError } from 'rxjs'; + * + * const delays$ = of(1000, 2000, Infinity, 3000); + * + * delays$.pipe( + * concatMap(ms => { + * if (ms < 10000) { + * return timer(ms); + * } else { + * // This is probably overkill. + * return throwError(() => new Error(`Invalid time ${ ms }`)); + * } + * }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * You can just throw the error instead + * + * ```ts + * import { of, concatMap, timer } from 'rxjs'; + * + * const delays$ = of(1000, 2000, Infinity, 3000); + * + * delays$.pipe( + * concatMap(ms => { + * if (ms < 10000) { + * return timer(ms); + * } else { + * // Cleaner and easier to read for most folks. + * throw new Error(`Invalid time ${ ms }`); + * } + * }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * @param errorFactory A factory function that will create the error instance that is pushed. + */ +export declare function throwError(errorFactory: () => any): Observable; +/** + * Returns an observable that will error with the specified error immediately upon subscription. + * + * @param error The error instance to emit + * @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is + * because it will create the error at the moment it should be created and capture a more appropriate stack trace. If + * for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`. + */ +export declare function throwError(error: any): Observable; +/** + * Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription. + * + * @param errorOrErrorFactory An error instance or error factory + * @param scheduler A scheduler to use to schedule the error notification + * @deprecated The `scheduler` parameter will be removed in v8. + * Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`. + * Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export declare function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=throwError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map new file mode 100644 index 0000000..1902a9c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throwError.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,mBAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts new file mode 100644 index 0000000..d3f396e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts @@ -0,0 +1,126 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * Creates an observable that will wait for a specified time period, or exact date, before + * emitting the number 0. + * + * Used to emit a notification after a delay. + * + * This observable is useful for creating delays in code, or racing against other values + * for ad-hoc timeouts. + * + * The `delay` is specified by default in milliseconds, however providing a custom scheduler could + * create a different behavior. + * + * ## Examples + * + * Wait 3 seconds and start another observable + * + * You might want to use `timer` to delay subscription to an + * observable by a set amount of time. Here we use a timer with + * {@link concatMapTo} or {@link concatMap} in order to wait + * a few seconds and start a subscription to a source. + * + * ```ts + * import { of, timer, concatMap } from 'rxjs'; + * + * // This could be any observable + * const source = of(1, 2, 3); + * + * timer(3000) + * .pipe(concatMap(() => source)) + * .subscribe(console.log); + * ``` + * + * Take all values until the start of the next minute + * + * Using a `Date` as the trigger for the first emission, you can + * do things like wait until midnight to fire an event, or in this case, + * wait until a new minute starts (chosen so the example wouldn't take + * too long to run) in order to stop watching a stream. Leveraging + * {@link takeUntil}. + * + * ```ts + * import { interval, takeUntil, timer } from 'rxjs'; + * + * // Build a Date object that marks the + * // next minute. + * const currentDate = new Date(); + * const startOfNextMinute = new Date( + * currentDate.getFullYear(), + * currentDate.getMonth(), + * currentDate.getDate(), + * currentDate.getHours(), + * currentDate.getMinutes() + 1 + * ); + * + * // This could be any observable stream + * const source = interval(1000); + * + * const result = source.pipe( + * takeUntil(timer(startOfNextMinute)) + * ); + * + * result.subscribe(console.log); + * ``` + * + * ### Known Limitations + * + * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. + * + * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and + * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission + * should occur will be incorrect. In this case, it would be best to do your own calculations + * ahead of time, and pass a `number` in as the `dueTime`. + * + * @param due If a `number`, the amount of time in milliseconds to wait before emitting. + * If a `Date`, the exact time at which to emit. + * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. + */ +export declare function timer(due: number | Date, scheduler?: SchedulerLike): Observable<0>; +/** + * Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` -- + * on each interval after words. + * + * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could + * create a different behavior. + * + * ## Example + * + * ### Start an interval that starts right away + * + * Since {@link interval} waits for the passed delay before starting, + * sometimes that's not ideal. You may want to start an interval immediately. + * `timer` works well for this. Here we have both side-by-side so you can + * see them in comparison. + * + * Note that this observable will never complete. + * + * ```ts + * import { timer, interval } from 'rxjs'; + * + * timer(0, 1000).subscribe(n => console.log('timer', n)); + * interval(1000).subscribe(n => console.log('interval', n)); + * ``` + * + * ### Known Limitations + * + * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. + * + * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and + * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission + * should occur will be incorrect. In this case, it would be best to do your own calculations + * ahead of time, and pass a `number` in as the `startDue`. + * @param startDue If a `number`, is the time to wait before starting the interval. + * If a `Date`, is the exact time at which to start the interval. + * @param intervalDuration The delay between each value emitted in the interval. Passing a + * negative number here will result in immediate completion after the first value is emitted, as though + * no `intervalDuration` was passed at all. + * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. + */ +export declare function timer(startDue: number | Date, intervalDuration: number, scheduler?: SchedulerLike): Observable; +/** + * @deprecated The signature allowing `undefined` to be passed for `intervalDuration` will be removed in v8. Use the `timer(dueTime, scheduler?)` signature instead. + */ +export declare function timer(dueTime: number | Date, unused: undefined, scheduler?: SchedulerLike): Observable<0>; +//# sourceMappingURL=timer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map new file mode 100644 index 0000000..a1e7151 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAExH;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/using.d.ts b/node_modules/rxjs/dist/types/internal/observable/using.d.ts new file mode 100644 index 0000000..a6ccd07 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/using.d.ts @@ -0,0 +1,32 @@ +import { Observable } from '../Observable'; +import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types'; +/** + * Creates an Observable that uses a resource which will be disposed at the same time as the Observable. + * + * Use it when you catch yourself cleaning up after an Observable. + * + * `using` is a factory operator, which accepts two functions. First function returns a disposable resource. + * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with + * that object and should return an Observable. That Observable can use resource object during its execution. + * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor + * resource object will be shared in any way between subscriptions. + * + * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed + * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output + * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself, + * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which + * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone + * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make + * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time. + * + * @see {@link defer} + * + * @param {function(): ISubscription} resourceFactory A function which creates any resource object + * that implements `unsubscribe` method. + * @param {function(resource: ISubscription): Observable} observableFactory A function which + * creates an Observable, that can use injected resource object. + * @return {Observable} An Observable that behaves the same as Observable returned by `observableFactory`, but + * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object. + */ +export declare function using>(resourceFactory: () => Unsubscribable | void, observableFactory: (resource: Unsubscribable | void) => T | void): Observable>; +//# sourceMappingURL=using.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map new file mode 100644 index 0000000..58fe729 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"using.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAClD,eAAe,EAAE,MAAM,cAAc,GAAG,IAAI,EAC5C,iBAAiB,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAC/D,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAchC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts new file mode 100644 index 0000000..67a41d1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts @@ -0,0 +1,7 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple } from '../types'; +export declare function zip(sources: [...ObservableInputTuple]): Observable; +export declare function zip(sources: [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; +export declare function zip(...sources: [...ObservableInputTuple]): Observable; +export declare function zip(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; +//# sourceMappingURL=zip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map new file mode 100644 index 0000000..714dfda --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhD,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACxG,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACjD,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACrC,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,GAClC,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC3G,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACjD,GAAG,wBAAwB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAC7E,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts new file mode 100644 index 0000000..91a0dc7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts @@ -0,0 +1,41 @@ +import { Subscriber } from '../Subscriber'; +/** + * Creates an instance of an `OperatorSubscriber`. + * @param destination The downstream subscriber. + * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any + * error that occurs in this function is caught and sent to the `error` method of this subscriber. + * @param onError Handles errors from the subscription, any errors that occur in this handler are caught + * and send to the `destination` error handler. + * @param onComplete Handles completion notification from the subscription. Any errors that occur in + * this handler are sent to the `destination` error handler. + * @param onFinalize Additional teardown logic here. This will only be called on teardown if the + * subscriber itself is not already closed. This is called after all other teardown logic is executed. + */ +export declare function createOperatorSubscriber(destination: Subscriber, onNext?: (value: T) => void, onComplete?: () => void, onError?: (err: any) => void, onFinalize?: () => void): Subscriber; +/** + * A generic helper for allowing operators to be created with a Subscriber and + * use closures to capture necessary state from the operator function itself. + */ +export declare class OperatorSubscriber extends Subscriber { + private onFinalize?; + private shouldUnsubscribe?; + /** + * Creates an instance of an `OperatorSubscriber`. + * @param destination The downstream subscriber. + * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any + * error that occurs in this function is caught and sent to the `error` method of this subscriber. + * @param onError Handles errors from the subscription, any errors that occur in this handler are caught + * and send to the `destination` error handler. + * @param onComplete Handles completion notification from the subscription. Any errors that occur in + * this handler are sent to the `destination` error handler. + * @param onFinalize Additional finalization logic here. This will only be called on finalization if the + * subscriber itself is not already closed. This is called after all other finalization logic is executed. + * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe. + * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription + * to the resulting observable does not actually disconnect from the source if there are active subscriptions + * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!) + */ + constructor(destination: Subscriber, onNext?: (value: T) => void, onComplete?: () => void, onError?: (err: any) => void, onFinalize?: (() => void) | undefined, shouldUnsubscribe?: (() => boolean) | undefined); + unsubscribe(): void; +} +//# sourceMappingURL=OperatorSubscriber.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map new file mode 100644 index 0000000..3e925bd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"OperatorSubscriber.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,EAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,EACvB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAC5B,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,UAAU,CAAC,CAAC,CAAC,CAEf;AAED;;;GAGG;AACH,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAsBpD,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,iBAAiB,CAAC;IAtB5B;;;;;;;;;;;;;;;OAeG;gBAED,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,EAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,EACvB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EACpB,UAAU,CAAC,SAAQ,IAAI,aAAA,EACvB,iBAAiB,CAAC,SAAQ,OAAO,aAAA;IAoD3C,WAAW;CAQZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts new file mode 100644 index 0000000..9020ef0 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts @@ -0,0 +1,48 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Ignores source values for a duration determined by another Observable, then + * emits the most recent value from the source Observable, then repeats this + * process. + * + * It's like {@link auditTime}, but the silencing + * duration is determined by a second Observable. + * + * ![](audit.svg) + * + * `audit` is similar to `throttle`, but emits the last value from the silenced + * time window, instead of the first value. `audit` emits the most recent value + * from the source Observable on the output Observable as soon as its internal + * timer becomes disabled, and ignores source values while the timer is enabled. + * Initially, the timer is disabled. As soon as the first source value arrives, + * the timer is enabled by calling the `durationSelector` function with the + * source value, which returns the "duration" Observable. When the duration + * Observable emits a value, the timer is disabled, then the most + * recent source value is emitted on the output Observable, and this process + * repeats for the next source value. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, audit, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(audit(ev => interval(1000))); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounce} + * @see {@link delayWhen} + * @see {@link sample} + * @see {@link throttle} + * + * @param durationSelector A function + * that receives a value from the source Observable, for computing the silencing + * duration, returned as an Observable or a Promise. + * @return A function that returns an Observable that performs rate-limiting of + * emissions from the source Observable. + */ +export declare function audit(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=audit.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map new file mode 100644 index 0000000..7a8377e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA2C1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts new file mode 100644 index 0000000..0cf79ab --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts @@ -0,0 +1,50 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Ignores source values for `duration` milliseconds, then emits the most recent + * value from the source Observable, then repeats this process. + * + * When it sees a source value, it ignores that plus + * the next ones for `duration` milliseconds, and then it emits the most recent + * value from the source. + * + * ![](auditTime.png) + * + * `auditTime` is similar to `throttleTime`, but emits the last value from the + * silenced time window, instead of the first value. `auditTime` emits the most + * recent value from the source Observable on the output Observable as soon as + * its internal timer becomes disabled, and ignores source values while the + * timer is enabled. Initially, the timer is disabled. As soon as the first + * source value arrives, the timer is enabled. After `duration` milliseconds (or + * the time unit determined internally by the optional `scheduler`) has passed, + * the timer is disabled, then the most recent source value is emitted on the + * output Observable, and this process repeats for the next source value. + * Optionally takes a {@link SchedulerLike} for managing timers. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, auditTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(auditTime(1000)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sampleTime} + * @see {@link throttleTime} + * + * @param {number} duration Time to wait before emitting the most recent source + * value, measured in milliseconds or the time unit determined internally + * by the optional `scheduler`. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the rate-limiting behavior. + * @return A function that returns an Observable that performs rate-limiting of + * emissions from the source Observable. + */ +export declare function auditTime(duration: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=auditTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map new file mode 100644 index 0000000..309fc45 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"auditTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts new file mode 100644 index 0000000..50ce9b4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts @@ -0,0 +1,41 @@ +import { OperatorFunction, ObservableInput } from '../types'; +/** + * Buffers the source Observable values until `closingNotifier` emits. + * + * Collects values from the past as an array, and emits + * that array only when another Observable emits. + * + * ![](buffer.png) + * + * Buffers the incoming Observable values until the given `closingNotifier` + * `ObservableInput` (that internally gets converted to an Observable) + * emits a value, at which point it emits the buffer on the output + * Observable and starts a new buffer internally, awaiting the next time + * `closingNotifier` emits. + * + * ## Example + * + * On every click, emit array of most recent interval events + * + * ```ts + * import { fromEvent, interval, buffer } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const intervalEvents = interval(1000); + * const buffered = intervalEvents.pipe(buffer(clicks)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link bufferWhen} + * @see {@link window} + * + * @param closingNotifier An `ObservableInput` that signals the + * buffer to be emitted on the output Observable. + * @return A function that returns an Observable of buffers, which are arrays + * of values. + */ +export declare function buffer(closingNotifier: ObservableInput): OperatorFunction; +//# sourceMappingURL=buffer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map new file mode 100644 index 0000000..261cbe7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAoCzF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts new file mode 100644 index 0000000..5c208ad --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts @@ -0,0 +1,54 @@ +import { OperatorFunction } from '../types'; +/** + * Buffers the source Observable values until the size hits the maximum + * `bufferSize` given. + * + * Collects values from the past as an array, and emits + * that array only when its size reaches `bufferSize`. + * + * ![](bufferCount.png) + * + * Buffers a number of values from the source Observable by `bufferSize` then + * emits the buffer and clears it, and starts a new buffer each + * `startBufferEvery` values. If `startBufferEvery` is not provided or is + * `null`, then new buffers are started immediately at the start of the source + * and when each buffer closes and is emitted. + * + * ## Examples + * + * Emit the last two click events as an array + * + * ```ts + * import { fromEvent, bufferCount } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferCount(2)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * On every click, emit the last two click events as an array + * + * ```ts + * import { fromEvent, bufferCount } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferCount(2, 1)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link bufferWhen} + * @see {@link pairwise} + * @see {@link windowCount} + * + * @param {number} bufferSize The maximum size of the buffer emitted. + * @param {number} [startBufferEvery] Interval at which to start a new buffer. + * For example if `startBufferEvery` is `2`, then a new buffer will be started + * on every other value from the source. A new buffer is started at the + * beginning of the source by default. + * @return A function that returns an Observable of arrays of buffered values. + */ +export declare function bufferCount(bufferSize: number, startBufferEvery?: number | null): OperatorFunction; +//# sourceMappingURL=bufferCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map new file mode 100644 index 0000000..b7fccb3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,GAAG,IAAW,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CA+DnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts new file mode 100644 index 0000000..bdad980 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts @@ -0,0 +1,5 @@ +import { OperatorFunction, SchedulerLike } from '../types'; +export declare function bufferTime(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction; +export declare function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, scheduler?: SchedulerLike): OperatorFunction; +export declare function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction; +//# sourceMappingURL=bufferTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map new file mode 100644 index 0000000..bfcc736 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAS3D,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3G,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjD,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjD,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts new file mode 100644 index 0000000..5e9cdbe --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts @@ -0,0 +1,46 @@ +import { OperatorFunction, ObservableInput } from '../types'; +/** + * Buffers the source Observable values starting from an emission from + * `openings` and ending when the output of `closingSelector` emits. + * + * Collects values from the past as an array. Starts + * collecting only when `opening` emits, and calls the `closingSelector` + * function to get an Observable that tells when to close the buffer. + * + * ![](bufferToggle.png) + * + * Buffers values from the source by opening the buffer via signals from an + * Observable provided to `openings`, and closing and sending the buffers when + * a Subscribable or Promise returned by the `closingSelector` function emits. + * + * ## Example + * + * Every other second, emit the click events from the next 500ms + * + * ```ts + * import { fromEvent, interval, bufferToggle, EMPTY } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const openings = interval(1000); + * const buffered = clicks.pipe(bufferToggle(openings, i => + * i % 2 ? interval(500) : EMPTY + * )); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferWhen} + * @see {@link windowToggle} + * + * @param openings A Subscribable or Promise of notifications to start new + * buffers. + * @param closingSelector A function that takes + * the value emitted by the `openings` observable and returns a Subscribable or Promise, + * which, when it emits, signals that the associated buffer should be emitted + * and cleared. + * @return A function that returns an Observable of arrays of buffered values. + */ +export declare function bufferToggle(openings: ObservableInput, closingSelector: (value: O) => ObservableInput): OperatorFunction; +//# sourceMappingURL=bufferToggle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map new file mode 100644 index 0000000..05ee389 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAC5B,eAAe,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAClD,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CA+C1B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts new file mode 100644 index 0000000..5427797 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts @@ -0,0 +1,41 @@ +import { ObservableInput, OperatorFunction } from '../types'; +/** + * Buffers the source Observable values, using a factory function of closing + * Observables to determine when to close, emit, and reset the buffer. + * + * Collects values from the past as an array. When it + * starts collecting values, it calls a function that returns an Observable that + * tells when to close the buffer and restart collecting. + * + * ![](bufferWhen.svg) + * + * Opens a buffer immediately, then closes the buffer when the observable + * returned by calling `closingSelector` function emits a value. When it closes + * the buffer, it immediately opens a new buffer and repeats the process. + * + * ## Example + * + * Emit an array of the last clicks every [1-5] random seconds + * + * ```ts + * import { fromEvent, bufferWhen, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe( + * bufferWhen(() => interval(1000 + Math.random() * 4000)) + * ); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link windowWhen} + * + * @param {function(): Observable} closingSelector A function that takes no + * arguments and returns an Observable that signals buffer closure. + * @return A function that returns an Observable of arrays of buffered values. + */ +export declare function bufferWhen(closingSelector: () => ObservableInput): OperatorFunction; +//# sourceMappingURL=bufferWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map new file mode 100644 index 0000000..cdddb4a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bufferWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAgDnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts new file mode 100644 index 0000000..ef7000e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts @@ -0,0 +1,4 @@ +import { Observable } from '../Observable'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +export declare function catchError>(selector: (err: any, caught: Observable) => O): OperatorFunction>; +//# sourceMappingURL=catchError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map new file mode 100644 index 0000000..26f902c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"catchError.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO9E,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAC/C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts new file mode 100644 index 0000000..e1431c1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts @@ -0,0 +1,6 @@ +import { combineLatestAll } from './combineLatestAll'; +/** + * @deprecated Renamed to {@link combineLatestAll}. Will be removed in v8. + */ +export declare const combineAll: typeof combineLatestAll; +//# sourceMappingURL=combineAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map new file mode 100644 index 0000000..a3bccf4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combineAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,UAAU,yBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts new file mode 100644 index 0000000..20944fa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts @@ -0,0 +1,10 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export declare function combineLatest(sources: [...ObservableInputTuple], project: (...values: [T, ...A]) => R): OperatorFunction; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export declare function combineLatest(sources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export declare function combineLatest(...sourcesAndProject: [...ObservableInputTuple, (...values: [T, ...A]) => R]): OperatorFunction; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export declare function combineLatest(...sources: [...ObservableInputTuple]): OperatorFunction; +//# sourceMappingURL=combineLatest.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map new file mode 100644 index 0000000..f2d2b79 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatest.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOnF,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC9D,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACrC,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GACnC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzI,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC9D,GAAG,iBAAiB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAC9E,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts new file mode 100644 index 0000000..ef412ab --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts @@ -0,0 +1,6 @@ +import { OperatorFunction, ObservableInput } from '../types'; +export declare function combineLatestAll(): OperatorFunction, T[]>; +export declare function combineLatestAll(): OperatorFunction; +export declare function combineLatestAll(project: (...values: T[]) => R): OperatorFunction, R>; +export declare function combineLatestAll(project: (...values: Array) => R): OperatorFunction; +//# sourceMappingURL=combineLatestAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map new file mode 100644 index 0000000..f24ab4f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACjF,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAChH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts new file mode 100644 index 0000000..71d3bdf --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts @@ -0,0 +1,43 @@ +import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; +/** + * Create an observable that combines the latest values from all passed observables and the source + * into arrays and emits them. + * + * Returns an observable, that when subscribed to, will subscribe to the source observable and all + * sources provided as arguments. Once all sources emit at least one value, all of the latest values + * will be emitted as an array. After that, every time any source emits a value, all of the latest values + * will be emitted as an array. + * + * This is a useful operator for eagerly calculating values based off of changed inputs. + * + * ## Example + * + * Simple concatenation of values from two inputs + * + * ```ts + * import { fromEvent, combineLatestWith, map } from 'rxjs'; + * + * // Setup: Add two inputs to the page + * const input1 = document.createElement('input'); + * document.body.appendChild(input1); + * const input2 = document.createElement('input'); + * document.body.appendChild(input2); + * + * // Get streams of changes + * const input1Changes$ = fromEvent(input1, 'change'); + * const input2Changes$ = fromEvent(input2, 'change'); + * + * // Combine the changes by adding them together + * input1Changes$.pipe( + * combineLatestWith(input2Changes$), + * map(([e1, e2]) => (e1.target).value + ' - ' + (e2.target).value) + * ) + * .subscribe(x => console.log(x)); + * ``` + * + * @param otherSources the other sources to subscribe to. + * @return A function that returns an Observable that emits the latest + * emissions from both source and provided Observables. + */ +export declare function combineLatestWith(...otherSources: [...ObservableInputTuple]): OperatorFunction>; +//# sourceMappingURL=combineLatestWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map new file mode 100644 index 0000000..bc1c10e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combineLatestWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAC/D,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEjC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts new file mode 100644 index 0000000..fe93031 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts @@ -0,0 +1,6 @@ +import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; +/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ +export declare function concat(...sources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ +export declare function concat(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): OperatorFunction; +//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map new file mode 100644 index 0000000..ff602b3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMjF,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACpD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts new file mode 100644 index 0000000..6eb2909 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts @@ -0,0 +1,59 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +/** + * Converts a higher-order Observable into a first-order Observable by + * concatenating the inner Observables in order. + * + * Flattens an Observable-of-Observables by putting one + * inner Observable after the other. + * + * ![](concatAll.svg) + * + * Joins every Observable emitted by the source (a higher-order Observable), in + * a serial fashion. It subscribes to each inner Observable only after the + * previous inner Observable has completed, and merges all of their values into + * the returned observable. + * + * __Warning:__ If the source Observable emits Observables quickly and + * endlessly, and the inner Observables it emits generally complete slower than + * the source emits, you can run into memory issues as the incoming Observables + * collect in an unbounded buffer. + * + * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set + * to `1`. + * + * ## Example + * + * For each click event, tick every second from 0 to 3, with no concurrency + * + * ```ts + * import { fromEvent, map, interval, take, concatAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(4))) + * ); + * const firstOrder = higherOrder.pipe(concatAll()); + * firstOrder.subscribe(x => console.log(x)); + * + * // Results in the following: + * // (results are not concurrent) + * // For every click on the "document" it will emit values 0 to 3 spaced + * // on a 1000ms interval + * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concat} + * @see {@link concatMap} + * @see {@link concatMapTo} + * @see {@link exhaustAll} + * @see {@link mergeAll} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link zipAll} + * + * @return A function that returns an Observable emitting values from all the + * inner Observables concatenated. + */ +export declare function concatAll>(): OperatorFunction>; +//# sourceMappingURL=concatAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map new file mode 100644 index 0000000..14058ca --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concatAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts new file mode 100644 index 0000000..935e19a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts @@ -0,0 +1,7 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +export declare function concatMap>(project: (value: T, index: number) => O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function concatMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function concatMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; +//# sourceMappingURL=concatMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map new file mode 100644 index 0000000..770b1d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts new file mode 100644 index 0000000..1c8aa69 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts @@ -0,0 +1,8 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */ +export declare function concatMapTo>(observable: O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function concatMapTo>(observable: O, resultSelector: undefined): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function concatMapTo>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; +//# sourceMappingURL=concatMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map new file mode 100644 index 0000000..8e20530 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concatMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9E,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9H,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC5D,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAClE,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts new file mode 100644 index 0000000..4beb57a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts @@ -0,0 +1,43 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +/** + * Emits all of the values from the source observable, then, once it completes, subscribes + * to each observable source provided, one at a time, emitting all of their values, and not subscribing + * to the next one until it completes. + * + * `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`. + * + * ## Example + * + * Listen for one mouse click, then listen for all mouse moves. + * + * ```ts + * import { fromEvent, map, take, concatWith } from 'rxjs'; + * + * const clicks$ = fromEvent(document, 'click'); + * const moves$ = fromEvent(document, 'mousemove'); + * + * clicks$.pipe( + * map(() => 'click'), + * take(1), + * concatWith( + * moves$.pipe( + * map(() => 'move') + * ) + * ) + * ) + * .subscribe(x => console.log(x)); + * + * // 'click' + * // 'move' + * // 'move' + * // 'move' + * // ... + * ``` + * + * @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete. + * @return A function that returns an Observable that concatenates + * subscriptions to the source and provided Observables subscribing to the next + * only once the current subscription completes. + */ +export declare function concatWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; +//# sourceMappingURL=concatWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map new file mode 100644 index 0000000..8524045 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concatWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACxD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts new file mode 100644 index 0000000..7e1f86d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts @@ -0,0 +1,87 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types'; +import { Observable } from '../Observable'; +/** + * An object used to configure {@link connect} operator. + */ +export interface ConnectConfig { + /** + * A factory function used to create the Subject through which the source + * is multicast. By default, this creates a {@link Subject}. + */ + connector: () => SubjectLike; +} +/** + * Creates an observable by multicasting the source within a function that + * allows the developer to define the usage of the multicast prior to connection. + * + * This is particularly useful if the observable source you wish to multicast could + * be synchronous or asynchronous. This sets it apart from {@link share}, which, in the + * case of totally synchronous sources will fail to share a single subscription with + * multiple consumers, as by the time the subscription to the result of {@link share} + * has returned, if the source is synchronous its internal reference count will jump from + * 0 to 1 back to 0 and reset. + * + * To use `connect`, you provide a `selector` function that will give you + * a multicast observable that is not yet connected. You then use that multicast observable + * to create a resulting observable that, when subscribed, will set up your multicast. This is + * generally, but not always, accomplished with {@link merge}. + * + * Note that using a {@link takeUntil} inside of `connect`'s `selector` _might_ mean you were looking + * to use the {@link takeWhile} operator instead. + * + * When you subscribe to the result of `connect`, the `selector` function will be called. After + * the `selector` function returns, the observable it returns will be subscribed to, _then_ the + * multicast will be connected to the source. + * + * ## Example + * + * Sharing a totally synchronous observable + * + * ```ts + * import { of, tap, connect, merge, map, filter } from 'rxjs'; + * + * const source$ = of(1, 2, 3, 4, 5).pipe( + * tap({ + * subscribe: () => console.log('subscription started'), + * next: n => console.log(`source emitted ${ n }`) + * }) + * ); + * + * source$.pipe( + * // Notice in here we're merging 3 subscriptions to `shared$`. + * connect(shared$ => merge( + * shared$.pipe(map(n => `all ${ n }`)), + * shared$.pipe(filter(n => n % 2 === 0), map(n => `even ${ n }`)), + * shared$.pipe(filter(n => n % 2 === 1), map(n => `odd ${ n }`)) + * )) + * ) + * .subscribe(console.log); + * + * // Expected output: (notice only one subscription) + * 'subscription started' + * 'source emitted 1' + * 'all 1' + * 'odd 1' + * 'source emitted 2' + * 'all 2' + * 'even 2' + * 'source emitted 3' + * 'all 3' + * 'odd 3' + * 'source emitted 4' + * 'all 4' + * 'even 4' + * 'source emitted 5' + * 'all 5' + * 'odd 5' + * ``` + * + * @param selector A function used to set up the multicast. Gives you a multicast observable + * that is not yet connected. With that, you're expected to create and return + * and Observable, that when subscribed to, will utilize the multicast observable. + * After this function is executed -- and its return value subscribed to -- the + * operator will subscribe to the source, and the connection will be made. + * @param config The configuration object for `connect`. + */ +export declare function connect>(selector: (shared: Observable) => O, config?: ConnectConfig): OperatorFunction>; +//# sourceMappingURL=connect.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map new file mode 100644 index 0000000..30b97e6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B;;;OAGG;IACH,SAAS,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;CACjC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC3D,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACtC,MAAM,GAAE,aAAa,CAAC,CAAC,CAAkB,GACxC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAOzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/count.d.ts b/node_modules/rxjs/dist/types/internal/operators/count.d.ts new file mode 100644 index 0000000..67b8e8c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/count.d.ts @@ -0,0 +1,58 @@ +import { OperatorFunction } from '../types'; +/** + * Counts the number of emissions on the source and emits that number when the + * source completes. + * + * Tells how many values were emitted, when the source + * completes. + * + * ![](count.png) + * + * `count` transforms an Observable that emits values into an Observable that + * emits a single value that represents the number of values emitted by the + * source Observable. If the source Observable terminates with an error, `count` + * will pass this error notification along without emitting a value first. If + * the source Observable does not terminate at all, `count` will neither emit + * a value nor terminate. This operator takes an optional `predicate` function + * as argument, in which case the output emission will represent the number of + * source values that matched `true` with the `predicate`. + * + * ## Examples + * + * Counts how many seconds have passed before the first click happened + * + * ```ts + * import { interval, fromEvent, takeUntil, count } from 'rxjs'; + * + * const seconds = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const secondsBeforeClick = seconds.pipe(takeUntil(clicks)); + * const result = secondsBeforeClick.pipe(count()); + * result.subscribe(x => console.log(x)); + * ``` + * + * Counts how many odd numbers are there between 1 and 7 + * + * ```ts + * import { range, count } from 'rxjs'; + * + * const numbers = range(1, 7); + * const result = numbers.pipe(count(i => i % 2 === 1)); + * result.subscribe(x => console.log(x)); + * // Results in: + * // 4 + * ``` + * + * @see {@link max} + * @see {@link min} + * @see {@link reduce} + * + * @param predicate A function that is used to analyze the value and the index and + * determine whether or not to increment the count. Return `true` to increment the count, + * and return `false` to keep the count the same. + * If the predicate is not provided, every value will be counted. + * @return A function that returns an Observable that emits one number that + * represents the count of emissions. + */ +export declare function count(predicate?: (value: T, index: number) => boolean): OperatorFunction; +//# sourceMappingURL=count.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map new file mode 100644 index 0000000..4ecfac5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAEtG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts new file mode 100644 index 0000000..e067a8c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts @@ -0,0 +1,61 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Emits a notification from the source Observable only after a particular time span + * determined by another Observable has passed without another source emission. + * + * It's like {@link debounceTime}, but the time span of + * emission silence is determined by a second Observable. + * + * ![](debounce.svg) + * + * `debounce` delays notifications emitted by the source Observable, but drops previous + * pending delayed emissions if a new notification arrives on the source Observable. + * This operator keeps track of the most recent notification from the source + * Observable, and spawns a duration Observable by calling the + * `durationSelector` function. The notification is emitted only when the duration + * Observable emits a next notification, and if no other notification was emitted on + * the source Observable since the duration Observable was spawned. If a new + * notification appears before the duration Observable emits, the previous notification will + * not be emitted and a new duration is scheduled from `durationSelector` is scheduled. + * If the completing event happens during the scheduled duration the last cached notification + * is emitted before the completion event is forwarded to the output observable. + * If the error event happens during the scheduled duration or after it only the error event is + * forwarded to the output observable. The cache notification is not emitted in this case. + * + * Like {@link debounceTime}, this is a rate-limiting operator, and also a + * delay-like operator since output emissions do not necessarily occur at the + * same time as they did on the source Observable. + * + * ## Example + * + * Emit the most recent click after a burst of clicks + * + * ```ts + * import { fromEvent, scan, debounce, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * scan(i => ++i, 1), + * debounce(i => interval(200 * i)) + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link throttle} + * @see {@link throttleTime} + * + * @param durationSelector A function + * that receives a value from the source Observable, for computing the timeout + * duration for each source value, returned as an Observable or a Promise. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified duration Observable returned by + * `durationSelector`, and may drop some values if they occur too frequently. + */ +export declare function debounce(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=debounce.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map new file mode 100644 index 0000000..d8bf354 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAqD7G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts new file mode 100644 index 0000000..c7e0146 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts @@ -0,0 +1,60 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Emits a notification from the source Observable only after a particular time span + * has passed without another source emission. + * + * It's like {@link delay}, but passes only the most + * recent notification from each burst of emissions. + * + * ![](debounceTime.png) + * + * `debounceTime` delays notifications emitted by the source Observable, but drops + * previous pending delayed emissions if a new notification arrives on the source + * Observable. This operator keeps track of the most recent notification from the + * source Observable, and emits that only when `dueTime` has passed + * without any other notification appearing on the source Observable. If a new value + * appears before `dueTime` silence occurs, the previous notification will be dropped + * and will not be emitted and a new `dueTime` is scheduled. + * If the completing event happens during `dueTime` the last cached notification + * is emitted before the completion event is forwarded to the output observable. + * If the error event happens during `dueTime` or after it only the error event is + * forwarded to the output observable. The cache notification is not emitted in this case. + * + * This is a rate-limiting operator, because it is impossible for more than one + * notification to be emitted in any time window of duration `dueTime`, but it is also + * a delay-like operator since output emissions do not occur at the same time as + * they did on the source Observable. Optionally takes a {@link SchedulerLike} for + * managing timers. + * + * ## Example + * + * Emit the most recent click after a burst of clicks + * + * ```ts + * import { fromEvent, debounceTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(debounceTime(1000)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link auditTime} + * @see {@link debounce} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link throttle} + * @see {@link throttleTime} + * + * @param {number} dueTime The timeout duration in milliseconds (or the time + * unit determined internally by the optional `scheduler`) for the window of + * time required to wait for emission silence before emitting the most recent + * source value. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the timeout for each value. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified `dueTime`, and may drop some values + * if they occur too frequently. + */ +export declare function debounceTime(dueTime: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=debounceTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map new file mode 100644 index 0000000..cbde28b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"debounceTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAIpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA4DvH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts new file mode 100644 index 0000000..afbd629 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts @@ -0,0 +1,38 @@ +import { OperatorFunction } from '../types'; +/** + * Emits a given value if the source Observable completes without emitting any + * `next` value, otherwise mirrors the source Observable. + * + * If the source Observable turns out to be empty, then + * this operator will emit a default value. + * + * ![](defaultIfEmpty.png) + * + * `defaultIfEmpty` emits the values emitted by the source Observable or a + * specified default value if the source Observable is empty (completes without + * having emitted any `next` value). + * + * ## Example + * + * If no clicks happen in 5 seconds, then emit 'no clicks' + * + * ```ts + * import { fromEvent, takeUntil, interval, defaultIfEmpty } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000))); + * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks')); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link empty} + * @see {@link last} + * + * @param defaultValue The default value used if the source + * Observable is empty. + * @return A function that returns an Observable that emits either the + * specified `defaultValue` if the source Observable emits no items, or the + * values emitted by the source Observable. + */ +export declare function defaultIfEmpty(defaultValue: R): OperatorFunction; +//# sourceMappingURL=defaultIfEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map new file mode 100644 index 0000000..3c4aeac --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultIfEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAmBhF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts new file mode 100644 index 0000000..c859222 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts @@ -0,0 +1,59 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Delays the emission of items from the source Observable by a given timeout or + * until a given Date. + * + * Time shifts each item by some specified amount of + * milliseconds. + * + * ![](delay.svg) + * + * If the delay argument is a Number, this operator time shifts the source + * Observable by that amount of time expressed in milliseconds. The relative + * time intervals between the values are preserved. + * + * If the delay argument is a Date, this operator time shifts the start of the + * Observable execution until the given date occurs. + * + * ## Examples + * + * Delay each click by one second + * + * ```ts + * import { fromEvent, delay } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second + * delayedClicks.subscribe(x => console.log(x)); + * ``` + * + * Delay all clicks until a future date happens + * + * ```ts + * import { fromEvent, delay } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const date = new Date('March 15, 2050 12:00:00'); // in the future + * const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date + * delayedClicks.subscribe(x => console.log(x)); + * ``` + * + * @see {@link delayWhen} + * @see {@link throttle} + * @see {@link throttleTime} + * @see {@link debounce} + * @see {@link debounceTime} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link audit} + * @see {@link auditTime} + * + * @param {number|Date} due The delay duration in milliseconds (a `number`) or + * a `Date` until which the emission of the source items is delayed. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the time-shift for each item. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified timeout or Date. + */ +export declare function delay(due: number | Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=delay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map new file mode 100644 index 0000000..46efccb --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAGnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts new file mode 100644 index 0000000..c9d6289 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts @@ -0,0 +1,6 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** @deprecated The `subscriptionDelay` parameter will be removed in v8. */ +export declare function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput, subscriptionDelay: Observable): MonoTypeOperatorFunction; +export declare function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=delayWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map new file mode 100644 index 0000000..f61e807 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"delayWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQrE,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,CAAC,EACzB,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,EACxE,iBAAiB,EAAE,UAAU,CAAC,GAAG,CAAC,GACjC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAC/B,wBAAgB,SAAS,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts new file mode 100644 index 0000000..b5a3949 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts @@ -0,0 +1,51 @@ +import { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types'; +/** + * Converts an Observable of {@link ObservableNotification} objects into the emissions + * that they represent. + * + * Unwraps {@link ObservableNotification} objects as actual `next`, + * `error` and `complete` emissions. The opposite of {@link materialize}. + * + * ![](dematerialize.png) + * + * `dematerialize` is assumed to operate an Observable that only emits + * {@link ObservableNotification} objects as `next` emissions, and does not emit any + * `error`. Such Observable is the output of a `materialize` operation. Those + * notifications are then unwrapped using the metadata they contain, and emitted + * as `next`, `error`, and `complete` on the output Observable. + * + * Use this operator in conjunction with {@link materialize}. + * + * ## Example + * + * Convert an Observable of Notifications to an actual Observable + * + * ```ts + * import { NextNotification, ErrorNotification, of, dematerialize } from 'rxjs'; + * + * const notifA: NextNotification = { kind: 'N', value: 'A' }; + * const notifB: NextNotification = { kind: 'N', value: 'B' }; + * const notifE: ErrorNotification = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') }; + * + * const materialized = of(notifA, notifB, notifE); + * + * const upperCase = materialized.pipe(dematerialize()); + * upperCase.subscribe({ + * next: x => console.log(x), + * error: e => console.error(e) + * }); + * + * // Results in: + * // A + * // B + * // TypeError: x.toUpperCase is not a function + * ``` + * + * @see {@link materialize} + * + * @return A function that returns an Observable that emits items and + * notifications embedded in Notification objects emitted by the source + * Observable. + */ +export declare function dematerialize>(): OperatorFunction>; +//# sourceMappingURL=dematerialize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map new file mode 100644 index 0000000..396d0d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dematerialize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAI3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,sBAAsB,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAIpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts new file mode 100644 index 0000000..d9346e7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts @@ -0,0 +1,60 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. + * + * If a `keySelector` function is provided, then it will project each value from the source observable into a new value that it will + * check for equality with previously projected values. If the `keySelector` function is not provided, it will use each value from the + * source observable directly with an equality check against previous values. + * + * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking. + * + * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the + * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct` + * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so + * that the internal `Set` can be "flushed", basically clearing it of values. + * + * ## Examples + * + * A simple example with numbers + * + * ```ts + * import { of, distinct } from 'rxjs'; + * + * of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1) + * .pipe(distinct()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 1 + * // 2 + * // 3 + * // 4 + * ``` + * + * An example using the `keySelector` function + * + * ```ts + * import { of, distinct } from 'rxjs'; + * + * of( + * { age: 4, name: 'Foo'}, + * { age: 7, name: 'Bar'}, + * { age: 5, name: 'Foo'} + * ) + * .pipe(distinct(({ name }) => name)) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // { age: 4, name: 'Foo' } + * // { age: 7, name: 'Bar' } + * ``` + * @see {@link distinctUntilChanged} + * @see {@link distinctUntilKeyChanged} + * + * @param keySelector Optional `function` to select which value you want to check as distinct. + * @param flushes Optional `ObservableInput` for flushing the internal HashSet of the operator. + * @return A function that returns an Observable that emits items from the + * source Observable with distinct values. + */ +export declare function distinct(keySelector?: (value: T) => K, flushes?: ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=distinct.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map new file mode 100644 index 0000000..9049e6a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAezH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts new file mode 100644 index 0000000..8394fa6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts @@ -0,0 +1,4 @@ +import { MonoTypeOperatorFunction } from '../types'; +export declare function distinctUntilChanged(comparator?: (previous: T, current: T) => boolean): MonoTypeOperatorFunction; +export declare function distinctUntilChanged(comparator: (previous: K, current: K) => boolean, keySelector: (value: T) => K): MonoTypeOperatorFunction; +//# sourceMappingURL=distinctUntilChanged.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map new file mode 100644 index 0000000..0a0f530 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilChanged.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACxH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EACvC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO,EAChD,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAC3B,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts new file mode 100644 index 0000000..4c054c8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts @@ -0,0 +1,4 @@ +import { MonoTypeOperatorFunction } from '../types'; +export declare function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction; +export declare function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction; +//# sourceMappingURL=distinctUntilKeyChanged.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map new file mode 100644 index 0000000..7e1119a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"distinctUntilKeyChanged.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACtF,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts new file mode 100644 index 0000000..b23d55d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts @@ -0,0 +1,51 @@ +import { OperatorFunction } from '../types'; +/** + * Emits the single value at the specified `index` in a sequence of emissions + * from the source Observable. + * + * Emits only the i-th value, then completes. + * + * ![](elementAt.png) + * + * `elementAt` returns an Observable that emits the item at the specified + * `index` in the source Observable, or a default value if that `index` is out + * of range and the `default` argument is provided. If the `default` argument is + * not given and the `index` is out of range, the output Observable will emit an + * `ArgumentOutOfRangeError` error. + * + * ## Example + * + * Emit only the third click event + * + * ```ts + * import { fromEvent, elementAt } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(elementAt(2)); + * result.subscribe(x => console.log(x)); + * + * // Results in: + * // click 1 = nothing + * // click 2 = nothing + * // click 3 = MouseEvent object logged to console + * ``` + * + * @see {@link first} + * @see {@link last} + * @see {@link skip} + * @see {@link single} + * @see {@link take} + * + * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an + * ArgumentOutOfRangeError to the Observer's `error` callback if `i < 0` or the + * Observable has completed before emitting the i-th `next` notification. + * + * @param {number} index Is the number `i` for the i-th source emission that has + * happened since the subscription, starting from the number `0`. + * @param {T} [defaultValue] The default value returned for missing indices. + * @return A function that returns an Observable that emits a single item, if + * it is found. Otherwise, it will emit the default value if given. If not, it + * emits an error. + */ +export declare function elementAt(index: number, defaultValue?: D): OperatorFunction; +//# sourceMappingURL=elementAt.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map new file mode 100644 index 0000000..dafa75c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"elementAt.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAW/F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts new file mode 100644 index 0000000..25236a5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts @@ -0,0 +1,7 @@ +import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types'; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function endWith(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction>; +export declare function endWith(...values: A): OperatorFunction>; +//# sourceMappingURL=endWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map new file mode 100644 index 0000000..9ee0e7e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"endWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErG,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAClF,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAClD,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAC3C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/every.d.ts b/node_modules/rxjs/dist/types/internal/operators/every.d.ts new file mode 100644 index 0000000..29e2654 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/every.d.ts @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +import { Falsy, OperatorFunction } from '../types'; +export declare function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function every(predicate: BooleanConstructor, thisArg: any): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function every(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; +export declare function every(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; +//# sourceMappingURL=every.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map new file mode 100644 index 0000000..313a35c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"every.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAChI,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EACrB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,GAAG,GACX,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAC1E,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EACxB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAChC,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts new file mode 100644 index 0000000..6379212 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts @@ -0,0 +1,6 @@ +import { exhaustAll } from './exhaustAll'; +/** + * @deprecated Renamed to {@link exhaustAll}. Will be removed in v8. + */ +export declare const exhaust: typeof exhaustAll; +//# sourceMappingURL=exhaust.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map new file mode 100644 index 0000000..6bf5832 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaust.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,OAAO,mBAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts new file mode 100644 index 0000000..fa22a01 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts @@ -0,0 +1,47 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +/** + * Converts a higher-order Observable into a first-order Observable by dropping + * inner Observables while the previous inner Observable has not yet completed. + * + * Flattens an Observable-of-Observables by dropping the + * next inner Observables while the current inner is still executing. + * + * ![](exhaustAll.svg) + * + * `exhaustAll` subscribes to an Observable that emits Observables, also known as a + * higher-order Observable. Each time it observes one of these emitted inner + * Observables, the output Observable begins emitting the items emitted by that + * inner Observable. So far, it behaves like {@link mergeAll}. However, + * `exhaustAll` ignores every new inner Observable if the previous Observable has + * not yet completed. Once that one completes, it will accept and flatten the + * next inner Observable and repeat this process. + * + * ## Example + * + * Run a finite timer for each click, only if there is no currently active timer + * + * ```ts + * import { fromEvent, map, interval, take, exhaustAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(5))) + * ); + * const result = higherOrder.pipe(exhaustAll()); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link mergeAll} + * @see {@link exhaustMap} + * @see {@link zipAll} + * + * @return A function that returns an Observable that takes a source of + * Observables and propagates the first Observable exclusively until it + * completes before subscribing to the next. + */ +export declare function exhaustAll>(): OperatorFunction>; +//# sourceMappingURL=exhaustAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map new file mode 100644 index 0000000..ec23721 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEpG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts new file mode 100644 index 0000000..89ef188 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts @@ -0,0 +1,7 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +export declare function exhaustMap>(project: (value: T, index: number) => O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function exhaustMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function exhaustMap(project: (value: T, index: number) => ObservableInput, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction; +//# sourceMappingURL=exhaustMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map new file mode 100644 index 0000000..afd740f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"exhaustMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO9E,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACxD,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC1F,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts new file mode 100644 index 0000000..3972017 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts @@ -0,0 +1,9 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types'; +export declare function expand>(project: (value: T, index: number) => O, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction>; +/** + * @deprecated The `scheduler` parameter will be removed in v8. If you need to schedule the inner subscription, + * use `subscribeOn` within the projection function: `expand((value) => fn(value).pipe(subscribeOn(scheduler)))`. + * Details: Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export declare function expand>(project: (value: T, index: number) => O, concurrent: number | undefined, scheduler: SchedulerLike): OperatorFunction>; +//# sourceMappingURL=expand.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map new file mode 100644 index 0000000..76a7b90 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK7F,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,aAAa,GACvB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts new file mode 100644 index 0000000..ca45a23 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts @@ -0,0 +1,9 @@ +import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function filter(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction; +export declare function filter(predicate: (value: T, index: number) => value is S): OperatorFunction; +export declare function filter(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function filter(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction; +export declare function filter(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; +//# sourceMappingURL=filter.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map new file mode 100644 index 0000000..8df64a4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIrF,gHAAgH;AAChH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3I,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnH,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,gHAAgH;AAChH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAChI,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts new file mode 100644 index 0000000..1255926 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts @@ -0,0 +1,64 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Returns an Observable that mirrors the source Observable, but will call a specified function when + * the source terminates on complete or error. + * The specified function will also be called when the subscriber explicitly unsubscribes. + * + * ## Examples + * + * Execute callback function when the observable completes + * + * ```ts + * import { interval, take, finalize } from 'rxjs'; + * + * // emit value in sequence every 1 second + * const source = interval(1000); + * const example = source.pipe( + * take(5), //take only the first 5 values + * finalize(() => console.log('Sequence complete')) // Execute when the observable completes + * ); + * const subscribe = example.subscribe(val => console.log(val)); + * + * // results: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 'Sequence complete' + * ``` + * + * Execute callback function when the subscriber explicitly unsubscribes + * + * ```ts + * import { interval, finalize, tap, noop, timer } from 'rxjs'; + * + * const source = interval(100).pipe( + * finalize(() => console.log('[finalize] Called')), + * tap({ + * next: () => console.log('[next] Called'), + * error: () => console.log('[error] Not called'), + * complete: () => console.log('[tap complete] Not called') + * }) + * ); + * + * const sub = source.subscribe({ + * next: x => console.log(x), + * error: noop, + * complete: () => console.log('[complete] Not called') + * }); + * + * timer(150).subscribe(() => sub.unsubscribe()); + * + * // results: + * // '[next] Called' + * // 0 + * // '[finalize] Called' + * ``` + * + * @param {function} callback Function to be called when source terminates. + * @return A function that returns an Observable that mirrors the source, but + * will call the specified function on termination. + */ +export declare function finalize(callback: () => void): MonoTypeOperatorFunction; +//# sourceMappingURL=finalize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map new file mode 100644 index 0000000..f427a73 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"finalize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAU7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/find.d.ts b/node_modules/rxjs/dist/types/internal/operators/find.d.ts new file mode 100644 index 0000000..0f89d5b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/find.d.ts @@ -0,0 +1,12 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +export declare function find(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function find(predicate: (this: A, value: T, index: number, source: Observable) => value is S, thisArg: A): OperatorFunction; +export declare function find(predicate: (value: T, index: number, source: Observable) => value is S): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function find(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; +export declare function find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; +export declare function createFind(predicate: (value: T, index: number, source: Observable) => boolean, thisArg: any, emit: 'value' | 'index'): (source: Observable, subscriber: Subscriber) => void; +//# sourceMappingURL=find.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map new file mode 100644 index 0000000..3248966 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI3D,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,gHAAgH;AAChH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACpC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EAClF,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACjC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,GACxE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,gHAAgH;AAChH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EACvB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AAmDpI,wBAAgB,UAAU,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,OAAO,GAAG,OAAO,YAGP,WAAW,CAAC,CAAC,cAAc,WAAW,GAAG,CAAC,UAmB3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts new file mode 100644 index 0000000..b0dc650 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +import { Falsy, OperatorFunction } from '../types'; +export declare function findIndex(predicate: BooleanConstructor): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function findIndex(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; +export declare function findIndex(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; +//# sourceMappingURL=findIndex.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map new file mode 100644 index 0000000..7383ecd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"findIndex.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAChH,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAC9H,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/B,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/first.d.ts b/node_modules/rxjs/dist/types/internal/operators/first.d.ts new file mode 100644 index 0000000..1b7df1c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/first.d.ts @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +export declare function first(predicate?: null, defaultValue?: D): OperatorFunction; +export declare function first(predicate: BooleanConstructor): OperatorFunction>; +export declare function first(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; +export declare function first(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue?: S): OperatorFunction; +export declare function first(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue: D): OperatorFunction; +export declare function first(predicate: (value: T, index: number, source: Observable) => boolean, defaultValue?: D): OperatorFunction; +//# sourceMappingURL=first.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map new file mode 100644 index 0000000..337c089 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,KAAK,CAAC,CAAC,EAA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CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts new file mode 100644 index 0000000..719fe58 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts @@ -0,0 +1,6 @@ +import { mergeMap } from './mergeMap'; +/** + * @deprecated Renamed to {@link mergeMap}. Will be removed in v8. + */ +export declare const flatMap: typeof mergeMap; +//# sourceMappingURL=flatMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map new file mode 100644 index 0000000..2177d97 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"flatMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,OAAO,iBAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts new file mode 100644 index 0000000..56aec0e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts @@ -0,0 +1,119 @@ +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { ObservableInput, OperatorFunction, SubjectLike } from '../types'; +export interface BasicGroupByOptions { + element?: undefined; + duration?: (grouped: GroupedObservable) => ObservableInput; + connector?: () => SubjectLike; +} +export interface GroupByOptionsWithElement { + element: (value: T) => E; + duration?: (grouped: GroupedObservable) => ObservableInput; + connector?: () => SubjectLike; +} +export declare function groupBy(key: (value: T) => K, options: BasicGroupByOptions): OperatorFunction>; +export declare function groupBy(key: (value: T) => K, options: GroupByOptionsWithElement): OperatorFunction>; +export declare function groupBy(key: (value: T) => value is K): OperatorFunction | GroupedObservable>>; +export declare function groupBy(key: (value: T) => K): OperatorFunction>; +/** + * @deprecated use the options parameter instead. + */ +export declare function groupBy(key: (value: T) => K, element: void, duration: (grouped: GroupedObservable) => Observable): OperatorFunction>; +/** + * @deprecated use the options parameter instead. + */ +export declare function groupBy(key: (value: T) => K, element?: (value: T) => R, duration?: (grouped: GroupedObservable) => Observable): OperatorFunction>; +/** + * Groups the items emitted by an Observable according to a specified criterion, + * and emits these grouped items as `GroupedObservables`, one + * {@link GroupedObservable} per group. + * + * ![](groupBy.png) + * + * When the Observable emits an item, a key is computed for this item with the key function. + * + * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new + * {@link GroupedObservable} for this key is created and emits. + * + * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common + * key is available as the `key` field of a {@link GroupedObservable} instance. + * + * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements + * returned by the element function. + * + * ## Examples + * + * Group objects by `id` and return as array + * + * ```ts + * import { of, groupBy, mergeMap, reduce } from 'rxjs'; + * + * of( + * { id: 1, name: 'JavaScript' }, + * { id: 2, name: 'Parcel' }, + * { id: 2, name: 'webpack' }, + * { id: 1, name: 'TypeScript' }, + * { id: 3, name: 'TSLint' } + * ).pipe( + * groupBy(p => p.id), + * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], []))) + * ) + * .subscribe(p => console.log(p)); + * + * // displays: + * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}] + * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}] + * // [{ id: 3, name: 'TSLint' }] + * ``` + * + * Pivot data on the `id` field + * + * ```ts + * import { of, groupBy, mergeMap, reduce, map } from 'rxjs'; + * + * of( + * { id: 1, name: 'JavaScript' }, + * { id: 2, name: 'Parcel' }, + * { id: 2, name: 'webpack' }, + * { id: 1, name: 'TypeScript' }, + * { id: 3, name: 'TSLint' } + * ).pipe( + * groupBy(p => p.id, { element: p => p.name }), + * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))), + * map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) })) + * ) + * .subscribe(p => console.log(p)); + * + * // displays: + * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] } + * // { id: 2, values: [ 'Parcel', 'webpack' ] } + * // { id: 3, values: [ 'TSLint' ] } + * ``` + * + * @param key A function that extracts the key + * for each item. + * @param element A function that extracts the + * return element for each item. + * @param duration + * A function that returns an Observable to determine how long each group should + * exist. + * @param connector Factory function to create an + * intermediate Subject through which grouped elements are emitted. + * @return A function that returns an Observable that emits GroupedObservables, + * each of which corresponds to a unique key value and each of which emits + * those items from the source Observable that share that key value. + * + * @deprecated Use the options parameter instead. + */ +export declare function groupBy(key: (value: T) => K, element?: (value: T) => R, duration?: (grouped: GroupedObservable) => Observable, connector?: () => Subject): OperatorFunction>; +/** + * An observable of values that is the emitted by the result of a {@link groupBy} operator, + * contains a `key` property for the grouping. + */ +export interface GroupedObservable extends Observable { + /** + * The key value for the grouped notifications. + */ + readonly key: K; +} +//# sourceMappingURL=groupBy.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map new file mode 100644 index 0000000..889877d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIpF,MAAM,WAAW,mBAAmB,CAAC,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CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,EAChE,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAC3B,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AA6IhD;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC5D;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts new file mode 100644 index 0000000..f852a52 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts @@ -0,0 +1,38 @@ +import { OperatorFunction } from '../types'; +/** + * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. + * + * ![](ignoreElements.png) + * + * The `ignoreElements` operator suppresses all items emitted by the source Observable, + * but allows its termination notification (either `error` or `complete`) to pass through unchanged. + * + * If you do not care about the items being emitted by an Observable, but you do want to be notified + * when it completes or when it terminates with an error, you can apply the `ignoreElements` operator + * to the Observable, which will ensure that it will never call its observers’ `next` handlers. + * + * ## Example + * + * Ignore all `next` emissions from the source + * + * ```ts + * import { of, ignoreElements } from 'rxjs'; + * + * of('you', 'talking', 'to', 'me') + * .pipe(ignoreElements()) + * .subscribe({ + * next: word => console.log(word), + * error: err => console.log('error:', err), + * complete: () => console.log('the end'), + * }); + * + * // result: + * // 'the end' + * ``` + * + * @return A function that returns an empty Observable that only calls + * `complete` or `error`, based on which one is called by the source + * Observable. + */ +export declare function ignoreElements(): OperatorFunction; +//# sourceMappingURL=ignoreElements.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map new file mode 100644 index 0000000..adeb20c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ignoreElements.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAIjE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts new file mode 100644 index 0000000..6c35fdb --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts @@ -0,0 +1,64 @@ +import { OperatorFunction } from '../types'; +/** + * Emits `false` if the input Observable emits any values, or emits `true` if the + * input Observable completes without emitting any values. + * + * Tells whether any values are emitted by an Observable. + * + * ![](isEmpty.png) + * + * `isEmpty` transforms an Observable that emits values into an Observable that + * emits a single boolean value representing whether or not any values were + * emitted by the source Observable. As soon as the source Observable emits a + * value, `isEmpty` will emit a `false` and complete. If the source Observable + * completes having not emitted anything, `isEmpty` will emit a `true` and + * complete. + * + * A similar effect could be achieved with {@link count}, but `isEmpty` can emit + * a `false` value sooner. + * + * ## Examples + * + * Emit `false` for a non-empty Observable + * + * ```ts + * import { Subject, isEmpty } from 'rxjs'; + * + * const source = new Subject(); + * const result = source.pipe(isEmpty()); + * + * source.subscribe(x => console.log(x)); + * result.subscribe(x => console.log(x)); + * + * source.next('a'); + * source.next('b'); + * source.next('c'); + * source.complete(); + * + * // Outputs + * // 'a' + * // false + * // 'b' + * // 'c' + * ``` + * + * Emit `true` for an empty Observable + * + * ```ts + * import { EMPTY, isEmpty } from 'rxjs'; + * + * const result = EMPTY.pipe(isEmpty()); + * result.subscribe(x => console.log(x)); + * + * // Outputs + * // true + * ``` + * + * @see {@link count} + * @see {@link EMPTY} + * + * @return A function that returns an Observable that emits boolean value + * indicating whether the source Observable was empty or not. + */ +export declare function isEmpty(): OperatorFunction; +//# sourceMappingURL=isEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map new file mode 100644 index 0000000..d99bb3a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAgBzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts new file mode 100644 index 0000000..3e784f3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts @@ -0,0 +1,14 @@ +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; +/** + * Collects all of the inner sources from source observable. Then, once the + * source completes, joins the values using the given static. + * + * This is used for {@link combineLatestAll} and {@link zipAll} which both have the + * same behavior of collecting all inner observables, then operating on them. + * + * @param joinFn The type of static join to apply to the sources collected + * @param project The projection function to apply to the values, if any + */ +export declare function joinAllInternals(joinFn: (sources: ObservableInput[]) => Observable, project?: (...args: any[]) => R): import("../types").UnaryFunction>, unknown>; +//# sourceMappingURL=joinAllInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map new file mode 100644 index 0000000..54dda17 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"joinAllInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAoB,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,6EAU/H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/last.d.ts b/node_modules/rxjs/dist/types/internal/operators/last.d.ts new file mode 100644 index 0000000..ecbed43 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/last.d.ts @@ -0,0 +1,8 @@ +import { Observable } from '../Observable'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +export declare function last(predicate: BooleanConstructor): OperatorFunction>; +export declare function last(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; +export declare function last(predicate?: null, defaultValue?: D): OperatorFunction; +export declare function last(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue?: S): OperatorFunction; +export declare function last(predicate: (value: T, index: number, source: Observable) => boolean, defaultValue?: D): OperatorFunction; +//# sourceMappingURL=last.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map new file mode 100644 index 0000000..c20a35b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/F,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACjC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/map.d.ts b/node_modules/rxjs/dist/types/internal/operators/map.d.ts new file mode 100644 index 0000000..e302b61 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/map.d.ts @@ -0,0 +1,5 @@ +import { OperatorFunction } from '../types'; +export declare function map(project: (value: T, index: number) => R): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export declare function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; +//# sourceMappingURL=map.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map new file mode 100644 index 0000000..ab43e40 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3F,gHAAgH;AAChH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts new file mode 100644 index 0000000..f3b8065 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts @@ -0,0 +1,10 @@ +import { OperatorFunction } from '../types'; +/** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */ +export declare function mapTo(value: R): OperatorFunction; +/** + * @deprecated Do not specify explicit type parameters. Signatures with type parameters + * that cannot be inferred will be removed in v8. `mapTo` itself will be removed in v9, + * use {@link map} instead: `map(() => value)`. + * */ +export declare function mapTo(value: R): OperatorFunction; +//# sourceMappingURL=mapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map new file mode 100644 index 0000000..df9402a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,oFAAoF;AACpF,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjE;;;;KAIK;AACL,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts new file mode 100644 index 0000000..63f5032 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts @@ -0,0 +1,52 @@ +import { Notification } from '../Notification'; +import { OperatorFunction, ObservableNotification } from '../types'; +/** + * Represents all of the notifications from the source Observable as `next` + * emissions marked with their original types within {@link Notification} + * objects. + * + * Wraps `next`, `error` and `complete` emissions in + * {@link Notification} objects, emitted as `next` on the output Observable. + * + * + * ![](materialize.png) + * + * `materialize` returns an Observable that emits a `next` notification for each + * `next`, `error`, or `complete` emission of the source Observable. When the + * source Observable emits `complete`, the output Observable will emit `next` as + * a Notification of type "complete", and then it will emit `complete` as well. + * When the source Observable emits `error`, the output will emit `next` as a + * Notification of type "error", and then `complete`. + * + * This operator is useful for producing metadata of the source Observable, to + * be consumed as `next` emissions. Use it in conjunction with + * {@link dematerialize}. + * + * ## Example + * + * Convert a faulty Observable to an Observable of Notifications + * + * ```ts + * import { of, materialize, map } from 'rxjs'; + * + * const letters = of('a', 'b', 13, 'd'); + * const upperCase = letters.pipe(map((x: any) => x.toUpperCase())); + * const materialized = upperCase.pipe(materialize()); + * + * materialized.subscribe(x => console.log(x)); + * + * // Results in the following: + * // - Notification { kind: 'N', value: 'A', error: undefined, hasValue: true } + * // - Notification { kind: 'N', value: 'B', error: undefined, hasValue: true } + * // - Notification { kind: 'E', value: undefined, error: TypeError { message: x.toUpperCase is not a function }, hasValue: false } + * ``` + * + * @see {@link Notification} + * @see {@link dematerialize} + * + * @return A function that returns an Observable that emits + * {@link Notification} objects that wrap the original emissions from the + * source Observable with metadata. + */ +export declare function materialize(): OperatorFunction & ObservableNotification>; +//# sourceMappingURL=materialize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map new file mode 100644 index 0000000..8c88231 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,WAAW,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAmBjG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/max.d.ts b/node_modules/rxjs/dist/types/internal/operators/max.d.ts new file mode 100644 index 0000000..4dadd2b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/max.d.ts @@ -0,0 +1,49 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), + * and when source Observable completes it emits a single item: the item with the largest value. + * + * ![](max.png) + * + * ## Examples + * + * Get the maximal value of a series of numbers + * + * ```ts + * import { of, max } from 'rxjs'; + * + * of(5, 4, 7, 2, 8) + * .pipe(max()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 8 + * ``` + * + * Use a comparer function to get the maximal item + * + * ```ts + * import { of, max } from 'rxjs'; + * + * of( + * { age: 7, name: 'Foo' }, + * { age: 5, name: 'Bar' }, + * { age: 9, name: 'Beer' } + * ).pipe( + * max((a, b) => a.age < b.age ? -1 : 1) + * ) + * .subscribe(x => console.log(x.name)); + * + * // Outputs + * // 'Beer' + * ``` + * + * @see {@link min} + * + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return A function that returns an Observable that emits item with the + * largest value. + */ +export declare function max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction; +//# sourceMappingURL=max.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map new file mode 100644 index 0000000..d4d0134 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts new file mode 100644 index 0000000..a0b04bd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts @@ -0,0 +1,10 @@ +import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export declare function merge(...sources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export declare function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number]): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export declare function merge(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export declare function merge(...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number, SchedulerLike]): OperatorFunction; +//# sourceMappingURL=merge.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map new file mode 100644 index 0000000..17678ec --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOlG,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrI,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAC7D,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,iCAAiC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GACxF,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts new file mode 100644 index 0000000..6ea5793 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts @@ -0,0 +1,62 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +/** + * Converts a higher-order Observable into a first-order Observable which + * concurrently delivers all values that are emitted on the inner Observables. + * + * Flattens an Observable-of-Observables. + * + * ![](mergeAll.png) + * + * `mergeAll` subscribes to an Observable that emits Observables, also known as + * a higher-order Observable. Each time it observes one of these emitted inner + * Observables, it subscribes to that and delivers all the values from the + * inner Observable on the output Observable. The output Observable only + * completes once all inner Observables have completed. Any error delivered by + * a inner Observable will be immediately emitted on the output Observable. + * + * ## Examples + * + * Spawn a new interval Observable for each click event, and blend their outputs as one Observable + * + * ```ts + * import { fromEvent, map, interval, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe(map(() => interval(1000))); + * const firstOrder = higherOrder.pipe(mergeAll()); + * + * firstOrder.subscribe(x => console.log(x)); + * ``` + * + * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers + * + * ```ts + * import { fromEvent, map, interval, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(10))) + * ); + * const firstOrder = higherOrder.pipe(mergeAll(2)); + * + * firstOrder.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link exhaustAll} + * @see {@link merge} + * @see {@link mergeMap} + * @see {@link mergeMapTo} + * @see {@link mergeScan} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link zipAll} + * + * @param {number} [concurrent=Infinity] Maximum number of inner + * Observables being subscribed to concurrently. + * @return A function that returns an Observable that emits values coming from + * all the inner Observables emitted by the source Observable. + */ +export declare function mergeAll>(concurrent?: number): OperatorFunction>; +//# sourceMappingURL=mergeAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map new file mode 100644 index 0000000..def11cf --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,UAAU,GAAE,MAAiB,GAAG,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAE/H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts new file mode 100644 index 0000000..14eed28 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts @@ -0,0 +1,18 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { ObservableInput, SchedulerLike } from '../types'; +/** + * A process embodying the general "merge" strategy. This is used in + * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical. + * @param source The original source observable + * @param subscriber The consumer subscriber + * @param project The projection function to get our inner sources + * @param concurrent The number of concurrent inner subscriptions + * @param onBeforeNext Additional logic to apply before nexting to our consumer + * @param expand If `true` this will perform an "expand" strategy, which differs only + * in that it recurses, and the inner subscription must be schedule-able. + * @param innerSubScheduler A scheduler to use to schedule inner subscriptions, + * this is to support the expand strategy, mostly, and should be deprecated + */ +export declare function mergeInternals(source: Observable, subscriber: Subscriber, project: (value: T, index: number) => ObservableInput, concurrent: number, onBeforeNext?: (innerValue: R) => void, expand?: boolean, innerSubScheduler?: SchedulerLike, additionalFinalizer?: () => void): () => void; +//# sourceMappingURL=mergeInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map new file mode 100644 index 0000000..aa06e61 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI1D;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EACjC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACxD,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,OAAO,EAChB,iBAAiB,CAAC,EAAE,aAAa,EACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,cAwHjC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts new file mode 100644 index 0000000..046ee28 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts @@ -0,0 +1,7 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +export declare function mergeMap>(project: (value: T, index: number) => O, concurrent?: number): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function mergeMap>(project: (value: T, index: number) => O, resultSelector: undefined, concurrent?: number): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function mergeMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction; +//# sourceMappingURL=mergeMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map new file mode 100644 index 0000000..0b97057 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ9E,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACxD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACxD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,EACzB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC3D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,EAC5G,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts new file mode 100644 index 0000000..81658e8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts @@ -0,0 +1,9 @@ +import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types'; +/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */ +export declare function mergeMapTo>(innerObservable: O, concurrent?: number): OperatorFunction>; +/** + * @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. + * Details: https://rxjs.dev/deprecations/resultSelector + */ +export declare function mergeMapTo>(innerObservable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction; +//# sourceMappingURL=mergeMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map new file mode 100644 index 0000000..408482f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC3D,eAAe,EAAE,CAAC,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EACjE,eAAe,EAAE,CAAC,EAClB,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,EAC5G,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts new file mode 100644 index 0000000..d92e804 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts @@ -0,0 +1,69 @@ +import { ObservableInput, OperatorFunction } from '../types'; +/** + * Applies an accumulator function over the source Observable where the + * accumulator function itself returns an Observable, then each intermediate + * Observable returned is merged into the output Observable. + * + * It's like {@link scan}, but the Observables returned + * by the accumulator are merged into the outer Observable. + * + * The first parameter of the `mergeScan` is an `accumulator` function which is + * being called every time the source Observable emits a value. `mergeScan` will + * subscribe to the value returned by the `accumulator` function and will emit + * values to the subscriber emitted by inner Observable. + * + * The `accumulator` function is being called with three parameters passed to it: + * `acc`, `value` and `index`. The `acc` parameter is used as the state parameter + * whose value is initially set to the `seed` parameter (the second parameter + * passed to the `mergeScan` operator). + * + * `mergeScan` internally keeps the value of the `acc` parameter: as long as the + * source Observable emits without inner Observable emitting, the `acc` will be + * set to `seed`. The next time the inner Observable emits a value, `mergeScan` + * will internally remember it and it will be passed to the `accumulator` + * function as `acc` parameter the next time source emits. + * + * The `value` parameter of the `accumulator` function is the value emitted by the + * source Observable, while the `index` is a number which represent the order of the + * current emission by the source Observable. It starts with 0. + * + * The last parameter to the `mergeScan` is the `concurrent` value which defaults + * to Infinity. It represents the maximum number of inner Observable subscriptions + * at a time. + * + * ## Example + * + * Count the number of click events + * + * ```ts + * import { fromEvent, map, mergeScan, of } from 'rxjs'; + * + * const click$ = fromEvent(document, 'click'); + * const one$ = click$.pipe(map(() => 1)); + * const seed = 0; + * const count$ = one$.pipe( + * mergeScan((acc, one) => of(acc + one), seed) + * ); + * + * count$.subscribe(x => console.log(x)); + * + * // Results: + * // 1 + * // 2 + * // 3 + * // 4 + * // ...and so on for each click + * ``` + * + * @see {@link scan} + * @see {@link switchScan} + * + * @param {function(acc: R, value: T): Observable} accumulator + * The accumulator function called on each source value. + * @param seed The initial accumulation value. + * @param {number} [concurrent=Infinity] Maximum number of + * input Observables being subscribed to concurrently. + * @return A function that returns an Observable of the accumulated values. + */ +export declare function mergeScan(accumulator: (acc: R, value: T, index: number) => ObservableInput, seed: R, concurrent?: number): OperatorFunction; +//# sourceMappingURL=mergeScan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map new file mode 100644 index 0000000..e8858ae --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeScan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACpE,IAAI,EAAE,CAAC,EACP,UAAU,SAAW,GACpB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAkBxB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts new file mode 100644 index 0000000..9b2164d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts @@ -0,0 +1,44 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +/** + * Merge the values from all observables to a single observable result. + * + * Creates an observable, that when subscribed to, subscribes to the source + * observable, and all other sources provided as arguments. All values from + * every source are emitted from the resulting subscription. + * + * When all sources complete, the resulting observable will complete. + * + * When any source errors, the resulting observable will error. + * + * ## Example + * + * Joining all outputs from multiple user input event streams + * + * ```ts + * import { fromEvent, map, mergeWith } from 'rxjs'; + * + * const clicks$ = fromEvent(document, 'click').pipe(map(() => 'click')); + * const mousemoves$ = fromEvent(document, 'mousemove').pipe(map(() => 'mousemove')); + * const dblclicks$ = fromEvent(document, 'dblclick').pipe(map(() => 'dblclick')); + * + * mousemoves$ + * .pipe(mergeWith(clicks$, dblclicks$)) + * .subscribe(x => console.log(x)); + * + * // result (assuming user interactions) + * // 'mousemove' + * // 'mousemove' + * // 'mousemove' + * // 'click' + * // 'click' + * // 'dblclick' + * ``` + * + * @see {@link merge} + * + * @param otherSources the sources to combine the current source with. + * @return A function that returns an Observable that merges the values from + * all given Observables. + */ +export declare function mergeWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; +//# sourceMappingURL=mergeWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map new file mode 100644 index 0000000..551d0f2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mergeWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACvD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/min.d.ts b/node_modules/rxjs/dist/types/internal/operators/min.d.ts new file mode 100644 index 0000000..7774020 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/min.d.ts @@ -0,0 +1,49 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), + * and when source Observable completes it emits a single item: the item with the smallest value. + * + * ![](min.png) + * + * ## Examples + * + * Get the minimal value of a series of numbers + * + * ```ts + * import { of, min } from 'rxjs'; + * + * of(5, 4, 7, 2, 8) + * .pipe(min()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 2 + * ``` + * + * Use a comparer function to get the minimal item + * + * ```ts + * import { of, min } from 'rxjs'; + * + * of( + * { age: 7, name: 'Foo' }, + * { age: 5, name: 'Bar' }, + * { age: 9, name: 'Beer' } + * ).pipe( + * min((a, b) => a.age < b.age ? -1 : 1) + * ) + * .subscribe(x => console.log(x.name)); + * + * // Outputs + * // 'Bar' + * ``` + * + * @see {@link max} + * + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return A function that returns an Observable that emits item with the + * smallest value. + */ +export declare function min(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction; +//# sourceMappingURL=min.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map new file mode 100644 index 0000000..1f00e15 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"min.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts new file mode 100644 index 0000000..7b7e222 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts @@ -0,0 +1,63 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { OperatorFunction, UnaryFunction, ObservedValueOf, ObservableInput } from '../types'; +/** + * An operator that creates a {@link ConnectableObservable}, that when connected, + * with the `connect` method, will use the provided subject to multicast the values + * from the source to all consumers. + * + * @param subject The subject to multicast through. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. + * `multicast(subject), refCount()` is equivalent to + * `share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function multicast(subject: Subject): UnaryFunction, ConnectableObservable>; +/** + * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, + * rather than duplicate the effort of documenting the same behavior, please see documentation for the + * {@link connect} operator. + * + * @param subject The subject used to multicast. + * @param selector A setup function to setup the multicast + * @return A function that returns an observable that mirrors the observable returned by the selector. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `multicast(subject, selector)` is equivalent to + * `connect(selector, { connector: () => subject })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function multicast>(subject: Subject, selector: (shared: Observable) => O): OperatorFunction>; +/** + * An operator that creates a {@link ConnectableObservable}, that when connected, + * with the `connect` method, will use the provided subject to multicast the values + * from the source to all consumers. + * + * @param subjectFactory A factory that will be called to create the subject. Passing a function here + * will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of + * the source. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. + * `multicast(() => new BehaviorSubject('test')), refCount()` is equivalent to + * `share({ connector: () => new BehaviorSubject('test') })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function multicast(subjectFactory: () => Subject): UnaryFunction, ConnectableObservable>; +/** + * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, + * rather than duplicate the effort of documenting the same behavior, please see documentation for the + * {@link connect} operator. + * + * @param subjectFactory A factory that creates the subject used to multicast. + * @param selector A function to setup the multicast and select the output. + * @return A function that returns an observable that mirrors the observable returned by the selector. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `multicast(subjectFactory, selector)` is equivalent to + * `connect(selector, { connector: subjectFactory })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function multicast>(subjectFactory: () => Subject, selector: (shared: Observable) => O): OperatorFunction>; +//# sourceMappingURL=multicast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map new file mode 100644 index 0000000..dfdec4b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"multicast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI7F;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1G;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GACrC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvH;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GACrC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts new file mode 100644 index 0000000..8ff7878 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts @@ -0,0 +1,56 @@ +/** @prettier */ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Re-emits all notifications from source Observable with specified scheduler. + * + * Ensure a specific scheduler is used, from outside of an Observable. + * + * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule + * notifications emitted by the source Observable. It might be useful, if you do not have control over + * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless. + * + * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, + * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal + * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits + * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`. + * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split + * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source + * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a + * little bit more, to ensure that they are emitted at expected moments. + * + * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications + * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn` + * will delay all notifications - including error notifications - while `delay` will pass through error + * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator + * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used + * for notification emissions in general. + * + * ## Example + * + * Ensure values in subscribe are called just before browser repaint + * + * ```ts + * import { interval, observeOn, animationFrameScheduler } from 'rxjs'; + * + * const someDiv = document.createElement('div'); + * someDiv.style.cssText = 'width: 200px;background: #09c'; + * document.body.appendChild(someDiv); + * const intervals = interval(10); // Intervals are scheduled + * // with async scheduler by default... + * intervals.pipe( + * observeOn(animationFrameScheduler) // ...but we will observe on animationFrame + * ) // scheduler to ensure smooth animation. + * .subscribe(val => { + * someDiv.style.height = val + 'px'; + * }); + * ``` + * + * @see {@link delay} + * + * @param scheduler Scheduler that will be used to reschedule notifications from source Observable. + * @param delay Number of milliseconds that states with what delay every notification should be rescheduled. + * @return A function that returns an Observable that emits the same + * notifications as the source Observable, but with provided scheduler. + */ +export declare function observeOn(scheduler: SchedulerLike, delay?: number): MonoTypeOperatorFunction; +//# sourceMappingURL=observeOn.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map new file mode 100644 index 0000000..5997ac5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"observeOn.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,SAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW7F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts new file mode 100644 index 0000000..8323747 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts @@ -0,0 +1,8 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +export declare function onErrorResumeNextWith(sources: [...ObservableInputTuple]): OperatorFunction; +export declare function onErrorResumeNextWith(...sources: [...ObservableInputTuple]): OperatorFunction; +/** + * @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8. + */ +export declare const onErrorResumeNext: typeof onErrorResumeNextWith; +//# sourceMappingURL=onErrorResumeNextWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map new file mode 100644 index 0000000..45bf50f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"onErrorResumeNextWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACpC,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACvC,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAsFtC;;GAEG;AACH,eAAO,MAAM,iBAAiB,8BAAwB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts new file mode 100644 index 0000000..08ea7b7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts @@ -0,0 +1,46 @@ +import { OperatorFunction } from '../types'; +/** + * Groups pairs of consecutive emissions together and emits them as an array of + * two values. + * + * Puts the current value and previous value together as + * an array, and emits that. + * + * ![](pairwise.png) + * + * The Nth emission from the source Observable will cause the output Observable + * to emit an array [(N-1)th, Nth] of the previous and the current value, as a + * pair. For this reason, `pairwise` emits on the second and subsequent + * emissions from the source Observable, but not on the first emission, because + * there is no previous value in that case. + * + * ## Example + * + * On every click (starting from the second), emit the relative distance to the previous click + * + * ```ts + * import { fromEvent, pairwise, map } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const pairs = clicks.pipe(pairwise()); + * const distance = pairs.pipe( + * map(([first, second]) => { + * const x0 = first.clientX; + * const y0 = first.clientY; + * const x1 = second.clientX; + * const y1 = second.clientY; + * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2)); + * }) + * ); + * + * distance.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * + * @return A function that returns an Observable of pairs (as arrays) of + * consecutive values from the source Observable. + */ +export declare function pairwise(): OperatorFunction; +//# sourceMappingURL=pairwise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map new file mode 100644 index 0000000..1c3a799 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pairwise.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAazD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts new file mode 100644 index 0000000..34fc1a2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts @@ -0,0 +1,55 @@ +import { Observable } from '../Observable'; +import { UnaryFunction } from '../types'; +/** + * Splits the source Observable into two, one with values that satisfy a + * predicate, and another with values that don't satisfy the predicate. + * + * It's like {@link filter}, but returns two Observables: + * one like the output of {@link filter}, and the other with values that did not + * pass the condition. + * + * ![](partition.png) + * + * `partition` outputs an array with two Observables that partition the values + * from the source Observable through the given `predicate` function. The first + * Observable in that array emits source values for which the predicate argument + * returns true. The second Observable emits source values for which the + * predicate returns false. The first behaves like {@link filter} and the second + * behaves like {@link filter} with the predicate negated. + * + * ## Example + * + * Partition click events into those on DIV elements and those elsewhere + * + * ```ts + * import { fromEvent } from 'rxjs'; + * import { partition } from 'rxjs/operators'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const [clicksOnDivs, clicksElsewhere] = clicks.pipe(partition(ev => (ev.target).tagName === 'DIV')); + * + * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x)); + * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x)); + * ``` + * + * @see {@link filter} + * + * @param {function(value: T, index: number): boolean} predicate A function that + * evaluates each value emitted by the source Observable. If it returns `true`, + * the value is emitted on the first Observable in the returned array, if + * `false` the value is emitted on the second Observable in the array. The + * `index` parameter is the number `i` for the i-th source emission that has + * happened since the subscription, starting from the number `0`. + * @param {any} [thisArg] An optional argument to determine the value of `this` + * in the `predicate` function. + * @return A function that returns an array with two Observables: one with + * values that passed the predicate, and another with values that did not pass + * the predicate. + * @deprecated Replaced with the `partition` static creation function. Will be removed in v8. + */ +export declare function partition(predicate: (value: T, index: number) => boolean, thisArg?: any): UnaryFunction, [Observable, Observable]>; +//# sourceMappingURL=partition.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map new file mode 100644 index 0000000..6d9e26c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAC/C,OAAO,CAAC,EAAE,GAAG,GACZ,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAG9D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts new file mode 100644 index 0000000..cfc757d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts @@ -0,0 +1,18 @@ +import { OperatorFunction } from '../types'; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2, k3: K3): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6, ...rest: string[]): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export declare function pluck(...properties: string[]): OperatorFunction; +//# sourceMappingURL=pluck.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map new file mode 100644 index 0000000..7f7aebd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pluck.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjF,kIAAkI;AAClI,wBA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CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClG,kIAAkI;AAClI,wBAAgB,KAAK,CACnB,CAAC,EACD,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAClC,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EACtC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACnG,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts new file mode 100644 index 0000000..89f8324 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts @@ -0,0 +1,30 @@ +import { Observable } from '../Observable'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { OperatorFunction, UnaryFunction, ObservableInput, ObservedValueOf } from '../types'; +/** + * Returns a connectable observable that, when connected, will multicast + * all values through a single underlying {@link Subject} instance. + * + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * `source.pipe(publish())` is equivalent to + * `connectable(source, { connector: () => new Subject(), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publish`, use {@link share} operator instead. + * `source.pipe(publish(), refCount())` is equivalent to + * `source.pipe(share({ resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publish(): UnaryFunction, ConnectableObservable>; +/** + * Returns an observable, that when subscribed to, creates an underlying {@link Subject}, + * provides an observable view of it to a `selector` function, takes the observable result of + * that selector function and subscribes to it, sending its values to the consumer, _then_ connects + * the subject to the original source. + * + * @param selector A function used to setup multicasting prior to automatic connection. + * + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `publish(selector)` is equivalent to `connect(selector)`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publish>(selector: (shared: Observable) => O): OperatorFunction>; +//# sourceMappingURL=publish.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map new file mode 100644 index 0000000..5003ff5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAA4B,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGvH;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts new file mode 100644 index 0000000..8f3db6c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts @@ -0,0 +1,19 @@ +import { Observable } from '../Observable'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { UnaryFunction } from '../types'; +/** + * Creates a {@link ConnectableObservable} that utilizes a {@link BehaviorSubject}. + * + * @param initialValue The initial value passed to the {@link BehaviorSubject}. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link BehaviorSubject} under the hood, use {@link connectable}. + * `source.pipe(publishBehavior(initValue))` is equivalent to + * `connectable(source, { connector: () => new BehaviorSubject(initValue), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishBehavior`, use the {@link share} operator instead. + * `source.pipe(publishBehavior(initValue), refCount())` is equivalent to + * `source.pipe(share({ connector: () => new BehaviorSubject(initValue), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publishBehavior(initialValue: T): UnaryFunction, ConnectableObservable>; +//# sourceMappingURL=publishBehavior.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map new file mode 100644 index 0000000..67ecc75 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"publishBehavior.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAM1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts new file mode 100644 index 0000000..9c3bc5f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts @@ -0,0 +1,69 @@ +import { Observable } from '../Observable'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { UnaryFunction } from '../types'; +/** + * Returns a connectable observable sequence that shares a single subscription to the + * underlying sequence containing only the last notification. + * + * ![](publishLast.png) + * + * Similar to {@link publish}, but it waits until the source observable completes and stores + * the last emitted value. + * Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last + * value even if it has no more subscribers. If subsequent subscriptions happen, they will + * immediately get that last stored value and complete. + * + * ## Example + * + * ```ts + * import { ConnectableObservable, interval, publishLast, tap, take } from 'rxjs'; + * + * const connectable = >interval(1000) + * .pipe( + * tap(x => console.log('side effect', x)), + * take(3), + * publishLast() + * ); + * + * connectable.subscribe({ + * next: x => console.log('Sub. A', x), + * error: err => console.log('Sub. A Error', err), + * complete: () => console.log('Sub. A Complete') + * }); + * + * connectable.subscribe({ + * next: x => console.log('Sub. B', x), + * error: err => console.log('Sub. B Error', err), + * complete: () => console.log('Sub. B Complete') + * }); + * + * connectable.connect(); + * + * // Results: + * // 'side effect 0' - after one second + * // 'side effect 1' - after two seconds + * // 'side effect 2' - after three seconds + * // 'Sub. A 2' - immediately after 'side effect 2' + * // 'Sub. B 2' + * // 'Sub. A Complete' + * // 'Sub. B Complete' + * ``` + * + * @see {@link ConnectableObservable} + * @see {@link publish} + * @see {@link publishReplay} + * @see {@link publishBehavior} + * + * @return A function that returns an Observable that emits elements of a + * sequence produced by multicasting the source sequence. + * @deprecated Will be removed in v8. To create a connectable observable with an + * {@link AsyncSubject} under the hood, use {@link connectable}. + * `source.pipe(publishLast())` is equivalent to + * `connectable(source, { connector: () => new AsyncSubject(), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishLast`, use the {@link share} operator instead. + * `source.pipe(publishLast(), refCount())` is equivalent to + * `source.pipe(share({ connector: () => new AsyncSubject(), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publishLast(): UnaryFunction, ConnectableObservable>; +//# sourceMappingURL=publishLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map new file mode 100644 index 0000000..387fb90 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"publishLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,WAAW,CAAC,CAAC,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAMvF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts new file mode 100644 index 0000000..c44a737 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts @@ -0,0 +1,56 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, OperatorFunction, TimestampProvider, ObservableInput, ObservedValueOf } from '../types'; +/** + * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} + * internally. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link ReplaySubject} under the hood, use {@link connectable}. + * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to + * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. + * `publishReplay(size, time, scheduler), refCount()` is equivalent to + * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publishReplay(bufferSize?: number, windowTime?: number, timestampProvider?: TimestampProvider): MonoTypeOperatorFunction; +/** + * Creates an observable, that when subscribed to, will create a {@link ReplaySubject}, + * and pass an observable from it (using [asObservable](api/index/class/Subject#asObservable)) to + * the `selector` function, which then returns an observable that is subscribed to before + * "connecting" the source to the internal `ReplaySubject`. + * + * Since this is deprecated, for additional details see the documentation for {@link connect}. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param selector A function used to setup the multicast. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `source.pipe(publishReplay(size, window, selector, scheduler))` is equivalent to + * `source.pipe(connect(selector, { connector: () => new ReplaySubject(size, window, scheduler) }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publishReplay>(bufferSize: number | undefined, windowTime: number | undefined, selector: (shared: Observable) => O, timestampProvider?: TimestampProvider): OperatorFunction>; +/** + * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} + * internally. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param selector Passing `undefined` here determines that this operator will return a {@link ConnectableObservable}. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link ReplaySubject} under the hood, use {@link connectable}. + * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to + * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. + * `publishReplay(size, time, scheduler), refCount()` is equivalent to + * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function publishReplay>(bufferSize: number | undefined, windowTime: number | undefined, selector: undefined, timestampProvider: TimestampProvider): OperatorFunction>; +//# sourceMappingURL=publishReplay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map new file mode 100644 index 0000000..7a48ebc --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"publishReplay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3H;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE/B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACtC,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,SAAS,EACnB,iBAAiB,EAAE,iBAAiB,GACnC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/race.d.ts b/node_modules/rxjs/dist/types/internal/operators/race.d.ts new file mode 100644 index 0000000..0aee184 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/race.d.ts @@ -0,0 +1,6 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ +export declare function race(otherSources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ +export declare function race(...otherSources: [...ObservableInputTuple]): OperatorFunction; +//# sourceMappingURL=race.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map new file mode 100644 index 0000000..ca68cb8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"race.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIlE,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts new file mode 100644 index 0000000..762f5b3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts @@ -0,0 +1,29 @@ +import { OperatorFunction, ObservableInputTuple } from '../types'; +/** + * Creates an Observable that mirrors the first source Observable to emit a next, + * error or complete notification from the combination of the Observable to which + * the operator is applied and supplied Observables. + * + * ## Example + * + * ```ts + * import { interval, map, raceWith } from 'rxjs'; + * + * const obs1 = interval(7000).pipe(map(() => 'slow one')); + * const obs2 = interval(3000).pipe(map(() => 'fast one')); + * const obs3 = interval(5000).pipe(map(() => 'medium one')); + * + * obs1 + * .pipe(raceWith(obs2, obs3)) + * .subscribe(winner => console.log(winner)); + * + * // Outputs + * // a series of 'fast one' + * ``` + * + * @param otherSources Sources used to race for which Observable emits first. + * @return A function that returns an Observable that mirrors the output of the + * first Observable to emit an item. + */ +export declare function raceWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; +//# sourceMappingURL=raceWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map new file mode 100644 index 0000000..4a64c3b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"raceWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKlE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACtD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAMpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts new file mode 100644 index 0000000..531f333 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts @@ -0,0 +1,5 @@ +import { OperatorFunction } from '../types'; +export declare function reduce(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; +export declare function reduce(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; +export declare function reduce(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; +//# sourceMappingURL=reduce.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map new file mode 100644 index 0000000..821fe4c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reduce.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACtH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts new file mode 100644 index 0000000..300bfbe --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts @@ -0,0 +1,61 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way + * you can connect to it. + * + * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if + * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it + * unsubscribes from the source. This way you can make sure that everything before the *published* + * refCount has only a single subscription independently of the number of subscribers to the target + * observable. + * + * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator + * (making the observable hot) and the *refCount* operator in a sequence. + * + * ![](refCount.png) + * + * ## Example + * + * In the following example there are two intervals turned into connectable observables + * by using the *publish* operator. The first one uses the *refCount* operator, the + * second one does not use it. You will notice that a connectable observable does nothing + * until you call its connect function. + * + * ```ts + * import { interval, tap, publish, refCount } from 'rxjs'; + * + * // Turn the interval observable into a ConnectableObservable (hot) + * const refCountInterval = interval(400).pipe( + * tap(num => console.log(`refCount ${ num }`)), + * publish(), + * refCount() + * ); + * + * const publishedInterval = interval(400).pipe( + * tap(num => console.log(`publish ${ num }`)), + * publish() + * ); + * + * refCountInterval.subscribe(); + * refCountInterval.subscribe(); + * // 'refCount 0' -----> 'refCount 1' -----> etc + * // All subscriptions will receive the same value and the tap (and + * // every other operator) before the `publish` operator will be executed + * // only once per event independently of the number of subscriptions. + * + * publishedInterval.subscribe(); + * // Nothing happens until you call .connect() on the observable. + * ``` + * + * @return A function that returns an Observable that automates the connection + * to ConnectableObservable. + * @see {@link ConnectableObservable} + * @see {@link share} + * @see {@link publish} + * @deprecated Replaced with the {@link share} operator. How `share` is used + * will depend on the connectable observable you created just prior to the + * `refCount` operator. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export declare function refCount(): MonoTypeOperatorFunction; +//# sourceMappingURL=refCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map new file mode 100644 index 0000000..51b9693 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"refCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAsDzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts new file mode 100644 index 0000000..527d532 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts @@ -0,0 +1,108 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +export interface RepeatConfig { + /** + * The number of times to repeat the source. Defaults to `Infinity`. + */ + count?: number; + /** + * If a `number`, will delay the repeat of the source by that number of milliseconds. + * If a function, it will provide the number of times the source has been subscribed to, + * and the return value should be a valid observable input that will notify when the source + * should be repeated. If the notifier observable is empty, the result will complete. + */ + delay?: number | ((count: number) => ObservableInput); +} +/** + * Returns an Observable that will resubscribe to the source stream when the source stream completes. + * + * Repeats all values emitted on the source. It's like {@link retry}, but for non error cases. + * + * ![](repeat.png) + * + * Repeat will output values from a source until the source completes, then it will resubscribe to the + * source a specified number of times, with a specified delay. Repeat can be particularly useful in + * combination with closing operators like {@link take}, {@link takeUntil}, {@link first}, or {@link takeWhile}, + * as it can be used to restart a source again from scratch. + * + * Repeat is very similar to {@link retry}, where {@link retry} will resubscribe to the source in the error case, but + * `repeat` will resubscribe if the source completes. + * + * Note that `repeat` will _not_ catch errors. Use {@link retry} for that. + * + * - `repeat(0)` returns an empty observable + * - `repeat()` will repeat forever + * - `repeat({ delay: 200 })` will repeat forever, with a delay of 200ms between repetitions. + * - `repeat({ count: 2, delay: 400 })` will repeat twice, with a delay of 400ms between repetitions. + * - `repeat({ delay: (count) => timer(count * 1000) })` will repeat forever, but will have a delay that grows by one second for each repetition. + * + * ## Example + * + * Repeat a message stream + * + * ```ts + * import { of, repeat } from 'rxjs'; + * + * const source = of('Repeat message'); + * const result = source.pipe(repeat(3)); + * + * result.subscribe(x => console.log(x)); + * + * // Results + * // 'Repeat message' + * // 'Repeat message' + * // 'Repeat message' + * ``` + * + * Repeat 3 values, 2 times + * + * ```ts + * import { interval, take, repeat } from 'rxjs'; + * + * const source = interval(1000); + * const result = source.pipe(take(3), repeat(2)); + * + * result.subscribe(x => console.log(x)); + * + * // Results every second + * // 0 + * // 1 + * // 2 + * // 0 + * // 1 + * // 2 + * ``` + * + * Defining two complex repeats with delays on the same source. + * Note that the second repeat cannot be called until the first + * repeat as exhausted it's count. + * + * ```ts + * import { defer, of, repeat } from 'rxjs'; + * + * const source = defer(() => { + * return of(`Hello, it is ${new Date()}`) + * }); + * + * source.pipe( + * // Repeat 3 times with a delay of 1 second between repetitions + * repeat({ + * count: 3, + * delay: 1000, + * }), + * + * // *Then* repeat forever, but with an exponential step-back + * // maxing out at 1 minute. + * repeat({ + * delay: (count) => timer(Math.min(60000, 2 ^ count * 1000)) + * }) + * ) + * ``` + * + * @see {@link repeatWhen} + * @see {@link retry} + * + * @param count The number of times the source Observable items are repeated, a count of 0 will yield + * an empty Observable. + */ +export declare function repeat(countOrConfig?: number | RepeatConfig): MonoTypeOperatorFunction; +//# sourceMappingURL=repeat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map new file mode 100644 index 0000000..30aa197 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAwD5F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts new file mode 100644 index 0000000..27bc5d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts @@ -0,0 +1,38 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source + * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable + * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise + * this method will resubscribe to the source Observable. + * + * ![](repeatWhen.png) + * + * ## Example + * + * Repeat a message stream on click + * + * ```ts + * import { of, fromEvent, repeatWhen } from 'rxjs'; + * + * const source = of('Repeat message'); + * const documentClick$ = fromEvent(document, 'click'); + * + * const result = source.pipe(repeatWhen(() => documentClick$)); + * + * result.subscribe(data => console.log(data)) + * ``` + * + * @see {@link repeat} + * @see {@link retry} + * @see {@link retryWhen} + * + * @param notifier Function that receives an Observable of notifications with + * which a user can `complete` or `error`, aborting the repetition. + * @return A function that returns an `ObservableInput` that mirrors the source + * Observable with the exception of a `complete`. + * @deprecated Will be removed in v9 or v10. Use {@link repeat}'s {@link RepeatConfig#delay delay} option instead. + * Instead of `repeatWhen(() => notify$)`, use: `repeat({ delay: () => notify$ })`. + */ +export declare function repeatWhen(notifier: (notifications: Observable) => ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=repeatWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map new file mode 100644 index 0000000..ca91308 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"repeatWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAiF9H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts new file mode 100644 index 0000000..d5afb0c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts @@ -0,0 +1,28 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * The {@link retry} operator configuration object. `retry` either accepts a `number` + * or an object described by this interface. + */ +export interface RetryConfig { + /** + * The maximum number of times to retry. If `count` is omitted, `retry` will try to + * resubscribe on errors infinite number of times. + */ + count?: number; + /** + * The number of milliseconds to delay before retrying, OR a function to + * return a notifier for delaying. If a function is given, that function should + * return a notifier that, when it emits will retry the source. If the notifier + * completes _without_ emitting, the resulting observable will complete without error, + * if the notifier errors, the error will be pushed to the result. + */ + delay?: number | ((error: any, retryCount: number) => ObservableInput); + /** + * Whether or not to reset the retry counter when the retried subscription + * emits its first value. + */ + resetOnSuccess?: boolean; +} +export declare function retry(count?: number): MonoTypeOperatorFunction; +export declare function retry(config: RetryConfig): MonoTypeOperatorFunction; +//# sourceMappingURL=retry.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map new file mode 100644 index 0000000..08890ee --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACtE,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts new file mode 100644 index 0000000..614bc86 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts @@ -0,0 +1,61 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable + * calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`. + * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child + * subscription. Otherwise this method will resubscribe to the source Observable. + * + * ![](retryWhen.png) + * + * Retry an observable sequence on error based on custom criteria. + * + * ## Example + * + * ```ts + * import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs'; + * + * const source = interval(1000); + * const result = source.pipe( + * map(value => { + * if (value > 5) { + * // error will be picked up by retryWhen + * throw value; + * } + * return value; + * }), + * retryWhen(errors => + * errors.pipe( + * // log error message + * tap(value => console.log(`Value ${ value } was too high!`)), + * // restart in 5 seconds + * delayWhen(value => timer(value * 1000)) + * ) + * ) + * ); + * + * result.subscribe(value => console.log(value)); + * + * // results: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * // 'Value 6 was too high!' + * // - Wait 5 seconds then repeat + * ``` + * + * @see {@link retry} + * + * @param notifier Function that receives an Observable of notifications with which a + * user can `complete` or `error`, aborting the retry. + * @return A function that returns an `ObservableInput` that mirrors the source + * Observable with the exception of an `error`. + * @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead. + * Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead. + * Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`. + */ +export declare function retryWhen(notifier: (errors: Observable) => ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=retryWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map new file mode 100644 index 0000000..a4b5b32 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"retryWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA8CrH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts new file mode 100644 index 0000000..3840266 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts @@ -0,0 +1,43 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Emits the most recently emitted value from the source Observable whenever + * another Observable, the `notifier`, emits. + * + * It's like {@link sampleTime}, but samples whenever + * the `notifier` `ObservableInput` emits something. + * + * ![](sample.png) + * + * Whenever the `notifier` `ObservableInput` emits a value, `sample` + * looks at the source Observable and emits whichever value it has most recently + * emitted since the previous sampling, unless the source has not emitted + * anything since the previous sampling. The `notifier` is subscribed to as soon + * as the output Observable is subscribed. + * + * ## Example + * + * On every click, sample the most recent `seconds` timer + * + * ```ts + * import { fromEvent, interval, sample } from 'rxjs'; + * + * const seconds = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const result = seconds.pipe(sample(clicks)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounce} + * @see {@link sampleTime} + * @see {@link throttle} + * + * @param notifier The `ObservableInput` to use for sampling the + * source Observable. + * @return A function that returns an Observable that emits the results of + * sampling the values emitted by the source Observable whenever the notifier + * Observable emits value or completes. + */ +export declare function sample(notifier: ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=sample.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map new file mode 100644 index 0000000..51a926b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAyBrF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts new file mode 100644 index 0000000..790a3da --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts @@ -0,0 +1,46 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Emits the most recently emitted value from the source Observable within + * periodic time intervals. + * + * Samples the source Observable at periodic time + * intervals, emitting what it samples. + * + * ![](sampleTime.png) + * + * `sampleTime` periodically looks at the source Observable and emits whichever + * value it has most recently emitted since the previous sampling, unless the + * source has not emitted anything since the previous sampling. The sampling + * happens periodically in time every `period` milliseconds (or the time unit + * defined by the optional `scheduler` argument). The sampling starts as soon as + * the output Observable is subscribed. + * + * ## Example + * + * Every second, emit the most recent click at most once + * + * ```ts + * import { fromEvent, sampleTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(sampleTime(1000)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sample} + * @see {@link throttleTime} + * + * @param {number} period The sampling period expressed in milliseconds or the + * time unit determined internally by the optional `scheduler`. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the sampling. + * @return A function that returns an Observable that emits the results of + * sampling the values emitted by the source Observable at the specified time + * interval. + */ +export declare function sampleTime(period: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=sampleTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map new file mode 100644 index 0000000..6840b29 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sampleTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts new file mode 100644 index 0000000..97a9152 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts @@ -0,0 +1,5 @@ +import { OperatorFunction } from '../types'; +export declare function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; +export declare function scan(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; +export declare function scan(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; +//# sourceMappingURL=scan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map new file mode 100644 index 0000000..52ba32d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts new file mode 100644 index 0000000..2adae3b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts @@ -0,0 +1,12 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +/** + * A basic scan operation. This is used for `scan` and `reduce`. + * @param accumulator The accumulator to use + * @param seed The seed value for the state to accumulate + * @param hasSeed Whether or not a seed was provided + * @param emitOnNext Whether or not to emit the state on next + * @param emitBeforeComplete Whether or not to emit the before completion + */ +export declare function scanInternals(accumulator: (acc: V | A | S, value: V, index: number) => A, seed: S, hasSeed: boolean, emitOnNext: boolean, emitBeforeComplete?: undefined | true): (source: Observable, subscriber: Subscriber) => void; +//# sourceMappingURL=scanInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map new file mode 100644 index 0000000..c810abe --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scanInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;;;GAOG;AAEH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACnC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAC3D,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,OAAO,EACnB,kBAAkB,CAAC,EAAE,SAAS,GAAG,IAAI,YAErB,WAAW,CAAC,CAAC,cAAc,WAAW,GAAG,CAAC,UAyC3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts new file mode 100644 index 0000000..f479615 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts @@ -0,0 +1,60 @@ +import { OperatorFunction, ObservableInput } from '../types'; +/** + * Compares all values of two observables in sequence using an optional comparator function + * and returns an observable of a single boolean value representing whether or not the two sequences + * are equal. + * + * Checks to see of all values emitted by both observables are equal, in order. + * + * ![](sequenceEqual.png) + * + * `sequenceEqual` subscribes to source observable and `compareTo` `ObservableInput` (that internally + * gets converted to an observable) and buffers incoming values from each observable. Whenever either + * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom + * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the + * observables completes, the operator will wait for the other observable to complete; If the other + * observable emits before completing, the returned observable will emit `false` and complete. If one observable never + * completes or emits after the other completes, the returned observable will never complete. + * + * ## Example + * + * Figure out if the Konami code matches + * + * ```ts + * import { from, fromEvent, map, bufferCount, mergeMap, sequenceEqual } from 'rxjs'; + * + * const codes = from([ + * 'ArrowUp', + * 'ArrowUp', + * 'ArrowDown', + * 'ArrowDown', + * 'ArrowLeft', + * 'ArrowRight', + * 'ArrowLeft', + * 'ArrowRight', + * 'KeyB', + * 'KeyA', + * 'Enter', // no start key, clearly. + * ]); + * + * const keys = fromEvent(document, 'keyup').pipe(map(e => e.code)); + * const matches = keys.pipe( + * bufferCount(11, 1), + * mergeMap(last11 => from(last11).pipe(sequenceEqual(codes))) + * ); + * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched)); + * ``` + * + * @see {@link combineLatest} + * @see {@link zip} + * @see {@link withLatestFrom} + * + * @param compareTo The `ObservableInput` sequence to compare the source sequence to. + * @param comparator An optional function to compare each value pair. + * + * @return A function that returns an Observable that emits a single boolean + * value representing whether or not the values emitted by the source + * Observable and provided `ObservableInput` were equal in sequence. + */ +export declare function sequenceEqual(compareTo: ObservableInput, comparator?: (a: T, b: T) => boolean): OperatorFunction; +//# sourceMappingURL=sequenceEqual.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map new file mode 100644 index 0000000..061182c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sequenceEqual.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,EAC7B,UAAU,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAA2B,GACtD,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CA2D9B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/share.d.ts b/node_modules/rxjs/dist/types/internal/operators/share.d.ts new file mode 100644 index 0000000..43b9edd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/share.d.ts @@ -0,0 +1,43 @@ +import { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types'; +export interface ShareConfig { + /** + * The factory used to create the subject that will connect the source observable to + * multicast consumers. + */ + connector?: () => SubjectLike; + /** + * If `true`, the resulting observable will reset internal state on error from source and return to a "cold" state. This + * allows the resulting observable to be "retried" in the event of an error. + * If `false`, when an error comes from the source it will push the error into the connecting subject, and the subject + * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent retries + * or resubscriptions will resubscribe to that same subject. In all cases, RxJS subjects will emit the same error again, however + * {@link ReplaySubject} will also push its buffered values before pushing the error. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnError?: boolean | ((error: any) => ObservableInput); + /** + * If `true`, the resulting observable will reset internal state on completion from source and return to a "cold" state. This + * allows the resulting observable to be "repeated" after it is done. + * If `false`, when the source completes, it will push the completion through the connecting subject, and the subject + * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent repeats + * or resubscriptions will resubscribe to that same subject. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnComplete?: boolean | (() => ObservableInput); + /** + * If `true`, when the number of subscribers to the resulting observable reaches zero due to those subscribers unsubscribing, the + * internal state will be reset and the resulting observable will return to a "cold" state. This means that the next + * time the resulting observable is subscribed to, a new subject will be created and the source will be subscribed to + * again. + * If `false`, when the number of subscribers to the resulting observable reaches zero due to unsubscription, the subject + * will remain connected to the source, and new subscriptions to the result will be connected through that same subject. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnRefCountZero?: boolean | (() => ObservableInput); +} +export declare function share(): MonoTypeOperatorFunction; +export declare function share(options: ShareConfig): MonoTypeOperatorFunction; +//# sourceMappingURL=share.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map new file mode 100644 index 0000000..ad8ff9e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGlF,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;IACjC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9D;AAED,wBAAgB,KAAK,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAExD,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts new file mode 100644 index 0000000..3343908 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts @@ -0,0 +1,10 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +export interface ShareReplayConfig { + bufferSize?: number; + windowTime?: number; + refCount: boolean; + scheduler?: SchedulerLike; +} +export declare function shareReplay(config: ShareReplayConfig): MonoTypeOperatorFunction; +export declare function shareReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=shareReplay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map new file mode 100644 index 0000000..55b8fcb --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"shareReplay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/single.d.ts b/node_modules/rxjs/dist/types/internal/operators/single.d.ts new file mode 100644 index 0000000..bcdf63b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/single.d.ts @@ -0,0 +1,5 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types'; +export declare function single(predicate: BooleanConstructor): OperatorFunction>; +export declare function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction; +//# sourceMappingURL=single.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map new file mode 100644 index 0000000..da32ebd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMrF,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts new file mode 100644 index 0000000..9960d03 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts @@ -0,0 +1,36 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Returns an Observable that skips the first `count` items emitted by the source Observable. + * + * ![](skip.png) + * + * Skips the values until the sent notifications are equal or less than provided skip count. It raises + * an error if skip count is equal or more than the actual number of emits and source raises an error. + * + * ## Example + * + * Skip the values before the emission + * + * ```ts + * import { interval, skip } from 'rxjs'; + * + * // emit every half second + * const source = interval(500); + * // skip the first 10 emitted values + * const result = source.pipe(skip(10)); + * + * result.subscribe(value => console.log(value)); + * // output: 10...11...12...13... + * ``` + * + * @see {@link last} + * @see {@link skipWhile} + * @see {@link skipUntil} + * @see {@link skipLast} + * + * @param {Number} count - The number of times, items emitted by source Observable should be skipped. + * @return A function that returns an Observable that skips the first `count` + * values emitted by the source Observable. + */ +export declare function skip(count: number): MonoTypeOperatorFunction; +//# sourceMappingURL=skip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map new file mode 100644 index 0000000..5855c40 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"skip.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAElE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts new file mode 100644 index 0000000..0e84709 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts @@ -0,0 +1,45 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Skip a specified number of values before the completion of an observable. + * + * ![](skipLast.png) + * + * Returns an observable that will emit values as soon as it can, given a number of + * skipped values. For example, if you `skipLast(3)` on a source, when the source + * emits its fourth value, the first value the source emitted will finally be emitted + * from the returned observable, as it is no longer part of what needs to be skipped. + * + * All values emitted by the result of `skipLast(N)` will be delayed by `N` emissions, + * as each value is held in a buffer until enough values have been emitted that that + * the buffered value may finally be sent to the consumer. + * + * After subscribing, unsubscribing will not result in the emission of the buffered + * skipped values. + * + * ## Example + * + * Skip the last 2 values of an observable with many values + * + * ```ts + * import { of, skipLast } from 'rxjs'; + * + * const numbers = of(1, 2, 3, 4, 5); + * const skipLastTwo = numbers.pipe(skipLast(2)); + * skipLastTwo.subscribe(x => console.log(x)); + * + * // Results in: + * // 1 2 3 + * // (4 and 5 are skipped) + * ``` + * + * @see {@link skip} + * @see {@link skipUntil} + * @see {@link skipWhile} + * @see {@link take} + * + * @param skipCount Number of elements to skip from the end of the source Observable. + * @return A function that returns an Observable that skips the last `count` + * values emitted by the source Observable. + */ +export declare function skipLast(skipCount: number): MonoTypeOperatorFunction; +//# sourceMappingURL=skipLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map new file mode 100644 index 0000000..1195f43 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"skipLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA+C1E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts new file mode 100644 index 0000000..caf1f5a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts @@ -0,0 +1,48 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. + * + * The `skipUntil` operator causes the observable stream to skip the emission of values until the passed in observable + * emits the first value. This can be particularly useful in combination with user interactions, responses of HTTP + * requests or waiting for specific times to pass by. + * + * ![](skipUntil.png) + * + * Internally, the `skipUntil` operator subscribes to the passed in `notifier` `ObservableInput` (which gets converted + * to an Observable) in order to recognize the emission of its first value. When `notifier` emits next, the operator + * unsubscribes from it and starts emitting the values of the *source* observable until it completes or errors. It + * will never let the *source* observable emit any values if the `notifier` completes or throws an error without + * emitting a value before. + * + * ## Example + * + * In the following example, all emitted values of the interval observable are skipped until the user clicks anywhere + * within the page + * + * ```ts + * import { interval, fromEvent, skipUntil } from 'rxjs'; + * + * const intervalObservable = interval(1000); + * const click = fromEvent(document, 'click'); + * + * const emitAfterClick = intervalObservable.pipe( + * skipUntil(click) + * ); + * // clicked at 4.6s. output: 5...6...7...8........ or + * // clicked at 7.3s. output: 8...9...10..11....... + * emitAfterClick.subscribe(value => console.log(value)); + * ``` + * + * @see {@link last} + * @see {@link skip} + * @see {@link skipWhile} + * @see {@link skipLast} + * + * @param notifier An `ObservableInput` that has to emit an item before the source Observable elements begin to + * be mirrored by the resulting Observable. + * @return A function that returns an Observable that skips items from the + * source Observable until the `notifier` Observable emits an item, then emits the + * remaining items. + */ +export declare function skipUntil(notifier: ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=skipUntil.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map new file mode 100644 index 0000000..169f0f4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"skipUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAiBxF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts new file mode 100644 index 0000000..dc78d67 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts @@ -0,0 +1,5 @@ +import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types'; +export declare function skipWhile(predicate: BooleanConstructor): OperatorFunction extends never ? never : T>; +export declare function skipWhile(predicate: (value: T, index: number) => true): OperatorFunction; +export declare function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; +//# sourceMappingURL=skipWhile.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map new file mode 100644 index 0000000..eac8c09 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"skipWhile.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI7E,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;AAC9H,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACvG,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts new file mode 100644 index 0000000..8956a4c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts @@ -0,0 +1,7 @@ +import { OperatorFunction, SchedulerLike, ValueFromArray } from '../types'; +export declare function startWith(value: null): OperatorFunction; +export declare function startWith(value: undefined): OperatorFunction; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export declare function startWith(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction>; +export declare function startWith(...values: A): OperatorFunction>; +//# sourceMappingURL=startWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map new file mode 100644 index 0000000..f86a117 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"startWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAS3E,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AACzE,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AAEnF,8JAA8J;AAC9J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAC7D,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAC3C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts new file mode 100644 index 0000000..b17f2d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts @@ -0,0 +1,62 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Asynchronously subscribes Observers to this Observable on the specified {@link SchedulerLike}. + * + * With `subscribeOn` you can decide what type of scheduler a specific Observable will be using when it is subscribed to. + * + * Schedulers control the speed and order of emissions to observers from an Observable stream. + * + * ![](subscribeOn.png) + * + * ## Example + * + * Given the following code: + * + * ```ts + * import { of, merge } from 'rxjs'; + * + * const a = of(1, 2, 3); + * const b = of(4, 5, 6); + * + * merge(a, b).subscribe(console.log); + * + * // Outputs + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * // 6 + * ``` + * + * Both Observable `a` and `b` will emit their values directly and synchronously once they are subscribed to. + * + * If we instead use the `subscribeOn` operator declaring that we want to use the {@link asyncScheduler} for values emitted by Observable `a`: + * + * ```ts + * import { of, subscribeOn, asyncScheduler, merge } from 'rxjs'; + * + * const a = of(1, 2, 3).pipe(subscribeOn(asyncScheduler)); + * const b = of(4, 5, 6); + * + * merge(a, b).subscribe(console.log); + * + * // Outputs + * // 4 + * // 5 + * // 6 + * // 1 + * // 2 + * // 3 + * ``` + * + * The reason for this is that Observable `b` emits its values directly and synchronously like before + * but the emissions from `a` are scheduled on the event loop because we are now using the {@link asyncScheduler} for that specific Observable. + * + * @param scheduler The {@link SchedulerLike} to perform subscription actions on. + * @param delay A delay to pass to the scheduler to delay subscriptions + * @return A function that returns an Observable modified so that its + * subscriptions happen on the specified {@link SchedulerLike}. + */ +export declare function subscribeOn(scheduler: SchedulerLike, delay?: number): MonoTypeOperatorFunction; +//# sourceMappingURL=subscribeOn.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map new file mode 100644 index 0000000..904061c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeOn.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,GAAE,MAAU,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAIvG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts new file mode 100644 index 0000000..816da0d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts @@ -0,0 +1,61 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +/** + * Converts a higher-order Observable into a first-order Observable + * producing values only from the most recent observable sequence + * + * Flattens an Observable-of-Observables. + * + * ![](switchAll.png) + * + * `switchAll` subscribes to a source that is an observable of observables, also known as a + * "higher-order observable" (or `Observable>`). It subscribes to the most recently + * provided "inner observable" emitted by the source, unsubscribing from any previously subscribed + * to inner observable, such that only the most recent inner observable may be subscribed to at + * any point in time. The resulting observable returned by `switchAll` will only complete if the + * source observable completes, *and* any currently subscribed to inner observable also has completed, + * if there are any. + * + * ## Examples + * + * Spawn a new interval observable for each click event, but for every new + * click, cancel the previous interval and subscribe to the new one + * + * ```ts + * import { fromEvent, tap, map, interval, switchAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click'))); + * const source = clicks.pipe(map(() => interval(1000))); + * + * source + * .pipe(switchAll()) + * .subscribe(x => console.log(x)); + * + * // Output + * // click + * // 0 + * // 1 + * // 2 + * // 3 + * // ... + * // click + * // 0 + * // 1 + * // 2 + * // ... + * // click + * // ... + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link exhaustAll} + * @see {@link switchMap} + * @see {@link switchMapTo} + * @see {@link mergeAll} + * + * @return A function that returns an Observable that converts a higher-order + * Observable into a first-order Observable producing values only from the most + * recent Observable sequence. + */ +export declare function switchAll>(): OperatorFunction>; +//# sourceMappingURL=switchAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map new file mode 100644 index 0000000..9181679 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"switchAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts new file mode 100644 index 0000000..86de39d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts @@ -0,0 +1,7 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +export declare function switchMap>(project: (value: T, index: number) => O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function switchMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function switchMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; +//# sourceMappingURL=switchMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map new file mode 100644 index 0000000..81016e7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM9E,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts new file mode 100644 index 0000000..3f16734 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts @@ -0,0 +1,8 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */ +export declare function switchMapTo>(observable: O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function switchMapTo>(observable: O, resultSelector: undefined): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export declare function switchMapTo>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; +//# sourceMappingURL=switchMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map new file mode 100644 index 0000000..1073190 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"switchMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9E,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9H,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC5D,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAClE,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts new file mode 100644 index 0000000..a36e196 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts @@ -0,0 +1,20 @@ +import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types'; +/** + * Applies an accumulator function over the source Observable where the + * accumulator function itself returns an Observable, emitting values + * only from the most recently returned Observable. + * + * It's like {@link mergeScan}, but only the most recent + * Observable returned by the accumulator is merged into the outer Observable. + * + * @see {@link scan} + * @see {@link mergeScan} + * @see {@link switchMap} + * + * @param accumulator + * The accumulator function called on each source value. + * @param seed The initial accumulation value. + * @return A function that returns an observable of the accumulated values. + */ +export declare function switchScan>(accumulator: (acc: R, value: T, index: number) => O, seed: R): OperatorFunction>; +//# sourceMappingURL=switchScan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map new file mode 100644 index 0000000..7dd464b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"switchScan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM9E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACnD,IAAI,EAAE,CAAC,GACN,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAuBzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/take.d.ts b/node_modules/rxjs/dist/types/internal/operators/take.d.ts new file mode 100644 index 0000000..f9a8ef9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/take.d.ts @@ -0,0 +1,45 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Emits only the first `count` values emitted by the source Observable. + * + * Takes the first `count` values from the source, then + * completes. + * + * ![](take.png) + * + * `take` returns an Observable that emits only the first `count` values emitted + * by the source Observable. If the source emits fewer than `count` values then + * all of its values are emitted. After that, it completes, regardless if the + * source completes. + * + * ## Example + * + * Take the first 5 seconds of an infinite 1-second interval Observable + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const intervalCount = interval(1000); + * const takeFive = intervalCount.pipe(take(5)); + * takeFive.subscribe(x => console.log(x)); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * ``` + * + * @see {@link takeLast} + * @see {@link takeUntil} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param count The maximum number of `next` values to emit. + * @return A function that returns an Observable that emits only the first + * `count` values emitted by the source Observable, or all of the values from + * the source if the source emits fewer than `count` values. + */ +export declare function take(count: number): MonoTypeOperatorFunction; +//# sourceMappingURL=take.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map new file mode 100644 index 0000000..bebe575 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"take.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAuBlE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts new file mode 100644 index 0000000..e5c99ad --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts @@ -0,0 +1,42 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * Waits for the source to complete, then emits the last N values from the source, + * as specified by the `count` argument. + * + * ![](takeLast.png) + * + * `takeLast` results in an observable that will hold values up to `count` values in memory, + * until the source completes. It then pushes all values in memory to the consumer, in the + * order they were received from the source, then notifies the consumer that it is + * complete. + * + * If for some reason the source completes before the `count` supplied to `takeLast` is reached, + * all values received until that point are emitted, and then completion is notified. + * + * **Warning**: Using `takeLast` with an observable that never completes will result + * in an observable that never emits a value. + * + * ## Example + * + * Take the last 3 values of an Observable with many values + * + * ```ts + * import { range, takeLast } from 'rxjs'; + * + * const many = range(1, 100); + * const lastThree = many.pipe(takeLast(3)); + * lastThree.subscribe(x => console.log(x)); + * ``` + * + * @see {@link take} + * @see {@link takeUntil} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param count The maximum number of values to emit from the end of + * the sequence of values emitted by the source Observable. + * @return A function that returns an Observable that emits at most the last + * `count` values emitted by the source Observable. + */ +export declare function takeLast(count: number): MonoTypeOperatorFunction; +//# sourceMappingURL=takeLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map new file mode 100644 index 0000000..e1140f9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"takeLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAoCtE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts new file mode 100644 index 0000000..ab6df8a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts @@ -0,0 +1,42 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * Emits the values emitted by the source Observable until a `notifier` + * Observable emits a value. + * + * Lets values pass until a second Observable, + * `notifier`, emits a value. Then, it completes. + * + * ![](takeUntil.png) + * + * `takeUntil` subscribes and begins mirroring the source Observable. It also + * monitors a second Observable, `notifier` that you provide. If the `notifier` + * emits a value, the output Observable stops mirroring the source Observable + * and completes. If the `notifier` doesn't emit any value and completes + * then `takeUntil` will pass all values. + * + * ## Example + * + * Tick every second until the first click happens + * + * ```ts + * import { interval, fromEvent, takeUntil } from 'rxjs'; + * + * const source = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const result = source.pipe(takeUntil(clicks)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link take} + * @see {@link takeLast} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param {Observable} notifier The Observable whose first emitted value will + * cause the output Observable of `takeUntil` to stop emitting values from the + * source Observable. + * @return A function that returns an Observable that emits the values from the + * source Observable until `notifier` emits its first value. + */ +export declare function takeUntil(notifier: ObservableInput): MonoTypeOperatorFunction; +//# sourceMappingURL=takeUntil.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map new file mode 100644 index 0000000..350d6aa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"takeUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAKxF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts new file mode 100644 index 0000000..5431372 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts @@ -0,0 +1,8 @@ +import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; +export declare function takeWhile(predicate: BooleanConstructor, inclusive: true): MonoTypeOperatorFunction; +export declare function takeWhile(predicate: BooleanConstructor, inclusive: false): OperatorFunction>; +export declare function takeWhile(predicate: BooleanConstructor): OperatorFunction>; +export declare function takeWhile(predicate: (value: T, index: number) => value is S): OperatorFunction; +export declare function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; +export declare function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; +//# sourceMappingURL=takeWhile.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map new file mode 100644 index 0000000..fd4e11d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"takeWhile.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIrF,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAC1G,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,KAAK,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACnG,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxI,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts new file mode 100644 index 0000000..349032a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts @@ -0,0 +1,72 @@ +import { MonoTypeOperatorFunction, Observer } from '../types'; +/** + * An extension to the {@link Observer} interface used only by the {@link tap} operator. + * + * It provides a useful set of callbacks a user can register to do side-effects in + * cases other than what the usual {@link Observer} callbacks are + * ({@link guide/glossary-and-semantics#next next}, + * {@link guide/glossary-and-semantics#error error} and/or + * {@link guide/glossary-and-semantics#complete complete}). + * + * ## Example + * + * ```ts + * import { fromEvent, switchMap, tap, interval, take } from 'rxjs'; + * + * const source$ = fromEvent(document, 'click'); + * const result$ = source$.pipe( + * switchMap((_, i) => i % 2 === 0 + * ? fromEvent(document, 'mousemove').pipe( + * tap({ + * subscribe: () => console.log('Subscribed to the mouse move events after click #' + i), + * unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'), + * finalize: () => console.log('Mouse move events #' + i + ' finalized') + * }) + * ) + * : interval(1_000).pipe( + * take(5), + * tap({ + * subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i), + * unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'), + * finalize: () => console.log('1-second interval events #' + i + ' finalized') + * }) + * ) + * ) + * ); + * + * const subscription = result$.subscribe({ + * next: console.log + * }); + * + * setTimeout(() => { + * console.log('Unsubscribe after 60 seconds'); + * subscription.unsubscribe(); + * }, 60_000); + * ``` + */ +export interface TapObserver extends Observer { + /** + * The callback that `tap` operator invokes at the moment when the source Observable + * gets subscribed to. + */ + subscribe: () => void; + /** + * The callback that `tap` operator invokes when an explicit + * {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on + * `error` or `complete` events. + */ + unsubscribe: () => void; + /** + * The callback that `tap` operator invokes when any kind of + * {@link guide/glossary-and-semantics#finalization finalization} happens - either when + * the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed + * by the user. There is no difference in using this callback or the {@link finalize} + * operator, but if you're already using `tap` operator, you can use this callback + * instead. You'd get the same result in either case. + */ + finalize: () => void; +} +export declare function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; +/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ +export declare function tap(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): MonoTypeOperatorFunction; +//# sourceMappingURL=tap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map new file mode 100644 index 0000000..ccffe8e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAM9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACjD;;;OAGG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AACD,wBAAgB,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACrH,4NAA4N;AAC5N,wBAAgB,GAAG,CAAC,CAAC,EACnB,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EAClC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAC7B,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts new file mode 100644 index 0000000..ed082b2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts @@ -0,0 +1,78 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +/** + * An object interface used by {@link throttle} or {@link throttleTime} that ensure + * configuration options of these operators. + * + * @see {@link throttle} + * @see {@link throttleTime} + */ +export interface ThrottleConfig { + /** + * If `true`, the resulting Observable will emit the first value from the source + * Observable at the **start** of the "throttling" process (when starting an + * internal timer that prevents other emissions from the source to pass through). + * If `false`, it will not emit the first value from the source Observable at the + * start of the "throttling" process. + * + * If not provided, defaults to: `true`. + */ + leading?: boolean; + /** + * If `true`, the resulting Observable will emit the last value from the source + * Observable at the **end** of the "throttling" process (when ending an internal + * timer that prevents other emissions from the source to pass through). + * If `false`, it will not emit the last value from the source Observable at the + * end of the "throttling" process. + * + * If not provided, defaults to: `false`. + */ + trailing?: boolean; +} +/** + * Emits a value from the source Observable, then ignores subsequent source + * values for a duration determined by another Observable, then repeats this + * process. + * + * It's like {@link throttleTime}, but the silencing + * duration is determined by a second Observable. + * + * ![](throttle.svg) + * + * `throttle` emits the source Observable values on the output Observable + * when its internal timer is disabled, and ignores source values when the timer + * is enabled. Initially, the timer is disabled. As soon as the first source + * value arrives, it is forwarded to the output Observable, and then the timer + * is enabled by calling the `durationSelector` function with the source value, + * which returns the "duration" Observable. When the duration Observable emits a + * value, the timer is disabled, and this process repeats for the + * next source value. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, throttle, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(throttle(() => interval(1000))); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounce} + * @see {@link delayWhen} + * @see {@link sample} + * @see {@link throttleTime} + * + * @param durationSelector A function that receives a value from the source + * Observable, for computing the silencing duration for each source value, + * returned as an `ObservableInput`. + * @param config A configuration object to define `leading` and `trailing` + * behavior. Defaults to `{ leading: true, trailing: false }`. + * @return A function that returns an Observable that performs the throttle + * operation to limit the rate of emissions from the source. + */ +export declare function throttle(durationSelector: (value: T) => ObservableInput, config?: ThrottleConfig): MonoTypeOperatorFunction; +//# sourceMappingURL=throttle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map new file mode 100644 index 0000000..c955d40 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA2DtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts new file mode 100644 index 0000000..b727f56 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts @@ -0,0 +1,53 @@ +import { ThrottleConfig } from './throttle'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +/** + * Emits a value from the source Observable, then ignores subsequent source + * values for `duration` milliseconds, then repeats this process. + * + * Lets a value pass, then ignores source values for the + * next `duration` milliseconds. + * + * ![](throttleTime.png) + * + * `throttleTime` emits the source Observable values on the output Observable + * when its internal timer is disabled, and ignores source values when the timer + * is enabled. Initially, the timer is disabled. As soon as the first source + * value arrives, it is forwarded to the output Observable, and then the timer + * is enabled. After `duration` milliseconds (or the time unit determined + * internally by the optional `scheduler`) has passed, the timer is disabled, + * and this process repeats for the next source value. Optionally takes a + * {@link SchedulerLike} for managing timers. + * + * ## Examples + * + * ### Limit click rate + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, throttleTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(throttleTime(1000)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sampleTime} + * @see {@link throttle} + * + * @param duration Time to wait before emitting another value after + * emitting the last value, measured in milliseconds or the time unit determined + * internally by the optional `scheduler`. + * @param scheduler The {@link SchedulerLike} to use for + * managing the timers that handle the throttling. Defaults to {@link asyncScheduler}. + * @param config A configuration object to define `leading` and + * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`. + * @return A function that returns an Observable that performs the throttle + * operation to limit the rate of emissions from the source. + */ +export declare function throttleTime(duration: number, scheduler?: SchedulerLike, config?: ThrottleConfig): MonoTypeOperatorFunction; +//# sourceMappingURL=throttleTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map new file mode 100644 index 0000000..3568dd5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throttleTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,aAA8B,EACzC,MAAM,CAAC,EAAE,cAAc,GACtB,wBAAwB,CAAC,CAAC,CAAC,CAG7B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts new file mode 100644 index 0000000..b66dc46 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts @@ -0,0 +1,39 @@ +import { MonoTypeOperatorFunction } from '../types'; +/** + * If the source observable completes without emitting a value, it will emit + * an error. The error will be created at that time by the optional + * `errorFactory` argument, otherwise, the error will be {@link EmptyError}. + * + * ![](throwIfEmpty.png) + * + * ## Example + * + * Throw an error if the document wasn't clicked within 1 second + * + * ```ts + * import { fromEvent, takeUntil, timer, throwIfEmpty } from 'rxjs'; + * + * const click$ = fromEvent(document, 'click'); + * + * click$.pipe( + * takeUntil(timer(1000)), + * throwIfEmpty(() => new Error('The document was not clicked within 1 second')) + * ) + * .subscribe({ + * next() { + * console.log('The document was clicked'); + * }, + * error(err) { + * console.error(err.message); + * } + * }); + * ``` + * + * @param errorFactory A factory function called to produce the + * error to be thrown when the source observable completes without emitting a + * value. + * @return A function that returns an Observable that throws an error if the + * source Observable completed without emitting. + */ +export declare function throwIfEmpty(errorFactory?: () => any): MonoTypeOperatorFunction; +//# sourceMappingURL=throwIfEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map new file mode 100644 index 0000000..00a5e90 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throwIfEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,YAAY,GAAE,MAAM,GAAyB,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAc1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts new file mode 100644 index 0000000..a8a047f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts @@ -0,0 +1,50 @@ +import { SchedulerLike, OperatorFunction } from '../types'; +/** + * Emits an object containing the current value, and the time that has + * passed between emitting the current value and the previous value, which is + * calculated by using the provided `scheduler`'s `now()` method to retrieve + * the current time at each emission, then calculating the difference. The `scheduler` + * defaults to {@link asyncScheduler}, so by default, the `interval` will be in + * milliseconds. + * + * Convert an Observable that emits items into one that + * emits indications of the amount of time elapsed between those emissions. + * + * ![](timeInterval.png) + * + * ## Example + * + * Emit interval between current value with the last value + * + * ```ts + * import { interval, timeInterval } from 'rxjs'; + * + * const seconds = interval(1000); + * + * seconds + * .pipe(timeInterval()) + * .subscribe(value => console.log(value)); + * + * // NOTE: The values will never be this precise, + * // intervals created with `interval` or `setInterval` + * // are non-deterministic. + * + * // { value: 0, interval: 1000 } + * // { value: 1, interval: 1000 } + * // { value: 2, interval: 1000 } + * ``` + * + * @param {SchedulerLike} [scheduler] Scheduler used to get the current time. + * @return A function that returns an Observable that emits information about + * value and interval. + */ +export declare function timeInterval(scheduler?: SchedulerLike): OperatorFunction>; +export declare class TimeInterval { + value: T; + interval: number; + /** + * @deprecated Internal implementation detail, do not construct directly. Will be made an interface in v8. + */ + constructor(value: T, interval: number); +} +//# sourceMappingURL=timeInterval.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map new file mode 100644 index 0000000..867ae5e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timeInterval.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,GAAE,aAA8B,GAAG,gBAAgB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAY/G;AAKD,qBAAa,YAAY,CAAC,CAAC;IAIN,KAAK,EAAE,CAAC;IAAS,QAAQ,EAAE,MAAM;IAHpD;;OAEG;gBACgB,KAAK,EAAE,CAAC,EAAS,QAAQ,EAAE,MAAM;CACrD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts new file mode 100644 index 0000000..6b22e83 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts @@ -0,0 +1,257 @@ +import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +export interface TimeoutConfig = ObservableInput, M = unknown> { + /** + * The time allowed between values from the source before timeout is triggered. + */ + each?: number; + /** + * The relative time as a `number` in milliseconds, or a specific time as a `Date` object, + * by which the first value must arrive from the source before timeout is triggered. + */ + first?: number | Date; + /** + * The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} + */ + scheduler?: SchedulerLike; + /** + * A factory used to create observable to switch to when timeout occurs. Provides + * a {@link TimeoutInfo} about the source observable's emissions and what delay or + * exact time triggered the timeout. + */ + with?: (info: TimeoutInfo) => O; + /** + * Optional additional metadata you can provide to code that handles + * the timeout, will be provided through the {@link TimeoutError}. + * This can be used to help identify the source of a timeout or pass along + * other information related to the timeout. + */ + meta?: M; +} +export interface TimeoutInfo { + /** Optional metadata that was provided to the timeout configuration. */ + readonly meta: M; + /** The number of messages seen before the timeout */ + readonly seen: number; + /** The last message seen */ + readonly lastValue: T | null; +} +/** + * An error emitted when a timeout occurs. + */ +export interface TimeoutError extends Error { + /** + * The information provided to the error by the timeout + * operation that created the error. Will be `null` if + * used directly in non-RxJS code with an empty constructor. + * (Note that using this constructor directly is not recommended, + * you should create your own errors) + */ + info: TimeoutInfo | null; +} +export interface TimeoutErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (info?: TimeoutInfo): TimeoutError; +} +/** + * An error thrown by the {@link timeout} operator. + * + * Provided so users can use as a type and do quality comparisons. + * We recommend you do not subclass this or create instances of this class directly. + * If you have need of a error representing a timeout, you should + * create your own error class and use that. + * + * @see {@link timeout} + * + * @class TimeoutError + */ +export declare const TimeoutError: TimeoutErrorCtor; +/** + * If `with` is provided, this will return an observable that will switch to a different observable if the source + * does not push values within the specified time parameters. + * + * The most flexible option for creating a timeout behavior. + * + * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, + * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory + * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by + * the settings in `first` and `each`. + * + * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the + * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of + * the first value from the source _only_. The timings of all subsequent values from the source will be checked + * against the time period provided by `each`, if it was provided. + * + * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of + * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if + * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first + * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. + * + * ## Examples + * + * Emit a custom error if there is too much time between values + * + * ```ts + * import { interval, timeout, throwError } from 'rxjs'; + * + * class CustomTimeoutError extends Error { + * constructor() { + * super('It was too slow'); + * this.name = 'CustomTimeoutError'; + * } + * } + * + * const slow$ = interval(900); + * + * slow$.pipe( + * timeout({ + * each: 1000, + * with: () => throwError(() => new CustomTimeoutError()) + * }) + * ) + * .subscribe({ + * error: console.error + * }); + * ``` + * + * Switch to a faster observable if your source is slow. + * + * ```ts + * import { interval, timeout } from 'rxjs'; + * + * const slow$ = interval(900); + * const fast$ = interval(500); + * + * slow$.pipe( + * timeout({ + * each: 1000, + * with: () => fast$, + * }) + * ) + * .subscribe(console.log); + * ``` + * @param config The configuration for the timeout. + */ +export declare function timeout, M = unknown>(config: TimeoutConfig & { + with: (info: TimeoutInfo) => O; +}): OperatorFunction>; +/** + * Returns an observable that will error or switch to a different observable if the source does not push values + * within the specified time parameters. + * + * The most flexible option for creating a timeout behavior. + * + * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, + * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory + * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by + * the settings in `first` and `each`. + * + * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the + * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of + * the first value from the source _only_. The timings of all subsequent values from the source will be checked + * against the time period provided by `each`, if it was provided. + * + * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of + * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if + * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first + * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. + * + * ### Handling TimeoutErrors + * + * If no `with` property was provided, subscriptions to the resulting observable may emit an error of {@link TimeoutError}. + * The timeout error provides useful information you can examine when you're handling the error. The most common way to handle + * the error would be with {@link catchError}, although you could use {@link tap} or just the error handler in your `subscribe` call + * directly, if your error handling is only a side effect (such as notifying the user, or logging). + * + * In this case, you would check the error for `instanceof TimeoutError` to validate that the error was indeed from `timeout`, and + * not from some other source. If it's not from `timeout`, you should probably rethrow it if you're in a `catchError`. + * + * ## Examples + * + * Emit a {@link TimeoutError} if the first value, and _only_ the first value, does not arrive within 5 seconds + * + * ```ts + * import { interval, timeout } from 'rxjs'; + * + * // A random interval that lasts between 0 and 10 seconds per tick + * const source$ = interval(Math.round(Math.random() * 10_000)); + * + * source$.pipe( + * timeout({ first: 5_000 }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * Emit a {@link TimeoutError} if the source waits longer than 5 seconds between any two values or the first value + * and subscription. + * + * ```ts + * import { timer, timeout, expand } from 'rxjs'; + * + * const getRandomTime = () => Math.round(Math.random() * 10_000); + * + * // An observable that waits a random amount of time between each delivered value + * const source$ = timer(getRandomTime()) + * .pipe(expand(() => timer(getRandomTime()))); + * + * source$ + * .pipe(timeout({ each: 5_000 })) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * Emit a {@link TimeoutError} if the source does not emit before 7 seconds, _or_ if the source waits longer than + * 5 seconds between any two values after the first. + * + * ```ts + * import { timer, timeout, expand } from 'rxjs'; + * + * const getRandomTime = () => Math.round(Math.random() * 10_000); + * + * // An observable that waits a random amount of time between each delivered value + * const source$ = timer(getRandomTime()) + * .pipe(expand(() => timer(getRandomTime()))); + * + * source$ + * .pipe(timeout({ first: 7_000, each: 5_000 })) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + */ +export declare function timeout(config: Omit, 'with'>): OperatorFunction; +/** + * Returns an observable that will error if the source does not push its first value before the specified time passed as a `Date`. + * This is functionally the same as `timeout({ first: someDate })`. + * + * Errors if the first value doesn't show up before the given date and time + * + * ![](timeout.png) + * + * @param first The date to at which the resulting observable will timeout if the source observable + * does not emit at least one value. + * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. + */ +export declare function timeout(first: Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +/** + * Returns an observable that will error if the source does not push a value within the specified time in milliseconds. + * This is functionally the same as `timeout({ each: milliseconds })`. + * + * Errors if it waits too long between any value + * + * ![](timeout.png) + * + * @param each The time allowed between each pushed value from the source before the resulting observable + * will timeout. + * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. + */ +export declare function timeout(each: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; +//# sourceMappingURL=timeout.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map new file mode 100644 index 0000000..e719057 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAUvH,MAAM,WAAW,aA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;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,EACxE,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,GACxE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhH;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEhG;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts new file mode 100644 index 0000000..9846627 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts @@ -0,0 +1,8 @@ +import { ObservableInput, OperatorFunction, SchedulerLike } from '../types'; +/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(someDate, a$, scheduler)`, use the configuration object + * `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. */ +export declare function timeoutWith(dueBy: Date, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; +/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use the configuration object + * `timeout({ each: 100, with: () => a$, scheduler })`. Will be removed in v8. */ +export declare function timeoutWith(waitFor: number, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; +//# sourceMappingURL=timeoutWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map new file mode 100644 index 0000000..c9370ed --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5E;uFACuF;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpI;kFACkF;AAClF,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts new file mode 100644 index 0000000..9258c76 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts @@ -0,0 +1,35 @@ +import { OperatorFunction, TimestampProvider, Timestamp } from '../types'; +/** + * Attaches a timestamp to each item emitted by an observable indicating when it was emitted + * + * The `timestamp` operator maps the *source* observable stream to an object of type + * `{value: T, timestamp: R}`. The properties are generically typed. The `value` property contains the value + * and type of the *source* observable. The `timestamp` is generated by the schedulers `now` function. By + * default, it uses the `asyncScheduler` which simply returns `Date.now()` (milliseconds since 1970/01/01 + * 00:00:00:000) and therefore is of type `number`. + * + * ![](timestamp.png) + * + * ## Example + * + * In this example there is a timestamp attached to the document's click events + * + * ```ts + * import { fromEvent, timestamp } from 'rxjs'; + * + * const clickWithTimestamp = fromEvent(document, 'click').pipe( + * timestamp() + * ); + * + * // Emits data of type { value: PointerEvent, timestamp: number } + * clickWithTimestamp.subscribe(data => { + * console.log(data); + * }); + * ``` + * + * @param timestampProvider An object with a `now()` method used to get the current timestamp. + * @return A function that returns an Observable that attaches a timestamp to + * each item emitted by the source Observable indicating when it was emitted. + */ +export declare function timestamp(timestampProvider?: TimestampProvider): OperatorFunction>; +//# sourceMappingURL=timestamp.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map new file mode 100644 index 0000000..16a51f1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,iBAAiB,GAAE,iBAAyC,GAAG,gBAAgB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAE5H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts new file mode 100644 index 0000000..f22f7f1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts @@ -0,0 +1,33 @@ +import { OperatorFunction } from '../types'; +/** + * Collects all source emissions and emits them as an array when the source completes. + * + * Get all values inside an array when the source completes + * + * ![](toArray.png) + * + * `toArray` will wait until the source Observable completes before emitting + * the array containing all emissions. When the source Observable errors no + * array will be emitted. + * + * ## Example + * + * ```ts + * import { interval, take, toArray } from 'rxjs'; + * + * const source = interval(1000); + * const example = source.pipe( + * take(10), + * toArray() + * ); + * + * example.subscribe(value => console.log(value)); + * + * // output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + * ``` + * + * @return A function that returns an Observable that emits an array of items + * emitted by the source Observable when source completes. + */ +export declare function toArray(): OperatorFunction; +//# sourceMappingURL=toArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map new file mode 100644 index 0000000..61ada18 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAOrD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/window.d.ts b/node_modules/rxjs/dist/types/internal/operators/window.d.ts new file mode 100644 index 0000000..88a78fb --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/window.d.ts @@ -0,0 +1,48 @@ +import { Observable } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; +/** + * Branch out the source Observable values as a nested Observable whenever + * `windowBoundaries` emits. + * + * It's like {@link buffer}, but emits a nested Observable + * instead of an array. + * + * ![](window.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits connected, non-overlapping + * windows. It emits the current window and opens a new one whenever the + * `windowBoundaries` emits an item. `windowBoundaries` can be any type that + * `ObservableInput` accepts. It internally gets converted to an Observable. + * Because each window is an Observable, the output is a higher-order Observable. + * + * ## Example + * + * In every window of 1 second each, emit at most 2 click events + * + * ```ts + * import { fromEvent, interval, window, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const sec = interval(1000); + * const result = clicks.pipe( + * window(sec), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link windowWhen} + * @see {@link buffer} + * + * @param windowBoundaries An `ObservableInput` that completes the + * previous window and starts a new window. + * @return A function that returns an Observable of windows, which are + * Observables emitting values of the source Observable. + */ +export declare function window(windowBoundaries: ObservableInput): OperatorFunction>; +//# sourceMappingURL=window.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map new file mode 100644 index 0000000..41ca0d6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CA6CpG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts new file mode 100644 index 0000000..bc3fdb6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts @@ -0,0 +1,66 @@ +import { Observable } from '../Observable'; +import { OperatorFunction } from '../types'; +/** + * Branch out the source Observable values as a nested Observable with each + * nested Observable emitting at most `windowSize` values. + * + * It's like {@link bufferCount}, but emits a nested + * Observable instead of an array. + * + * ![](windowCount.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits windows every `startWindowEvery` + * items, each containing no more than `windowSize` items. When the source + * Observable completes or encounters an error, the output Observable emits + * the current window and propagates the notification from the source + * Observable. If `startWindowEvery` is not provided, then new windows are + * started immediately at the start of the source and when each window completes + * with size `windowSize`. + * + * ## Examples + * + * Ignore every 3rd click event, starting from the first one + * + * ```ts + * import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowCount(3), + * map(win => win.pipe(skip(1))), // skip first of every 3 clicks + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * Ignore every 3rd click event, starting from the third one + * + * ```ts + * import { fromEvent, windowCount, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowCount(2, 3), + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link windowWhen} + * @see {@link bufferCount} + * + * @param {number} windowSize The maximum number of values emitted by each + * window. + * @param {number} [startWindowEvery] Interval at which to start a new window. + * For example if `startWindowEvery` is `2`, then a new window will be started + * on every other value from the source. A new window is started at the + * beginning of the source by default. + * @return A function that returns an Observable of windows, which in turn are + * Observable of values. + */ +export declare function windowCount(windowSize: number, startWindowEvery?: number): OperatorFunction>; +//# sourceMappingURL=windowCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map new file mode 100644 index 0000000..1e1d5af --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"windowCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAU,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CA6DnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts new file mode 100644 index 0000000..4d7ee6b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts @@ -0,0 +1,6 @@ +import { Observable } from '../Observable'; +import { OperatorFunction, SchedulerLike } from '../types'; +export declare function windowTime(windowTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction>; +export declare function windowTime(windowTimeSpan: number, windowCreationInterval: number, scheduler?: SchedulerLike): OperatorFunction>; +export declare function windowTime(windowTimeSpan: number, windowCreationInterval: number | null | void, maxWindowSize: number, scheduler?: SchedulerLike): OperatorFunction>; +//# sourceMappingURL=windowTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map new file mode 100644 index 0000000..8f85cc4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"windowTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAY,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOrE,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,EAC9B,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACtC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,EAC5C,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts new file mode 100644 index 0000000..70efc36 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts @@ -0,0 +1,51 @@ +import { Observable } from '../Observable'; +import { ObservableInput, OperatorFunction } from '../types'; +/** + * Branch out the source Observable values as a nested Observable starting from + * an emission from `openings` and ending when the output of `closingSelector` + * emits. + * + * It's like {@link bufferToggle}, but emits a nested + * Observable instead of an array. + * + * ![](windowToggle.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits windows that contain those items + * emitted by the source Observable between the time when the `openings` + * Observable emits an item and when the Observable returned by + * `closingSelector` emits an item. + * + * ## Example + * + * Every other second, emit the click events from the next 500ms + * + * ```ts + * import { fromEvent, interval, windowToggle, EMPTY, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const openings = interval(1000); + * const result = clicks.pipe( + * windowToggle(openings, i => i % 2 ? interval(500) : EMPTY), + * mergeAll() + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowWhen} + * @see {@link bufferToggle} + * + * @param {Observable} openings An observable of notifications to start new + * windows. + * @param {function(value: O): Observable} closingSelector A function that takes + * the value emitted by the `openings` observable and returns an Observable, + * which, when it emits a next notification, signals that the + * associated window should complete. + * @return A function that returns an Observable of windows, which in turn are + * Observables. + */ +export declare function windowToggle(openings: ObservableInput, closingSelector: (openValue: O) => ObservableInput): OperatorFunction>; +//# sourceMappingURL=windowToggle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map new file mode 100644 index 0000000..25b74c1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"windowToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAC5B,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GACtD,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAyEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts new file mode 100644 index 0000000..17aa327 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts @@ -0,0 +1,48 @@ +import { Observable } from '../Observable'; +import { ObservableInput, OperatorFunction } from '../types'; +/** + * Branch out the source Observable values as a nested Observable using a + * factory function of closing Observables to determine when to start a new + * window. + * + * It's like {@link bufferWhen}, but emits a nested + * Observable instead of an array. + * + * ![](windowWhen.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits connected, non-overlapping windows. + * It emits the current window and opens a new one whenever the Observable + * produced by the specified `closingSelector` function emits an item. The first + * window is opened immediately when subscribing to the output Observable. + * + * ## Example + * + * Emit only the first two clicks events in every window of [1-5] random seconds + * + * ```ts + * import { fromEvent, windowWhen, interval, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowWhen(() => interval(1000 + Math.random() * 4000)), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link bufferWhen} + * + * @param {function(): Observable} closingSelector A function that takes no + * arguments and returns an Observable that signals (on either `next` or + * `complete`) when to close the previous window and start a new one. + * @return A function that returns an Observable of windows, which in turn are + * Observables. + */ +export declare function windowWhen(closingSelector: () => ObservableInput): OperatorFunction>; +//# sourceMappingURL=windowWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map new file mode 100644 index 0000000..0275fd5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"windowWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAuE7G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts new file mode 100644 index 0000000..7cc3c18 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts @@ -0,0 +1,4 @@ +import { OperatorFunction, ObservableInputTuple } from '../types'; +export declare function withLatestFrom(...inputs: [...ObservableInputTuple]): OperatorFunction; +export declare function withLatestFrom(...inputs: [...ObservableInputTuple, (...value: [T, ...O]) => R]): OperatorFunction; +//# sourceMappingURL=withLatestFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map new file mode 100644 index 0000000..901d652 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"withLatestFrom.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAQlE,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAEhI,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EACtD,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts new file mode 100644 index 0000000..ecdb727 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts @@ -0,0 +1,10 @@ +import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export declare function zip(otherInputs: [...ObservableInputTuple]): OperatorFunction>; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export declare function zip(otherInputsAndProject: [...ObservableInputTuple], project: (...values: Cons) => R): OperatorFunction; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export declare function zip(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export declare function zip(...otherInputsAndProject: [...ObservableInputTuple, (...values: Cons) => R]): OperatorFunction; +//# sourceMappingURL=zip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map new file mode 100644 index 0000000..5b64813 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGzF,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjI,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACpD,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACnD,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GACpC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACpI,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACpD,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GACnF,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts new file mode 100644 index 0000000..3c3276b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts @@ -0,0 +1,14 @@ +import { OperatorFunction, ObservableInput } from '../types'; +/** + * Collects all observable inner sources from the source, once the source completes, + * it will subscribe to all inner sources, combining their values by index and emitting + * them. + * + * @see {@link zipWith} + * @see {@link zip} + */ +export declare function zipAll(): OperatorFunction, T[]>; +export declare function zipAll(): OperatorFunction; +export declare function zipAll(project: (...values: T[]) => R): OperatorFunction, R>; +export declare function zipAll(project: (...values: Array) => R): OperatorFunction; +//# sourceMappingURL=zipAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map new file mode 100644 index 0000000..52fe3f2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"zipAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI7D;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACvE,wBAAgB,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtG,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts new file mode 100644 index 0000000..42c9c0b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts @@ -0,0 +1,26 @@ +import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; +/** + * Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays. + * + * What is meant by "combine by index": The first value from each will be made into a single array, then emitted, + * then the second value from each will be combined into a single array and emitted, then the third value + * from each will be combined into a single array and emitted, and so on. + * + * This will continue until it is no longer able to combine values of the same index into an array. + * + * After the last value from any one completed source is emitted in an array, the resulting observable will complete, + * as there is no way to continue "zipping" values together by index. + * + * Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting + * values at a much faster rate than the others. Usage should likely be limited to streams that emit + * at a similar pace, or finite streams of known length. + * + * In many cases, authors want `combineLatestWith` and not `zipWith`. + * + * @param otherInputs other observable inputs to collate values from. + * @return A function that returns an Observable that emits items by index + * combined from the source Observable and provided Observables, in form of an + * array. + */ +export declare function zipWith(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; +//# sourceMappingURL=zipWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map new file mode 100644 index 0000000..b1a3a8f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"zipWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts new file mode 100644 index 0000000..7bab482 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts @@ -0,0 +1,4 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +export declare function scheduleArray(input: ArrayLike, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=scheduleArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map new file mode 100644 index 0000000..b1f58de --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBAuB7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts new file mode 100644 index 0000000..2856f17 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts @@ -0,0 +1,4 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +export declare function scheduleAsyncIterable(input: AsyncIterable, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=scheduleAsyncIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map new file mode 100644 index 0000000..3052359 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleAsyncIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBA0BzF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts new file mode 100644 index 0000000..71dc623 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts @@ -0,0 +1,9 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +/** + * Used in {@link scheduled} to create an observable from an Iterable. + * @param input The iterable to create an observable from + * @param scheduler The scheduler to use + */ +export declare function scheduleIterable(input: Iterable, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=scheduleIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map new file mode 100644 index 0000000..34939b7 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBAgD/E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts new file mode 100644 index 0000000..4b22bf8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts @@ -0,0 +1,3 @@ +import { InteropObservable, SchedulerLike } from '../types'; +export declare function scheduleObservable(input: InteropObservable, scheduler: SchedulerLike): import("../Observable").Observable; +//# sourceMappingURL=scheduleObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map new file mode 100644 index 0000000..de60a0c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,yCAE1F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts new file mode 100644 index 0000000..36c20bd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts @@ -0,0 +1,3 @@ +import { SchedulerLike } from '../types'; +export declare function schedulePromise(input: PromiseLike, scheduler: SchedulerLike): import("../Observable").Observable; +//# sourceMappingURL=schedulePromise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map new file mode 100644 index 0000000..3ab24da --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"schedulePromise.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,yCAEjF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts new file mode 100644 index 0000000..8377ea8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts @@ -0,0 +1,4 @@ +import { SchedulerLike, ReadableStreamLike } from '../types'; +import { Observable } from '../Observable'; +export declare function scheduleReadableStreamLike(input: ReadableStreamLike, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=scheduleReadableStreamLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map new file mode 100644 index 0000000..d360350 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduleReadableStreamLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAEnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts new file mode 100644 index 0000000..4309964 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts @@ -0,0 +1,15 @@ +import { ObservableInput, SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +/** + * Converts from a common {@link ObservableInput} type to an observable where subscription and emissions + * are scheduled on the provided scheduler. + * + * @see {@link from} + * @see {@link of} + * + * @param input The observable, array, promise, iterable, etc you would like to schedule + * @param scheduler The scheduler to use to schedule the subscription and emissions from + * the returned observable. + */ +export declare function scheduled(input: ObservableInput, scheduler: SchedulerLike): Observable; +//# sourceMappingURL=scheduled.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map new file mode 100644 index 0000000..dcfb245 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAsB/F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts new file mode 100644 index 0000000..66e615f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts @@ -0,0 +1,32 @@ +import { Scheduler } from '../Scheduler'; +import { Subscription } from '../Subscription'; +import { SchedulerAction } from '../types'; +/** + * A unit of work to be executed in a `scheduler`. An action is typically + * created from within a {@link SchedulerLike} and an RxJS user does not need to concern + * themselves about creating and manipulating an Action. + * + * ```ts + * class Action extends Subscription { + * new (scheduler: Scheduler, work: (state?: T) => void); + * schedule(state?: T, delay: number = 0): Subscription; + * } + * ``` + * + * @class Action + */ +export declare class Action extends Subscription { + constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void); + /** + * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed + * some context object, `state`. May happen at some point in the future, + * according to the `delay` parameter, if specified. + * @param {T} [state] Some contextual data that the `work` function uses when + * called by the Scheduler. + * @param {number} [delay] Time to wait before executing the work, where the + * time unit is implicit and defined by the Scheduler. + * @return {void} + */ + schedule(state?: T, delay?: number): Subscription; +} +//# sourceMappingURL=Action.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map new file mode 100644 index 0000000..8579896 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;;;;GAaG;AACH,qBAAa,MAAM,CAAC,CAAC,CAAE,SAAQ,YAAY;gBAC7B,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAGrF;;;;;;;;;OASG;IACI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;CAG5D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts new file mode 100644 index 0000000..5b1757d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts @@ -0,0 +1,12 @@ +import { AsyncAction } from './AsyncAction'; +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; +export declare class AnimationFrameAction extends AsyncAction { + protected scheduler: AnimationFrameScheduler; + protected work: (this: SchedulerAction, state?: T) => void; + constructor(scheduler: AnimationFrameScheduler, work: (this: SchedulerAction, state?: T) => void); + protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay?: number): TimerHandle; + protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay?: number): TimerHandle | undefined; +} +//# sourceMappingURL=AnimationFrameAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map new file mode 100644 index 0000000..494eb2b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,SAAS,EAAE,uBAAuB;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAjG,SAAS,EAAE,uBAAuB,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvH,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,uBAAuB,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAa9G,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,uBAAuB,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,GAAG,SAAS;CAkB3H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts new file mode 100644 index 0000000..333e229 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts @@ -0,0 +1,6 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; +export declare class AnimationFrameScheduler extends AsyncScheduler { + flush(action?: AsyncAction): void; +} +//# sourceMappingURL=AnimationFrameScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map new file mode 100644 index 0000000..a9e0897 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AnimationFrameScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,cAAc;IAClD,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CAiC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts new file mode 100644 index 0000000..f0549c6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts @@ -0,0 +1,12 @@ +import { AsyncAction } from './AsyncAction'; +import { AsapScheduler } from './AsapScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; +export declare class AsapAction extends AsyncAction { + protected scheduler: AsapScheduler; + protected work: (this: SchedulerAction, state?: T) => void; + constructor(scheduler: AsapScheduler, work: (this: SchedulerAction, state?: T) => void); + protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay?: number): TimerHandle; + protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay?: number): TimerHandle | undefined; +} +//# sourceMappingURL=AsapAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map new file mode 100644 index 0000000..0ea713a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACnC,SAAS,CAAC,SAAS,EAAE,aAAa;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAvF,SAAS,EAAE,aAAa,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAI7G,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAapG,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,GAAG,SAAS;CAoBjH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts new file mode 100644 index 0000000..cd83028 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts @@ -0,0 +1,6 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; +export declare class AsapScheduler extends AsyncScheduler { + flush(action?: AsyncAction): void; +} +//# sourceMappingURL=AsapScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map new file mode 100644 index 0000000..26ec193 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AsapScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,aAAc,SAAQ,cAAc;IACxC,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CAiC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts new file mode 100644 index 0000000..943187b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts @@ -0,0 +1,25 @@ +import { Action } from './Action'; +import { SchedulerAction } from '../types'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +import { TimerHandle } from './timerHandle'; +export declare class AsyncAction extends Action { + protected scheduler: AsyncScheduler; + protected work: (this: SchedulerAction, state?: T) => void; + id: TimerHandle | undefined; + state?: T; + delay: number; + protected pending: boolean; + constructor(scheduler: AsyncScheduler, work: (this: SchedulerAction, state?: T) => void); + schedule(state?: T, delay?: number): Subscription; + protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay?: number): TimerHandle; + protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay?: number | null): TimerHandle | undefined; + /** + * Immediately executes this action and the `work` it contains. + * @return {any} + */ + execute(state: T, delay: number): any; + protected _execute(state: T, _delay: number): any; + unsubscribe(): void; +} +//# sourceMappingURL=AsyncAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map new file mode 100644 index 0000000..ba6c562 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,MAAM,CAAC,CAAC,CAAC;IAO/B,SAAS,CAAC,SAAS,EAAE,cAAc;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IANvG,EAAE,EAAE,WAAW,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,CAAC,CAAC;IAEV,KAAK,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAS;gBAEb,SAAS,EAAE,cAAc,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;IA+C3D,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAItG,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAM,GAAG,IAAQ,GAAG,WAAW,GAAG,SAAS;IAczH;;;OAGG;IACI,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG;IA2B5C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG;IAkBjD,WAAW;CAiBZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts new file mode 100644 index 0000000..fe9e006 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts @@ -0,0 +1,9 @@ +import { Scheduler } from '../Scheduler'; +import { Action } from './Action'; +import { AsyncAction } from './AsyncAction'; +export declare class AsyncScheduler extends Scheduler { + actions: Array>; + constructor(SchedulerAction: typeof Action, now?: () => number); + flush(action: AsyncAction): void; +} +//# sourceMappingURL=AsyncScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map new file mode 100644 index 0000000..2f7b638 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AsyncScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,qBAAa,cAAe,SAAQ,SAAS;IACpC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAM;gBAiBjC,eAAe,EAAE,OAAO,MAAM,EAAE,GAAG,GAAE,MAAM,MAAsB;IAItE,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CA0B7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts new file mode 100644 index 0000000..7d476dc --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts @@ -0,0 +1,14 @@ +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { QueueScheduler } from './QueueScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; +export declare class QueueAction extends AsyncAction { + protected scheduler: QueueScheduler; + protected work: (this: SchedulerAction, state?: T) => void; + constructor(scheduler: QueueScheduler, work: (this: SchedulerAction, state?: T) => void); + schedule(state?: T, delay?: number): Subscription; + execute(state: T, delay: number): any; + protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay?: number): TimerHandle; +} +//# sourceMappingURL=QueueAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map new file mode 100644 index 0000000..9731371 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACpC,SAAS,CAAC,SAAS,EAAE,cAAc;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAxF,SAAS,EAAE,cAAc,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;IAUpD,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG;IAI5C,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;CAkBtG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts new file mode 100644 index 0000000..46e29d5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts @@ -0,0 +1,4 @@ +import { AsyncScheduler } from './AsyncScheduler'; +export declare class QueueScheduler extends AsyncScheduler { +} +//# sourceMappingURL=QueueScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map new file mode 100644 index 0000000..32ddc64 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"QueueScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,cAAe,SAAQ,cAAc;CACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts new file mode 100644 index 0000000..766ab57 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts @@ -0,0 +1,49 @@ +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; +export declare class VirtualTimeScheduler extends AsyncScheduler { + maxFrames: number; + /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */ + static frameTimeFactor: number; + /** + * The current frame for the state of the virtual scheduler instance. The difference + * between two "frames" is synonymous with the passage of "virtual time units". So if + * you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`, + * that means `10` virtual time units have passed. + */ + frame: number; + /** + * Used internally to examine the current virtual action index being processed. + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + index: number; + /** + * This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of + * this constructor is likely to change in the long run. + * + * @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling. + * @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles. + */ + constructor(schedulerActionCtor?: typeof AsyncAction, maxFrames?: number); + /** + * Prompt the Scheduler to execute all of its queued actions, therefore + * clearing its queue. + * @return {void} + */ + flush(): void; +} +export declare class VirtualAction extends AsyncAction { + protected scheduler: VirtualTimeScheduler; + protected work: (this: SchedulerAction, state?: T) => void; + protected index: number; + protected active: boolean; + constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction, state?: T) => void, index?: number); + schedule(state?: T, delay?: number): Subscription; + protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle; + protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle | undefined; + protected _execute(state: T, delay: number): any; + private static sortActions; +} +//# sourceMappingURL=VirtualTimeScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map new file mode 100644 index 0000000..e4aa090 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VirtualTimeScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,oBAAqB,SAAQ,cAAc;IAyB6B,SAAS,EAAE,MAAM;I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ationFrame.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts new file mode 100644 index 0000000..0355d4a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts @@ -0,0 +1,38 @@ +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; +/** + * + * Animation Frame Scheduler + * + * Perform task when `window.requestAnimationFrame` would fire + * + * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler + * behaviour. + * + * Without delay, `animationFrame` scheduler can be used to create smooth browser animations. + * It makes sure scheduled task will happen just before next browser content repaint, + * thus performing animations as efficiently as possible. + * + * ## Example + * Schedule div height animation + * ```ts + * // html:
+ * import { animationFrameScheduler } from 'rxjs'; + * + * const div = document.querySelector('div'); + * + * animationFrameScheduler.schedule(function(height) { + * div.style.height = height + "px"; + * + * this.schedule(height + 1); // `this` references currently executing Action, + * // which we reschedule with new state + * }, 0, 0); + * + * // You will see a div element growing in height + * ``` + */ +export declare const animationFrameScheduler: AnimationFrameScheduler; +/** + * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8. + */ +export declare const animationFrame: AnimationFrameScheduler; +//# sourceMappingURL=animationFrame.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map new file mode 100644 index 0000000..10e71f5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrame.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,uBAAuB,yBAAoD,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,cAAc,yBAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts new file mode 100644 index 0000000..71a733b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts @@ -0,0 +1,13 @@ +import { Subscription } from '../Subscription'; +interface AnimationFrameProvider { + schedule(callback: FrameRequestCallback): Subscription; + requestAnimationFrame: typeof requestAnimationFrame; + cancelAnimationFrame: typeof cancelAnimationFrame; + delegate: { + requestAnimationFrame: typeof requestAnimationFrame; + cancelAnimationFrame: typeof cancelAnimationFrame; + } | undefined; +} +export declare const animationFrameProvider: AnimationFrameProvider; +export {}; +//# sourceMappingURL=animationFrameProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map new file mode 100644 index 0000000..150a954 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"animationFrameProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,GAAG,YAAY,CAAC;IACvD,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;IACpD,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;IAClD,QAAQ,EACJ;QACE,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;QACpD,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;KACnD,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB,EAAE,sBA6BpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts new file mode 100644 index 0000000..48dfb98 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts @@ -0,0 +1,41 @@ +import { AsapScheduler } from './AsapScheduler'; +/** + * + * Asap Scheduler + * + * Perform task as fast as it can be performed asynchronously + * + * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task + * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing + * code to end and then it will try to execute given task as fast as possible. + * + * `asap` scheduler will do its best to minimize time between end of currently executing code + * and start of scheduled task. This makes it best candidate for performing so called "deferring". + * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves + * some (although minimal) unwanted delay. + * + * Note that using `asap` scheduler does not necessarily mean that your task will be first to process + * after currently executing code. In particular, if some task was also scheduled with `asap` before, + * that task will execute first. That being said, if you need to schedule task asynchronously, but + * as soon as possible, `asap` scheduler is your best bet. + * + * ## Example + * Compare async and asap scheduler< + * ```ts + * import { asapScheduler, asyncScheduler } from 'rxjs'; + * + * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first... + * asapScheduler.schedule(() => console.log('asap')); + * + * // Logs: + * // "asap" + * // "async" + * // ... but 'asap' goes first! + * ``` + */ +export declare const asapScheduler: AsapScheduler; +/** + * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8. + */ +export declare const asap: AsapScheduler; +//# sourceMappingURL=asap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map new file mode 100644 index 0000000..979373f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"asap.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,eAAO,MAAM,aAAa,eAAgC,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,IAAI,eAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts new file mode 100644 index 0000000..c08a5b4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts @@ -0,0 +1,53 @@ +import { AsyncScheduler } from './AsyncScheduler'; +/** + * + * Async Scheduler + * + * Schedule task as if you used setTimeout(task, duration) + * + * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript + * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating + * in intervals. + * + * If you just want to "defer" task, that is to perform it right after currently + * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`), + * better choice will be the {@link asapScheduler} scheduler. + * + * ## Examples + * Use async scheduler to delay task + * ```ts + * import { asyncScheduler } from 'rxjs'; + * + * const task = () => console.log('it works!'); + * + * asyncScheduler.schedule(task, 2000); + * + * // After 2 seconds logs: + * // "it works!" + * ``` + * + * Use async scheduler to repeat task in intervals + * ```ts + * import { asyncScheduler } from 'rxjs'; + * + * function task(state) { + * console.log(state); + * this.schedule(state + 1, 1000); // `this` references currently executing Action, + * // which we reschedule with new state and delay + * } + * + * asyncScheduler.schedule(task, 3000, 0); + * + * // Logs: + * // 0 after 3s + * // 1 after 4s + * // 2 after 5s + * // 3 after 6s + * ``` + */ +export declare const asyncScheduler: AsyncScheduler; +/** + * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8. + */ +export declare const async: AsyncScheduler; +//# sourceMappingURL=async.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map new file mode 100644 index 0000000..678fa13 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,eAAO,MAAM,cAAc,gBAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,KAAK,gBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts new file mode 100644 index 0000000..f88403f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts @@ -0,0 +1,7 @@ +import { TimestampProvider } from '../types'; +interface DateTimestampProvider extends TimestampProvider { + delegate: TimestampProvider | undefined; +} +export declare const dateTimestampProvider: DateTimestampProvider; +export {}; +//# sourceMappingURL=dateTimestampProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map new file mode 100644 index 0000000..26ca11a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dateTimestampProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAOnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts new file mode 100644 index 0000000..8226a71 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts @@ -0,0 +1,14 @@ +import type { TimerHandle } from './timerHandle'; +declare type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle; +declare type ClearImmediateFunction = (handle: TimerHandle) => void; +interface ImmediateProvider { + setImmediate: SetImmediateFunction; + clearImmediate: ClearImmediateFunction; + delegate: { + setImmediate: SetImmediateFunction; + clearImmediate: ClearImmediateFunction; + } | undefined; +} +export declare const immediateProvider: ImmediateProvider; +export {}; +//# sourceMappingURL=immediateProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map new file mode 100644 index 0000000..17cfb10 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"immediateProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,aAAK,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AACjF,aAAK,sBAAsB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE5D,UAAU,iBAAiB;IACzB,YAAY,EAAE,oBAAoB,CAAC;IACnC,cAAc,EAAE,sBAAsB,CAAC;IACvC,QAAQ,EACJ;QACE,YAAY,EAAE,oBAAoB,CAAC;QACnC,cAAc,EAAE,sBAAsB,CAAC;KACxC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAY/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts new file mode 100644 index 0000000..cda8e4f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts @@ -0,0 +1,14 @@ +import type { TimerHandle } from './timerHandle'; +declare type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; +declare type ClearIntervalFunction = (handle: TimerHandle) => void; +interface IntervalProvider { + setInterval: SetIntervalFunction; + clearInterval: ClearIntervalFunction; + delegate: { + setInterval: SetIntervalFunction; + clearInterval: ClearIntervalFunction; + } | undefined; +} +export declare const intervalProvider: IntervalProvider; +export {}; +//# sourceMappingURL=intervalProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map new file mode 100644 index 0000000..68dbec4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"intervalProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,aAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AAClG,aAAK,qBAAqB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE3D,UAAU,gBAAgB;IACxB,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,qBAAqB,CAAC;IACrC,QAAQ,EACJ;QACE,WAAW,EAAE,mBAAmB,CAAC;QACjC,aAAa,EAAE,qBAAqB,CAAC;KACtC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAe9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts new file mode 100644 index 0000000..6a15ad3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts @@ -0,0 +1,7 @@ +import { TimestampProvider } from '../types'; +interface PerformanceTimestampProvider extends TimestampProvider { + delegate: TimestampProvider | undefined; +} +export declare const performanceTimestampProvider: PerformanceTimestampProvider; +export {}; +//# sourceMappingURL=performanceTimestampProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map new file mode 100644 index 0000000..4250539 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"performanceTimestampProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,UAAU,4BAA6B,SAAQ,iBAAiB;IAC9D,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,4BAA4B,EAAE,4BAO1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts new file mode 100644 index 0000000..e038f3c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts @@ -0,0 +1,69 @@ +import { QueueScheduler } from './QueueScheduler'; +/** + * + * Queue Scheduler + * + * Put every next task on a queue, instead of executing it immediately + * + * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler. + * + * When used without delay, it schedules given task synchronously - executes it right when + * it is scheduled. However when called recursively, that is when inside the scheduled task, + * another task is scheduled with queue scheduler, instead of executing immediately as well, + * that task will be put on a queue and wait for current one to finish. + * + * This means that when you execute task with `queue` scheduler, you are sure it will end + * before any other task scheduled with that scheduler will start. + * + * ## Examples + * Schedule recursively first, then do something + * ```ts + * import { queueScheduler } from 'rxjs'; + * + * queueScheduler.schedule(() => { + * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue + * + * console.log('first'); + * }); + * + * // Logs: + * // "first" + * // "second" + * ``` + * + * Reschedule itself recursively + * ```ts + * import { queueScheduler } from 'rxjs'; + * + * queueScheduler.schedule(function(state) { + * if (state !== 0) { + * console.log('before', state); + * this.schedule(state - 1); // `this` references currently executing Action, + * // which we reschedule with new state + * console.log('after', state); + * } + * }, 0, 3); + * + * // In scheduler that runs recursively, you would expect: + * // "before", 3 + * // "before", 2 + * // "before", 1 + * // "after", 1 + * // "after", 2 + * // "after", 3 + * + * // But with queue it logs: + * // "before", 3 + * // "after", 3 + * // "before", 2 + * // "after", 2 + * // "before", 1 + * // "after", 1 + * ``` + */ +export declare const queueScheduler: QueueScheduler; +/** + * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8. + */ +export declare const queue: QueueScheduler; +//# sourceMappingURL=queue.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map new file mode 100644 index 0000000..fdd91e6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,eAAO,MAAM,cAAc,gBAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,KAAK,gBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts new file mode 100644 index 0000000..0da3da8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts @@ -0,0 +1,14 @@ +import type { TimerHandle } from './timerHandle'; +declare type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; +declare type ClearTimeoutFunction = (handle: TimerHandle) => void; +interface TimeoutProvider { + setTimeout: SetTimeoutFunction; + clearTimeout: ClearTimeoutFunction; + delegate: { + setTimeout: SetTimeoutFunction; + clearTimeout: ClearTimeoutFunction; + } | undefined; +} +export declare const timeoutProvider: TimeoutProvider; +export {}; +//# sourceMappingURL=timeoutProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map new file mode 100644 index 0000000..379161e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timeoutProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,aAAK,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AACjG,aAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1D,UAAU,eAAe;IACvB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,YAAY,EAAE,oBAAoB,CAAC;IACnC,QAAQ,EACJ;QACE,UAAU,EAAE,kBAAkB,CAAC;QAC/B,YAAY,EAAE,oBAAoB,CAAC;KACpC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,eAAe,EAAE,eAe7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts new file mode 100644 index 0000000..c023a37 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts @@ -0,0 +1,2 @@ +export declare type TimerHandle = number | ReturnType; +//# sourceMappingURL=timerHandle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map new file mode 100644 index 0000000..9a49462 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"timerHandle.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts new file mode 100644 index 0000000..19a41cd --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts @@ -0,0 +1,3 @@ +export declare function getSymbolIterator(): symbol; +export declare const iterator: symbol; +//# sourceMappingURL=iterator.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map new file mode 100644 index 0000000..a3c59d4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.d.ts","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED,eAAO,MAAM,QAAQ,QAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts new file mode 100644 index 0000000..0c49b30 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts @@ -0,0 +1,8 @@ +/** + * Symbol.observable or a string "@@observable". Used for interop + * + * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS. + * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable + */ +export declare const observable: string | symbol; +//# sourceMappingURL=observable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map new file mode 100644 index 0000000..08daa1e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,MAAwF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts new file mode 100644 index 0000000..76b175a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts @@ -0,0 +1,16 @@ +import { Observable } from '../Observable'; +import { Scheduler } from '../Scheduler'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { Subscriber } from '../Subscriber'; +export declare class ColdObservable extends Observable implements SubscriptionLoggable { + messages: TestMessage[]; + subscriptions: SubscriptionLog[]; + scheduler: Scheduler; + logSubscribedFrame: () => number; + logUnsubscribedFrame: (index: number) => void; + constructor(messages: TestMessage[], scheduler: Scheduler); + scheduleMessages(subscriber: Subscriber): void; +} +//# sourceMappingURL=ColdObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map new file mode 100644 index 0000000..bf1cfff --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ColdObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,oBAAoB;IAQ/D,QAAQ,EAAE,WAAW,EAAE;IAPnC,aAAa,EAAE,eAAe,EAAE,CAAM;IAC7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IAEjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAE3B,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS;IAgBhE,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC;CAgB7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts new file mode 100644 index 0000000..f296694 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts @@ -0,0 +1,15 @@ +import { Subject } from '../Subject'; +import { Scheduler } from '../Scheduler'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +export declare class HotObservable extends Subject implements SubscriptionLoggable { + messages: TestMessage[]; + subscriptions: SubscriptionLog[]; + scheduler: Scheduler; + logSubscribedFrame: () => number; + logUnsubscribedFrame: (index: number) => void; + constructor(messages: TestMessage[], scheduler: Scheduler); + setup(): void; +} +//# sourceMappingURL=HotObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map new file mode 100644 index 0000000..9cada0a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HotObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB;IAQ3D,QAAQ,EAAE,WAAW,EAAE;IAPnC,aAAa,EAAE,eAAe,EAAE,CAAM;IAC7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IAEjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAE3B,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS;IAmBhE,KAAK;CAcN"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts new file mode 100644 index 0000000..f029e80 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts @@ -0,0 +1,6 @@ +export declare class SubscriptionLog { + subscribedFrame: number; + unsubscribedFrame: number; + constructor(subscribedFrame: number, unsubscribedFrame?: number); +} +//# sourceMappingURL=SubscriptionLog.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map new file mode 100644 index 0000000..4b57b08 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLog.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IACP,eAAe,EAAE,MAAM;IACvB,iBAAiB,EAAE,MAAM;gBADzB,eAAe,EAAE,MAAM,EACvB,iBAAiB,GAAE,MAAiB;CAExD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts new file mode 100644 index 0000000..2b21758 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts @@ -0,0 +1,9 @@ +import { Scheduler } from '../Scheduler'; +import { SubscriptionLog } from './SubscriptionLog'; +export declare class SubscriptionLoggable { + subscriptions: SubscriptionLog[]; + scheduler: Scheduler; + logSubscribedFrame(): number; + logUnsubscribedFrame(index: number): void; +} +//# sourceMappingURL=SubscriptionLoggable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map new file mode 100644 index 0000000..113e268 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SubscriptionLoggable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,oBAAoB;IACxB,aAAa,EAAE,eAAe,EAAE,CAAM;IAE7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,IAAI,MAAM;IAK5B,oBAAoB,CAAC,KAAK,EAAE,MAAM;CAQnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts new file mode 100644 index 0000000..de58893 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts @@ -0,0 +1,7 @@ +import { ObservableNotification } from '../types'; +export interface TestMessage { + frame: number; + notification: ObservableNotification; + isGhost?: boolean; +} +//# sourceMappingURL=TestMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map new file mode 100644 index 0000000..250c8e0 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TestMessage.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts new file mode 100644 index 0000000..d0345ff --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts @@ -0,0 +1,91 @@ +import { Observable } from '../Observable'; +import { ColdObservable } from './ColdObservable'; +import { HotObservable } from './HotObservable'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { VirtualTimeScheduler } from '../scheduler/VirtualTimeScheduler'; +export interface RunHelpers { + cold: typeof TestScheduler.prototype.createColdObservable; + hot: typeof TestScheduler.prototype.createHotObservable; + flush: typeof TestScheduler.prototype.flush; + time: typeof TestScheduler.prototype.createTime; + expectObservable: typeof TestScheduler.prototype.expectObservable; + expectSubscriptions: typeof TestScheduler.prototype.expectSubscriptions; + animate: (marbles: string) => void; +} +export declare type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void; +export declare type subscriptionLogsToBeFn = (marbles: string | string[]) => void; +export declare class TestScheduler extends VirtualTimeScheduler { + assertDeepEqual: (actual: any, expected: any) => boolean | void; + /** + * The number of virtual time units each character in a marble diagram represents. If + * the test scheduler is being used in "run mode", via the `run` method, this is temporarily + * set to `1` for the duration of the `run` block, then set back to whatever value it was. + * @nocollapse + */ + static frameTimeFactor: number; + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + readonly hotObservables: HotObservable[]; + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + readonly coldObservables: ColdObservable[]; + /** + * Test meta data to be processed during `flush()` + */ + private flushTests; + /** + * Indicates whether the TestScheduler instance is operating in "run mode", + * meaning it's processing a call to `run()` + */ + private runMode; + /** + * + * @param assertDeepEqual A function to set up your assertion for your test harness + */ + constructor(assertDeepEqual: (actual: any, expected: any) => boolean | void); + createTime(marbles: string): number; + /** + * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. + * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. + * @param error The error to use for the `#` marble (if present). + */ + createColdObservable(marbles: string, values?: { + [marble: string]: T; + }, error?: any): ColdObservable; + /** + * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. + * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. + * @param error The error to use for the `#` marble (if present). + */ + createHotObservable(marbles: string, values?: { + [marble: string]: T; + }, error?: any): HotObservable; + private materializeInnerObservable; + expectObservable(observable: Observable, subscriptionMarbles?: string | null): { + toBe(marbles: string, values?: any, errorValue?: any): void; + toEqual: (other: Observable) => void; + }; + expectSubscriptions(actualSubscriptionLogs: SubscriptionLog[]): { + toBe: subscriptionLogsToBeFn; + }; + flush(): void; + /** @nocollapse */ + static parseMarblesAsSubscriptions(marbles: string | null, runMode?: boolean): SubscriptionLog; + /** @nocollapse */ + static parseMarbles(marbles: string, values?: any, errorValue?: any, materializeInnerObservables?: boolean, runMode?: boolean): TestMessage[]; + private createAnimator; + private createDelegates; + /** + * The `run` method performs the test in 'run mode' - in which schedulers + * used within the test automatically delegate to the `TestScheduler`. That + * is, in 'run mode' there is no need to explicitly pass a `TestScheduler` + * instance to observable creators or operators. + * + * @see {@link /guide/testing/marble-testing} + */ + run(callback: (helpers: RunHelpers) => T): T; +} +//# sourceMappingURL=TestScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map new file mode 100644 index 0000000..e6d3f27 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,E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WAAW,EAAE;IA4GhB,OAAO,CAAC,cAAc;IA+DtB,OAAO,CAAC,eAAe;IA8IvB;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,CAAC,GAAG,CAAC;CA2ChD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/types.d.ts b/node_modules/rxjs/dist/types/internal/types.d.ts new file mode 100644 index 0000000..d156869 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/types.d.ts @@ -0,0 +1,301 @@ +/// +import { Observable } from './Observable'; +import { Subscription } from './Subscription'; +/** + * Note: This will add Symbol.observable globally for all TypeScript users, + * however, we are no longer polyfilling Symbol.observable + */ +declare global { + interface SymbolConstructor { + readonly observable: symbol; + } +} +/** + * A function type interface that describes a function that accepts one parameter `T` + * and returns another parameter `R`. + * + * Usually used to describe {@link OperatorFunction} - it always takes a single + * parameter (the source Observable) and returns another Observable. + */ +export interface UnaryFunction { + (source: T): R; +} +export interface OperatorFunction extends UnaryFunction, Observable> { +} +export declare type FactoryOrValue = T | (() => T); +export interface MonoTypeOperatorFunction extends OperatorFunction { +} +/** + * A value and the time at which it was emitted. + * + * Emitted by the `timestamp` operator + * + * @see {@link timestamp} + */ +export interface Timestamp { + value: T; + /** + * The timestamp. By default, this is in epoch milliseconds. + * Could vary based on the timestamp provider passed to the operator. + */ + timestamp: number; +} +/** + * A value emitted and the amount of time since the last value was emitted. + * + * Emitted by the `timeInterval` operator. + * + * @see {@link timeInterval} + */ +export interface TimeInterval { + value: T; + /** + * The amount of time between this value's emission and the previous value's emission. + * If this is the first emitted value, then it will be the amount of time since subscription + * started. + */ + interval: number; +} +export interface Unsubscribable { + unsubscribe(): void; +} +export declare type TeardownLogic = Subscription | Unsubscribable | (() => void) | void; +export interface SubscriptionLike extends Unsubscribable { + unsubscribe(): void; + readonly closed: boolean; +} +/** + * @deprecated Do not use. Most likely you want to use `ObservableInput`. Will be removed in v8. + */ +export declare type SubscribableOrPromise = Subscribable | Subscribable | PromiseLike | InteropObservable; +/** OBSERVABLE INTERFACES */ +export interface Subscribable { + subscribe(observer: Partial>): Unsubscribable; +} +/** + * Valid types that can be converted to observables. + */ +export declare type ObservableInput = Observable | InteropObservable | AsyncIterable | PromiseLike | ArrayLike | Iterable | ReadableStreamLike; +/** + * @deprecated Renamed to {@link InteropObservable }. Will be removed in v8. + */ +export declare type ObservableLike = InteropObservable; +/** + * An object that implements the `Symbol.observable` interface. + */ +export interface InteropObservable { + [Symbol.observable]: () => Subscribable; +} +/** + * A notification representing a "next" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface NextNotification { + /** The kind of notification. Always "N" */ + kind: 'N'; + /** The value of the notification. */ + value: T; +} +/** + * A notification representing an "error" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface ErrorNotification { + /** The kind of notification. Always "E" */ + kind: 'E'; + error: any; +} +/** + * A notification representing a "completion" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface CompleteNotification { + kind: 'C'; +} +/** + * Valid observable notification types. + */ +export declare type ObservableNotification = NextNotification | ErrorNotification | CompleteNotification; +export interface NextObserver { + closed?: boolean; + next: (value: T) => void; + error?: (err: any) => void; + complete?: () => void; +} +export interface ErrorObserver { + closed?: boolean; + next?: (value: T) => void; + error: (err: any) => void; + complete?: () => void; +} +export interface CompletionObserver { + closed?: boolean; + next?: (value: T) => void; + error?: (err: any) => void; + complete: () => void; +} +export declare type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; +/** + * An object interface that defines a set of callback functions a user can use to get + * notified of any set of {@link Observable} + * {@link guide/glossary-and-semantics#notification notification} events. + * + * For more info, please refer to {@link guide/observer this guide}. + */ +export interface Observer { + /** + * A callback function that gets called by the producer during the subscription when + * the producer "has" the `value`. It won't be called if `error` or `complete` callback + * functions have been called, nor after the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#next this guide}. + */ + next: (value: T) => void; + /** + * A callback function that gets called by the producer if and when it encountered a + * problem of any kind. The errored value will be provided through the `err` parameter. + * This callback can't be called more than one time, it can't be called if the + * `complete` callback function have been called previously, nor it can't be called if + * the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#error this guide}. + */ + error: (err: any) => void; + /** + * A callback function that gets called by the producer if and when it has no more + * values to provide (by calling `next` callback function). This means that no error + * has happened. This callback can't be called more than one time, it can't be called + * if the `error` callback function have been called previously, nor it can't be called + * if the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}. + */ + complete: () => void; +} +export interface SubjectLike extends Observer, Subscribable { +} +export interface SchedulerLike extends TimestampProvider { + schedule(work: (this: SchedulerAction, state: T) => void, delay: number, state: T): Subscription; + schedule(work: (this: SchedulerAction, state?: T) => void, delay: number, state?: T): Subscription; + schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; +} +export interface SchedulerAction extends Subscription { + schedule(state?: T, delay?: number): Subscription; +} +/** + * This is a type that provides a method to allow RxJS to create a numeric timestamp + */ +export interface TimestampProvider { + /** + * Returns a timestamp as a number. + * + * This is used by types like `ReplaySubject` or operators like `timestamp` to calculate + * the amount of time passed between events. + */ + now(): number; +} +/** + * Extracts the type from an `ObservableInput`. If you have + * `O extends ObservableInput` and you pass in `Observable`, or + * `Promise`, etc, it will type as `number`. + */ +export declare type ObservedValueOf = O extends ObservableInput ? T : never; +/** + * Extracts a union of element types from an `ObservableInput[]`. + * If you have `O extends ObservableInput[]` and you pass in + * `Observable[]` or `Promise[]` you would get + * back a type of `string`. + * If you pass in `[Observable, Observable]` you would + * get back a type of `string | number`. + */ +export declare type ObservedValueUnionFromArray = X extends Array> ? T : never; +/** + * @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8. + */ +export declare type ObservedValuesFromArray = ObservedValueUnionFromArray; +/** + * Extracts a tuple of element types from an `ObservableInput[]`. + * If you have `O extends ObservableInput[]` and you pass in + * `[Observable, Observable]` you would get back a type + * of `[string, number]`. + */ +export declare type ObservedValueTupleFromArray = { + [K in keyof X]: ObservedValueOf; +}; +/** + * Used to infer types from arguments to functions like {@link forkJoin}. + * So that you can have `forkJoin([Observable
, PromiseLike]): Observable<[A, B]>` + * et al. + */ +export declare type ObservableInputTuple = { + [K in keyof T]: ObservableInput; +}; +/** + * Constructs a new tuple with the specified type at the head. + * If you declare `Cons` you will get back `[A, B, C]`. + */ +export declare type Cons = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never; +/** + * Extracts the head of a tuple. + * If you declare `Head<[A, B, C]>` you will get back `A`. + */ +export declare type Head = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never; +/** + * Extracts the tail of a tuple. + * If you declare `Tail<[A, B, C]>` you will get back `[B, C]`. + */ +export declare type Tail = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never; +/** + * Extracts the generic value from an Array type. + * If you have `T extends Array`, and pass a `string[]` to it, + * `ValueFromArray` will return the actual type of `string`. + */ +export declare type ValueFromArray = A extends Array ? T : never; +/** + * Gets the value type from an {@link ObservableNotification}, if possible. + */ +export declare type ValueFromNotification = T extends { + kind: 'N' | 'E' | 'C'; +} ? T extends NextNotification ? T extends { + value: infer V; +} ? V : undefined : never : never; +/** + * A simple type to represent a gamut of "falsy" values... with a notable exception: + * `NaN` is "falsy" however, it is not and cannot be typed via TypeScript. See + * comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417 + */ +export declare type Falsy = null | undefined | false | 0 | -0 | 0n | ''; +export declare type TruthyTypesOf = T extends Falsy ? never : T; +interface ReadableStreamDefaultReaderLike { + read(): PromiseLike<{ + done: false; + value: T; + } | { + done: true; + value?: undefined; + }>; + releaseLock(): void; +} +/** + * The base signature RxJS will look for to identify and use + * a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) + * as an {@link ObservableInput} source. + */ +export interface ReadableStreamLike { + getReader(): ReadableStreamDefaultReaderLike; +} +/** + * An observable with a `connect` method that is used to create a subscription + * to an underlying source, connecting it with all consumers via a multicast. + */ +export interface Connectable extends Observable { + /** + * (Idempotent) Calling this method will connect the underlying source observable to all subscribed consumers + * through an underlying {@link Subject}. + * @returns A subscription, that when unsubscribed, will "disconnect" the source from the connector subject, + * severing notifications to all consumers. + */ + connect(): Subscription; +} +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/types.d.ts.map b/node_modules/rxjs/dist/types/internal/types.d.ts.map new file mode 100644 index 0000000..b66c435 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,iBAAiB;QACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B;CACF;AAID;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC;IACjC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAAG;AAE9F,oBAAY,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9C,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC;IACT;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;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AI,+BAA+B,CAAC,CAAC,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACnD;;;;;OAKG;IACH,OAAO,IAAI,YAAY,CAAC;CACzB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts new file mode 100644 index 0000000..0bc595a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts @@ -0,0 +1,21 @@ +export interface ArgumentOutOfRangeError extends Error { +} +export interface ArgumentOutOfRangeErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): ArgumentOutOfRangeError; +} +/** + * An error thrown when an element was queried at a certain index of an + * Observable, but no such index or position exists in that sequence. + * + * @see {@link elementAt} + * @see {@link take} + * @see {@link takeLast} + * + * @class ArgumentOutOfRangeError + */ +export declare const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor; +//# sourceMappingURL=ArgumentOutOfRangeError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map new file mode 100644 index 0000000..db1b380 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ArgumentOutOfRangeError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAwB,SAAQ,KAAK;CAAG;AAEzD,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,uBAAuB,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,EAAE,2BAOrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts new file mode 100644 index 0000000..c9db090 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts @@ -0,0 +1,23 @@ +export interface EmptyError extends Error { +} +export interface EmptyErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): EmptyError; +} +/** + * An error thrown when an Observable or a sequence was queried but has no + * elements. + * + * @see {@link first} + * @see {@link last} + * @see {@link single} + * @see {@link firstValueFrom} + * @see {@link lastValueFrom} + * + * @class EmptyError + */ +export declare const EmptyError: EmptyErrorCtor; +//# sourceMappingURL=EmptyError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map new file mode 100644 index 0000000..e25c99e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EmptyError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAW,SAAQ,KAAK;CAAG;AAE5C,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,UAAU,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,cAIvB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts new file mode 100644 index 0000000..72ae5b6 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts @@ -0,0 +1,14 @@ +/** + * Helper functions to schedule and unschedule microtasks. + */ +export declare const Immediate: { + setImmediate(cb: () => void): number; + clearImmediate(handle: number): void; +}; +/** + * Used for internal testing purposes only. Do not export from library. + */ +export declare const TestTools: { + pending(): number; +}; +//# sourceMappingURL=Immediate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map new file mode 100644 index 0000000..6738831 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Immediate.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,eAAO,MAAM,SAAS;qBACH,MAAM,IAAI,GAAG,MAAM;2BAUb,MAAM,GAAG,IAAI;CAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;CAIrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts new file mode 100644 index 0000000..e4debbe --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts @@ -0,0 +1,19 @@ +export interface NotFoundError extends Error { +} +export interface NotFoundErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string): NotFoundError; +} +/** + * An error thrown when a value or values are missing from an + * observable sequence. + * + * @see {@link operators/single} + * + * @class NotFoundError + */ +export declare const NotFoundError: NotFoundErrorCtor; +//# sourceMappingURL=NotFoundError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map new file mode 100644 index 0000000..3ed4b49 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAc,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts new file mode 100644 index 0000000..372abfa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts @@ -0,0 +1,20 @@ +export interface ObjectUnsubscribedError extends Error { +} +export interface ObjectUnsubscribedErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): ObjectUnsubscribedError; +} +/** + * An error thrown when an action is invalid because the object has been + * unsubscribed. + * + * @see {@link Subject} + * @see {@link BehaviorSubject} + * + * @class ObjectUnsubscribedError + */ +export declare const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor; +//# sourceMappingURL=ObjectUnsubscribedError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map new file mode 100644 index 0000000..7d8bf1b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ObjectUnsubscribedError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAwB,SAAQ,KAAK;CAAG;AAEzD,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,uBAAuB,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,2BAOrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts new file mode 100644 index 0000000..e485536 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts @@ -0,0 +1,19 @@ +export interface SequenceError extends Error { +} +export interface SequenceErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string): SequenceError; +} +/** + * An error thrown when something is wrong with the sequence of + * values arriving on the observable. + * + * @see {@link operators/single} + * + * @class SequenceError + */ +export declare const SequenceError: SequenceErrorCtor; +//# sourceMappingURL=SequenceError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map new file mode 100644 index 0000000..b4a8227 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SequenceError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAc,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts new file mode 100644 index 0000000..9c584ce --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts @@ -0,0 +1,16 @@ +export interface UnsubscriptionError extends Error { + readonly errors: any[]; +} +export interface UnsubscriptionErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (errors: any[]): UnsubscriptionError; +} +/** + * An error thrown when one or more errors have occurred during the + * `unsubscribe` of a {@link Subscription}. + */ +export declare const UnsubscriptionError: UnsubscriptionErrorCtor; +//# sourceMappingURL=UnsubscriptionError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map new file mode 100644 index 0000000..e6f2809 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"UnsubscriptionError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,uBAWjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts new file mode 100644 index 0000000..91c9ed2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts @@ -0,0 +1,2 @@ +export declare function applyMixins(derivedCtor: any, baseCtors: any[]): void; +//# sourceMappingURL=applyMixins.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map new file mode 100644 index 0000000..d41642c --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"applyMixins.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAS7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/args.d.ts b/node_modules/rxjs/dist/types/internal/util/args.d.ts new file mode 100644 index 0000000..0dfb0a0 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/args.d.ts @@ -0,0 +1,5 @@ +import { SchedulerLike } from '../types'; +export declare function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined; +export declare function popScheduler(args: any[]): SchedulerLike | undefined; +export declare function popNumber(args: any[], defaultValue: number): number; +//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/args.d.ts.map b/node_modules/rxjs/dist/types/internal/util/args.d.ts.map new file mode 100644 index 0000000..45de1ed --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/args.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,SAAS,CAE5F;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,aAAa,GAAG,SAAS,CAEnE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEnE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts new file mode 100644 index 0000000..de18e29 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts @@ -0,0 +1,11 @@ +/** + * Used in functions where either a list of arguments, a single array of arguments, or a + * dictionary of arguments can be returned. Returns an object with an `args` property with + * the arguments in an array, if it is a dictionary, it will also return the `keys` in another + * property. + */ +export declare function argsArgArrayOrObject>(args: T[] | [O] | [T[]]): { + args: T[]; + keys: string[] | null; +}; +//# sourceMappingURL=argsArgArrayOrObject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map new file mode 100644 index 0000000..fad6ddf --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"argsArgArrayOrObject.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,CAgBlI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts new file mode 100644 index 0000000..768d674 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts @@ -0,0 +1,6 @@ +/** + * Used in operators and functions that accept either a list of arguments, or an array of arguments + * as a single argument. + */ +export declare function argsOrArgArray(args: (T | T[])[]): T[]; +//# sourceMappingURL=argsOrArgArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map new file mode 100644 index 0000000..73f4d10 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"argsOrArgArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAExD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts new file mode 100644 index 0000000..c7cb9fa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts @@ -0,0 +1,7 @@ +/** + * Removes an item from an array, mutating it. + * @param arr The array to remove the item from + * @param item The item to remove + */ +export declare function arrRemove(arr: T[] | undefined | null, item: T): void; +//# sourceMappingURL=arrRemove.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map new file mode 100644 index 0000000..f31c2b3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"arrRemove.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,QAKhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts new file mode 100644 index 0000000..0821eab --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts @@ -0,0 +1,11 @@ +/** + * Used to create Error subclasses until the community moves away from ES5. + * + * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors + * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123 + * + * @param createImpl A factory function to create the actual constructor implementation. The returned + * function should be a named function that calls `_super` internally. + */ +export declare function createErrorClass(createImpl: (_super: any) => any): T; +//# sourceMappingURL=createErrorClass.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map new file mode 100644 index 0000000..2243a56 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createErrorClass.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,CAUvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts new file mode 100644 index 0000000..e9ae39e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts @@ -0,0 +1,2 @@ +export declare function createObject(keys: string[], values: any[]): any; +//# sourceMappingURL=createObject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map new file mode 100644 index 0000000..e08ba0a --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"createObject.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAEzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts new file mode 100644 index 0000000..5345a28 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts @@ -0,0 +1,14 @@ +/** + * Handles dealing with errors for super-gross mode. Creates a context, in which + * any synchronously thrown errors will be passed to {@link captureError}. Which + * will record the error such that it will be rethrown after the call back is complete. + * TODO: Remove in v8 + * @param cb An immediately executed function. + */ +export declare function errorContext(cb: () => void): void; +/** + * Captures errors only in super-gross mode. + * @param err the error to capture + */ +export declare function captureError(err: any): void; +//# sourceMappingURL=errorContext.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map new file mode 100644 index 0000000..d08a687 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"errorContext.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,IAAI,QAmB1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,QAKpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts new file mode 100644 index 0000000..a46a606 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts @@ -0,0 +1,5 @@ +import { Subscription } from '../Subscription'; +import { SchedulerLike } from '../types'; +export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay: number, repeat: true): void; +export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay?: number, repeat?: false): Subscription; +//# sourceMappingURL=executeSchedule.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map new file mode 100644 index 0000000..3577be1 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"executeSchedule.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,EAChC,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,MAAM,IAAI,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,IAAI,GACX,IAAI,CAAC;AACR,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,EAChC,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,MAAM,IAAI,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,KAAK,GACb,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/identity.d.ts b/node_modules/rxjs/dist/types/internal/util/identity.d.ts new file mode 100644 index 0000000..328d6ed --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/identity.d.ts @@ -0,0 +1,44 @@ +/** + * This function takes one parameter and just returns it. Simply put, + * this is like `(x: T): T => x`. + * + * ## Examples + * + * This is useful in some cases when using things like `mergeMap` + * + * ```ts + * import { interval, take, map, range, mergeMap, identity } from 'rxjs'; + * + * const source$ = interval(1000).pipe(take(5)); + * + * const result$ = source$.pipe( + * map(i => range(i)), + * mergeMap(identity) // same as mergeMap(x => x) + * ); + * + * result$.subscribe({ + * next: console.log + * }); + * ``` + * + * Or when you want to selectively apply an operator + * + * ```ts + * import { interval, take, identity } from 'rxjs'; + * + * const shouldLimit = () => Math.random() < 0.5; + * + * const source$ = interval(1000); + * + * const result$ = source$.pipe(shouldLimit() ? take(5) : identity); + * + * result$.subscribe({ + * next: console.log + * }); + * ``` + * + * @param x Any value that is returned by this function + * @returns The value passed as the first parameter to this function + */ +export declare function identity(x: T): T; +//# sourceMappingURL=identity.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map b/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map new file mode 100644 index 0000000..f52067b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAEnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts new file mode 100644 index 0000000..f2878e5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts @@ -0,0 +1,2 @@ +export declare const isArrayLike: (x: any) => x is ArrayLike; +//# sourceMappingURL=isArrayLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map new file mode 100644 index 0000000..3ef1303 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isArrayLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAAW,GAAG,sBAAqF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts new file mode 100644 index 0000000..dfb0206 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts @@ -0,0 +1,2 @@ +export declare function isAsyncIterable(obj: any): obj is AsyncIterable; +//# sourceMappingURL=isAsyncIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map new file mode 100644 index 0000000..14807c3 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isAsyncIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAEpE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts new file mode 100644 index 0000000..cb9a6ae --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts @@ -0,0 +1,9 @@ +/** + * Checks to see if a value is not only a `Date` object, + * but a *valid* `Date` object that can be converted to a + * number. For example, `new Date('blah')` is indeed an + * `instanceof Date`, however it cannot be converted to a + * number. + */ +export declare function isValidDate(value: any): value is Date; +//# sourceMappingURL=isDate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map new file mode 100644 index 0000000..59ef4f2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isDate.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,IAAI,CAErD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts new file mode 100644 index 0000000..b9ea60f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts @@ -0,0 +1,6 @@ +/** + * Returns true if the object is a function. + * @param value The value to check + */ +export declare function isFunction(value: any): value is (...args: any[]) => any; +//# sourceMappingURL=isFunction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map new file mode 100644 index 0000000..b66e708 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isFunction.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts new file mode 100644 index 0000000..4a27f38 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts @@ -0,0 +1,4 @@ +import { InteropObservable } from '../types'; +/** Identifies an input as being Observable (but not necessary an Rx Observable) */ +export declare function isInteropObservable(input: any): input is InteropObservable; +//# sourceMappingURL=isInteropObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map new file mode 100644 index 0000000..b76d5c5 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isInteropObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAI7C,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAE/E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts new file mode 100644 index 0000000..f152825 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts @@ -0,0 +1,3 @@ +/** Identifies an input as being an Iterable */ +export declare function isIterable(input: any): input is Iterable; +//# sourceMappingURL=isIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map new file mode 100644 index 0000000..e605afa --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,CAE7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts new file mode 100644 index 0000000..d6b6211 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts @@ -0,0 +1,8 @@ +/** prettier */ +import { Observable } from '../Observable'; +/** + * Tests to see if the object is an RxJS {@link Observable} + * @param obj the object to test + */ +export declare function isObservable(obj: any): obj is Observable; +//# sourceMappingURL=isObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map new file mode 100644 index 0000000..569d59d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAIjE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts new file mode 100644 index 0000000..9090e34 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts @@ -0,0 +1,6 @@ +/** + * Tests to see if the object is "thennable". + * @param value the object to test + */ +export declare function isPromise(value: any): value is PromiseLike; +//# sourceMappingURL=isPromise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map new file mode 100644 index 0000000..df356b2 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isPromise.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAAC,GAAG,CAAC,CAE/D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts new file mode 100644 index 0000000..3cb2782 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts @@ -0,0 +1,4 @@ +import { ReadableStreamLike } from '../types'; +export declare function readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator; +export declare function isReadableStreamLike(obj: any): obj is ReadableStreamLike; +//# sourceMappingURL=isReadableStreamLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map new file mode 100644 index 0000000..1dadd18 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isReadableStreamLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9C,wBAAuB,kCAAkC,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAarH;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAI9E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts new file mode 100644 index 0000000..d637034 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts @@ -0,0 +1,3 @@ +import { SchedulerLike } from '../types'; +export declare function isScheduler(value: any): value is SchedulerLike; +//# sourceMappingURL=isScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map new file mode 100644 index 0000000..4c42e4f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa,CAE9D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/lift.d.ts b/node_modules/rxjs/dist/types/internal/util/lift.d.ts new file mode 100644 index 0000000..2fb543d --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/lift.d.ts @@ -0,0 +1,15 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { OperatorFunction } from '../types'; +/** + * Used to determine if an object is an Observable with a lift function. + */ +export declare function hasLift(source: any): source is { + lift: InstanceType['lift']; +}; +/** + * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way. + * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription. + */ +export declare function operate(init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void): OperatorFunction; +//# sourceMappingURL=lift.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map b/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map new file mode 100644 index 0000000..9008a32 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lift.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI;IAAE,IAAI,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAEhG;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GACpF,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAaxB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts new file mode 100644 index 0000000..ec7d8ed --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts @@ -0,0 +1,7 @@ +import { OperatorFunction } from "../types"; +/** + * Used in several -- mostly deprecated -- situations where we need to + * apply a list of arguments or a single argument to a result selector. + */ +export declare function mapOneOrManyArgs(fn: ((...values: T[]) => R)): OperatorFunction; +//# sourceMappingURL=mapOneOrManyArgs.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map new file mode 100644 index 0000000..f498539 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mapOneOrManyArgs.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAS5C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,GAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAE9F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/noop.d.ts b/node_modules/rxjs/dist/types/internal/util/noop.d.ts new file mode 100644 index 0000000..57938f4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/noop.d.ts @@ -0,0 +1,2 @@ +export declare function noop(): void; +//# sourceMappingURL=noop.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map b/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map new file mode 100644 index 0000000..c4effe9 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,wBAAgB,IAAI,SAAM"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/not.d.ts b/node_modules/rxjs/dist/types/internal/util/not.d.ts new file mode 100644 index 0000000..85e3f8e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/not.d.ts @@ -0,0 +1,2 @@ +export declare function not(pred: (value: T, index: number) => boolean, thisArg: any): (value: T, index: number) => boolean; +//# sourceMappingURL=not.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/not.d.ts.map b/node_modules/rxjs/dist/types/internal/util/not.d.ts.map new file mode 100644 index 0000000..07dbbe4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/not.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAErH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts new file mode 100644 index 0000000..4df727f --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts @@ -0,0 +1,14 @@ +import { identity } from './identity'; +import { UnaryFunction } from '../types'; +export declare function pipe(): typeof identity; +export declare function pipe(fn1: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction): UnaryFunction; +export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction, ...fns: UnaryFunction[]): UnaryFunction; +//# sourceMappingURL=pipe.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map new file mode 100644 index 0000000..9e06cc8 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,IAAI,IAAI,OAAO,QAAQ,CAAC;AACxC,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1E,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvG,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpI,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAA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d.ts b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts new file mode 100644 index 0000000..c0b8d41 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts @@ -0,0 +1,11 @@ +/** + * Handles an error on another job either with the user-configured {@link onUnhandledError}, + * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc. + * + * This should be called whenever there is an error that is out-of-band with the subscription + * or when an error hits a terminal boundary of the subscription and no error handler was provided. + * + * @param err the error to report + */ +export declare function reportUnhandledError(err: any): void; +//# sourceMappingURL=reportUnhandledError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map new file mode 100644 index 0000000..92adc5e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reportUnhandledError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,QAW5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts new file mode 100644 index 0000000..543b961 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts @@ -0,0 +1,7 @@ +import { Subscriber } from '../Subscriber'; +/** + * Subscribes to an ArrayLike with a subscriber + * @param array The array or array-like to subscribe to + */ +export declare const subscribeToArray: (array: ArrayLike) => (subscriber: Subscriber) => void; +//# sourceMappingURL=subscribeToArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map new file mode 100644 index 0000000..279c671 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subscribeToArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,iEAK5B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts new file mode 100644 index 0000000..b07130b --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts @@ -0,0 +1,6 @@ +/** + * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`. + * @param input The object that was passed. + */ +export declare function createInvalidObservableTypeError(input: any): TypeError; +//# sourceMappingURL=throwUnobservableError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map new file mode 100644 index 0000000..e1a43ab --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"throwUnobservableError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,GAAG,aAO1D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts new file mode 100644 index 0000000..53c76a4 --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=workarounds.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map new file mode 100644 index 0000000..6419f2e --- /dev/null +++ b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"workarounds.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/operators/index.d.ts b/node_modules/rxjs/dist/types/operators/index.d.ts new file mode 100644 index 0000000..5b9232c --- /dev/null +++ b/node_modules/rxjs/dist/types/operators/index.d.ts @@ -0,0 +1,114 @@ +export { audit } from '../internal/operators/audit'; +export { auditTime } from '../internal/operators/auditTime'; +export { buffer } from '../internal/operators/buffer'; +export { bufferCount } from '../internal/operators/bufferCount'; +export { bufferTime } from '../internal/operators/bufferTime'; +export { bufferToggle } from '../internal/operators/bufferToggle'; +export { bufferWhen } from '../internal/operators/bufferWhen'; +export { catchError } from '../internal/operators/catchError'; +export { combineAll } from '../internal/operators/combineAll'; +export { combineLatestAll } from '../internal/operators/combineLatestAll'; +export { combineLatest } from '../internal/operators/combineLatest'; +export { combineLatestWith } from '../internal/operators/combineLatestWith'; +export { concat } from '../internal/operators/concat'; +export { concatAll } from '../internal/operators/concatAll'; +export { concatMap } from '../internal/operators/concatMap'; +export { concatMapTo } from '../internal/operators/concatMapTo'; +export { concatWith } from '../internal/operators/concatWith'; +export { connect, ConnectConfig } from '../internal/operators/connect'; +export { count } from '../internal/operators/count'; +export { debounce } from '../internal/operators/debounce'; +export { debounceTime } from '../internal/operators/debounceTime'; +export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; +export { delay } from '../internal/operators/delay'; +export { delayWhen } from '../internal/operators/delayWhen'; +export { dematerialize } from '../internal/operators/dematerialize'; +export { distinct } from '../internal/operators/distinct'; +export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; +export { elementAt } from '../internal/operators/elementAt'; +export { endWith } from '../internal/operators/endWith'; +export { every } from '../internal/operators/every'; +export { exhaust } from '../internal/operators/exhaust'; +export { exhaustAll } from '../internal/operators/exhaustAll'; +export { exhaustMap } from '../internal/operators/exhaustMap'; +export { expand } from '../internal/operators/expand'; +export { filter } from '../internal/operators/filter'; +export { finalize } from '../internal/operators/finalize'; +export { find } from '../internal/operators/find'; +export { findIndex } from '../internal/operators/findIndex'; +export { first } from '../internal/operators/first'; +export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from '../internal/operators/groupBy'; +export { ignoreElements } from '../internal/operators/ignoreElements'; +export { isEmpty } from '../internal/operators/isEmpty'; +export { last } from '../internal/operators/last'; +export { map } from '../internal/operators/map'; +export { mapTo } from '../internal/operators/mapTo'; +export { materialize } from '../internal/operators/materialize'; +export { max } from '../internal/operators/max'; +export { merge } from '../internal/operators/merge'; +export { mergeAll } from '../internal/operators/mergeAll'; +export { flatMap } from '../internal/operators/flatMap'; +export { mergeMap } from '../internal/operators/mergeMap'; +export { mergeMapTo } from '../internal/operators/mergeMapTo'; +export { mergeScan } from '../internal/operators/mergeScan'; +export { mergeWith } from '../internal/operators/mergeWith'; +export { min } from '../internal/operators/min'; +export { multicast } from '../internal/operators/multicast'; +export { observeOn } from '../internal/operators/observeOn'; +export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; +export { pairwise } from '../internal/operators/pairwise'; +export { partition } from '../internal/operators/partition'; +export { pluck } from '../internal/operators/pluck'; +export { publish } from '../internal/operators/publish'; +export { publishBehavior } from '../internal/operators/publishBehavior'; +export { publishLast } from '../internal/operators/publishLast'; +export { publishReplay } from '../internal/operators/publishReplay'; +export { race } from '../internal/operators/race'; +export { raceWith } from '../internal/operators/raceWith'; +export { reduce } from '../internal/operators/reduce'; +export { repeat, RepeatConfig } from '../internal/operators/repeat'; +export { repeatWhen } from '../internal/operators/repeatWhen'; +export { retry, RetryConfig } from '../internal/operators/retry'; +export { retryWhen } from '../internal/operators/retryWhen'; +export { refCount } from '../internal/operators/refCount'; +export { sample } from '../internal/operators/sample'; +export { sampleTime } from '../internal/operators/sampleTime'; +export { scan } from '../internal/operators/scan'; +export { sequenceEqual } from '../internal/operators/sequenceEqual'; +export { share, ShareConfig } from '../internal/operators/share'; +export { shareReplay, ShareReplayConfig } from '../internal/operators/shareReplay'; +export { single } from '../internal/operators/single'; +export { skip } from '../internal/operators/skip'; +export { skipLast } from '../internal/operators/skipLast'; +export { skipUntil } from '../internal/operators/skipUntil'; +export { skipWhile } from '../internal/operators/skipWhile'; +export { startWith } from '../internal/operators/startWith'; +export { subscribeOn } from '../internal/operators/subscribeOn'; +export { switchAll } from '../internal/operators/switchAll'; +export { switchMap } from '../internal/operators/switchMap'; +export { switchMapTo } from '../internal/operators/switchMapTo'; +export { switchScan } from '../internal/operators/switchScan'; +export { take } from '../internal/operators/take'; +export { takeLast } from '../internal/operators/takeLast'; +export { takeUntil } from '../internal/operators/takeUntil'; +export { takeWhile } from '../internal/operators/takeWhile'; +export { tap, TapObserver } from '../internal/operators/tap'; +export { throttle, ThrottleConfig } from '../internal/operators/throttle'; +export { throttleTime } from '../internal/operators/throttleTime'; +export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; +export { timeInterval } from '../internal/operators/timeInterval'; +export { timeout, TimeoutConfig, TimeoutInfo } from '../internal/operators/timeout'; +export { timeoutWith } from '../internal/operators/timeoutWith'; +export { timestamp } from '../internal/operators/timestamp'; +export { toArray } from '../internal/operators/toArray'; +export { window } from '../internal/operators/window'; +export { windowCount } from '../internal/operators/windowCount'; +export { windowTime } from '../internal/operators/windowTime'; +export { windowToggle } from '../internal/operators/windowToggle'; +export { windowWhen } from '../internal/operators/windowWhen'; +export { withLatestFrom } from '../internal/operators/withLatestFrom'; +export { zip } from '../internal/operators/zip'; +export { zipAll } from '../internal/operators/zipAll'; +export { zipWith } from '../internal/operators/zipWith'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/operators/index.d.ts.map b/node_modules/rxjs/dist/types/operators/index.d.ts.map new file mode 100644 index 0000000..3920212 --- /dev/null +++ b/node_modules/rxjs/dist/types/operators/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY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/dist/types/testing/index.d.ts new file mode 100644 index 0000000..989b5d9 --- /dev/null +++ b/node_modules/rxjs/dist/types/testing/index.d.ts @@ -0,0 +1,2 @@ +export { TestScheduler, RunHelpers } from '../internal/testing/TestScheduler'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/testing/index.d.ts.map b/node_modules/rxjs/dist/types/testing/index.d.ts.map new file mode 100644 index 0000000..f5da557 --- /dev/null +++ b/node_modules/rxjs/dist/types/testing/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/webSocket/index.d.ts b/node_modules/rxjs/dist/types/webSocket/index.d.ts new file mode 100644 index 0000000..2e1940d --- /dev/null +++ b/node_modules/rxjs/dist/types/webSocket/index.d.ts @@ -0,0 +1,3 @@ +export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; +export { WebSocketSubject, WebSocketSubjectConfig } from '../internal/observable/dom/WebSocketSubject'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/webSocket/index.d.ts.map b/node_modules/rxjs/dist/types/webSocket/index.d.ts.map new file mode 100644 index 0000000..a38d6bc --- /dev/null +++ b/node_modules/rxjs/dist/types/webSocket/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/fetch/package.json b/node_modules/rxjs/fetch/package.json new file mode 100644 index 0000000..892f358 --- /dev/null +++ b/node_modules/rxjs/fetch/package.json @@ -0,0 +1,8 @@ +{ + "name": "rxjs/fetch", + "types": "../dist/types/fetch/index.d.ts", + "main": "../dist/cjs/fetch/index.js", + "module": "../dist/esm5/fetch/index.js", + "es2015": "../dist/esm/fetch/index.js", + "sideEffects": false +} diff --git a/node_modules/rxjs/operators/package.json b/node_modules/rxjs/operators/package.json new file mode 100644 index 0000000..302736d --- /dev/null +++ b/node_modules/rxjs/operators/package.json @@ -0,0 +1,8 @@ +{ + "name": "rxjs/operators", + "types": "../dist/types/operators/index.d.ts", + "main": "../dist/cjs/operators/index.js", + "module": "../dist/esm5/operators/index.js", + "es2015": "../dist/esm/operators/index.js", + "sideEffects": false +} diff --git a/node_modules/rxjs/package.json b/node_modules/rxjs/package.json new file mode 100644 index 0000000..97084fa --- /dev/null +++ b/node_modules/rxjs/package.json @@ -0,0 +1,245 @@ +{ + "name": "rxjs", + "version": "7.8.1", + "description": "Reactive Extensions for modern JavaScript", + "main": "./dist/cjs/index.js", + "module": "./dist/esm5/index.js", + "es2015": "./dist/esm/index.js", + "types": "index.d.ts", + "typesVersions": { + ">=4.2": { + "*": [ + "dist/types/*" + ] + } + }, + "sideEffects": false, + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "node": "./dist/cjs/index.js", + "require": "./dist/cjs/index.js", + "es2015": "./dist/esm/index.js", + "default": "./dist/esm5/index.js" + }, + "./ajax": { + "types": "./dist/types/ajax/index.d.ts", + "node": "./dist/cjs/ajax/index.js", + "require": "./dist/cjs/ajax/index.js", + "es2015": "./dist/esm/ajax/index.js", + "default": "./dist/esm5/ajax/index.js" + }, + "./fetch": { + "types": "./dist/types/fetch/index.d.ts", + "node": "./dist/cjs/fetch/index.js", + "require": "./dist/cjs/fetch/index.js", + "es2015": "./dist/esm/fetch/index.js", + "default": "./dist/esm5/fetch/index.js" + }, + "./operators": { + "types": "./dist/types/operators/index.d.ts", + "node": "./dist/cjs/operators/index.js", + "require": "./dist/cjs/operators/index.js", + "es2015": "./dist/esm/operators/index.js", + "default": "./dist/esm5/operators/index.js" + }, + "./testing": { + "types": "./dist/types/testing/index.d.ts", + "node": "./dist/cjs/testing/index.js", + "require": "./dist/cjs/testing/index.js", + "es2015": "./dist/esm/testing/index.js", + "default": "./dist/esm5/testing/index.js" + }, + "./webSocket": { + "types": "./dist/types/webSocket/index.d.ts", + "node": "./dist/cjs/webSocket/index.js", + "require": "./dist/cjs/webSocket/index.js", + "es2015": "./dist/esm/webSocket/index.js", + "default": "./dist/esm5/webSocket/index.js" + }, + "./internal/*": { + "types": "./dist/types/internal/*.d.ts", + "node": "./dist/cjs/internal/*.js", + "require": "./dist/cjs/internal/*.js", + "es2015": "./dist/esm/internal/*.js", + "default": "./dist/esm5/internal/*.js" + }, + "./package.json": "./package.json" + }, + "config": { + "commitizen": { + "path": "cz-conventional-changelog" + } + }, + "lint-staged": { + "*.js": "eslint --cache --fix", + "(src|spec)/**/*.ts": [ + "tslint --fix", + "prettier --write" + ], + "*.{js,css,md}": "prettier --write" + }, + "scripts": { + "changelog": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s", + "build:spec:browser": "echo \"Browser test is not working currently\" && exit -1 && webpack --config spec/support/webpack.mocha.config.js", + "lint_spec": "tslint -c spec/tslint.json -p spec/tsconfig.json \"spec/**/*.ts\"", + "lint_src": "tslint -c tslint.json -p src/tsconfig.base.json \"src/**/*.ts\"", + "lint": "npm-run-all --parallel lint_*", + "dtslint": "tsc -b ./src/tsconfig.types.json && tslint -c spec-dtslint/tslint.json -p spec-dtslint/tsconfig.json \"spec-dtslint/**/*.ts\"", + "prepublishOnly": "npm run build:package && npm run lint && npm run test && npm run test:circular && npm run dtslint && npm run test:side-effects", + "publish_docs": "./publish_docs.sh", + "test": "cross-env TS_NODE_PROJECT=tsconfig.mocha.json mocha --config spec/support/.mocharc.js \"spec/**/*-spec.ts\"", + "test:esm": "node spec/module-test-spec.mjs", + "test:browser": "echo \"Browser test is not working currently\" && exit -1 && npm-run-all build:spec:browser && opn spec/support/mocha-browser-runner.html", + "test:circular": "dependency-cruiser --validate .dependency-cruiser.json -x \"^node_modules\" dist/esm5", + "test:systemjs": "node integration/systemjs/systemjs-compatibility-spec.js", + "test:side-effects": "check-side-effects --test integration/side-effects/side-effects.json", + "test:side-effects:update": "npm run test:side-effects -- --update", + "test:import": "ts-node ./integration/import/runner.ts", + "compile": "tsc -b ./src/tsconfig.cjs.json ./src/tsconfig.cjs.spec.json ./src/tsconfig.esm.json ./src/tsconfig.esm5.json ./src/tsconfig.esm5.rollup.json ./src/tsconfig.types.json ./src/tsconfig.types.spec.json ./spec/tsconfig.json", + "build:clean": "shx rm -rf ./dist", + "build:global": "node ./tools/make-umd-bundle.js && node ./tools/make-closure-core.js", + "build:package": "npm-run-all build:clean compile build:global && node ./tools/prepare-package.js && node ./tools/generate-alias.js", + "watch": "nodemon -w \"src/\" -w \"spec/\" -e ts -x npm test", + "watch:dtslint": "nodemon -w \"src/\" -w \"spec-dtslint/\" -e ts -x npm run dtslint" + }, + "repository": { + "type": "git", + "url": "https://github.com/reactivex/rxjs.git" + }, + "keywords": [ + "Rx", + "RxJS", + "ReactiveX", + "ReactiveExtensions", + "Streams", + "Observables", + "Observable", + "Stream", + "ES6", + "ES2015" + ], + "author": "Ben Lesh ", + "contributors": [ + { + "name": "Ben Lesh", + "email": "ben@benlesh.com" + }, + { + "name": "Paul Taylor", + "email": "paul.e.taylor@me.com" + }, + { + "name": "Jeff Cross", + "email": "crossj@google.com" + }, + { + "name": "Matthew Podwysocki", + "email": "matthewp@microsoft.com" + }, + { + "name": "OJ Kwon", + "email": "kwon.ohjoong@gmail.com" + }, + { + "name": "Andre Staltz", + "email": "andre@staltz.com" + } + ], + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/ReactiveX/RxJS/issues" + }, + "homepage": "https://rxjs.dev", + "dependencies": { + "tslib": "^2.1.0" + }, + "devDependencies": { + "@angular-devkit/build-optimizer": "0.4.6", + "@angular-devkit/schematics": "^11.0.7", + "@swc/core": "^1.2.128", + "@swc/helpers": "^0.3.2", + "@types/chai": "^4.2.11", + "@types/lodash": "4.14.102", + "@types/mocha": "^7.0.2", + "@types/node": "^14.14.6", + "@types/shelljs": "^0.8.8", + "@types/sinon": "4.1.3", + "@types/sinon-chai": "2.7.29", + "@types/source-map": "^0.5.2", + "@typescript-eslint/eslint-plugin": "^4.29.1", + "@typescript-eslint/parser": "^4.29.1", + "babel-polyfill": "6.26.0", + "chai": "^4.2.0", + "check-side-effects": "0.0.23", + "color": "3.0.0", + "colors": "1.1.2", + "cross-env": "5.1.3", + "cz-conventional-changelog": "1.2.0", + "dependency-cruiser": "^9.12.0", + "escape-string-regexp": "1.0.5", + "eslint": "^7.8.1", + "eslint-plugin-jasmine": "^2.10.1", + "form-data": "^3.0.0", + "fs-extra": "^8.1.0", + "glob": "7.1.2", + "google-closure-compiler-js": "20170218.0.0", + "husky": "^4.2.5", + "klaw-sync": "3.0.2", + "lint-staged": "^10.2.11", + "lodash": "^4.17.15", + "minimist": "^1.2.5", + "mocha": "^8.1.3", + "nodemon": "^1.9.2", + "npm-run-all": "4.1.2", + "opn-cli": "3.1.0", + "platform": "1.3.5", + "prettier": "^2.5.1", + "promise": "8.0.1", + "rollup": "0.66.6", + "rollup-plugin-alias": "1.4.0", + "rollup-plugin-inject": "2.0.0", + "rollup-plugin-node-resolve": "2.0.0", + "shelljs": "^0.8.4", + "shx": "^0.3.2", + "sinon": "4.3.0", + "sinon-chai": "2.14.0", + "source-map-support": "0.5.3", + "systemjs": "^0.21.0", + "ts-node": "^9.1.1", + "tslint": "^5.20.1", + "tslint-config-prettier": "^1.18.0", + "tslint-etc": "1.13.10", + "tslint-no-toplevel-property-access": "0.0.2", + "tslint-no-unused-expression-chai": "0.0.3", + "typescript": "~4.2.0", + "validate-commit-msg": "2.14.0", + "web-streams-polyfill": "^3.0.2", + "webpack": "^4.31.0" + }, + "files": [ + "dist/bundles", + "dist/cjs/**/!(*.tsbuildinfo)", + "dist/esm/**/!(*.tsbuildinfo)", + "dist/esm5/**/!(*.tsbuildinfo)", + "dist/types/**/!(*.tsbuildinfo)", + "ajax", + "fetch", + "operators", + "testing", + "webSocket", + "src", + "CHANGELOG.md", + "CODE_OF_CONDUCT.md", + "LICENSE.txt", + "package.json", + "README.md", + "tsconfig.json" + ], + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "commit-msg": "validate-commit-msg" + } + } +} diff --git a/node_modules/rxjs/src/Rx.global.js b/node_modules/rxjs/src/Rx.global.js new file mode 100644 index 0000000..d75682b --- /dev/null +++ b/node_modules/rxjs/src/Rx.global.js @@ -0,0 +1,5 @@ +(function (root, factory) { + root.Rx = factory(); +})(window || global || this, function () { + return require('../dist/package/Rx'); +}); \ No newline at end of file diff --git a/node_modules/rxjs/src/ajax/index.ts b/node_modules/rxjs/src/ajax/index.ts new file mode 100644 index 0000000..f30f026 --- /dev/null +++ b/node_modules/rxjs/src/ajax/index.ts @@ -0,0 +1,4 @@ +export { ajax } from '../internal/ajax/ajax'; +export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; +export { AjaxResponse } from '../internal/ajax/AjaxResponse'; +export { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types'; diff --git a/node_modules/rxjs/src/fetch/index.ts b/node_modules/rxjs/src/fetch/index.ts new file mode 100644 index 0000000..e6ff01d --- /dev/null +++ b/node_modules/rxjs/src/fetch/index.ts @@ -0,0 +1 @@ +export { fromFetch } from '../internal/observable/dom/fetch'; diff --git a/node_modules/rxjs/src/index.ts b/node_modules/rxjs/src/index.ts new file mode 100644 index 0000000..1805341 --- /dev/null +++ b/node_modules/rxjs/src/index.ts @@ -0,0 +1,209 @@ +////////////////////////////////////////////////////////// +// Here we need to reference our other deep imports +// so VS code will figure out where they are +// see conversation here: +// https://github.com/microsoft/TypeScript/issues/43034 +////////////////////////////////////////////////////////// + +// tslint:disable: no-reference +// It's tempting to add references to all of the deep-import locations, but +// adding references to those that require DOM types breaks Node projects. +/// +/// +// tslint:enable: no-reference + +/* Observable */ +export { Observable } from './internal/Observable'; +export { ConnectableObservable } from './internal/observable/ConnectableObservable'; +export { GroupedObservable } from './internal/operators/groupBy'; +export { Operator } from './internal/Operator'; +export { observable } from './internal/symbol/observable'; +export { animationFrames } from './internal/observable/dom/animationFrames'; + +/* Subjects */ +export { Subject } from './internal/Subject'; +export { BehaviorSubject } from './internal/BehaviorSubject'; +export { ReplaySubject } from './internal/ReplaySubject'; +export { AsyncSubject } from './internal/AsyncSubject'; + +/* Schedulers */ +export { asap, asapScheduler } from './internal/scheduler/asap'; +export { async, asyncScheduler } from './internal/scheduler/async'; +export { queue, queueScheduler } from './internal/scheduler/queue'; +export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; +export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; +export { Scheduler } from './internal/Scheduler'; + +/* Subscription */ +export { Subscription } from './internal/Subscription'; +export { Subscriber } from './internal/Subscriber'; + +/* Notification */ +export { Notification, NotificationKind } from './internal/Notification'; + +/* Utils */ +export { pipe } from './internal/util/pipe'; +export { noop } from './internal/util/noop'; +export { identity } from './internal/util/identity'; +export { isObservable } from './internal/util/isObservable'; + +/* Promise Conversion */ +export { lastValueFrom } from './internal/lastValueFrom'; +export { firstValueFrom } from './internal/firstValueFrom'; + +/* Error types */ +export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; +export { EmptyError } from './internal/util/EmptyError'; +export { NotFoundError } from './internal/util/NotFoundError'; +export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; +export { SequenceError } from './internal/util/SequenceError'; +export { TimeoutError } from './internal/operators/timeout'; +export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; + +/* Static observable creation exports */ +export { bindCallback } from './internal/observable/bindCallback'; +export { bindNodeCallback } from './internal/observable/bindNodeCallback'; +export { combineLatest } from './internal/observable/combineLatest'; +export { concat } from './internal/observable/concat'; +export { connectable } from './internal/observable/connectable'; +export { defer } from './internal/observable/defer'; +export { empty } from './internal/observable/empty'; +export { forkJoin } from './internal/observable/forkJoin'; +export { from } from './internal/observable/from'; +export { fromEvent } from './internal/observable/fromEvent'; +export { fromEventPattern } from './internal/observable/fromEventPattern'; +export { generate } from './internal/observable/generate'; +export { iif } from './internal/observable/iif'; +export { interval } from './internal/observable/interval'; +export { merge } from './internal/observable/merge'; +export { never } from './internal/observable/never'; +export { of } from './internal/observable/of'; +export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; +export { pairs } from './internal/observable/pairs'; +export { partition } from './internal/observable/partition'; +export { race } from './internal/observable/race'; +export { range } from './internal/observable/range'; +export { throwError } from './internal/observable/throwError'; +export { timer } from './internal/observable/timer'; +export { using } from './internal/observable/using'; +export { zip } from './internal/observable/zip'; +export { scheduled } from './internal/scheduled/scheduled'; + +/* Constants */ +export { EMPTY } from './internal/observable/empty'; +export { NEVER } from './internal/observable/never'; + +/* Types */ +export * from './internal/types'; + +/* Config */ +export { config, GlobalConfig } from './internal/config'; + +/* Operators */ +export { audit } from './internal/operators/audit'; +export { auditTime } from './internal/operators/auditTime'; +export { buffer } from './internal/operators/buffer'; +export { bufferCount } from './internal/operators/bufferCount'; +export { bufferTime } from './internal/operators/bufferTime'; +export { bufferToggle } from './internal/operators/bufferToggle'; +export { bufferWhen } from './internal/operators/bufferWhen'; +export { catchError } from './internal/operators/catchError'; +export { combineAll } from './internal/operators/combineAll'; +export { combineLatestAll } from './internal/operators/combineLatestAll'; +export { combineLatestWith } from './internal/operators/combineLatestWith'; +export { concatAll } from './internal/operators/concatAll'; +export { concatMap } from './internal/operators/concatMap'; +export { concatMapTo } from './internal/operators/concatMapTo'; +export { concatWith } from './internal/operators/concatWith'; +export { connect, ConnectConfig } from './internal/operators/connect'; +export { count } from './internal/operators/count'; +export { debounce } from './internal/operators/debounce'; +export { debounceTime } from './internal/operators/debounceTime'; +export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; +export { delay } from './internal/operators/delay'; +export { delayWhen } from './internal/operators/delayWhen'; +export { dematerialize } from './internal/operators/dematerialize'; +export { distinct } from './internal/operators/distinct'; +export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; +export { elementAt } from './internal/operators/elementAt'; +export { endWith } from './internal/operators/endWith'; +export { every } from './internal/operators/every'; +export { exhaust } from './internal/operators/exhaust'; +export { exhaustAll } from './internal/operators/exhaustAll'; +export { exhaustMap } from './internal/operators/exhaustMap'; +export { expand } from './internal/operators/expand'; +export { filter } from './internal/operators/filter'; +export { finalize } from './internal/operators/finalize'; +export { find } from './internal/operators/find'; +export { findIndex } from './internal/operators/findIndex'; +export { first } from './internal/operators/first'; +export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy'; +export { ignoreElements } from './internal/operators/ignoreElements'; +export { isEmpty } from './internal/operators/isEmpty'; +export { last } from './internal/operators/last'; +export { map } from './internal/operators/map'; +export { mapTo } from './internal/operators/mapTo'; +export { materialize } from './internal/operators/materialize'; +export { max } from './internal/operators/max'; +export { mergeAll } from './internal/operators/mergeAll'; +export { flatMap } from './internal/operators/flatMap'; +export { mergeMap } from './internal/operators/mergeMap'; +export { mergeMapTo } from './internal/operators/mergeMapTo'; +export { mergeScan } from './internal/operators/mergeScan'; +export { mergeWith } from './internal/operators/mergeWith'; +export { min } from './internal/operators/min'; +export { multicast } from './internal/operators/multicast'; +export { observeOn } from './internal/operators/observeOn'; +export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; +export { pairwise } from './internal/operators/pairwise'; +export { pluck } from './internal/operators/pluck'; +export { publish } from './internal/operators/publish'; +export { publishBehavior } from './internal/operators/publishBehavior'; +export { publishLast } from './internal/operators/publishLast'; +export { publishReplay } from './internal/operators/publishReplay'; +export { raceWith } from './internal/operators/raceWith'; +export { reduce } from './internal/operators/reduce'; +export { repeat, RepeatConfig } from './internal/operators/repeat'; +export { repeatWhen } from './internal/operators/repeatWhen'; +export { retry, RetryConfig } from './internal/operators/retry'; +export { retryWhen } from './internal/operators/retryWhen'; +export { refCount } from './internal/operators/refCount'; +export { sample } from './internal/operators/sample'; +export { sampleTime } from './internal/operators/sampleTime'; +export { scan } from './internal/operators/scan'; +export { sequenceEqual } from './internal/operators/sequenceEqual'; +export { share, ShareConfig } from './internal/operators/share'; +export { shareReplay, ShareReplayConfig } from './internal/operators/shareReplay'; +export { single } from './internal/operators/single'; +export { skip } from './internal/operators/skip'; +export { skipLast } from './internal/operators/skipLast'; +export { skipUntil } from './internal/operators/skipUntil'; +export { skipWhile } from './internal/operators/skipWhile'; +export { startWith } from './internal/operators/startWith'; +export { subscribeOn } from './internal/operators/subscribeOn'; +export { switchAll } from './internal/operators/switchAll'; +export { switchMap } from './internal/operators/switchMap'; +export { switchMapTo } from './internal/operators/switchMapTo'; +export { switchScan } from './internal/operators/switchScan'; +export { take } from './internal/operators/take'; +export { takeLast } from './internal/operators/takeLast'; +export { takeUntil } from './internal/operators/takeUntil'; +export { takeWhile } from './internal/operators/takeWhile'; +export { tap, TapObserver } from './internal/operators/tap'; +export { throttle, ThrottleConfig } from './internal/operators/throttle'; +export { throttleTime } from './internal/operators/throttleTime'; +export { throwIfEmpty } from './internal/operators/throwIfEmpty'; +export { timeInterval } from './internal/operators/timeInterval'; +export { timeout, TimeoutConfig, TimeoutInfo } from './internal/operators/timeout'; +export { timeoutWith } from './internal/operators/timeoutWith'; +export { timestamp } from './internal/operators/timestamp'; +export { toArray } from './internal/operators/toArray'; +export { window } from './internal/operators/window'; +export { windowCount } from './internal/operators/windowCount'; +export { windowTime } from './internal/operators/windowTime'; +export { windowToggle } from './internal/operators/windowToggle'; +export { windowWhen } from './internal/operators/windowWhen'; +export { withLatestFrom } from './internal/operators/withLatestFrom'; +export { zipAll } from './internal/operators/zipAll'; +export { zipWith } from './internal/operators/zipWith'; diff --git a/node_modules/rxjs/src/internal/AnyCatcher.ts b/node_modules/rxjs/src/internal/AnyCatcher.ts new file mode 100644 index 0000000..e69ebe1 --- /dev/null +++ b/node_modules/rxjs/src/internal/AnyCatcher.ts @@ -0,0 +1,14 @@ +/* + * Note that we cannot apply the `internal` tag here because the declaration + * needs to survive the `stripInternal` option. Otherwise, `AnyCatcher` will + * be `any` in the `.d.ts` files. + */ +declare const anyCatcherSymbol: unique symbol; + +/** + * This is just a type that we're using to identify `any` being passed to + * function overloads. This is used because of situations like {@link forkJoin}, + * where it could return an `Observable` or an `Observable<{ [key: K]: T }>`, + * so `forkJoin(any)` would mean we need to return `Observable`. + */ +export type AnyCatcher = typeof anyCatcherSymbol; diff --git a/node_modules/rxjs/src/internal/AsyncSubject.ts b/node_modules/rxjs/src/internal/AsyncSubject.ts new file mode 100644 index 0000000..954cd92 --- /dev/null +++ b/node_modules/rxjs/src/internal/AsyncSubject.ts @@ -0,0 +1,41 @@ +import { Subject } from './Subject'; +import { Subscriber } from './Subscriber'; + +/** + * A variant of Subject that only emits a value when it completes. It will emit + * its latest value to all its observers on completion. + * + * @class AsyncSubject + */ +export class AsyncSubject extends Subject { + private _value: T | null = null; + private _hasValue = false; + private _isComplete = false; + + /** @internal */ + protected _checkFinalizedStatuses(subscriber: Subscriber) { + const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value!); + subscriber.complete(); + } + } + + next(value: T): void { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + } + + complete(): void { + const { _hasValue, _value, _isComplete } = this; + if (!_isComplete) { + this._isComplete = true; + _hasValue && super.next(_value!); + super.complete(); + } + } +} diff --git a/node_modules/rxjs/src/internal/BehaviorSubject.ts b/node_modules/rxjs/src/internal/BehaviorSubject.ts new file mode 100644 index 0000000..8e56179 --- /dev/null +++ b/node_modules/rxjs/src/internal/BehaviorSubject.ts @@ -0,0 +1,39 @@ +import { Subject } from './Subject'; +import { Subscriber } from './Subscriber'; +import { Subscription } from './Subscription'; + +/** + * A variant of Subject that requires an initial value and emits its current + * value whenever it is subscribed to. + * + * @class BehaviorSubject + */ +export class BehaviorSubject extends Subject { + constructor(private _value: T) { + super(); + } + + get value(): T { + return this.getValue(); + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + const subscription = super._subscribe(subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + } + + getValue(): T { + const { hasError, thrownError, _value } = this; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + } + + next(value: T): void { + super.next((this._value = value)); + } +} diff --git a/node_modules/rxjs/src/internal/Notification.ts b/node_modules/rxjs/src/internal/Notification.ts new file mode 100644 index 0000000..4195d04 --- /dev/null +++ b/node_modules/rxjs/src/internal/Notification.ts @@ -0,0 +1,243 @@ +import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types'; +import { Observable } from './Observable'; +import { EMPTY } from './observable/empty'; +import { of } from './observable/of'; +import { throwError } from './observable/throwError'; +import { isFunction } from './util/isFunction'; + +// TODO: When this enum is removed, replace it with a type alias. See #4556. +/** + * @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8. + * It will not be replaced with a const enum as those are not compatible with isolated modules. + */ +export enum NotificationKind { + NEXT = 'N', + ERROR = 'E', + COMPLETE = 'C', +} + +/** + * Represents a push-based event or value that an {@link Observable} can emit. + * This class is particularly useful for operators that manage notifications, + * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and + * others. Besides wrapping the actual delivered value, it also annotates it + * with metadata of, for instance, what type of push message it is (`next`, + * `error`, or `complete`). + * + * @see {@link materialize} + * @see {@link dematerialize} + * @see {@link observeOn} + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ +export class Notification { + /** + * A value signifying that the notification will "next" if observed. In truth, + * This is really synonymous with just checking `kind === "N"`. + * @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `"N"`. + */ + readonly hasValue: boolean; + + /** + * Creates a "Next" notification object. + * @param kind Always `'N'` + * @param value The value to notify with if observed. + * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead. + */ + constructor(kind: 'N', value?: T); + /** + * Creates an "Error" notification object. + * @param kind Always `'E'` + * @param value Always `undefined` + * @param error The error to notify with if observed. + * @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead. + */ + constructor(kind: 'E', value: undefined, error: any); + /** + * Creates a "completion" notification object. + * @param kind Always `'C'` + * @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead. + */ + constructor(kind: 'C'); + constructor(public readonly kind: 'N' | 'E' | 'C', public readonly value?: T, public readonly error?: any) { + this.hasValue = kind === 'N'; + } + + /** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param observer The observer to notify. + */ + observe(observer: PartialObserver): void { + return observeNotification(this as ObservableNotification, observer); + } + + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @param complete A complete handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void, error: (err: any) => void): void; + /** + * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise + * this will not error, and it will be a noop. + * @param next The next handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + do(next: (value: T) => void): void; + do(nextHandler: (value: T) => void, errorHandler?: (err: any) => void, completeHandler?: () => void): void { + const { kind, value, error } = this; + return kind === 'N' ? nextHandler?.(value!) : kind === 'E' ? errorHandler?.(error) : completeHandler?.(); + } + + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @param complete A complete handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; + /** + * Executes a notification on the appropriate handler from a list provided. + * If a handler is missing for the kind of notification, nothing is called + * and no error is thrown, it will be a noop. + * @param next A next handler + * @param error An error handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void, error: (err: any) => void): void; + /** + * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise + * this will not error, and it will be a noop. + * @param next The next handler + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(next: (value: T) => void): void; + + /** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param observer The observer to notify. + * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. + */ + accept(observer: PartialObserver): void; + accept(nextOrObserver: PartialObserver | ((value: T) => void), error?: (err: any) => void, complete?: () => void) { + return isFunction((nextOrObserver as any)?.next) + ? this.observe(nextOrObserver as PartialObserver) + : this.do(nextOrObserver as (value: T) => void, error as any, complete as any); + } + + /** + * Returns a simple Observable that just delivers the notification represented + * by this Notification instance. + * + * @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable}, + * use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`. + */ + toObservable(): Observable { + const { kind, value, error } = this; + // Select the observable to return by `kind` + const result = + kind === 'N' + ? // Next kind. Return an observable of that value. + of(value!) + : // + kind === 'E' + ? // Error kind. Return an observable that emits the error. + throwError(() => error) + : // + kind === 'C' + ? // Completion kind. Kind is "C", return an observable that just completes. + EMPTY + : // Unknown kind, return falsy, so we error below. + 0; + if (!result) { + // TODO: consider removing this check. The only way to cause this would be to + // use the Notification constructor directly in a way that is not type-safe. + // and direct use of the Notification constructor is deprecated. + throw new TypeError(`Unexpected notification kind ${kind}`); + } + return result; + } + + private static completeNotification = new Notification('C') as Notification & CompleteNotification; + /** + * A shortcut to create a Notification instance of the type `next` from a + * given value. + * @param {T} value The `next` value. + * @return {Notification} The "next" Notification representing the + * argument. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createNext(value: T) { + return new Notification('N', value) as Notification & NextNotification; + } + + /** + * A shortcut to create a Notification instance of the type `error` from a + * given error. + * @param {any} [err] The `error` error. + * @return {Notification} The "error" Notification representing the + * argument. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createError(err?: any) { + return new Notification('E', undefined, err) as Notification & ErrorNotification; + } + + /** + * A shortcut to create a Notification instance of the type `complete`. + * @return {Notification} The valueless "complete" Notification. + * @nocollapse + * @deprecated It is NOT recommended to create instances of `Notification` directly. + * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. + * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. + * Will be removed in v8. + */ + static createComplete(): Notification & CompleteNotification { + return Notification.completeNotification; + } +} + +/** + * Executes the appropriate handler on a passed `observer` given the `kind` of notification. + * If the handler is missing it will do nothing. Even if the notification is an error, if + * there is no error handler on the observer, an error will not be thrown, it will noop. + * @param notification The notification object to observe. + * @param observer The observer to notify. + */ +export function observeNotification(notification: ObservableNotification, observer: PartialObserver) { + const { kind, value, error } = notification as any; + if (typeof kind !== 'string') { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === 'N' ? observer.next?.(value!) : kind === 'E' ? observer.error?.(error) : observer.complete?.(); +} diff --git a/node_modules/rxjs/src/internal/NotificationFactories.ts b/node_modules/rxjs/src/internal/NotificationFactories.ts new file mode 100644 index 0000000..5d2080a --- /dev/null +++ b/node_modules/rxjs/src/internal/NotificationFactories.ts @@ -0,0 +1,40 @@ +import { CompleteNotification, NextNotification, ErrorNotification } from './types'; + +/** + * A completion object optimized for memory use and created to be the + * same "shape" as other notifications in v8. + * @internal + */ +export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)(); + +/** + * Internal use only. Creates an optimized error notification that is the same "shape" + * as other notifications. + * @internal + */ +export function errorNotification(error: any): ErrorNotification { + return createNotification('E', undefined, error) as any; +} + +/** + * Internal use only. Creates an optimized next notification that is the same "shape" + * as other notifications. + * @internal + */ +export function nextNotification(value: T) { + return createNotification('N', value, undefined) as NextNotification; +} + +/** + * Ensures that all notifications created internally have the same "shape" in v8. + * + * TODO: This is only exported to support a crazy legacy test in `groupBy`. + * @internal + */ +export function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) { + return { + kind, + value, + error, + }; +} diff --git a/node_modules/rxjs/src/internal/Observable.ts b/node_modules/rxjs/src/internal/Observable.ts new file mode 100644 index 0000000..c40a6de --- /dev/null +++ b/node_modules/rxjs/src/internal/Observable.ts @@ -0,0 +1,498 @@ +import { Operator } from './Operator'; +import { SafeSubscriber, Subscriber } from './Subscriber'; +import { isSubscription, Subscription } from './Subscription'; +import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types'; +import { observable as Symbol_observable } from './symbol/observable'; +import { pipeFromArray } from './util/pipe'; +import { config } from './config'; +import { isFunction } from './util/isFunction'; +import { errorContext } from './util/errorContext'; + +/** + * A representation of any set of values over any amount of time. This is the most basic building block + * of RxJS. + * + * @class Observable + */ +export class Observable implements Subscribable { + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + source: Observable | undefined; + + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + operator: Operator | undefined; + + /** + * @constructor + * @param {Function} subscribe the function that is called when the Observable is + * initially subscribed to. This function is given a Subscriber, to which new values + * can be `next`ed, or an `error` method can be called to raise an error, or + * `complete` can be called to notify of a successful completion. + */ + constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) { + if (subscribe) { + this._subscribe = subscribe; + } + } + + // HACK: Since TypeScript inherits static properties too, we have to + // fight against TypeScript here so Subject can have a different static create signature + /** + * Creates a new Observable by calling the Observable constructor + * @owner Observable + * @method create + * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor + * @return {Observable} a new observable + * @nocollapse + * @deprecated Use `new Observable()` instead. Will be removed in v8. + */ + static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => { + return new Observable(subscribe); + }; + + /** + * Creates a new Observable, with this Observable instance as the source, and the passed + * operator defined as the new observable's operator. + * @method lift + * @param operator the operator defining the operation to take on the observable + * @return a new observable with the Operator applied + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + * If you have implemented an operator using `lift`, it is recommended that you create an + * operator by simply returning `new Observable()` directly. See "Creating new operators from + * scratch" section here: https://rxjs.dev/guide/operators + */ + lift(operator?: Operator): Observable { + const observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + } + + subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; + /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ + subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; + /** + * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit. + * + * Use it when you have all these Observables, but still nothing is happening. + * + * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It + * might be for example a function that you passed to Observable's constructor, but most of the time it is + * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means + * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often + * the thought. + * + * Apart from starting the execution of an Observable, this method allows you to listen for values + * that an Observable emits, as well as for when it completes or errors. You can achieve this in two + * of the following ways. + * + * The first way is creating an object that implements {@link Observer} interface. It should have methods + * defined by that interface, but note that it should be just a regular JavaScript object, which you can create + * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do + * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also + * that your object does not have to implement all methods. If you find yourself creating a method that doesn't + * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens, + * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead, + * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or + * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide + * an `error` method to avoid missing thrown errors. + * + * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods. + * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent + * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer, + * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`, + * since `subscribe` recognizes these functions by where they were placed in function call. When it comes + * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously. + * + * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events + * and you also handled emissions internally by using operators (e.g. using `tap`). + * + * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object. + * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean + * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback + * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable. + * + * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously. + * It is an Observable itself that decides when these functions will be called. For example {@link of} + * by default emits all its values synchronously. Always check documentation for how given Observable + * will behave when subscribed and if its default behavior can be modified with a `scheduler`. + * + * #### Examples + * + * Subscribe with an {@link guide/observer Observer} + * + * ```ts + * import { of } from 'rxjs'; + * + * const sumObserver = { + * sum: 0, + * next(value) { + * console.log('Adding: ' + value); + * this.sum = this.sum + value; + * }, + * error() { + * // We actually could just remove this method, + * // since we do not really care about errors right now. + * }, + * complete() { + * console.log('Sum equals: ' + this.sum); + * } + * }; + * + * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes. + * .subscribe(sumObserver); + * + * // Logs: + * // 'Adding: 1' + * // 'Adding: 2' + * // 'Adding: 3' + * // 'Sum equals: 6' + * ``` + * + * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated}) + * + * ```ts + * import { of } from 'rxjs' + * + * let sum = 0; + * + * of(1, 2, 3).subscribe( + * value => { + * console.log('Adding: ' + value); + * sum = sum + value; + * }, + * undefined, + * () => console.log('Sum equals: ' + sum) + * ); + * + * // Logs: + * // 'Adding: 1' + * // 'Adding: 2' + * // 'Adding: 3' + * // 'Sum equals: 6' + * ``` + * + * Cancel a subscription + * + * ```ts + * import { interval } from 'rxjs'; + * + * const subscription = interval(1000).subscribe({ + * next(num) { + * console.log(num) + * }, + * complete() { + * // Will not be called, even when cancelling subscription. + * console.log('completed!'); + * } + * }); + * + * setTimeout(() => { + * subscription.unsubscribe(); + * console.log('unsubscribed!'); + * }, 2500); + * + * // Logs: + * // 0 after 1s + * // 1 after 2s + * // 'unsubscribed!' after 2.5s + * ``` + * + * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called, + * or the first of three possible handlers, which is the handler for each value emitted from the subscribed + * Observable. + * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided, + * the error will be thrown asynchronously as unhandled. + * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion. + * @return {Subscription} a subscription reference to the registered handlers + * @method subscribe + */ + subscribe( + observerOrNext?: Partial> | ((value: T) => void) | null, + error?: ((error: any) => void) | null, + complete?: (() => void) | null + ): Subscription { + const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); + + errorContext(() => { + const { operator, source } = this; + subscriber.add( + operator + ? // We're dealing with a subscription in the + // operator chain to one of our lifted operators. + operator.call(subscriber, source) + : source + ? // If `source` has a value, but `operator` does not, something that + // had intimate knowledge of our API, like our `Subject`, must have + // set it. We're going to just call `_subscribe` directly. + this._subscribe(subscriber) + : // In all other cases, we're likely wrapping a user-provided initializer + // function, so we need to catch errors and handle them appropriately. + this._trySubscribe(subscriber) + ); + }); + + return subscriber; + } + + /** @internal */ + protected _trySubscribe(sink: Subscriber): TeardownLogic { + try { + return this._subscribe(sink); + } catch (err) { + // We don't need to return anything in this case, + // because it's just going to try to `add()` to a subscription + // above. + sink.error(err); + } + } + + /** + * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with + * APIs that expect promises, like `async/await`. You cannot unsubscribe from this. + * + * **WARNING**: Only use this with observables you *know* will complete. If the source + * observable does not complete, you will end up with a promise that is hung up, and + * potentially all of the state of an async function hanging out in memory. To avoid + * this situation, look into adding something like {@link timeout}, {@link take}, + * {@link takeWhile}, or {@link takeUntil} amongst others. + * + * #### Example + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const source$ = interval(1000).pipe(take(4)); + * + * async function getTotal() { + * let total = 0; + * + * await source$.forEach(value => { + * total += value; + * console.log('observable -> ' + value); + * }); + * + * return total; + * } + * + * getTotal().then( + * total => console.log('Total: ' + total) + * ); + * + * // Expected: + * // 'observable -> 0' + * // 'observable -> 1' + * // 'observable -> 2' + * // 'observable -> 3' + * // 'Total: 6' + * ``` + * + * @param next a handler for each value emitted by the observable + * @return a promise that either resolves on observable completion or + * rejects with the handled error + */ + forEach(next: (value: T) => void): Promise; + + /** + * @param next a handler for each value emitted by the observable + * @param promiseCtor a constructor function used to instantiate the Promise + * @return a promise that either resolves on observable completion or + * rejects with the handled error + * @deprecated Passing a Promise constructor will no longer be available + * in upcoming versions of RxJS. This is because it adds weight to the library, for very + * little benefit. If you need this functionality, it is recommended that you either + * polyfill Promise, or you create an adapter to convert the returned native promise + * to whatever promise implementation you wanted. Will be removed in v8. + */ + forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; + + forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise { + promiseCtor = getPromiseCtor(promiseCtor); + + return new promiseCtor((resolve, reject) => { + const subscriber = new SafeSubscriber({ + next: (value) => { + try { + next(value); + } catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve, + }); + this.subscribe(subscriber); + }) as Promise; + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): TeardownLogic { + return this.source?.subscribe(subscriber); + } + + /** + * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable + * @method Symbol.observable + * @return {Observable} this instance of the observable + */ + [Symbol_observable]() { + return this; + } + + /* tslint:disable:max-line-length */ + pipe(): Observable; + pipe(op1: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction): Observable; + pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction, + op6: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction, + op6: OperatorFunction, + op7: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction, + op6: OperatorFunction, + op7: OperatorFunction, + op8: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction, + op6: OperatorFunction, + op7: OperatorFunction, + op8: OperatorFunction, + op9: OperatorFunction + ): Observable; + pipe( + op1: OperatorFunction, + op2: OperatorFunction, + op3: OperatorFunction, + op4: OperatorFunction, + op5: OperatorFunction, + op6: OperatorFunction, + op7: OperatorFunction, + op8: OperatorFunction, + op9: OperatorFunction, + ...operations: OperatorFunction[] + ): Observable; + /* tslint:enable:max-line-length */ + + /** + * Used to stitch together functional operators into a chain. + * @method pipe + * @return {Observable} the Observable result of all of the operators having + * been called in the order they were passed in. + * + * ## Example + * + * ```ts + * import { interval, filter, map, scan } from 'rxjs'; + * + * interval(1000) + * .pipe( + * filter(x => x % 2 === 0), + * map(x => x + x), + * scan((acc, x) => acc + x) + * ) + * .subscribe(x => console.log(x)); + * ``` + */ + pipe(...operations: OperatorFunction[]): Observable { + return pipeFromArray(operations)(this); + } + + /* tslint:disable:max-line-length */ + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(): Promise; + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(PromiseCtor: typeof Promise): Promise; + /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ + toPromise(PromiseCtor: PromiseConstructorLike): Promise; + /* tslint:enable:max-line-length */ + + /** + * Subscribe to this Observable and get a Promise resolving on + * `complete` with the last emission (if any). + * + * **WARNING**: Only use this with observables you *know* will complete. If the source + * observable does not complete, you will end up with a promise that is hung up, and + * potentially all of the state of an async function hanging out in memory. To avoid + * this situation, look into adding something like {@link timeout}, {@link take}, + * {@link takeWhile}, or {@link takeUntil} amongst others. + * + * @method toPromise + * @param [promiseCtor] a constructor function used to instantiate + * the Promise + * @return A Promise that resolves with the last value emit, or + * rejects on an error. If there were no emissions, Promise + * resolves with undefined. + * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise + */ + toPromise(promiseCtor?: PromiseConstructorLike): Promise { + promiseCtor = getPromiseCtor(promiseCtor); + + return new promiseCtor((resolve, reject) => { + let value: T | undefined; + this.subscribe( + (x: T) => (value = x), + (err: any) => reject(err), + () => resolve(value) + ); + }) as Promise; + } +} + +/** + * Decides between a passed promise constructor from consuming code, + * A default configured promise constructor, and the native promise + * constructor and returns it. If nothing can be found, it will throw + * an error. + * @param promiseCtor The optional promise constructor to passed by consuming code + */ +function getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) { + return promiseCtor ?? config.Promise ?? Promise; +} + +function isObserver(value: any): value is Observer { + return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); +} + +function isSubscriber(value: any): value is Subscriber { + return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); +} diff --git a/node_modules/rxjs/src/internal/Operator.ts b/node_modules/rxjs/src/internal/Operator.ts new file mode 100644 index 0000000..ab7bc50 --- /dev/null +++ b/node_modules/rxjs/src/internal/Operator.ts @@ -0,0 +1,9 @@ +import { Subscriber } from './Subscriber'; +import { TeardownLogic } from './types'; + +/*** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ +export interface Operator { + call(subscriber: Subscriber, source: any): TeardownLogic; +} diff --git a/node_modules/rxjs/src/internal/ReplaySubject.ts b/node_modules/rxjs/src/internal/ReplaySubject.ts new file mode 100644 index 0000000..a81d735 --- /dev/null +++ b/node_modules/rxjs/src/internal/ReplaySubject.ts @@ -0,0 +1,110 @@ +import { Subject } from './Subject'; +import { TimestampProvider } from './types'; +import { Subscriber } from './Subscriber'; +import { Subscription } from './Subscription'; +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; + +/** + * A variant of {@link Subject} that "replays" old values to new subscribers by emitting them when they first subscribe. + * + * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`, + * `ReplaySubject` "observes" values by having them passed to its `next` method. When it observes a value, it will store that + * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor. + * + * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in + * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will + * error if it has observed an error. + * + * There are two main configuration items to be concerned with: + * + * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite. + * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer. + * + * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values + * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`. + * + * ### Differences with BehaviorSubject + * + * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions: + * + * 1. `BehaviorSubject` comes "primed" with a single value upon construction. + * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not. + * + * @see {@link Subject} + * @see {@link BehaviorSubject} + * @see {@link shareReplay} + */ +export class ReplaySubject extends Subject { + private _buffer: (T | number)[] = []; + private _infiniteTimeWindow = true; + + /** + * @param bufferSize The size of the buffer to replay on subscription + * @param windowTime The amount of time the buffered items will stay buffered + * @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to + * calculate the amount of time something has been buffered. + */ + constructor( + private _bufferSize = Infinity, + private _windowTime = Infinity, + private _timestampProvider: TimestampProvider = dateTimestampProvider + ) { + super(); + this._infiniteTimeWindow = _windowTime === Infinity; + this._bufferSize = Math.max(1, _bufferSize); + this._windowTime = Math.max(1, _windowTime); + } + + next(value: T): void { + const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + super.next(value); + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + this._throwIfClosed(); + this._trimBuffer(); + + const subscription = this._innerSubscribe(subscriber); + + const { _infiniteTimeWindow, _buffer } = this; + // We use a copy here, so reentrant code does not mutate our array while we're + // emitting it to a new subscriber. + const copy = _buffer.slice(); + for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i] as T); + } + + this._checkFinalizedStatuses(subscriber); + + return subscription; + } + + private _trimBuffer() { + const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this; + // If we don't have an infinite buffer size, and we're over the length, + // use splice to truncate the old buffer values off. Note that we have to + // double the size for instances where we're not using an infinite time window + // because we're storing the values and the timestamps in the same array. + const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + + // Now, if we're not in an infinite time window, remove all values where the time is + // older than what is allowed. + if (!_infiniteTimeWindow) { + const now = _timestampProvider.now(); + let last = 0; + // Search the array for the first timestamp that isn't expired and + // truncate the buffer up to that point. + for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + } +} diff --git a/node_modules/rxjs/src/internal/Scheduler.ts b/node_modules/rxjs/src/internal/Scheduler.ts new file mode 100644 index 0000000..7906d22 --- /dev/null +++ b/node_modules/rxjs/src/internal/Scheduler.ts @@ -0,0 +1,62 @@ +import { Action } from './scheduler/Action'; +import { Subscription } from './Subscription'; +import { SchedulerLike, SchedulerAction } from './types'; +import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; + +/** + * An execution context and a data structure to order tasks and schedule their + * execution. Provides a notion of (potentially virtual) time, through the + * `now()` getter method. + * + * Each unit of work in a Scheduler is called an `Action`. + * + * ```ts + * class Scheduler { + * now(): number; + * schedule(work, delay?, state?): Subscription; + * } + * ``` + * + * @class Scheduler + * @deprecated Scheduler is an internal implementation detail of RxJS, and + * should not be used directly. Rather, create your own class and implement + * {@link SchedulerLike}. Will be made internal in v8. + */ +export class Scheduler implements SchedulerLike { + public static now: () => number = dateTimestampProvider.now; + + constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) { + this.now = now; + } + + /** + * A getter method that returns a number representing the current time + * (at the time this function was called) according to the scheduler's own + * internal clock. + * @return {number} A number that represents the current time. May or may not + * have a relation to wall-clock time. May or may not refer to a time unit + * (e.g. milliseconds). + */ + public now: () => number; + + /** + * Schedules a function, `work`, for execution. May happen at some point in + * the future, according to the `delay` parameter, if specified. May be passed + * some context object, `state`, which will be passed to the `work` function. + * + * The given arguments will be processed an stored as an Action object in a + * queue of actions. + * + * @param {function(state: ?T): ?Subscription} work A function representing a + * task, or some unit of work to be executed by the Scheduler. + * @param {number} [delay] Time to wait before executing the work, where the + * time unit is implicit and defined by the Scheduler itself. + * @param {T} [state] Some contextual data that the `work` function uses when + * called by the Scheduler. + * @return {Subscription} A subscription in order to be able to unsubscribe + * the scheduled work. + */ + public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription { + return new this.schedulerActionCtor(this, work).schedule(state, delay); + } +} diff --git a/node_modules/rxjs/src/internal/Subject.ts b/node_modules/rxjs/src/internal/Subject.ts new file mode 100644 index 0000000..d514552 --- /dev/null +++ b/node_modules/rxjs/src/internal/Subject.ts @@ -0,0 +1,189 @@ +import { Operator } from './Operator'; +import { Observable } from './Observable'; +import { Subscriber } from './Subscriber'; +import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; +import { Observer, SubscriptionLike, TeardownLogic } from './types'; +import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; +import { arrRemove } from './util/arrRemove'; +import { errorContext } from './util/errorContext'; + +/** + * A Subject is a special type of Observable that allows values to be + * multicasted to many Observers. Subjects are like EventEmitters. + * + * Every Subject is an Observable and an Observer. You can subscribe to a + * Subject, and you can call next to feed values as well as error and complete. + */ +export class Subject extends Observable implements SubscriptionLike { + closed = false; + + private currentObservers: Observer[] | null = null; + + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + observers: Observer[] = []; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + isStopped = false; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + hasError = false; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + thrownError: any = null; + + /** + * Creates a "subject" by basically gluing an observer to an observable. + * + * @nocollapse + * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion. + */ + static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => { + return new AnonymousSubject(destination, source); + }; + + constructor() { + // NOTE: This must be here to obscure Observable's constructor. + super(); + } + + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + lift(operator: Operator): Observable { + const subject = new AnonymousSubject(this, this); + subject.operator = operator as any; + return subject as any; + } + + /** @internal */ + protected _throwIfClosed() { + if (this.closed) { + throw new ObjectUnsubscribedError(); + } + } + + next(value: T) { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + if (!this.currentObservers) { + this.currentObservers = Array.from(this.observers); + } + for (const observer of this.currentObservers) { + observer.next(value); + } + } + }); + } + + error(err: any) { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.hasError = this.isStopped = true; + this.thrownError = err; + const { observers } = this; + while (observers.length) { + observers.shift()!.error(err); + } + } + }); + } + + complete() { + errorContext(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.isStopped = true; + const { observers } = this; + while (observers.length) { + observers.shift()!.complete(); + } + } + }); + } + + unsubscribe() { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null!; + } + + get observed() { + return this.observers?.length > 0; + } + + /** @internal */ + protected _trySubscribe(subscriber: Subscriber): TeardownLogic { + this._throwIfClosed(); + return super._trySubscribe(subscriber); + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + } + + /** @internal */ + protected _innerSubscribe(subscriber: Subscriber) { + const { hasError, isStopped, observers } = this; + if (hasError || isStopped) { + return EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription(() => { + this.currentObservers = null; + arrRemove(observers, subscriber); + }); + } + + /** @internal */ + protected _checkFinalizedStatuses(subscriber: Subscriber) { + const { hasError, thrownError, isStopped } = this; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + } + + /** + * Creates a new Observable with this Subject as the source. You can do this + * to create custom Observer-side logic of the Subject and conceal it from + * code that uses the Observable. + * @return {Observable} Observable that the Subject casts to + */ + asObservable(): Observable { + const observable: any = new Observable(); + observable.source = this; + return observable; + } +} + +/** + * @class AnonymousSubject + */ +export class AnonymousSubject extends Subject { + constructor( + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + public destination?: Observer, + source?: Observable + ) { + super(); + this.source = source; + } + + next(value: T) { + this.destination?.next?.(value); + } + + error(err: any) { + this.destination?.error?.(err); + } + + complete() { + this.destination?.complete?.(); + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION; + } +} diff --git a/node_modules/rxjs/src/internal/Subscriber.ts b/node_modules/rxjs/src/internal/Subscriber.ts new file mode 100644 index 0000000..e682fe4 --- /dev/null +++ b/node_modules/rxjs/src/internal/Subscriber.ts @@ -0,0 +1,276 @@ +import { isFunction } from './util/isFunction'; +import { Observer, ObservableNotification } from './types'; +import { isSubscription, Subscription } from './Subscription'; +import { config } from './config'; +import { reportUnhandledError } from './util/reportUnhandledError'; +import { noop } from './util/noop'; +import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; +import { timeoutProvider } from './scheduler/timeoutProvider'; +import { captureError } from './util/errorContext'; + +/** + * Implements the {@link Observer} interface and extends the + * {@link Subscription} class. While the {@link Observer} is the public API for + * consuming the values of an {@link Observable}, all Observers get converted to + * a Subscriber, in order to provide Subscription-like capabilities such as + * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for + * implementing operators, but it is rarely used as a public API. + * + * @class Subscriber + */ +export class Subscriber extends Subscription implements Observer { + /** + * A static factory for a Subscriber, given a (potentially partial) definition + * of an Observer. + * @param next The `next` callback of an Observer. + * @param error The `error` callback of an + * Observer. + * @param complete The `complete` callback of an + * Observer. + * @return A Subscriber wrapping the (partially defined) + * Observer represented by the given arguments. + * @nocollapse + * @deprecated Do not use. Will be removed in v8. There is no replacement for this + * method, and there is no reason to be creating instances of `Subscriber` directly. + * If you have a specific use case, please file an issue. + */ + static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber { + return new SafeSubscriber(next, error, complete); + } + + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + protected isStopped: boolean = false; + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R) + + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons. + */ + constructor(destination?: Subscriber | Observer) { + super(); + if (destination) { + this.destination = destination; + // Automatically chain subscriptions together here. + // if destination is a Subscription, then it is a Subscriber. + if (isSubscription(destination)) { + destination.add(this); + } + } else { + this.destination = EMPTY_OBSERVER; + } + } + + /** + * The {@link Observer} callback to receive notifications of type `next` from + * the Observable, with a value. The Observable may call this method 0 or more + * times. + * @param {T} [value] The `next` value. + * @return {void} + */ + next(value?: T): void { + if (this.isStopped) { + handleStoppedNotification(nextNotification(value), this); + } else { + this._next(value!); + } + } + + /** + * The {@link Observer} callback to receive notifications of type `error` from + * the Observable, with an attached `Error`. Notifies the Observer that + * the Observable has experienced an error condition. + * @param {any} [err] The `error` exception. + * @return {void} + */ + error(err?: any): void { + if (this.isStopped) { + handleStoppedNotification(errorNotification(err), this); + } else { + this.isStopped = true; + this._error(err); + } + } + + /** + * The {@link Observer} callback to receive a valueless notification of type + * `complete` from the Observable. Notifies the Observer that the Observable + * has finished sending push-based notifications. + * @return {void} + */ + complete(): void { + if (this.isStopped) { + handleStoppedNotification(COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + } + + unsubscribe(): void { + if (!this.closed) { + this.isStopped = true; + super.unsubscribe(); + this.destination = null!; + } + } + + protected _next(value: T): void { + this.destination.next(value); + } + + protected _error(err: any): void { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + } + + protected _complete(): void { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + } +} + +/** + * This bind is captured here because we want to be able to have + * compatibility with monoid libraries that tend to use a method named + * `bind`. In particular, a library called Monio requires this. + */ +const _bind = Function.prototype.bind; + +function bind any>(fn: Fn, thisArg: any): Fn { + return _bind.call(fn, thisArg); +} + +/** + * Internal optimization only, DO NOT EXPOSE. + * @internal + */ +class ConsumerObserver implements Observer { + constructor(private partialObserver: Partial>) {} + + next(value: T): void { + const { partialObserver } = this; + if (partialObserver.next) { + try { + partialObserver.next(value); + } catch (error) { + handleUnhandledError(error); + } + } + } + + error(err: any): void { + const { partialObserver } = this; + if (partialObserver.error) { + try { + partialObserver.error(err); + } catch (error) { + handleUnhandledError(error); + } + } else { + handleUnhandledError(err); + } + } + + complete(): void { + const { partialObserver } = this; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } catch (error) { + handleUnhandledError(error); + } + } + } +} + +export class SafeSubscriber extends Subscriber { + constructor( + observerOrNext?: Partial> | ((value: T) => void) | null, + error?: ((e?: any) => void) | null, + complete?: (() => void) | null + ) { + super(); + + let partialObserver: Partial>; + if (isFunction(observerOrNext) || !observerOrNext) { + // The first argument is a function, not an observer. The next + // two arguments *could* be observers, or they could be empty. + partialObserver = { + next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined), + error: error ?? undefined, + complete: complete ?? undefined, + }; + } else { + // The first argument is a partial observer. + let context: any; + if (this && config.useDeprecatedNextContext) { + // This is a deprecated path that made `this.unsubscribe()` available in + // next handler functions passed to subscribe. This only exists behind a flag + // now, as it is *very* slow. + context = Object.create(observerOrNext); + context.unsubscribe = () => this.unsubscribe(); + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context), + error: observerOrNext.error && bind(observerOrNext.error, context), + complete: observerOrNext.complete && bind(observerOrNext.complete, context), + }; + } else { + // The "normal" path. Just use the partial observer directly. + partialObserver = observerOrNext; + } + } + + // Wrap the partial observer to ensure it's a full observer, and + // make sure proper error handling is accounted for. + this.destination = new ConsumerObserver(partialObserver); + } +} + +function handleUnhandledError(error: any) { + if (config.useDeprecatedSynchronousErrorHandling) { + captureError(error); + } else { + // Ideal path, we report this as an unhandled error, + // which is thrown on a new call stack. + reportUnhandledError(error); + } +} + +/** + * An error handler used when no error handler was supplied + * to the SafeSubscriber -- meaning no error handler was supplied + * do the `subscribe` call on our observable. + * @param err The error to handle + */ +function defaultErrorHandler(err: any) { + throw err; +} + +/** + * A handler for notifications that cannot be sent to a stopped subscriber. + * @param notification The notification being sent + * @param subscriber The stopped subscriber + */ +function handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) { + const { onStoppedNotification } = config; + onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); +} + +/** + * The observer used as a stub for subscriptions where the user did not + * pass any arguments to `subscribe`. Comes with the default error handling + * behavior. + */ +export const EMPTY_OBSERVER: Readonly> & { closed: true } = { + closed: true, + next: noop, + error: defaultErrorHandler, + complete: noop, +}; diff --git a/node_modules/rxjs/src/internal/Subscription.ts b/node_modules/rxjs/src/internal/Subscription.ts new file mode 100644 index 0000000..ab60131 --- /dev/null +++ b/node_modules/rxjs/src/internal/Subscription.ts @@ -0,0 +1,216 @@ +import { isFunction } from './util/isFunction'; +import { UnsubscriptionError } from './util/UnsubscriptionError'; +import { SubscriptionLike, TeardownLogic, Unsubscribable } from './types'; +import { arrRemove } from './util/arrRemove'; + +/** + * Represents a disposable resource, such as the execution of an Observable. A + * Subscription has one important method, `unsubscribe`, that takes no argument + * and just disposes the resource held by the subscription. + * + * Additionally, subscriptions may be grouped together through the `add()` + * method, which will attach a child Subscription to the current Subscription. + * When a Subscription is unsubscribed, all its children (and its grandchildren) + * will be unsubscribed as well. + * + * @class Subscription + */ +export class Subscription implements SubscriptionLike { + /** @nocollapse */ + public static EMPTY = (() => { + const empty = new Subscription(); + empty.closed = true; + return empty; + })(); + + /** + * A flag to indicate whether this Subscription has already been unsubscribed. + */ + public closed = false; + + private _parentage: Subscription[] | Subscription | null = null; + + /** + * The list of registered finalizers to execute upon unsubscription. Adding and removing from this + * list occurs in the {@link #add} and {@link #remove} methods. + */ + private _finalizers: Exclude[] | null = null; + + /** + * @param initialTeardown A function executed first as part of the finalization + * process that is kicked off when {@link #unsubscribe} is called. + */ + constructor(private initialTeardown?: () => void) {} + + /** + * Disposes the resources held by the subscription. May, for instance, cancel + * an ongoing Observable execution or cancel any other type of work that + * started when the Subscription was created. + * @return {void} + */ + unsubscribe(): void { + let errors: any[] | undefined; + + if (!this.closed) { + this.closed = true; + + // Remove this from it's parents. + const { _parentage } = this; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + for (const parent of _parentage) { + parent.remove(this); + } + } else { + _parentage.remove(this); + } + } + + const { initialTeardown: initialFinalizer } = this; + if (isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } catch (e) { + errors = e instanceof UnsubscriptionError ? e.errors : [e]; + } + } + + const { _finalizers } = this; + if (_finalizers) { + this._finalizers = null; + for (const finalizer of _finalizers) { + try { + execFinalizer(finalizer); + } catch (err) { + errors = errors ?? []; + if (err instanceof UnsubscriptionError) { + errors = [...errors, ...err.errors]; + } else { + errors.push(err); + } + } + } + } + + if (errors) { + throw new UnsubscriptionError(errors); + } + } + } + + /** + * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called + * when this subscription is unsubscribed. If this subscription is already {@link #closed}, + * because it has already been unsubscribed, then whatever finalizer is passed to it + * will automatically be executed (unless the finalizer itself is also a closed subscription). + * + * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed + * subscription to a any subscription will result in no operation. (A noop). + * + * Adding a subscription to itself, or adding `null` or `undefined` will not perform any + * operation at all. (A noop). + * + * `Subscription` instances that are added to this instance will automatically remove themselves + * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove + * will need to be removed manually with {@link #remove} + * + * @param teardown The finalization logic to add to this subscription. + */ + add(teardown: TeardownLogic): void { + // Only add the finalizer if it's not undefined + // and don't add a subscription to itself. + if (teardown && teardown !== this) { + if (this.closed) { + // If this subscription is already closed, + // execute whatever finalizer is handed to it automatically. + execFinalizer(teardown); + } else { + if (teardown instanceof Subscription) { + // We don't add closed subscriptions, and we don't add the same subscription + // twice. Subscription unsubscribe is idempotent. + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = this._finalizers ?? []).push(teardown); + } + } + } + + /** + * Checks to see if a this subscription already has a particular parent. + * This will signal that this subscription has already been added to the parent in question. + * @param parent the parent to check for + */ + private _hasParent(parent: Subscription) { + const { _parentage } = this; + return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); + } + + /** + * Adds a parent to this subscription so it can be removed from the parent if it + * unsubscribes on it's own. + * + * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED. + * @param parent The parent subscription to add + */ + private _addParent(parent: Subscription) { + const { _parentage } = this; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + } + + /** + * Called on a child when it is removed via {@link #remove}. + * @param parent The parent to remove + */ + private _removeParent(parent: Subscription) { + const { _parentage } = this; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + arrRemove(_parentage, parent); + } + } + + /** + * Removes a finalizer from this subscription that was previously added with the {@link #add} method. + * + * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves + * from every other `Subscription` they have been added to. This means that using the `remove` method + * is not a common thing and should be used thoughtfully. + * + * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance + * more than once, you will need to call `remove` the same number of times to remove all instances. + * + * All finalizer instances are removed to free up memory upon unsubscription. + * + * @param teardown The finalizer to remove from this subscription + */ + remove(teardown: Exclude): void { + const { _finalizers } = this; + _finalizers && arrRemove(_finalizers, teardown); + + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + } +} + +export const EMPTY_SUBSCRIPTION = Subscription.EMPTY; + +export function isSubscription(value: any): value is Subscription { + return ( + value instanceof Subscription || + (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)) + ); +} + +function execFinalizer(finalizer: Unsubscribable | (() => void)) { + if (isFunction(finalizer)) { + finalizer(); + } else { + finalizer.unsubscribe(); + } +} diff --git a/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts b/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts new file mode 100644 index 0000000..c9ca915 --- /dev/null +++ b/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts @@ -0,0 +1,124 @@ +import { AjaxRequest, AjaxResponseType } from './types'; +import { getXHRResponse } from './getXHRResponse'; + +/** + * A normalized response from an AJAX request. To get the data from the response, + * you will want to read the `response` property. + * + * - DO NOT create instances of this class directly. + * - DO NOT subclass this class. + * + * It is advised not to hold this object in memory, as it has a reference to + * the original XHR used to make the request, as well as properties containing + * request and response data. + * + * @see {@link ajax} + * @see {@link AjaxConfig} + */ +export class AjaxResponse { + /** The HTTP status code */ + readonly status: number; + + /** + * The response data, if any. Note that this will automatically be converted to the proper type + */ + readonly response: T; + + /** + * The responseType set on the request. (For example: `""`, `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, or `"text"`) + * @deprecated There isn't much reason to examine this. It's the same responseType set (or defaulted) on the ajax config. + * If you really need to examine this value, you can check it on the `request` or the `xhr`. Will be removed in v8. + */ + readonly responseType: XMLHttpRequestResponseType; + + /** + * The total number of bytes loaded so far. To be used with {@link total} while + * calculating progress. (You will want to set {@link includeDownloadProgress} or + * {@link includeDownloadProgress}) + */ + readonly loaded: number; + + /** + * The total number of bytes to be loaded. To be used with {@link loaded} while + * calculating progress. (You will want to set {@link includeDownloadProgress} or + * {@link includeDownloadProgress}) + */ + readonly total: number; + + /** + * A dictionary of the response headers. + */ + readonly responseHeaders: Record; + + /** + * A normalized response from an AJAX request. To get the data from the response, + * you will want to read the `response` property. + * + * - DO NOT create instances of this class directly. + * - DO NOT subclass this class. + * + * @param originalEvent The original event object from the XHR `onload` event. + * @param xhr The `XMLHttpRequest` object used to make the request. This is useful for examining status code, etc. + * @param request The request settings used to make the HTTP request. + * @param type The type of the event emitted by the {@link ajax} Observable + */ + constructor( + /** + * The original event object from the raw XHR event. + */ + public readonly originalEvent: ProgressEvent, + /** + * The XMLHttpRequest object used to make the request. + * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers + * and many other things related to the request. + */ + public readonly xhr: XMLHttpRequest, + /** + * The request parameters used to make the HTTP request. + */ + public readonly request: AjaxRequest, + /** + * The event type. This can be used to discern between different events + * if you're using progress events with {@link includeDownloadProgress} or + * {@link includeUploadProgress} settings in {@link AjaxConfig}. + * + * The event type consists of two parts: the {@link AjaxDirection} and the + * the event type. Merged with `_`, they form the `type` string. The + * direction can be an `upload` or a `download` direction, while an event can + * be `loadstart`, `progress` or `load`. + * + * `download_load` is the type of event when download has finished and the + * response is available. + */ + public readonly type: AjaxResponseType = 'download_load' + ) { + const { status, responseType } = xhr; + this.status = status ?? 0; + this.responseType = responseType ?? ''; + + // Parse the response headers in advance for the user. There's really + // not a great way to get all of them. So we need to parse the header string + // we get back. It comes in a simple enough format: + // + // header-name: value here + // content-type: application/json + // other-header-here: some, other, values, or, whatever + const allHeaders = xhr.getAllResponseHeaders(); + this.responseHeaders = allHeaders + ? // Split the header text into lines + allHeaders.split('\n').reduce((headers: Record, line) => { + // Split the lines on the first ": " as + // "key: value". Note that the value could + // technically have a ": " in it. + const index = line.indexOf(': '); + headers[line.slice(0, index)] = line.slice(index + 2); + return headers; + }, {}) + : {}; + + this.response = getXHRResponse(xhr); + const { loaded, total } = originalEvent; + this.loaded = loaded; + this.total = total; + } +} diff --git a/node_modules/rxjs/src/internal/ajax/ajax.ts b/node_modules/rxjs/src/internal/ajax/ajax.ts new file mode 100644 index 0000000..b1628da --- /dev/null +++ b/node_modules/rxjs/src/internal/ajax/ajax.ts @@ -0,0 +1,622 @@ +import { map } from '../operators/map'; +import { Observable } from '../Observable'; +import { AjaxConfig, AjaxRequest, AjaxDirection, ProgressEventType } from './types'; +import { AjaxResponse } from './AjaxResponse'; +import { AjaxTimeoutError, AjaxError } from './errors'; + +export interface AjaxCreationMethod { + /** + * Creates an observable that will perform an AJAX request using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default. + * + * This is the most configurable option, and the basis for all other AJAX calls in the library. + * + * ## Example + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax({ + * method: 'GET', + * url: 'https://api.github.com/users?per_page=5', + * responseType: 'json' + * }).pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * ``` + */ + (config: AjaxConfig): Observable>; + + /** + * Perform an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope. Defaults to a `responseType` of `"json"`. + * + * ## Example + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * ``` + */ + (url: string): Observable>; + + /** + * Performs an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + get(url: string, headers?: Record): Observable>; + + /** + * Performs an HTTP POST using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + post(url: string, body?: any, headers?: Record): Observable>; + + /** + * Performs an HTTP PUT using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + put(url: string, body?: any, headers?: Record): Observable>; + + /** + * Performs an HTTP PATCH using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * Before sending the value passed to the `body` argument, it is automatically serialized + * based on the specified `responseType`. By default, a JavaScript object will be serialized + * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided + * dictionary object to a url-encoded string. + * + * @param url The URL to get the resource from + * @param body The content to send. The body is automatically serialized. + * @param headers Optional headers. Case-Insensitive. + */ + patch(url: string, body?: any, headers?: Record): Observable>; + + /** + * Performs an HTTP DELETE using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and a `responseType` of `"json"`. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + delete(url: string, headers?: Record): Observable>; + + /** + * Performs an HTTP GET using the + * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in + * global scope by default, and returns the hydrated JavaScript object from the + * response. + * + * @param url The URL to get the resource from + * @param headers Optional headers. Case-Insensitive. + */ + getJSON(url: string, headers?: Record): Observable; +} + +function ajaxGet(url: string, headers?: Record): Observable> { + return ajax({ method: 'GET', url, headers }); +} + +function ajaxPost(url: string, body?: any, headers?: Record): Observable> { + return ajax({ method: 'POST', url, body, headers }); +} + +function ajaxDelete(url: string, headers?: Record): Observable> { + return ajax({ method: 'DELETE', url, headers }); +} + +function ajaxPut(url: string, body?: any, headers?: Record): Observable> { + return ajax({ method: 'PUT', url, body, headers }); +} + +function ajaxPatch(url: string, body?: any, headers?: Record): Observable> { + return ajax({ method: 'PATCH', url, body, headers }); +} + +const mapResponse = map((x: AjaxResponse) => x.response); + +function ajaxGetJSON(url: string, headers?: Record): Observable { + return mapResponse( + ajax({ + method: 'GET', + url, + headers, + }) + ); +} + +/** + * There is an ajax operator on the Rx object. + * + * It creates an observable for an Ajax request with either a request object with + * url, headers, etc or a string for a URL. + * + * ## Examples + * + * Using `ajax()` to fetch the response object that is being returned from API + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax.getJSON()` to fetch data from API + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax.getJSON('https://api.github.com/users?per_page=5').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax()` with object as argument and method POST with a two seconds delay + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const users = ajax({ + * url: 'https://httpbin.org/delay/2', + * method: 'POST', + * headers: { + * 'Content-Type': 'application/json', + * 'rxjs-custom-header': 'Rxjs' + * }, + * body: { + * rxjs: 'Hello World!' + * } + * }).pipe( + * map(response => console.log('response: ', response)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * users.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + * + * Using `ajax()` to fetch. An error object that is being returned from the request + * + * ```ts + * import { ajax } from 'rxjs/ajax'; + * import { map, catchError, of } from 'rxjs'; + * + * const obs$ = ajax('https://api.github.com/404').pipe( + * map(userResponse => console.log('users: ', userResponse)), + * catchError(error => { + * console.log('error: ', error); + * return of(error); + * }) + * ); + * + * obs$.subscribe({ + * next: value => console.log(value), + * error: err => console.log(err) + * }); + * ``` + */ +export const ajax: AjaxCreationMethod = (() => { + const create = (urlOrConfig: string | AjaxConfig) => { + const config: AjaxConfig = + typeof urlOrConfig === 'string' + ? { + url: urlOrConfig, + } + : urlOrConfig; + return fromAjax(config); + }; + + create.get = ajaxGet; + create.post = ajaxPost; + create.delete = ajaxDelete; + create.put = ajaxPut; + create.patch = ajaxPatch; + create.getJSON = ajaxGetJSON; + + return create; +})(); + +const UPLOAD = 'upload'; +const DOWNLOAD = 'download'; +const LOADSTART = 'loadstart'; +const PROGRESS = 'progress'; +const LOAD = 'load'; + +export function fromAjax(init: AjaxConfig): Observable> { + return new Observable((destination) => { + const config = { + // Defaults + async: true, + crossDomain: false, + withCredentials: false, + method: 'GET', + timeout: 0, + responseType: 'json' as XMLHttpRequestResponseType, + + ...init, + }; + + const { queryParams, body: configuredBody, headers: configuredHeaders } = config; + + let url = config.url; + if (!url) { + throw new TypeError('url is required'); + } + + if (queryParams) { + let searchParams: URLSearchParams; + if (url.includes('?')) { + // If the user has passed a URL with a querystring already in it, + // we need to combine them. So we're going to split it. There + // should only be one `?` in a valid URL. + const parts = url.split('?'); + if (2 < parts.length) { + throw new TypeError('invalid url'); + } + // Add the passed queryParams to the params already in the url provided. + searchParams = new URLSearchParams(parts[1]); + // queryParams is converted to any because the runtime is *much* more permissive than + // the types are. + new URLSearchParams(queryParams as any).forEach((value, key) => searchParams.set(key, value)); + // We have to do string concatenation here, because `new URL(url)` does + // not like relative URLs like `/this` without a base url, which we can't + // specify, nor can we assume `location` will exist, because of node. + url = parts[0] + '?' + searchParams; + } else { + // There is no preexisting querystring, so we can just use URLSearchParams + // to convert the passed queryParams into the proper format and encodings. + // queryParams is converted to any because the runtime is *much* more permissive than + // the types are. + searchParams = new URLSearchParams(queryParams as any); + url = url + '?' + searchParams; + } + } + + // Normalize the headers. We're going to make them all lowercase, since + // Headers are case insensitive by design. This makes it easier to verify + // that we aren't setting or sending duplicates. + const headers: Record = {}; + if (configuredHeaders) { + for (const key in configuredHeaders) { + if (configuredHeaders.hasOwnProperty(key)) { + headers[key.toLowerCase()] = configuredHeaders[key]; + } + } + } + + const crossDomain = config.crossDomain; + + // Set the x-requested-with header. This is a non-standard header that has + // come to be a de facto standard for HTTP requests sent by libraries and frameworks + // using XHR. However, we DO NOT want to set this if it is a CORS request. This is + // because sometimes this header can cause issues with CORS. To be clear, + // None of this is necessary, it's only being set because it's "the thing libraries do" + // Starting back as far as JQuery, and continuing with other libraries such as Angular 1, + // Axios, et al. + if (!crossDomain && !('x-requested-with' in headers)) { + headers['x-requested-with'] = 'XMLHttpRequest'; + } + + // Allow users to provide their XSRF cookie name and the name of a custom header to use to + // send the cookie. + const { withCredentials, xsrfCookieName, xsrfHeaderName } = config; + if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { + const xsrfCookie = document?.cookie.match(new RegExp(`(^|;\\s*)(${xsrfCookieName})=([^;]*)`))?.pop() ?? ''; + if (xsrfCookie) { + headers[xsrfHeaderName] = xsrfCookie; + } + } + + // Examine the body and determine whether or not to serialize it + // and set the content-type in `headers`, if we're able. + const body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); + + // The final request settings. + const _request: Readonly = { + ...config, + + // Set values we ensured above + url, + headers, + body, + }; + + let xhr: XMLHttpRequest; + + // Create our XHR so we can get started. + xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); + + { + /////////////////////////////////////////////////// + // set up the events before open XHR + // https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest + // You need to add the event listeners before calling open() on the request. + // Otherwise the progress events will not fire. + /////////////////////////////////////////////////// + + const { progressSubscriber, includeDownloadProgress = false, includeUploadProgress = false } = init; + + /** + * Wires up an event handler that will emit an error when fired. Used + * for timeout and abort events. + * @param type The type of event we're treating as an error + * @param errorFactory A function that creates the type of error to emit. + */ + const addErrorEvent = (type: string, errorFactory: () => any) => { + xhr.addEventListener(type, () => { + const error = errorFactory(); + progressSubscriber?.error?.(error); + destination.error(error); + }); + }; + + // If the request times out, handle errors appropriately. + addErrorEvent('timeout', () => new AjaxTimeoutError(xhr, _request)); + + // If the request aborts (due to a network disconnection or the like), handle + // it as an error. + addErrorEvent('abort', () => new AjaxError('aborted', xhr, _request)); + + /** + * Creates a response object to emit to the consumer. + * @param direction the direction related to the event. Prefixes the event `type` in the + * `AjaxResponse` object with "upload_" for events related to uploading and "download_" + * for events related to downloading. + * @param event the actual event object. + */ + const createResponse = (direction: AjaxDirection, event: ProgressEvent) => + new AjaxResponse(event, xhr, _request, `${direction}_${event.type as ProgressEventType}` as const); + + /** + * Wires up an event handler that emits a Response object to the consumer, used for + * all events that emit responses, loadstart, progress, and load. + * Note that download load handling is a bit different below, because it has + * more logic it needs to run. + * @param target The target, either the XHR itself or the Upload object. + * @param type The type of event to wire up + * @param direction The "direction", used to prefix the response object that is + * emitted to the consumer. (e.g. "upload_" or "download_") + */ + const addProgressEvent = (target: any, type: string, direction: AjaxDirection) => { + target.addEventListener(type, (event: ProgressEvent) => { + destination.next(createResponse(direction, event)); + }); + }; + + if (includeUploadProgress) { + [LOADSTART, PROGRESS, LOAD].forEach((type) => addProgressEvent(xhr.upload, type, UPLOAD)); + } + + if (progressSubscriber) { + [LOADSTART, PROGRESS].forEach((type) => xhr.upload.addEventListener(type, (e: any) => progressSubscriber?.next?.(e))); + } + + if (includeDownloadProgress) { + [LOADSTART, PROGRESS].forEach((type) => addProgressEvent(xhr, type, DOWNLOAD)); + } + + const emitError = (status?: number) => { + const msg = 'ajax error' + (status ? ' ' + status : ''); + destination.error(new AjaxError(msg, xhr, _request)); + }; + + xhr.addEventListener('error', (e) => { + progressSubscriber?.error?.(e); + emitError(); + }); + + xhr.addEventListener(LOAD, (event) => { + const { status } = xhr; + // 4xx and 5xx should error (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) + if (status < 400) { + progressSubscriber?.complete?.(); + + let response: AjaxResponse; + try { + // This can throw in IE, because we end up needing to do a JSON.parse + // of the response in some cases to produce object we'd expect from + // modern browsers. + response = createResponse(DOWNLOAD, event); + } catch (err) { + destination.error(err); + return; + } + + destination.next(response); + destination.complete(); + } else { + progressSubscriber?.error?.(event); + emitError(status); + } + }); + } + + const { user, method, async } = _request; + // open XHR + if (user) { + xhr.open(method, url, async, user, _request.password); + } else { + xhr.open(method, url, async); + } + + // timeout, responseType and withCredentials can be set once the XHR is open + if (async) { + xhr.timeout = _request.timeout; + xhr.responseType = _request.responseType; + } + + if ('withCredentials' in xhr) { + xhr.withCredentials = _request.withCredentials; + } + + // set headers + for (const key in headers) { + if (headers.hasOwnProperty(key)) { + xhr.setRequestHeader(key, headers[key]); + } + } + + // finally send the request + if (body) { + xhr.send(body); + } else { + xhr.send(); + } + + return () => { + if (xhr && xhr.readyState !== 4 /*XHR done*/) { + xhr.abort(); + } + }; + }); +} + +/** + * Examines the body to determine if we need to serialize it for them or not. + * If the body is a type that XHR handles natively, we just allow it through, + * otherwise, if the body is something that *we* can serialize for the user, + * we will serialize it, and attempt to set the `content-type` header, if it's + * not already set. + * @param body The body passed in by the user + * @param headers The normalized headers + */ +function extractContentTypeAndMaybeSerializeBody(body: any, headers: Record) { + if ( + !body || + typeof body === 'string' || + isFormData(body) || + isURLSearchParams(body) || + isArrayBuffer(body) || + isFile(body) || + isBlob(body) || + isReadableStream(body) + ) { + // The XHR instance itself can handle serializing these, and set the content-type for us + // so we don't need to do that. https://xhr.spec.whatwg.org/#the-send()-method + return body; + } + + if (isArrayBufferView(body)) { + // This is a typed array (e.g. Float32Array or Uint8Array), or a DataView. + // XHR can handle this one too: https://fetch.spec.whatwg.org/#concept-bodyinit-extract + return body.buffer; + } + + if (typeof body === 'object') { + // If we have made it here, this is an object, probably a POJO, and we'll try + // to serialize it for them. If this doesn't work, it will throw, obviously, which + // is okay. The workaround for users would be to manually set the body to their own + // serialized string (accounting for circular references or whatever), then set + // the content-type manually as well. + headers['content-type'] = headers['content-type'] ?? 'application/json;charset=utf-8'; + return JSON.stringify(body); + } + + // If we've gotten past everything above, this is something we don't quite know how to + // handle. Throw an error. This will be caught and emitted from the observable. + throw new TypeError('Unknown body type'); +} + +const _toString = Object.prototype.toString; + +function toStringCheck(obj: any, name: string): boolean { + return _toString.call(obj) === `[object ${name}]`; +} + +function isArrayBuffer(body: any): body is ArrayBuffer { + return toStringCheck(body, 'ArrayBuffer'); +} + +function isFile(body: any): body is File { + return toStringCheck(body, 'File'); +} + +function isBlob(body: any): body is Blob { + return toStringCheck(body, 'Blob'); +} + +function isArrayBufferView(body: any): body is ArrayBufferView { + return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); +} + +function isFormData(body: any): body is FormData { + return typeof FormData !== 'undefined' && body instanceof FormData; +} + +function isURLSearchParams(body: any): body is URLSearchParams { + return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; +} + +function isReadableStream(body: any): body is ReadableStream { + return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; +} diff --git a/node_modules/rxjs/src/internal/ajax/errors.ts b/node_modules/rxjs/src/internal/ajax/errors.ts new file mode 100644 index 0000000..bb220a2 --- /dev/null +++ b/node_modules/rxjs/src/internal/ajax/errors.ts @@ -0,0 +1,106 @@ +import { AjaxRequest } from './types'; +import { getXHRResponse } from './getXHRResponse'; +import { createErrorClass } from '../util/createErrorClass'; + +/** + * A normalized AJAX error. + * + * @see {@link ajax} + * + * @class AjaxError + */ +export interface AjaxError extends Error { + /** + * The XHR instance associated with the error. + */ + xhr: XMLHttpRequest; + + /** + * The AjaxRequest associated with the error. + */ + request: AjaxRequest; + + /** + * The HTTP status code, if the request has completed. If not, + * it is set to `0`. + */ + status: number; + + /** + * The responseType (e.g. 'json', 'arraybuffer', or 'xml'). + */ + responseType: XMLHttpRequestResponseType; + + /** + * The response data. + */ + response: any; +} + +export interface AjaxErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError; +} + +/** + * Thrown when an error occurs during an AJAX request. + * This is only exported because it is useful for checking to see if an error + * is an `instanceof AjaxError`. DO NOT create new instances of `AjaxError` with + * the constructor. + * + * @class AjaxError + * @see {@link ajax} + */ +export const AjaxError: AjaxErrorCtor = createErrorClass( + (_super) => + function AjaxErrorImpl(this: any, message: string, xhr: XMLHttpRequest, request: AjaxRequest) { + this.message = message; + this.name = 'AjaxError'; + this.xhr = xhr; + this.request = request; + this.status = xhr.status; + this.responseType = xhr.responseType; + let response: any; + try { + // This can throw in IE, because we have to do a JSON.parse of + // the response in some cases to get the expected response property. + response = getXHRResponse(xhr); + } catch (err) { + response = xhr.responseText; + } + this.response = response; + } +); + +export interface AjaxTimeoutError extends AjaxError {} + +export interface AjaxTimeoutErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError; +} + +/** + * Thrown when an AJAX request times out. Not to be confused with {@link TimeoutError}. + * + * This is exported only because it is useful for checking to see if errors are an + * `instanceof AjaxTimeoutError`. DO NOT use the constructor to create an instance of + * this type. + * + * @class AjaxTimeoutError + * @see {@link ajax} + */ +export const AjaxTimeoutError: AjaxTimeoutErrorCtor = (() => { + function AjaxTimeoutErrorImpl(this: any, xhr: XMLHttpRequest, request: AjaxRequest) { + AjaxError.call(this, 'ajax timeout', xhr, request); + this.name = 'AjaxTimeoutError'; + return this; + } + AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); + return AjaxTimeoutErrorImpl; +})() as any; diff --git a/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts b/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts new file mode 100644 index 0000000..34d7031 --- /dev/null +++ b/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts @@ -0,0 +1,37 @@ +/** + * Gets what should be in the `response` property of the XHR. However, + * since we still support the final versions of IE, we need to do a little + * checking here to make sure that we get the right thing back. Consequently, + * we need to do a JSON.parse() in here, which *could* throw if the response + * isn't valid JSON. + * + * This is used both in creating an AjaxResponse, and in creating certain errors + * that we throw, so we can give the user whatever was in the response property. + * + * @param xhr The XHR to examine the response of + */ +export function getXHRResponse(xhr: XMLHttpRequest) { + switch (xhr.responseType) { + case 'json': { + if ('response' in xhr) { + return xhr.response; + } else { + // IE + const ieXHR: any = xhr; + return JSON.parse(ieXHR.responseText); + } + } + case 'document': + return xhr.responseXML; + case 'text': + default: { + if ('response' in xhr) { + return xhr.response; + } else { + // IE + const ieXHR: any = xhr; + return ieXHR.responseText; + } + } + } +} diff --git a/node_modules/rxjs/src/internal/ajax/types.ts b/node_modules/rxjs/src/internal/ajax/types.ts new file mode 100644 index 0000000..96e8a91 --- /dev/null +++ b/node_modules/rxjs/src/internal/ajax/types.ts @@ -0,0 +1,235 @@ +import { PartialObserver } from '../types'; + +/** + * Valid Ajax direction types. Prefixes the event `type` in the + * {@link AjaxResponse} object with "upload_" for events related + * to uploading and "download_" for events related to downloading. + */ +export type AjaxDirection = 'upload' | 'download'; + +export type ProgressEventType = 'loadstart' | 'progress' | 'load'; + +export type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`; + +/** + * The object containing values RxJS used to make the HTTP request. + * + * This is provided in {@link AjaxError} instances as the `request` + * object. + */ +export interface AjaxRequest { + /** + * The URL requested. + */ + url: string; + + /** + * The body to send over the HTTP request. + */ + body?: any; + + /** + * The HTTP method used to make the HTTP request. + */ + method: string; + + /** + * Whether or not the request was made asynchronously. + */ + async: boolean; + + /** + * The headers sent over the HTTP request. + */ + headers: Readonly>; + + /** + * The timeout value used for the HTTP request. + * Note: this is only honored if the request is asynchronous (`async` is `true`). + */ + timeout: number; + + /** + * The user credentials user name sent with the HTTP request. + */ + user?: string; + + /** + * The user credentials password sent with the HTTP request. + */ + password?: string; + + /** + * Whether or not the request was a CORS request. + */ + crossDomain: boolean; + + /** + * Whether or not a CORS request was sent with credentials. + * If `false`, will also ignore cookies in the CORS response. + */ + withCredentials: boolean; + + /** + * The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request. + */ + responseType: XMLHttpRequestResponseType; +} + +/** + * Configuration for the {@link ajax} creation function. + */ +export interface AjaxConfig { + /** The address of the resource to request via HTTP. */ + url: string; + + /** + * The body of the HTTP request to send. + * + * This is serialized, by default, based off of the value of the `"content-type"` header. + * For example, if the `"content-type"` is `"application/json"`, the body will be serialized + * as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed + * to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object. + * In all other cases, the body will be passed directly. + */ + body?: any; + + /** + * Whether or not to send the request asynchronously. Defaults to `true`. + * If set to `false`, this will block the thread until the AJAX request responds. + */ + async?: boolean; + + /** + * The HTTP Method to use for the request. Defaults to "GET". + */ + method?: string; + + /** + * The HTTP headers to apply. + * + * Note that, by default, RxJS will add the following headers under certain conditions: + * + * 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData), + * a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically. + * 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`, + * (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically. + * This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests. + */ + headers?: Readonly>; + + /** + * The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the + * `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout". + */ + timeout?: number; + + /** The user credentials user name to send with the HTTP request */ + user?: string; + + /** The user credentials password to send with the HTTP request*/ + password?: string; + + /** + * Whether or not to send the HTTP request as a CORS request. + * Defaults to `false`. + * + * @deprecated Will be removed in version 8. Cross domain requests and what creates a cross + * domain request, are dictated by the browser, and a boolean that forces it to be cross domain + * does not make sense. If you need to force cross domain, make sure you're making a secure request, + * then add a custom header to the request or use `withCredentials`. For more information on what + * triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials). + * In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful + * for understanding when CORS will not be used. + */ + crossDomain?: boolean; + + /** + * To send user credentials in a CORS request, set to `true`. To exclude user credentials from + * a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`. + * + * Defaults to `false`. + */ + withCredentials?: boolean; + + /** + * The name of your site's XSRF cookie. + */ + xsrfCookieName?: string; + + /** + * The name of a custom header that you can use to send your XSRF cookie. + */ + xsrfHeaderName?: string; + + /** + * Can be set to change the response type. + * Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`. + * Note that the type of `"document"` (such as an XML document) is ignored if the global context is + * not `Window`. + * + * Defaults to `"json"`. + */ + responseType?: XMLHttpRequestResponseType; + + /** + * An optional factory used to create the XMLHttpRequest object used to make the AJAX request. + * This is useful in environments that lack `XMLHttpRequest`, or in situations where you + * wish to override the default `XMLHttpRequest` for some reason. + * + * If not provided, the `XMLHttpRequest` in global scope will be used. + * + * NOTE: This AJAX implementation relies on the built-in serialization and setting + * of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations, + * be sure any implementation you use meets that standard. + */ + createXHR?: () => XMLHttpRequest; + + /** + * An observer for watching the upload progress of an HTTP request. Will + * emit progress events, and completes on the final upload load event, will error for + * any XHR error or timeout. + * + * This will **not** error for errored status codes. Rather, it will always _complete_ when + * the HTTP response comes back. + * + * @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and + * {@link includeUploadProgress} instead. Will be removed in v8. + */ + progressSubscriber?: PartialObserver; + + /** + * If `true`, will emit all download progress and load complete events as {@link AjaxResponse} + * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. + * + * If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will + * be emitted from the resulting observable. + */ + includeDownloadProgress?: boolean; + + /** + * If `true`, will emit all upload progress and load complete events as {@link AjaxResponse} + * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. + * + * If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will + * be emitted from the resulting observable. + */ + includeUploadProgress?: boolean; + + /** + * Query string parameters to add to the URL in the request. + * This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer! + * + * Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an + * array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take). + * + * If, for some reason you have a query string in the `url` argument, this will append to the query string in the url, + * but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`, + * with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`. + */ + queryParams?: + | string + | URLSearchParams + | Record + | [string, string | number | boolean | string[] | number[] | boolean[]][]; +} diff --git a/node_modules/rxjs/src/internal/config.ts b/node_modules/rxjs/src/internal/config.ts new file mode 100644 index 0000000..99461db --- /dev/null +++ b/node_modules/rxjs/src/internal/config.ts @@ -0,0 +1,84 @@ +import { Subscriber } from './Subscriber'; +import { ObservableNotification } from './types'; + +/** + * The {@link GlobalConfig} object for RxJS. It is used to configure things + * like how to react on unhandled errors. + */ +export const config: GlobalConfig = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false, +}; + +/** + * The global configuration object for RxJS, used to configure things + * like how to react on unhandled errors. Accessible via {@link config} + * object. + */ +export interface GlobalConfig { + /** + * A registration point for unhandled errors from RxJS. These are errors that + * cannot were not handled by consuming code in the usual subscription path. For + * example, if you have this configured, and you subscribe to an observable without + * providing an error handler, errors from that subscription will end up here. This + * will _always_ be called asynchronously on another job in the runtime. This is because + * we do not want errors thrown in this user-configured handler to interfere with the + * behavior of the library. + */ + onUnhandledError: ((err: any) => void) | null; + + /** + * A registration point for notifications that cannot be sent to subscribers because they + * have completed, errored or have been explicitly unsubscribed. By default, next, complete + * and error notifications sent to stopped subscribers are noops. However, sometimes callers + * might want a different behavior. For example, with sources that attempt to report errors + * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead. + * This will _always_ be called asynchronously on another job in the runtime. This is because + * we do not want errors thrown in this user-configured handler to interfere with the + * behavior of the library. + */ + onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null; + + /** + * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach} + * methods. + * + * @deprecated As of version 8, RxJS will no longer support this sort of injection of a + * Promise constructor. If you need a Promise implementation other than native promises, + * please polyfill/patch Promise as you see appropriate. Will be removed in v8. + */ + Promise?: PromiseConstructorLike; + + /** + * If true, turns on synchronous error rethrowing, which is a deprecated behavior + * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe + * call in a try/catch block. It also enables producer interference, a nasty bug + * where a multicast can be broken for all observers by a downstream consumer with + * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME + * FOR MIGRATION REASONS. + * + * @deprecated As of version 8, RxJS will no longer support synchronous throwing + * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad + * behaviors described above. Will be removed in v8. + */ + useDeprecatedSynchronousErrorHandling: boolean; + + /** + * If true, enables an as-of-yet undocumented feature from v5: The ability to access + * `unsubscribe()` via `this` context in `next` functions created in observers passed + * to `subscribe`. + * + * This is being removed because the performance was severely problematic, and it could also cause + * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have + * their `this` context overwritten. + * + * @deprecated As of version 8, RxJS will no longer support altering the + * context of next functions provided as part of an observer to Subscribe. Instead, + * you will have access to a subscription or a signal or token that will allow you to do things like + * unsubscribe and test closed status. Will be removed in v8. + */ + useDeprecatedNextContext: boolean; +} diff --git a/node_modules/rxjs/src/internal/firstValueFrom.ts b/node_modules/rxjs/src/internal/firstValueFrom.ts new file mode 100644 index 0000000..2fc4bcf --- /dev/null +++ b/node_modules/rxjs/src/internal/firstValueFrom.ts @@ -0,0 +1,75 @@ +import { Observable } from './Observable'; +import { EmptyError } from './util/EmptyError'; +import { SafeSubscriber } from './Subscriber'; + +export interface FirstValueFromConfig { + defaultValue: T; +} + +export function firstValueFrom(source: Observable, config: FirstValueFromConfig): Promise; +export function firstValueFrom(source: Observable): Promise; + +/** + * Converts an observable to a promise by subscribing to the observable, + * and returning a promise that will resolve as soon as the first value + * arrives from the observable. The subscription will then be closed. + * + * If the observable stream completes before any values were emitted, the + * returned promise will reject with {@link EmptyError} or will resolve + * with the default value if a default was specified. + * + * If the observable stream emits an error, the returned promise will reject + * with that error. + * + * **WARNING**: Only use this with observables you *know* will emit at least one value, + * *OR* complete. If the source observable does not emit one value or complete, you will + * end up with a promise that is hung up, and potentially all of the state of an + * async function hanging out in memory. To avoid this situation, look into adding + * something like {@link timeout}, {@link take}, {@link takeWhile}, or {@link takeUntil} + * amongst others. + * + * ## Example + * + * Wait for the first value from a stream and emit it from a promise in + * an async function + * + * ```ts + * import { interval, firstValueFrom } from 'rxjs'; + * + * async function execute() { + * const source$ = interval(2000); + * const firstNumber = await firstValueFrom(source$); + * console.log(`The first number is ${ firstNumber }`); + * } + * + * execute(); + * + * // Expected output: + * // 'The first number is 0' + * ``` + * + * @see {@link lastValueFrom} + * + * @param source the observable to convert to a promise + * @param config a configuration object to define the `defaultValue` to use if the source completes without emitting a value + */ +export function firstValueFrom(source: Observable, config?: FirstValueFromConfig): Promise { + const hasConfig = typeof config === 'object'; + return new Promise((resolve, reject) => { + const subscriber = new SafeSubscriber({ + next: (value) => { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: () => { + if (hasConfig) { + resolve(config!.defaultValue); + } else { + reject(new EmptyError()); + } + }, + }); + source.subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/lastValueFrom.ts b/node_modules/rxjs/src/internal/lastValueFrom.ts new file mode 100644 index 0000000..90fcebf --- /dev/null +++ b/node_modules/rxjs/src/internal/lastValueFrom.ts @@ -0,0 +1,76 @@ +import { Observable } from './Observable'; +import { EmptyError } from './util/EmptyError'; + +export interface LastValueFromConfig { + defaultValue: T; +} + +export function lastValueFrom(source: Observable, config: LastValueFromConfig): Promise; +export function lastValueFrom(source: Observable): Promise; + +/** + * Converts an observable to a promise by subscribing to the observable, + * waiting for it to complete, and resolving the returned promise with the + * last value from the observed stream. + * + * If the observable stream completes before any values were emitted, the + * returned promise will reject with {@link EmptyError} or will resolve + * with the default value if a default was specified. + * + * If the observable stream emits an error, the returned promise will reject + * with that error. + * + * **WARNING**: Only use this with observables you *know* will complete. If the source + * observable does not complete, you will end up with a promise that is hung up, and + * potentially all of the state of an async function hanging out in memory. To avoid + * this situation, look into adding something like {@link timeout}, {@link take}, + * {@link takeWhile}, or {@link takeUntil} amongst others. + * + * ## Example + * + * Wait for the last value from a stream and emit it from a promise in + * an async function + * + * ```ts + * import { interval, take, lastValueFrom } from 'rxjs'; + * + * async function execute() { + * const source$ = interval(2000).pipe(take(10)); + * const finalNumber = await lastValueFrom(source$); + * console.log(`The final number is ${ finalNumber }`); + * } + * + * execute(); + * + * // Expected output: + * // 'The final number is 9' + * ``` + * + * @see {@link firstValueFrom} + * + * @param source the observable to convert to a promise + * @param config a configuration object to define the `defaultValue` to use if the source completes without emitting a value + */ +export function lastValueFrom(source: Observable, config?: LastValueFromConfig): Promise { + const hasConfig = typeof config === 'object'; + return new Promise((resolve, reject) => { + let _hasValue = false; + let _value: T; + source.subscribe({ + next: (value) => { + _value = value; + _hasValue = true; + }, + error: reject, + complete: () => { + if (_hasValue) { + resolve(_value); + } else if (hasConfig) { + resolve(config!.defaultValue); + } else { + reject(new EmptyError()); + } + }, + }); + }); +} diff --git a/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts b/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts new file mode 100644 index 0000000..bd1c76f --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts @@ -0,0 +1,104 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { Subscription } from '../Subscription'; +import { refCount as higherOrderRefCount } from '../operators/refCount'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { hasLift } from '../util/lift'; + +/** + * @class ConnectableObservable + * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. + * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator + * instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export class ConnectableObservable extends Observable { + protected _subject: Subject | null = null; + protected _refCount: number = 0; + protected _connection: Subscription | null = null; + + /** + * @param source The source observable + * @param subjectFactory The factory that creates the subject used internally. + * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. + * `new ConnectableObservable(source, factory)` is equivalent to + * `connectable(source, { connector: factory })`. + * When the `refCount()` method is needed, the {@link share} operator should be used instead: + * `new ConnectableObservable(source, factory).refCount()` is equivalent to + * `source.pipe(share({ connector: factory }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ + constructor(public source: Observable, protected subjectFactory: () => Subject) { + super(); + // If we have lift, monkey patch that here. This is done so custom observable + // types will compose through multicast. Otherwise the resulting observable would + // simply be an instance of `ConnectableObservable`. + if (hasLift(source)) { + this.lift = source.lift; + } + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber) { + return this.getSubject().subscribe(subscriber); + } + + protected getSubject(): Subject { + const subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject!; + } + + protected _teardown() { + this._refCount = 0; + const { _connection } = this; + this._subject = this._connection = null; + _connection?.unsubscribe(); + } + + /** + * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ + connect(): Subscription { + let connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription(); + const subject = this.getSubject(); + connection.add( + this.source.subscribe( + createOperatorSubscriber( + subject as any, + undefined, + () => { + this._teardown(); + subject.complete(); + }, + (err) => { + this._teardown(); + subject.error(err); + }, + () => this._teardown() + ) + ) + ); + + if (connection.closed) { + this._connection = null; + connection = Subscription.EMPTY; + } + } + return connection; + } + + /** + * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead. + * Details: https://rxjs.dev/deprecations/multicasting + */ + refCount(): Observable { + return higherOrderRefCount()(this) as Observable; + } +} diff --git a/node_modules/rxjs/src/internal/observable/bindCallback.ts b/node_modules/rxjs/src/internal/observable/bindCallback.ts new file mode 100644 index 0000000..f402517 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/bindCallback.ts @@ -0,0 +1,145 @@ +/* @prettier */ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +import { bindCallbackInternals } from './bindCallbackInternals'; + +export function bindCallback( + callbackFunc: (...args: any[]) => void, + resultSelector: (...args: any[]) => any, + scheduler?: SchedulerLike +): (...args: any[]) => Observable; + +// args is the arguments array and we push the callback on the rest tuple since the rest parameter must be last (only item) in a parameter list +export function bindCallback( + callbackFunc: (...args: [...A, (...res: R) => void]) => void, + schedulerLike?: SchedulerLike +): (...arg: A) => Observable; + +/** + * Converts a callback API to a function that returns an Observable. + * + * Give it a function `f` of type `f(x, callback)` and + * it will return a function `g` that when called as `g(x)` will output an + * Observable. + * + * `bindCallback` is not an operator because its input and output are not + * Observables. The input is a function `func` with some parameters. The + * last parameter must be a callback function that `func` calls when it is + * done. + * + * The output of `bindCallback` is a function that takes the same parameters + * as `func`, except the last one (the callback). When the output function + * is called with arguments it will return an Observable. If function `func` + * calls its callback with one argument, the Observable will emit that value. + * If on the other hand the callback is called with multiple values the resulting + * Observable will emit an array with said values as arguments. + * + * It is **very important** to remember that input function `func` is not called + * when the output function is, but rather when the Observable returned by the output + * function is subscribed. This means if `func` makes an AJAX request, that request + * will be made every time someone subscribes to the resulting Observable, but not before. + * + * The last optional parameter - `scheduler` - can be used to control when the call + * to `func` happens after someone subscribes to Observable, as well as when results + * passed to callback will be emitted. By default, the subscription to an Observable calls `func` + * synchronously, but using {@link asyncScheduler} as the last parameter will defer the call to `func`, + * just like wrapping the call in `setTimeout` with a timeout of `0` would. If you were to use the async Scheduler + * and call `subscribe` on the output Observable, all function calls that are currently executing + * will end before `func` is invoked. + * + * By default, results passed to the callback are emitted immediately after `func` invokes the callback. + * In particular, if the callback is called synchronously, then the subscription of the resulting Observable + * will call the `next` function synchronously as well. If you want to defer that call, + * you may use {@link asyncScheduler} just as before. This means that by using `Scheduler.async` you can + * ensure that `func` always calls its callback asynchronously, thus avoiding terrifying Zalgo. + * + * Note that the Observable created by the output function will always emit a single value + * and then complete immediately. If `func` calls the callback multiple times, values from subsequent + * calls will not appear in the stream. If you need to listen for multiple calls, + * you probably want to use {@link fromEvent} or {@link fromEventPattern} instead. + * + * If `func` depends on some context (`this` property) and is not already bound, the context of `func` + * will be the context that the output function has at call time. In particular, if `func` + * is called as a method of some object and if `func` is not already bound, in order to preserve the context + * it is recommended that the context of the output function is set to that object as well. + * + * If the input function calls its callback in the "node style" (i.e. first argument to callback is + * optional error parameter signaling whether the call failed or not), {@link bindNodeCallback} + * provides convenient error handling and probably is a better choice. + * `bindCallback` will treat such functions the same as any other and error parameters + * (whether passed or not) will always be interpreted as regular callback argument. + * + * ## Examples + * + * ### Convert jQuery's getJSON to an Observable API + * ```ts + * import { bindCallback } from 'rxjs'; + * import * as jQuery from 'jquery'; + * + * // Suppose we have jQuery.getJSON('/my/url', callback) + * const getJSONAsObservable = bindCallback(jQuery.getJSON); + * const result = getJSONAsObservable('/my/url'); + * result.subscribe(x => console.log(x), e => console.error(e)); + * ``` + * + * ### Receive an array of arguments passed to a callback + * ```ts + * import { bindCallback } from 'rxjs'; + * + * const someFunction = (n, s, cb) => { + * cb(n, s, { someProperty: 'someValue' }); + * }; + * + * const boundSomeFunction = bindCallback(someFunction); + * boundSomeFunction(5, 'some string').subscribe((values) => { + * console.log(values); // [5, 'some string', {someProperty: 'someValue'}] + * }); + * ``` + * + * ### Compare behaviour with and without async Scheduler + * ```ts + * import { bindCallback, asyncScheduler } from 'rxjs'; + * + * function iCallMyCallbackSynchronously(cb) { + * cb(); + * } + * + * const boundSyncFn = bindCallback(iCallMyCallbackSynchronously); + * const boundAsyncFn = bindCallback(iCallMyCallbackSynchronously, null, asyncScheduler); + * + * boundSyncFn().subscribe(() => console.log('I was sync!')); + * boundAsyncFn().subscribe(() => console.log('I was async!')); + * console.log('This happened...'); + * + * // Logs: + * // I was sync! + * // This happened... + * // I was async! + * ``` + * + * ### Use bindCallback on an object method + * ```ts + * import { bindCallback } from 'rxjs'; + * + * const boundMethod = bindCallback(someObject.methodWithCallback); + * boundMethod + * .call(someObject) // make sure methodWithCallback has access to someObject + * .subscribe(subscriber); + * ``` + * + * @see {@link bindNodeCallback} + * @see {@link from} + * + * @param {function} func A function with a callback as the last parameter. + * @param {SchedulerLike} [scheduler] The scheduler on which to schedule the + * callbacks. + * @return {function(...params: *): Observable} A function which returns the + * Observable that delivers the same values the callback would deliver. + */ +export function bindCallback( + callbackFunc: (...args: [...any[], (...res: any) => void]) => void, + resultSelector?: ((...args: any[]) => any) | SchedulerLike, + scheduler?: SchedulerLike +): (...args: any[]) => Observable { + return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); +} diff --git a/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts b/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts new file mode 100644 index 0000000..e614044 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts @@ -0,0 +1,119 @@ +import { SchedulerLike } from '../types'; +import { isScheduler } from '../util/isScheduler'; +import { Observable } from '../Observable'; +import { subscribeOn } from '../operators/subscribeOn'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { observeOn } from '../operators/observeOn'; +import { AsyncSubject } from '../AsyncSubject'; + +export function bindCallbackInternals( + isNodeStyle: boolean, + callbackFunc: any, + resultSelector?: any, + scheduler?: SchedulerLike +): (...args: any[]) => Observable { + if (resultSelector) { + if (isScheduler(resultSelector)) { + scheduler = resultSelector; + } else { + // The user provided a result selector. + return function (this: any, ...args: any[]) { + return (bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) as any) + .apply(this, args) + .pipe(mapOneOrManyArgs(resultSelector as any)); + }; + } + } + + // If a scheduler was passed, use our `subscribeOn` and `observeOn` operators + // to compose that behavior for the user. + if (scheduler) { + return function (this: any, ...args: any[]) { + return (bindCallbackInternals(isNodeStyle, callbackFunc) as any) + .apply(this, args) + .pipe(subscribeOn(scheduler!), observeOn(scheduler!)); + }; + } + + return function (this: any, ...args: any[]): Observable { + // We're using AsyncSubject, because it emits when it completes, + // and it will play the value to all late-arriving subscribers. + const subject = new AsyncSubject(); + + // If this is true, then we haven't called our function yet. + let uninitialized = true; + return new Observable((subscriber) => { + // Add our subscriber to the subject. + const subs = subject.subscribe(subscriber); + + if (uninitialized) { + uninitialized = false; + // We're going to execute the bound function + // This bit is to signal that we are hitting the callback asynchronously. + // Because we don't have any anti-"Zalgo" guarantees with whatever + // function we are handed, we use this bit to figure out whether or not + // we are getting hit in a callback synchronously during our call. + let isAsync = false; + + // This is used to signal that the callback completed synchronously. + let isComplete = false; + + // Call our function that has a callback. If at any time during this + // call, an error is thrown, it will be caught by the Observable + // subscription process and sent to the consumer. + callbackFunc.apply( + // Pass the appropriate `this` context. + this, + [ + // Pass the arguments. + ...args, + // And our callback handler. + (...results: any[]) => { + if (isNodeStyle) { + // If this is a node callback, shift the first value off of the + // results and check it, as it is the error argument. By shifting, + // we leave only the argument(s) we want to pass to the consumer. + const err = results.shift(); + if (err != null) { + subject.error(err); + // If we've errored, we can stop processing this function + // as there's nothing else to do. Just return to escape. + return; + } + } + // If we have one argument, notify the consumer + // of it as a single value, otherwise, if there's more than one, pass + // them as an array. Note that if there are no arguments, `undefined` + // will be emitted. + subject.next(1 < results.length ? results : results[0]); + // Flip this flag, so we know we can complete it in the synchronous + // case below. + isComplete = true; + // If we're not asynchronous, we need to defer the `complete` call + // until after the call to the function is over. This is because an + // error could be thrown in the function after it calls our callback, + // and if that is the case, if we complete here, we are unable to notify + // the consumer than an error occurred. + if (isAsync) { + subject.complete(); + } + }, + ] + ); + // If we flipped `isComplete` during the call, we resolved synchronously, + // notify complete, because we skipped it in the callback to wait + // to make sure there were no errors during the call. + if (isComplete) { + subject.complete(); + } + + // We're no longer synchronous. If the callback is called at this point + // we can notify complete on the spot. + isAsync = true; + } + + // Return the subscription from adding our subscriber to the subject. + return subs; + }); + }; +} diff --git a/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts b/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts new file mode 100644 index 0000000..7c5f060 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts @@ -0,0 +1,128 @@ +/* @prettier */ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +import { bindCallbackInternals } from './bindCallbackInternals'; + +export function bindNodeCallback( + callbackFunc: (...args: any[]) => void, + resultSelector: (...args: any[]) => any, + scheduler?: SchedulerLike +): (...args: any[]) => Observable; + +// args is the arguments array and we push the callback on the rest tuple since the rest parameter must be last (only item) in a parameter list +export function bindNodeCallback( + callbackFunc: (...args: [...A, (err: any, ...res: R) => void]) => void, + schedulerLike?: SchedulerLike +): (...arg: A) => Observable; + +/** + * Converts a Node.js-style callback API to a function that returns an + * Observable. + * + * It's just like {@link bindCallback}, but the + * callback is expected to be of type `callback(error, result)`. + * + * `bindNodeCallback` is not an operator because its input and output are not + * Observables. The input is a function `func` with some parameters, but the + * last parameter must be a callback function that `func` calls when it is + * done. The callback function is expected to follow Node.js conventions, + * where the first argument to the callback is an error object, signaling + * whether call was successful. If that object is passed to callback, it means + * something went wrong. + * + * The output of `bindNodeCallback` is a function that takes the same + * parameters as `func`, except the last one (the callback). When the output + * function is called with arguments, it will return an Observable. + * If `func` calls its callback with error parameter present, Observable will + * error with that value as well. If error parameter is not passed, Observable will emit + * second parameter. If there are more parameters (third and so on), + * Observable will emit an array with all arguments, except first error argument. + * + * Note that `func` will not be called at the same time output function is, + * but rather whenever resulting Observable is subscribed. By default call to + * `func` will happen synchronously after subscription, but that can be changed + * with proper `scheduler` provided as optional third parameter. {@link SchedulerLike} + * can also control when values from callback will be emitted by Observable. + * To find out more, check out documentation for {@link bindCallback}, where + * {@link SchedulerLike} works exactly the same. + * + * As in {@link bindCallback}, context (`this` property) of input function will be set to context + * of returned function, when it is called. + * + * After Observable emits value, it will complete immediately. This means + * even if `func` calls callback again, values from second and consecutive + * calls will never appear on the stream. If you need to handle functions + * that call callbacks multiple times, check out {@link fromEvent} or + * {@link fromEventPattern} instead. + * + * Note that `bindNodeCallback` can be used in non-Node.js environments as well. + * "Node.js-style" callbacks are just a convention, so if you write for + * browsers or any other environment and API you use implements that callback style, + * `bindNodeCallback` can be safely used on that API functions as well. + * + * Remember that Error object passed to callback does not have to be an instance + * of JavaScript built-in `Error` object. In fact, it does not even have to an object. + * Error parameter of callback function is interpreted as "present", when value + * of that parameter is truthy. It could be, for example, non-zero number, non-empty + * string or boolean `true`. In all of these cases resulting Observable would error + * with that value. This means usually regular style callbacks will fail very often when + * `bindNodeCallback` is used. If your Observable errors much more often then you + * would expect, check if callback really is called in Node.js-style and, if not, + * switch to {@link bindCallback} instead. + * + * Note that even if error parameter is technically present in callback, but its value + * is falsy, it still won't appear in array emitted by Observable. + * + * ## Examples + * ### Read a file from the filesystem and get the data as an Observable + * ```ts + * import * as fs from 'fs'; + * const readFileAsObservable = bindNodeCallback(fs.readFile); + * const result = readFileAsObservable('./roadNames.txt', 'utf8'); + * result.subscribe(x => console.log(x), e => console.error(e)); + * ``` + * + * ### Use on function calling callback with multiple arguments + * ```ts + * someFunction((err, a, b) => { + * console.log(err); // null + * console.log(a); // 5 + * console.log(b); // "some string" + * }); + * const boundSomeFunction = bindNodeCallback(someFunction); + * boundSomeFunction() + * .subscribe(value => { + * console.log(value); // [5, "some string"] + * }); + * ``` + * + * ### Use on function calling callback in regular style + * ```ts + * someFunction(a => { + * console.log(a); // 5 + * }); + * const boundSomeFunction = bindNodeCallback(someFunction); + * boundSomeFunction() + * .subscribe( + * value => {} // never gets called + * err => console.log(err) // 5 + * ); + * ``` + * + * @see {@link bindCallback} + * @see {@link from} + * + * @param {function} func Function with a Node.js-style callback as the last parameter. + * @param {SchedulerLike} [scheduler] The scheduler on which to schedule the + * callbacks. + * @return {function(...params: *): Observable} A function which returns the + * Observable that delivers the same values the Node.js callback would + * deliver. + */ +export function bindNodeCallback( + callbackFunc: (...args: [...any[], (err: any, ...res: any) => void]) => void, + resultSelector?: ((...args: any[]) => any) | SchedulerLike, + scheduler?: SchedulerLike +): (...args: any[]) => Observable { + return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); +} diff --git a/node_modules/rxjs/src/internal/observable/combineLatest.ts b/node_modules/rxjs/src/internal/observable/combineLatest.ts new file mode 100644 index 0000000..5c807b6 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/combineLatest.ts @@ -0,0 +1,304 @@ +import { Observable } from '../Observable'; +import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { Subscriber } from '../Subscriber'; +import { from } from './from'; +import { identity } from '../util/identity'; +import { Subscription } from '../Subscription'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { popResultSelector, popScheduler } from '../util/args'; +import { createObject } from '../util/createObject'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { AnyCatcher } from '../AnyCatcher'; +import { executeSchedule } from '../util/executeSchedule'; + +// combineLatest(any) +// We put this first because we need to catch cases where the user has supplied +// _exactly `any`_ as the argument. Since `any` literally matches _anything_, +// we don't want it to randomly hit one of the other type signatures below, +// as we have no idea at build-time what type we should be returning when given an any. + +/** + * You have passed `any` here, we can't figure out if it is + * an array or an object, so you're getting `unknown`. Use better types. + * @param arg Something typed as `any` + */ +export function combineLatest(arg: T): Observable; + +// combineLatest([a, b, c]) +export function combineLatest(sources: []): Observable; +export function combineLatest(sources: readonly [...ObservableInputTuple]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function combineLatest( + sources: readonly [...ObservableInputTuple], + resultSelector: (...values: A) => R, + scheduler: SchedulerLike +): Observable; +export function combineLatest( + sources: readonly [...ObservableInputTuple], + resultSelector: (...values: A) => R +): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function combineLatest( + sources: readonly [...ObservableInputTuple], + scheduler: SchedulerLike +): Observable; + +// combineLatest(a, b, c) +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export function combineLatest(...sources: [...ObservableInputTuple]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function combineLatest( + ...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple, (...values: A) => R, SchedulerLike] +): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export function combineLatest( + ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] +): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function combineLatest( + ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] +): Observable; + +// combineLatest({a, b, c}) +export function combineLatest(sourcesObject: { [K in any]: never }): Observable; +export function combineLatest>>( + sourcesObject: T +): Observable<{ [K in keyof T]: ObservedValueOf }>; + +/** + * Combines multiple Observables to create an Observable whose values are + * calculated from the latest values of each of its input Observables. + * + * Whenever any input Observable emits a value, it + * computes a formula using the latest values from all the inputs, then emits + * the output of that formula. + * + * ![](combineLatest.png) + * + * `combineLatest` combines the values from all the Observables passed in the + * observables array. This is done by subscribing to each Observable in order and, + * whenever any Observable emits, collecting an array of the most recent + * values from each Observable. So if you pass `n` Observables to this operator, + * the returned Observable will always emit an array of `n` values, in an order + * corresponding to the order of the passed Observables (the value from the first Observable + * will be at index 0 of the array and so on). + * + * Static version of `combineLatest` accepts an array of Observables. Note that an array of + * Observables is a good choice, if you don't know beforehand how many Observables + * you will combine. Passing an empty array will result in an Observable that + * completes immediately. + * + * To ensure the output array always has the same length, `combineLatest` will + * actually wait for all input Observables to emit at least once, + * before it starts emitting results. This means if some Observable emits + * values before other Observables started emitting, all these values but the last + * will be lost. On the other hand, if some Observable does not emit a value but + * completes, resulting Observable will complete at the same moment without + * emitting anything, since it will now be impossible to include a value from the + * completed Observable in the resulting array. Also, if some input Observable does + * not emit any value and never completes, `combineLatest` will also never emit + * and never complete, since, again, it will wait for all streams to emit some + * value. + * + * If at least one Observable was passed to `combineLatest` and all passed Observables + * emitted something, the resulting Observable will complete when all combined + * streams complete. So even if some Observable completes, the result of + * `combineLatest` will still emit values when other Observables do. In case + * of a completed Observable, its value from now on will always be the last + * emitted value. On the other hand, if any Observable errors, `combineLatest` + * will error immediately as well, and all other Observables will be unsubscribed. + * + * ## Examples + * + * Combine two timer Observables + * + * ```ts + * import { timer, combineLatest } from 'rxjs'; + * + * const firstTimer = timer(0, 1000); // emit 0, 1, 2... after every second, starting from now + * const secondTimer = timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now + * const combinedTimers = combineLatest([firstTimer, secondTimer]); + * combinedTimers.subscribe(value => console.log(value)); + * // Logs + * // [0, 0] after 0.5s + * // [1, 0] after 1s + * // [1, 1] after 1.5s + * // [2, 1] after 2s + * ``` + * + * Combine a dictionary of Observables + * + * ```ts + * import { of, delay, startWith, combineLatest } from 'rxjs'; + * + * const observables = { + * a: of(1).pipe(delay(1000), startWith(0)), + * b: of(5).pipe(delay(5000), startWith(0)), + * c: of(10).pipe(delay(10000), startWith(0)) + * }; + * const combined = combineLatest(observables); + * combined.subscribe(value => console.log(value)); + * // Logs + * // { a: 0, b: 0, c: 0 } immediately + * // { a: 1, b: 0, c: 0 } after 1s + * // { a: 1, b: 5, c: 0 } after 5s + * // { a: 1, b: 5, c: 10 } after 10s + * ``` + * + * Combine an array of Observables + * + * ```ts + * import { of, delay, startWith, combineLatest } from 'rxjs'; + * + * const observables = [1, 5, 10].map( + * n => of(n).pipe( + * delay(n * 1000), // emit 0 and then emit n after n seconds + * startWith(0) + * ) + * ); + * const combined = combineLatest(observables); + * combined.subscribe(value => console.log(value)); + * // Logs + * // [0, 0, 0] immediately + * // [1, 0, 0] after 1s + * // [1, 5, 0] after 5s + * // [1, 5, 10] after 10s + * ``` + * + * Use map operator to dynamically calculate the Body-Mass Index + * + * ```ts + * import { of, combineLatest, map } from 'rxjs'; + * + * const weight = of(70, 72, 76, 79, 75); + * const height = of(1.76, 1.77, 1.78); + * const bmi = combineLatest([weight, height]).pipe( + * map(([w, h]) => w / (h * h)), + * ); + * bmi.subscribe(x => console.log('BMI is ' + x)); + * + * // With output to console: + * // BMI is 24.212293388429753 + * // BMI is 23.93948099205209 + * // BMI is 23.671253629592222 + * ``` + * + * @see {@link combineLatestAll} + * @see {@link merge} + * @see {@link withLatestFrom} + * + * @param {ObservableInput} [observables] An array of input Observables to combine with each other. + * An array of Observables must be given as the first argument. + * @param {function} [project] An optional function to project the values from + * the combined latest values into a new value on the output Observable. + * @param {SchedulerLike} [scheduler=null] The {@link SchedulerLike} to use for subscribing to + * each input Observable. + * @return {Observable} An Observable of projected values from the most recent + * values from each input Observable, or an array of the most recent values from + * each input Observable. + */ +export function combineLatest, R>(...args: any[]): Observable | Observable[]> { + const scheduler = popScheduler(args); + const resultSelector = popResultSelector(args); + + const { args: observables, keys } = argsArgArrayOrObject(args); + + if (observables.length === 0) { + // If no observables are passed, or someone has passed an empty array + // of observables, or even an empty object POJO, we need to just + // complete (EMPTY), but we have to honor the scheduler provided if any. + return from([], scheduler as any); + } + + const result = new Observable[]>( + combineLatestInit( + observables as ObservableInput>[], + scheduler, + keys + ? // A handler for scrubbing the array of args into a dictionary. + (values) => createObject(keys, values) + : // A passthrough to just return the array + identity + ) + ); + + return resultSelector ? (result.pipe(mapOneOrManyArgs(resultSelector)) as Observable) : result; +} + +export function combineLatestInit( + observables: ObservableInput[], + scheduler?: SchedulerLike, + valueTransform: (values: any[]) => any = identity +) { + return (subscriber: Subscriber) => { + // The outer subscription. We're capturing this in a function + // because we may have to schedule it. + maybeSchedule( + scheduler, + () => { + const { length } = observables; + // A store for the values each observable has emitted so far. We match observable to value on index. + const values = new Array(length); + // The number of currently active subscriptions, as they complete, we decrement this number to see if + // we are all done combining values, so we can complete the result. + let active = length; + // The number of inner sources that still haven't emitted the first value + // We need to track this because all sources need to emit one value in order + // to start emitting values. + let remainingFirstValues = length; + // The loop to kick off subscription. We're keying everything on index `i` to relate the observables passed + // in to the slot in the output array or the key in the array of keys in the output dictionary. + for (let i = 0; i < length; i++) { + maybeSchedule( + scheduler, + () => { + const source = from(observables[i], scheduler as any); + let hasFirstValue = false; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // When we get a value, record it in our set of values. + values[i] = value; + if (!hasFirstValue) { + // If this is our first value, record that. + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + // We're not waiting for any more + // first values, so we can emit! + subscriber.next(valueTransform(values.slice())); + } + }, + () => { + if (!--active) { + // We only complete the result if we have no more active + // inner observables. + subscriber.complete(); + } + } + ) + ); + }, + subscriber + ); + } + }, + subscriber + ); + }; +} + +/** + * A small utility to handle the couple of locations where we want to schedule if a scheduler was provided, + * but we don't if there was no scheduler. + */ +function maybeSchedule(scheduler: SchedulerLike | undefined, execute: () => void, subscription: Subscription) { + if (scheduler) { + executeSchedule(subscription, scheduler, execute); + } else { + execute(); + } +} diff --git a/node_modules/rxjs/src/internal/observable/concat.ts b/node_modules/rxjs/src/internal/observable/concat.ts new file mode 100644 index 0000000..75f9722 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/concat.ts @@ -0,0 +1,115 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple, SchedulerLike } from '../types'; +import { concatAll } from '../operators/concatAll'; +import { popScheduler } from '../util/args'; +import { from } from './from'; + +export function concat(...inputs: [...ObservableInputTuple]): Observable; +export function concat( + ...inputsAndScheduler: [...ObservableInputTuple, SchedulerLike] +): Observable; + +/** + * Creates an output Observable which sequentially emits all values from the first given + * Observable and then moves on to the next. + * + * Concatenates multiple Observables together by + * sequentially emitting their values, one Observable after the other. + * + * ![](concat.png) + * + * `concat` joins multiple Observables together, by subscribing to them one at a time and + * merging their results into the output Observable. You can pass either an array of + * Observables, or put them directly as arguments. Passing an empty array will result + * in Observable that completes immediately. + * + * `concat` will subscribe to first input Observable and emit all its values, without + * changing or affecting them in any way. When that Observable completes, it will + * subscribe to then next Observable passed and, again, emit its values. This will be + * repeated, until the operator runs out of Observables. When last input Observable completes, + * `concat` will complete as well. At any given moment only one Observable passed to operator + * emits values. If you would like to emit values from passed Observables concurrently, check out + * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact, + * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`. + * + * Note that if some input Observable never completes, `concat` will also never complete + * and Observables following the one that did not complete will never be subscribed. On the other + * hand, if some Observable simply completes immediately after it is subscribed, it will be + * invisible for `concat`, which will just move on to the next Observable. + * + * If any Observable in chain errors, instead of passing control to the next Observable, + * `concat` will error immediately as well. Observables that would be subscribed after + * the one that emitted error, never will. + * + * If you pass to `concat` the same Observable many times, its stream of values + * will be "replayed" on every subscription, which means you can repeat given Observable + * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious, + * you can always use {@link repeat}. + * + * ## Examples + * + * Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10 + * + * ```ts + * import { interval, take, range, concat } from 'rxjs'; + * + * const timer = interval(1000).pipe(take(4)); + * const sequence = range(1, 10); + * const result = concat(timer, sequence); + * result.subscribe(x => console.log(x)); + * + * // results in: + * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10 + * ``` + * + * Concatenate 3 Observables + * + * ```ts + * import { interval, take, concat } from 'rxjs'; + * + * const timer1 = interval(1000).pipe(take(10)); + * const timer2 = interval(2000).pipe(take(6)); + * const timer3 = interval(500).pipe(take(10)); + * + * const result = concat(timer1, timer2, timer3); + * result.subscribe(x => console.log(x)); + * + * // results in the following: + * // (Prints to console sequentially) + * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9 + * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5 + * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9 + * ``` + * + * Concatenate the same Observable to repeat it + * + * ```ts + * import { interval, take, concat } from 'rxjs'; + * + * const timer = interval(1000).pipe(take(2)); + * + * concat(timer, timer) // concatenating the same Observable! + * .subscribe({ + * next: value => console.log(value), + * complete: () => console.log('...and it is done!') + * }); + * + * // Logs: + * // 0 after 1s + * // 1 after 2s + * // 0 after 3s + * // 1 after 4s + * // '...and it is done!' also after 4s + * ``` + * + * @see {@link concatAll} + * @see {@link concatMap} + * @see {@link concatMapTo} + * @see {@link startWith} + * @see {@link endWith} + * + * @param args Input Observables to concatenate. + */ +export function concat(...args: any[]): Observable { + return concatAll()(from(args, popScheduler(args))); +} diff --git a/node_modules/rxjs/src/internal/observable/connectable.ts b/node_modules/rxjs/src/internal/observable/connectable.ts new file mode 100644 index 0000000..4609118 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/connectable.ts @@ -0,0 +1,64 @@ +import { Connectable, ObservableInput, SubjectLike } from '../types'; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { Observable } from '../Observable'; +import { defer } from './defer'; + +export interface ConnectableConfig { + /** + * A factory function used to create the Subject through which the source + * is multicast. By default this creates a {@link Subject}. + */ + connector: () => SubjectLike; + /** + * If true, the resulting observable will reset internal state upon disconnection + * and return to a "cold" state. This allows the resulting observable to be + * reconnected. + * If false, upon disconnection, the connecting subject will remain the + * connecting subject, meaning the resulting observable will not go "cold" again, + * and subsequent repeats or resubscriptions will resubscribe to that same subject. + */ + resetOnDisconnect?: boolean; +} + +/** + * The default configuration for `connectable`. + */ +const DEFAULT_CONFIG: ConnectableConfig = { + connector: () => new Subject(), + resetOnDisconnect: true, +}; + +/** + * Creates an observable that multicasts once `connect()` is called on it. + * + * @param source The observable source to make connectable. + * @param config The configuration object for `connectable`. + * @returns A "connectable" observable, that has a `connect()` method, that you must call to + * connect the source to all consumers through the subject provided as the connector. + */ +export function connectable(source: ObservableInput, config: ConnectableConfig = DEFAULT_CONFIG): Connectable { + // The subscription representing the connection. + let connection: Subscription | null = null; + const { connector, resetOnDisconnect = true } = config; + let subject = connector(); + + const result: any = new Observable((subscriber) => { + return subject.subscribe(subscriber); + }); + + // Define the `connect` function. This is what users must call + // in order to "connect" the source to the subject that is + // multicasting it. + result.connect = () => { + if (!connection || connection.closed) { + connection = defer(() => source).subscribe(subject); + if (resetOnDisconnect) { + connection.add(() => (subject = connector())); + } + } + return connection; + }; + + return result; +} diff --git a/node_modules/rxjs/src/internal/observable/defer.ts b/node_modules/rxjs/src/internal/observable/defer.ts new file mode 100644 index 0000000..2e54b37 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/defer.ts @@ -0,0 +1,57 @@ +import { Observable } from '../Observable'; +import { ObservedValueOf, ObservableInput } from '../types'; +import { innerFrom } from './innerFrom'; + +/** + * Creates an Observable that, on subscribe, calls an Observable factory to + * make an Observable for each new Observer. + * + * Creates the Observable lazily, that is, only when it + * is subscribed. + * + * + * ![](defer.png) + * + * `defer` allows you to create an Observable only when the Observer + * subscribes. It waits until an Observer subscribes to it, calls the given + * factory function to get an Observable -- where a factory function typically + * generates a new Observable -- and subscribes the Observer to this Observable. + * In case the factory function returns a falsy value, then EMPTY is used as + * Observable instead. Last but not least, an exception during the factory + * function call is transferred to the Observer by calling `error`. + * + * ## Example + * + * Subscribe to either an Observable of clicks or an Observable of interval, at random + * + * ```ts + * import { defer, fromEvent, interval } from 'rxjs'; + * + * const clicksOrInterval = defer(() => { + * return Math.random() > 0.5 + * ? fromEvent(document, 'click') + * : interval(1000); + * }); + * clicksOrInterval.subscribe(x => console.log(x)); + * + * // Results in the following behavior: + * // If the result of Math.random() is greater than 0.5 it will listen + * // for clicks anywhere on the "document"; when document is clicked it + * // will log a MouseEvent object to the console. If the result is less + * // than 0.5 it will emit ascending numbers, one every second(1000ms). + * ``` + * + * @see {@link Observable} + * + * @param {function(): ObservableInput} observableFactory The Observable + * factory function to invoke for each Observer that subscribes to the output + * Observable. May also return a Promise, which will be converted on the fly + * to an Observable. + * @return {Observable} An Observable whose Observers' subscriptions trigger + * an invocation of the given Observable factory function. + */ +export function defer>(observableFactory: () => R): Observable> { + return new Observable>((subscriber) => { + innerFrom(observableFactory()).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts b/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts new file mode 100644 index 0000000..9eecbf5 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts @@ -0,0 +1,397 @@ +import { Subject, AnonymousSubject } from '../../Subject'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { Operator } from '../../Operator'; +import { ReplaySubject } from '../../ReplaySubject'; +import { Observer, NextObserver } from '../../types'; + +/** + * WebSocketSubjectConfig is a plain Object that allows us to make our + * webSocket configurable. + * + * Provides flexibility to {@link webSocket} + * + * It defines a set of properties to provide custom behavior in specific + * moments of the socket's lifecycle. When the connection opens we can + * use `openObserver`, when the connection is closed `closeObserver`, if we + * are interested in listening for data coming from server: `deserializer`, + * which allows us to customize the deserialization strategy of data before passing it + * to the socket client. By default, `deserializer` is going to apply `JSON.parse` to each message coming + * from the Server. + * + * ## Examples + * + * **deserializer**, the default for this property is `JSON.parse` but since there are just two options + * for incoming data, either be text or binary data. We can apply a custom deserialization strategy + * or just simply skip the default behaviour. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * //Apply any transformation of your choice. + * deserializer: ({ data }) => data + * }); + * + * wsSubject.subscribe(console.log); + * + * // Let's suppose we have this on the Server: ws.send('This is a msg from the server') + * //output + * // + * // This is a msg from the server + * ``` + * + * **serializer** allows us to apply custom serialization strategy but for the outgoing messages. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * // Apply any transformation of your choice. + * serializer: msg => JSON.stringify({ channel: 'webDevelopment', msg: msg }) + * }); + * + * wsSubject.subscribe(() => subject.next('msg to the server')); + * + * // Let's suppose we have this on the Server: + * // ws.on('message', msg => console.log); + * // ws.send('This is a msg from the server'); + * // output at server side: + * // + * // {"channel":"webDevelopment","msg":"msg to the server"} + * ``` + * + * **closeObserver** allows us to set a custom error when an error raises up. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * closeObserver: { + * next() { + * const customError = { code: 6666, reason: 'Custom evil reason' } + * console.log(`code: ${ customError.code }, reason: ${ customError.reason }`); + * } + * } + * }); + * + * // output + * // code: 6666, reason: Custom evil reason + * ``` + * + * **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the + * webSocket or sending notification that the connection was successful, this is when + * openObserver is useful for. + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const wsSubject = webSocket({ + * url: 'ws://localhost:8081', + * openObserver: { + * next: () => { + * console.log('Connection ok'); + * } + * } + * }); + * + * // output + * // Connection ok + * ``` + */ +export interface WebSocketSubjectConfig { + /** The url of the socket server to connect to */ + url: string; + /** The protocol to use to connect */ + protocol?: string | Array; + /** @deprecated Will be removed in v8. Use {@link deserializer} instead. */ + resultSelector?: (e: MessageEvent) => T; + /** + * A serializer used to create messages from passed values before the + * messages are sent to the server. Defaults to JSON.stringify. + */ + serializer?: (value: T) => WebSocketMessage; + /** + * A deserializer used for messages arriving on the socket from the + * server. Defaults to JSON.parse. + */ + deserializer?: (e: MessageEvent) => T; + /** + * An Observer that watches when open events occur on the underlying web socket. + */ + openObserver?: NextObserver; + /** + * An Observer that watches when close events occur on the underlying web socket + */ + closeObserver?: NextObserver; + /** + * An Observer that watches when a close is about to occur due to + * unsubscription. + */ + closingObserver?: NextObserver; + /** + * A WebSocket constructor to use. This is useful for situations like using a + * WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket + * for testing purposes + */ + WebSocketCtor?: { new (url: string, protocols?: string | string[]): WebSocket }; + /** Sets the `binaryType` property of the underlying WebSocket. */ + binaryType?: 'blob' | 'arraybuffer'; +} + +const DEFAULT_WEBSOCKET_CONFIG: WebSocketSubjectConfig = { + url: '', + deserializer: (e: MessageEvent) => JSON.parse(e.data), + serializer: (value: any) => JSON.stringify(value), +}; + +const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = + 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; + +export type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView; + +export class WebSocketSubject extends AnonymousSubject { + // @ts-ignore: Property has no initializer and is not definitely assigned + private _config: WebSocketSubjectConfig; + + /** @internal */ + // @ts-ignore: Property has no initializer and is not definitely assigned + _output: Subject; + + private _socket: WebSocket | null = null; + + constructor(urlConfigOrSource: string | WebSocketSubjectConfig | Observable, destination?: Observer) { + super(); + if (urlConfigOrSource instanceof Observable) { + this.destination = destination; + this.source = urlConfigOrSource as Observable; + } else { + const config = (this._config = { ...DEFAULT_WEBSOCKET_CONFIG }); + this._output = new Subject(); + if (typeof urlConfigOrSource === 'string') { + config.url = urlConfigOrSource; + } else { + for (const key in urlConfigOrSource) { + if (urlConfigOrSource.hasOwnProperty(key)) { + (config as any)[key] = (urlConfigOrSource as any)[key]; + } + } + } + + if (!config.WebSocketCtor && WebSocket) { + config.WebSocketCtor = WebSocket; + } else if (!config.WebSocketCtor) { + throw new Error('no WebSocket constructor can be found'); + } + this.destination = new ReplaySubject(); + } + } + + /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ + lift(operator: Operator): WebSocketSubject { + const sock = new WebSocketSubject(this._config as WebSocketSubjectConfig, this.destination as any); + sock.operator = operator; + sock.source = this; + return sock; + } + + private _resetState() { + this._socket = null; + if (!this.source) { + this.destination = new ReplaySubject(); + } + this._output = new Subject(); + } + + /** + * Creates an {@link Observable}, that when subscribed to, sends a message, + * defined by the `subMsg` function, to the server over the socket to begin a + * subscription to data over that socket. Once data arrives, the + * `messageFilter` argument will be used to select the appropriate data for + * the resulting Observable. When finalization occurs, either due to + * unsubscription, completion, or error, a message defined by the `unsubMsg` + * argument will be sent to the server over the WebSocketSubject. + * + * @param subMsg A function to generate the subscription message to be sent to + * the server. This will still be processed by the serializer in the + * WebSocketSubject's config. (Which defaults to JSON serialization) + * @param unsubMsg A function to generate the unsubscription message to be + * sent to the server at finalization. This will still be processed by the + * serializer in the WebSocketSubject's config. + * @param messageFilter A predicate for selecting the appropriate messages + * from the server for the output stream. + */ + multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean) { + const self = this; + return new Observable((observer: Observer) => { + try { + self.next(subMsg()); + } catch (err) { + observer.error(err); + } + + const subscription = self.subscribe({ + next: (x) => { + try { + if (messageFilter(x)) { + observer.next(x); + } + } catch (err) { + observer.error(err); + } + }, + error: (err) => observer.error(err), + complete: () => observer.complete(), + }); + + return () => { + try { + self.next(unsubMsg()); + } catch (err) { + observer.error(err); + } + subscription.unsubscribe(); + }; + }); + } + + private _connectSocket() { + const { WebSocketCtor, protocol, url, binaryType } = this._config; + const observer = this._output; + + let socket: WebSocket | null = null; + try { + socket = protocol ? new WebSocketCtor!(url, protocol) : new WebSocketCtor!(url); + this._socket = socket; + if (binaryType) { + this._socket.binaryType = binaryType; + } + } catch (e) { + observer.error(e); + return; + } + + const subscription = new Subscription(() => { + this._socket = null; + if (socket && socket.readyState === 1) { + socket.close(); + } + }); + + socket.onopen = (evt: Event) => { + const { _socket } = this; + if (!_socket) { + socket!.close(); + this._resetState(); + return; + } + const { openObserver } = this._config; + if (openObserver) { + openObserver.next(evt); + } + + const queue = this.destination; + + this.destination = Subscriber.create( + (x) => { + if (socket!.readyState === 1) { + try { + const { serializer } = this._config; + socket!.send(serializer!(x!)); + } catch (e) { + this.destination!.error(e); + } + } + }, + (err) => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); + } + if (err && err.code) { + socket!.close(err.code, err.reason); + } else { + observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); + } + this._resetState(); + }, + () => { + const { closingObserver } = this._config; + if (closingObserver) { + closingObserver.next(undefined); + } + socket!.close(); + this._resetState(); + } + ) as Subscriber; + + if (queue && queue instanceof ReplaySubject) { + subscription.add((queue as ReplaySubject).subscribe(this.destination)); + } + }; + + socket.onerror = (e: Event) => { + this._resetState(); + observer.error(e); + }; + + socket.onclose = (e: CloseEvent) => { + if (socket === this._socket) { + this._resetState(); + } + const { closeObserver } = this._config; + if (closeObserver) { + closeObserver.next(e); + } + if (e.wasClean) { + observer.complete(); + } else { + observer.error(e); + } + }; + + socket.onmessage = (e: MessageEvent) => { + try { + const { deserializer } = this._config; + observer.next(deserializer!(e)); + } catch (err) { + observer.error(err); + } + }; + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + const { source } = this; + if (source) { + return source.subscribe(subscriber); + } + if (!this._socket) { + this._connectSocket(); + } + this._output.subscribe(subscriber); + subscriber.add(() => { + const { _socket } = this; + if (this._output.observers.length === 0) { + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + } + }); + return subscriber; + } + + unsubscribe() { + const { _socket } = this; + if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { + _socket.close(); + } + this._resetState(); + super.unsubscribe(); + } +} diff --git a/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts b/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts new file mode 100644 index 0000000..38b338b --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts @@ -0,0 +1,132 @@ +import { Observable } from '../../Observable'; +import { TimestampProvider } from '../../types'; +import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; + +/** + * An observable of animation frames + * + * Emits the amount of time elapsed since subscription and the timestamp on each animation frame. + * Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own. + * + * Every subscription will start a separate animation loop. Since animation frames are always scheduled + * by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously + * should not be much different or have more overhead than looping over an array of events during + * a single animation frame. However, if for some reason the developer would like to ensure the + * execution of animation-related handlers are all executed during the same task by the engine, + * the `share` operator can be used. + * + * This is useful for setting up animations with RxJS. + * + * ## Examples + * + * Tweening a div to move it on the screen + * + * ```ts + * import { animationFrames, map, takeWhile, endWith } from 'rxjs'; + * + * function tween(start: number, end: number, duration: number) { + * const diff = end - start; + * return animationFrames().pipe( + * // Figure out what percentage of time has passed + * map(({ elapsed }) => elapsed / duration), + * // Take the vector while less than 100% + * takeWhile(v => v < 1), + * // Finish with 100% + * endWith(1), + * // Calculate the distance traveled between start and end + * map(v => v * diff + start) + * ); + * } + * + * // Setup a div for us to move around + * const div = document.createElement('div'); + * document.body.appendChild(div); + * div.style.position = 'absolute'; + * div.style.width = '40px'; + * div.style.height = '40px'; + * div.style.backgroundColor = 'lime'; + * div.style.transform = 'translate3d(10px, 0, 0)'; + * + * tween(10, 200, 4000).subscribe(x => { + * div.style.transform = `translate3d(${ x }px, 0, 0)`; + * }); + * ``` + * + * Providing a custom timestamp provider + * + * ```ts + * import { animationFrames, TimestampProvider } from 'rxjs'; + * + * // A custom timestamp provider + * let now = 0; + * const customTSProvider: TimestampProvider = { + * now() { return now++; } + * }; + * + * const source$ = animationFrames(customTSProvider); + * + * // Log increasing numbers 0...1...2... on every animation frame. + * source$.subscribe(({ elapsed }) => console.log(elapsed)); + * ``` + * + * @param timestampProvider An object with a `now` method that provides a numeric timestamp + */ +export function animationFrames(timestampProvider?: TimestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; +} + +/** + * Does the work of creating the observable for `animationFrames`. + * @param timestampProvider The timestamp provider to use to create the observable + */ +function animationFramesFactory(timestampProvider?: TimestampProvider) { + return new Observable<{ timestamp: number; elapsed: number }>((subscriber) => { + // If no timestamp provider is specified, use performance.now() - as it + // will return timestamps 'compatible' with those passed to the run + // callback and won't be affected by NTP adjustments, etc. + const provider = timestampProvider || performanceTimestampProvider; + + // Capture the start time upon subscription, as the run callback can remain + // queued for a considerable period of time and the elapsed time should + // represent the time elapsed since subscription - not the time since the + // first rendered animation frame. + const start = provider.now(); + + let id = 0; + const run = () => { + if (!subscriber.closed) { + id = animationFrameProvider.requestAnimationFrame((timestamp: DOMHighResTimeStamp | number) => { + id = 0; + // Use the provider's timestamp to calculate the elapsed time. Note that + // this means - if the caller hasn't passed a provider - that + // performance.now() will be used instead of the timestamp that was + // passed to the run callback. The reason for this is that the timestamp + // passed to the callback can be earlier than the start time, as it + // represents the time at which the browser decided it would render any + // queued frames - and that time can be earlier the captured start time. + const now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start, + }); + run(); + }); + } + }; + + run(); + + return () => { + if (id) { + animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); +} + +/** + * In the common case, where the timestamp provided by the rAF API is used, + * we use this shared observable to reduce overhead. + */ +const DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); diff --git a/node_modules/rxjs/src/internal/observable/dom/fetch.ts b/node_modules/rxjs/src/internal/observable/dom/fetch.ts new file mode 100644 index 0000000..1894d24 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/dom/fetch.ts @@ -0,0 +1,180 @@ +import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; +import { Observable } from '../../Observable'; +import { innerFrom } from '../../observable/innerFrom'; +import { ObservableInput } from '../../types'; + +export function fromFetch( + input: string | Request, + init: RequestInit & { + selector: (response: Response) => ObservableInput; + } +): Observable; + +export function fromFetch(input: string | Request, init?: RequestInit): Observable; + +/** + * Uses [the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to + * make an HTTP request. + * + * **WARNING** Parts of the fetch API are still experimental. `AbortController` is + * required for this implementation to work and use cancellation appropriately. + * + * Will automatically set up an internal [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) + * in order to finalize the internal `fetch` when the subscription tears down. + * + * If a `signal` is provided via the `init` argument, it will behave like it usually does with + * `fetch`. If the provided `signal` aborts, the error that `fetch` normally rejects with + * in that scenario will be emitted as an error from the observable. + * + * ## Examples + * + * Basic use + * + * ```ts + * import { fromFetch } from 'rxjs/fetch'; + * import { switchMap, of, catchError } from 'rxjs'; + * + * const data$ = fromFetch('https://api.github.com/users?per_page=5').pipe( + * switchMap(response => { + * if (response.ok) { + * // OK return data + * return response.json(); + * } else { + * // Server is returning a status requiring the client to try something else. + * return of({ error: true, message: `Error ${ response.status }` }); + * } + * }), + * catchError(err => { + * // Network or other error, handle appropriately + * console.error(err); + * return of({ error: true, message: err.message }) + * }) + * ); + * + * data$.subscribe({ + * next: result => console.log(result), + * complete: () => console.log('done') + * }); + * ``` + * + * ### Use with Chunked Transfer Encoding + * + * With HTTP responses that use [chunked transfer encoding](https://tools.ietf.org/html/rfc7230#section-3.3.1), + * the promise returned by `fetch` will resolve as soon as the response's headers are + * received. + * + * That means the `fromFetch` observable will emit a `Response` - and will + * then complete - before the body is received. When one of the methods on the + * `Response` - like `text()` or `json()` - is called, the returned promise will not + * resolve until the entire body has been received. Unsubscribing from any observable + * that uses the promise as an observable input will not abort the request. + * + * To facilitate aborting the retrieval of responses that use chunked transfer encoding, + * a `selector` can be specified via the `init` parameter: + * + * ```ts + * import { of } from 'rxjs'; + * import { fromFetch } from 'rxjs/fetch'; + * + * const data$ = fromFetch('https://api.github.com/users?per_page=5', { + * selector: response => response.json() + * }); + * + * data$.subscribe({ + * next: result => console.log(result), + * complete: () => console.log('done') + * }); + * ``` + * + * @param input The resource you would like to fetch. Can be a url or a request object. + * @param initWithSelector A configuration object for the fetch. + * [See MDN for more details](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * @returns An Observable, that when subscribed to, performs an HTTP request using the native `fetch` + * function. The {@link Subscription} is tied to an `AbortController` for the fetch. + */ +export function fromFetch( + input: string | Request, + initWithSelector: RequestInit & { + selector?: (response: Response) => ObservableInput; + } = {} +): Observable { + const { selector, ...init } = initWithSelector; + return new Observable((subscriber) => { + // Our controller for aborting this fetch. + // Any externally provided AbortSignal will have to call + // abort on this controller when signaled, because the + // signal from this controller is what is being passed to `fetch`. + const controller = new AbortController(); + const { signal } = controller; + // This flag exists to make sure we don't `abort()` the fetch upon tearing down + // this observable after emitting a Response. Aborting in such circumstances + // would also abort subsequent methods - like `json()` - that could be called + // on the Response. Consider: `fromFetch().pipe(take(1), mergeMap(res => res.json()))` + let abortable = true; + + // If the user provided an init configuration object, + // let's process it and chain our abort signals, if necessary. + // If a signal is provided, just have it finalized. It's a cancellation token, basically. + const { signal: outerSignal } = init; + if (outerSignal) { + if (outerSignal.aborted) { + controller.abort(); + } else { + // We got an AbortSignal from the arguments passed into `fromFetch`. + // We need to wire up our AbortController to abort when this signal aborts. + const outerSignalHandler = () => { + if (!signal.aborted) { + controller.abort(); + } + }; + outerSignal.addEventListener('abort', outerSignalHandler); + subscriber.add(() => outerSignal.removeEventListener('abort', outerSignalHandler)); + } + } + + // The initialization object passed to `fetch` as the second + // argument. This ferries in important information, including our + // AbortSignal. Create a new init, so we don't accidentally mutate the + // passed init, or reassign it. This is because the init passed in + // is shared between each subscription to the result. + const perSubscriberInit: RequestInit = { ...init, signal }; + + const handleError = (err: any) => { + abortable = false; + subscriber.error(err); + }; + + fetch(input, perSubscriberInit) + .then((response) => { + if (selector) { + // If we have a selector function, use it to project our response. + // Note that any error that comes from our selector will be + // sent to the promise `catch` below and handled. + innerFrom(selector(response)).subscribe( + createOperatorSubscriber( + subscriber, + // Values are passed through to the subscriber + undefined, + // The projected response is complete. + () => { + abortable = false; + subscriber.complete(); + }, + handleError + ) + ); + } else { + abortable = false; + subscriber.next(response); + subscriber.complete(); + } + }) + .catch(handleError); + + return () => { + if (abortable) { + controller.abort(); + } + }; + }); +} diff --git a/node_modules/rxjs/src/internal/observable/dom/webSocket.ts b/node_modules/rxjs/src/internal/observable/dom/webSocket.ts new file mode 100644 index 0000000..d642f0b --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/dom/webSocket.ts @@ -0,0 +1,162 @@ +import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject'; + +/** + * Wrapper around the w3c-compatible WebSocket object provided by the browser. + * + * {@link Subject} that communicates with a server via WebSocket + * + * `webSocket` is a factory function that produces a `WebSocketSubject`, + * which can be used to make WebSocket connection with an arbitrary endpoint. + * `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an + * {@link WebSocketSubjectConfig} object for providing additional configuration, as + * well as Observers for tracking lifecycle of WebSocket connection. + * + * When `WebSocketSubject` is subscribed, it attempts to make a socket connection, + * unless there is one made already. This means that many subscribers will always listen + * on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`, + * even if these two were provided with the same url, they will attempt to make separate + * connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed, + * only if there are no more subscribers still listening. If after some time a consumer starts + * subscribing again, connection is reestablished. + * + * Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that + * message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you + * want to customize how deserialization is handled (if at all), you can provide custom `resultSelector` + * function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without + * any errors. If at any point (starting, maintaining or closing a connection) there is an error, + * stream will also error with whatever WebSocket API has thrown. + * + * By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order + * to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind + * that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand, + * before calling `next` with a result. Note also that if at the moment of nexting value + * there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection + * is finally established. `complete` method closes socket connection. `error` does the same, + * as well as notifying the server that something went wrong via status code and string with details of what happened. + * Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`, + * arbitrary values being passed to the `error` method. It needs to be called with an object that has `code` + * property with status code number and optional `reason` property with string describing details + * of an error. + * + * Calling `next` does not affect subscribers of `WebSocketSubject` - they have no + * information that something was sent to the server (unless of course the server + * responds somehow to a message). On the other hand, since calling `complete` triggers + * an attempt to close socket connection. If that connection is closed without any errors, stream will + * complete, thus notifying all subscribers. And since calling `error` closes + * socket connection as well, just with a different status code for the server, if closing itself proceeds + * without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases + * (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream + * will error. + * + * **Multiplexing** + * + * `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is + * used to simulate opening several socket connections, while in reality maintaining only one. + * For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions, + * it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket + * endpoints, running on separate machines with only GUI combining them together. Having a socket connection + * for each functionality could become too resource expensive. It is a common pattern to have single + * WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services). + * Even though there is a single connection in a client app, having the ability to manipulate streams as if it + * were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for + * given service and filter out messages of interest. This is exactly what `multiplex` method is for. + * + * Method accepts three parameters. First two are functions returning subscription and unsubscription messages + * respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable + * subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop + * being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier, + * gateway server can decide that it should connect to real sport news service and start forwarding messages from it. + * Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just + * as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and + * unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server + * might stop sending messages, since it got unsubscription message. This needs to be handled + * on the server or using {@link publish} on a Observable returned from 'multiplex'. + * + * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages + * sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these + * messages with some kind of string identifier on a message object and `messageFilter` would return `true` + * if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped, + * and are not passed down the stream. + * + * Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this + * is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the + * server, use root `WebSocketSubject`. + * + * ## Examples + * + * Listening for messages from the server + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * subject.subscribe({ + * next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server. + * error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error. + * complete: () => console.log('complete') // Called when connection is closed (for whatever reason). + * }); + * ``` + * + * Pushing messages to the server + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * subject.subscribe(); + * // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent, + * // since no connection was established! + * + * subject.next({ message: 'some message' }); + * // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default! + * + * subject.complete(); // Closes the connection. + * + * subject.error({ code: 4000, reason: 'I think our app just broke!' }); + * // Also closes the connection, but let's the server know that this closing is caused by some error. + * ``` + * + * Multiplexing WebSocket + * + * ```ts + * import { webSocket } from 'rxjs/webSocket'; + * + * const subject = webSocket('ws://localhost:8081'); + * + * const observableA = subject.multiplex( + * () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'... + * () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop. + * message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false. + * ); + * + * const observableB = subject.multiplex( // And the same goes for 'B'. + * () => ({ subscribe: 'B' }), + * () => ({ unsubscribe: 'B' }), + * message => message.type === 'B' + * ); + * + * const subA = observableA.subscribe(messageForA => console.log(messageForA)); + * // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A', + * // which we log here. + * + * const subB = observableB.subscribe(messageForB => console.log(messageForB)); + * // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B', + * // which we log here. + * + * subB.unsubscribe(); + * // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages. + * + * subA.unsubscribe(); + * // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject, + * // socket connection closes. + * ``` + * + * @param {string|WebSocketSubjectConfig} urlConfigOrSource The WebSocket endpoint as an url or an object with + * configuration and additional Observers. + * @return {WebSocketSubject} Subject which allows to both send and receive messages via WebSocket connection. + */ +export function webSocket(urlConfigOrSource: string | WebSocketSubjectConfig): WebSocketSubject { + return new WebSocketSubject(urlConfigOrSource); +} diff --git a/node_modules/rxjs/src/internal/observable/empty.ts b/node_modules/rxjs/src/internal/observable/empty.ts new file mode 100644 index 0000000..8f59e45 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/empty.ts @@ -0,0 +1,79 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; + +/** + * A simple Observable that emits no items to the Observer and immediately + * emits a complete notification. + * + * Just emits 'complete', and nothing else. + * + * ![](empty.png) + * + * A simple Observable that only emits the complete notification. It can be used + * for composing with other Observables, such as in a {@link mergeMap}. + * + * ## Examples + * + * Log complete notification + * + * ```ts + * import { EMPTY } from 'rxjs'; + * + * EMPTY.subscribe({ + * next: () => console.log('Next'), + * complete: () => console.log('Complete!') + * }); + * + * // Outputs + * // Complete! + * ``` + * + * Emit the number 7, then complete + * + * ```ts + * import { EMPTY, startWith } from 'rxjs'; + * + * const result = EMPTY.pipe(startWith(7)); + * result.subscribe(x => console.log(x)); + * + * // Outputs + * // 7 + * ``` + * + * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'` + * + * ```ts + * import { interval, mergeMap, of, EMPTY } from 'rxjs'; + * + * const interval$ = interval(1000); + * const result = interval$.pipe( + * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY), + * ); + * result.subscribe(x => console.log(x)); + * + * // Results in the following to the console: + * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...) + * // x will occur every 1000ms + * // if x % 2 is equal to 1, print a, b, c (each on its own) + * // if x % 2 is not equal to 1, nothing will be output + * ``` + * + * @see {@link Observable} + * @see {@link NEVER} + * @see {@link of} + * @see {@link throwError} + */ +export const EMPTY = new Observable((subscriber) => subscriber.complete()); + +/** + * @param scheduler A {@link SchedulerLike} to use for scheduling + * the emission of the complete notification. + * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8. + */ +export function empty(scheduler?: SchedulerLike) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; +} + +function emptyScheduled(scheduler: SchedulerLike) { + return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete())); +} diff --git a/node_modules/rxjs/src/internal/observable/forkJoin.ts b/node_modules/rxjs/src/internal/observable/forkJoin.ts new file mode 100644 index 0000000..21eb3cc --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/forkJoin.ts @@ -0,0 +1,186 @@ +import { Observable } from '../Observable'; +import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types'; +import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; +import { innerFrom } from './innerFrom'; +import { popResultSelector } from '../util/args'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { createObject } from '../util/createObject'; +import { AnyCatcher } from '../AnyCatcher'; + +// forkJoin(any) +// We put this first because we need to catch cases where the user has supplied +// _exactly `any`_ as the argument. Since `any` literally matches _anything_, +// we don't want it to randomly hit one of the other type signatures below, +// as we have no idea at build-time what type we should be returning when given an any. + +/** + * You have passed `any` here, we can't figure out if it is + * an array or an object, so you're getting `unknown`. Use better types. + * @param arg Something typed as `any` + */ +export function forkJoin(arg: T): Observable; + +// forkJoin(null | undefined) +export function forkJoin(scheduler: null | undefined): Observable; + +// forkJoin([a, b, c]) +export function forkJoin(sources: readonly []): Observable; +export function forkJoin(sources: readonly [...ObservableInputTuple]): Observable; +export function forkJoin( + sources: readonly [...ObservableInputTuple], + resultSelector: (...values: A) => R +): Observable; + +// forkJoin(a, b, c) +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export function forkJoin(...sources: [...ObservableInputTuple]): Observable; +/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ +export function forkJoin( + ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] +): Observable; + +// forkJoin({a, b, c}) +export function forkJoin(sourcesObject: { [K in any]: never }): Observable; +export function forkJoin>>( + sourcesObject: T +): Observable<{ [K in keyof T]: ObservedValueOf }>; + +/** + * Accepts an `Array` of {@link ObservableInput} or a dictionary `Object` of {@link ObservableInput} and returns + * an {@link Observable} that emits either an array of values in the exact same order as the passed array, + * or a dictionary of values in the same shape as the passed dictionary. + * + * Wait for Observables to complete and then combine last values they emitted; + * complete immediately if an empty array is passed. + * + * ![](forkJoin.png) + * + * `forkJoin` is an operator that takes any number of input observables which can be passed either as an array + * or a dictionary of input observables. If no input observables are provided (e.g. an empty array is passed), + * then the resulting stream will complete immediately. + * + * `forkJoin` will wait for all passed observables to emit and complete and then it will emit an array or an object with last + * values from corresponding observables. + * + * If you pass an array of `n` observables to the operator, then the resulting + * array will have `n` values, where the first value is the last one emitted by the first observable, + * second value is the last one emitted by the second observable and so on. + * + * If you pass a dictionary of observables to the operator, then the resulting + * objects will have the same keys as the dictionary passed, with their last values they have emitted + * located at the corresponding key. + * + * That means `forkJoin` will not emit more than once and it will complete after that. If you need to emit combined + * values not only at the end of the lifecycle of passed observables, but also throughout it, try out {@link combineLatest} + * or {@link zip} instead. + * + * In order for the resulting array to have the same length as the number of input observables, whenever any of + * the given observables completes without emitting any value, `forkJoin` will complete at that moment as well + * and it will not emit anything either, even if it already has some last values from other observables. + * Conversely, if there is an observable that never completes, `forkJoin` will never complete either, + * unless at any point some other observable completes without emitting a value, which brings us back to + * the previous case. Overall, in order for `forkJoin` to emit a value, all given observables + * have to emit something at least once and complete. + * + * If any given observable errors at some point, `forkJoin` will error as well and immediately unsubscribe + * from the other observables. + * + * Optionally `forkJoin` accepts a `resultSelector` function, that will be called with values which normally + * would land in the emitted array. Whatever is returned by the `resultSelector`, will appear in the output + * observable instead. This means that the default `resultSelector` can be thought of as a function that takes + * all its arguments and puts them into an array. Note that the `resultSelector` will be called only + * when `forkJoin` is supposed to emit a result. + * + * ## Examples + * + * Use `forkJoin` with a dictionary of observable inputs + * + * ```ts + * import { forkJoin, of, timer } from 'rxjs'; + * + * const observable = forkJoin({ + * foo: of(1, 2, 3, 4), + * bar: Promise.resolve(8), + * baz: timer(4000) + * }); + * observable.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('This is how it ends!'), + * }); + * + * // Logs: + * // { foo: 4, bar: 8, baz: 0 } after 4 seconds + * // 'This is how it ends!' immediately after + * ``` + * + * Use `forkJoin` with an array of observable inputs + * + * ```ts + * import { forkJoin, of, timer } from 'rxjs'; + * + * const observable = forkJoin([ + * of(1, 2, 3, 4), + * Promise.resolve(8), + * timer(4000) + * ]); + * observable.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('This is how it ends!'), + * }); + * + * // Logs: + * // [4, 8, 0] after 4 seconds + * // 'This is how it ends!' immediately after + * ``` + * + * @see {@link combineLatest} + * @see {@link zip} + * + * @param {...ObservableInput} args Any number of Observables provided either as an array or as an arguments + * passed directly to the operator. + * @param {function} [project] Function that takes values emitted by input Observables and returns value + * that will appear in resulting Observable instead of default array. + * @return {Observable} Observable emitting either an array of last values emitted by passed Observables + * or value from project function. + */ +export function forkJoin(...args: any[]): Observable { + const resultSelector = popResultSelector(args); + const { args: sources, keys } = argsArgArrayOrObject(args); + const result = new Observable((subscriber) => { + const { length } = sources; + if (!length) { + subscriber.complete(); + return; + } + const values = new Array(length); + let remainingCompletions = length; + let remainingEmissions = length; + for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { + let hasValue = false; + innerFrom(sources[sourceIndex]).subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, + () => remainingCompletions--, + undefined, + () => { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject(keys, values) : values); + } + subscriber.complete(); + } + } + ) + ); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; +} diff --git a/node_modules/rxjs/src/internal/observable/from.ts b/node_modules/rxjs/src/internal/observable/from.ts new file mode 100644 index 0000000..834bb22 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/from.ts @@ -0,0 +1,104 @@ +import { Observable } from '../Observable'; +import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types'; +import { scheduled } from '../scheduled/scheduled'; +import { innerFrom } from './innerFrom'; + +export function from>(input: O): Observable>; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function from>(input: O, scheduler: SchedulerLike | undefined): Observable>; + +/** + * Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object. + * + * Converts almost anything to an Observable. + * + * ![](from.png) + * + * `from` converts various other objects and data types into Observables. It also converts a Promise, an array-like, or an + * iterable + * object into an Observable that emits the items in that promise, array, or iterable. A String, in this context, is treated + * as an array of characters. Observable-like objects (contains a function named with the ES2015 Symbol for Observable) can also be + * converted through this operator. + * + * ## Examples + * + * Converts an array to an Observable + * + * ```ts + * import { from } from 'rxjs'; + * + * const array = [10, 20, 30]; + * const result = from(array); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 10 + * // 20 + * // 30 + * ``` + * + * Convert an infinite iterable (from a generator) to an Observable + * + * ```ts + * import { from, take } from 'rxjs'; + * + * function* generateDoubles(seed) { + * let i = seed; + * while (true) { + * yield i; + * i = 2 * i; // double it + * } + * } + * + * const iterator = generateDoubles(3); + * const result = from(iterator).pipe(take(10)); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 3 + * // 6 + * // 12 + * // 24 + * // 48 + * // 96 + * // 192 + * // 384 + * // 768 + * // 1536 + * ``` + * + * With `asyncScheduler` + * + * ```ts + * import { from, asyncScheduler } from 'rxjs'; + * + * console.log('start'); + * + * const array = [10, 20, 30]; + * const result = from(array, asyncScheduler); + * + * result.subscribe(x => console.log(x)); + * + * console.log('end'); + * + * // Logs: + * // 'start' + * // 'end' + * // 10 + * // 20 + * // 30 + * ``` + * + * @see {@link fromEvent} + * @see {@link fromEventPattern} + * + * @param {ObservableInput} A subscription object, a Promise, an Observable-like, + * an Array, an iterable, or an array-like object to be converted. + * @param {SchedulerLike} An optional {@link SchedulerLike} on which to schedule the emission of values. + * @return {Observable} + */ +export function from(input: ObservableInput, scheduler?: SchedulerLike): Observable { + return scheduler ? scheduled(input, scheduler) : innerFrom(input); +} diff --git a/node_modules/rxjs/src/internal/observable/fromEvent.ts b/node_modules/rxjs/src/internal/observable/fromEvent.ts new file mode 100644 index 0000000..e9c7c92 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/fromEvent.ts @@ -0,0 +1,336 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Observable } from '../Observable'; +import { mergeMap } from '../operators/mergeMap'; +import { isArrayLike } from '../util/isArrayLike'; +import { isFunction } from '../util/isFunction'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; + +// These constants are used to create handler registry functions using array mapping below. +const nodeEventEmitterMethods = ['addListener', 'removeListener'] as const; +const eventTargetMethods = ['addEventListener', 'removeEventListener'] as const; +const jqueryMethods = ['on', 'off'] as const; + +export interface NodeStyleEventEmitter { + addListener(eventName: string | symbol, handler: NodeEventHandler): this; + removeListener(eventName: string | symbol, handler: NodeEventHandler): this; +} + +export type NodeEventHandler = (...args: any[]) => void; + +// For APIs that implement `addListener` and `removeListener` methods that may +// not use the same arguments or return EventEmitter values +// such as React Native +export interface NodeCompatibleEventEmitter { + addListener(eventName: string, handler: NodeEventHandler): void | {}; + removeListener(eventName: string, handler: NodeEventHandler): void | {}; +} + +// Use handler types like those in @types/jquery. See: +// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/847731ba1d7fa6db6b911c0e43aa0afe596e7723/types/jquery/misc.d.ts#L6395 +export interface JQueryStyleEventEmitter { + on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; + off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; +} + +export interface EventListenerObject { + handleEvent(evt: E): void; +} + +export interface HasEventTargetAddRemove { + addEventListener( + type: string, + listener: ((evt: E) => void) | EventListenerObject | null, + options?: boolean | AddEventListenerOptions + ): void; + removeEventListener( + type: string, + listener: ((evt: E) => void) | EventListenerObject | null, + options?: EventListenerOptions | boolean + ): void; +} + +export interface EventListenerOptions { + capture?: boolean; + passive?: boolean; + once?: boolean; +} + +export interface AddEventListenerOptions extends EventListenerOptions { + once?: boolean; + passive?: boolean; +} + +export function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string): Observable; +export function fromEvent( + target: HasEventTargetAddRemove | ArrayLike>, + eventName: string, + resultSelector: (event: T) => R +): Observable; +export function fromEvent( + target: HasEventTargetAddRemove | ArrayLike>, + eventName: string, + options: EventListenerOptions +): Observable; +export function fromEvent( + target: HasEventTargetAddRemove | ArrayLike>, + eventName: string, + options: EventListenerOptions, + resultSelector: (event: T) => R +): Observable; + +export function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; +export function fromEvent( + target: NodeStyleEventEmitter | ArrayLike, + eventName: string, + resultSelector: (...args: any[]) => R +): Observable; + +export function fromEvent( + target: NodeCompatibleEventEmitter | ArrayLike, + eventName: string +): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; +export function fromEvent( + target: NodeCompatibleEventEmitter | ArrayLike, + eventName: string, + resultSelector: (...args: any[]) => R +): Observable; + +export function fromEvent( + target: JQueryStyleEventEmitter | ArrayLike>, + eventName: string +): Observable; +export function fromEvent( + target: JQueryStyleEventEmitter | ArrayLike>, + eventName: string, + resultSelector: (value: T, ...args: any[]) => R +): Observable; + +/** + * Creates an Observable that emits events of a specific type coming from the + * given event target. + * + * Creates an Observable from DOM events, or Node.js + * EventEmitter events or others. + * + * ![](fromEvent.png) + * + * `fromEvent` accepts as a first argument event target, which is an object with methods + * for registering event handler functions. As a second argument it takes string that indicates + * type of event we want to listen for. `fromEvent` supports selected types of event targets, + * which are described in detail below. If your event target does not match any of the ones listed, + * you should use {@link fromEventPattern}, which can be used on arbitrary APIs. + * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event + * handler functions have different names, but they all accept a string describing event type + * and function itself, which will be called whenever said event happens. + * + * Every time resulting Observable is subscribed, event handler function will be registered + * to event target on given event type. When that event fires, value + * passed as a first argument to registered function will be emitted by output Observable. + * When Observable is unsubscribed, function will be unregistered from event target. + * + * Note that if event target calls registered function with more than one argument, second + * and following arguments will not appear in resulting stream. In order to get access to them, + * you can pass to `fromEvent` optional project function, which will be called with all arguments + * passed to event handler. Output Observable will then emit value returned by project function, + * instead of the usual value. + * + * Remember that event targets listed below are checked via duck typing. It means that + * no matter what kind of object you have and no matter what environment you work in, + * you can safely use `fromEvent` on that object if it exposes described methods (provided + * of course they behave as was described above). So for example if Node.js library exposes + * event target which has the same method names as DOM EventTarget, `fromEvent` is still + * a good choice. + * + * If the API you use is more callback then event handler oriented (subscribed + * callback function fires only once and thus there is no need to manually + * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback} + * instead. + * + * `fromEvent` supports following types of event targets: + * + * **DOM EventTarget** + * + * This is an object with `addEventListener` and `removeEventListener` methods. + * + * In the browser, `addEventListener` accepts - apart from event type string and event + * handler function arguments - optional third parameter, which is either an object or boolean, + * both used for additional configuration how and when passed function will be called. When + * `fromEvent` is used with event target of that type, you can provide this values + * as third parameter as well. + * + * **Node.js EventEmitter** + * + * An object with `addListener` and `removeListener` methods. + * + * **JQuery-style event target** + * + * An object with `on` and `off` methods + * + * **DOM NodeList** + * + * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`. + * + * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes + * it contains and install event handler function in every of them. When returned Observable + * is unsubscribed, function will be removed from all Nodes. + * + * **DOM HtmlCollection** + * + * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is + * installed and removed in each of elements. + * + * + * ## Examples + * + * Emit clicks happening on the DOM document + * + * ```ts + * import { fromEvent } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * clicks.subscribe(x => console.log(x)); + * + * // Results in: + * // MouseEvent object logged to console every time a click + * // occurs on the document. + * ``` + * + * Use `addEventListener` with capture option + * + * ```ts + * import { fromEvent } from 'rxjs'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * // note optional configuration parameter which will be passed to addEventListener + * const clicksInDocument = fromEvent(document, 'click', { capture: true }); + * const clicksInDiv = fromEvent(div, 'click'); + * + * clicksInDocument.subscribe(() => console.log('document')); + * clicksInDiv.subscribe(() => console.log('div')); + * + * // By default events bubble UP in DOM tree, so normally + * // when we would click on div in document + * // "div" would be logged first and then "document". + * // Since we specified optional `capture` option, document + * // will catch event when it goes DOWN DOM tree, so console + * // will log "document" and then "div". + * ``` + * + * @see {@link bindCallback} + * @see {@link bindNodeCallback} + * @see {@link fromEventPattern} + * + * @param {FromEventTarget} target The DOM EventTarget, Node.js + * EventEmitter, JQuery-like event target, NodeList or HTMLCollection to attach the event handler to. + * @param {string} eventName The event name of interest, being emitted by the + * `target`. + * @param {EventListenerOptions} [options] Options to pass through to addEventListener + * @return {Observable} + */ +export function fromEvent( + target: any, + eventName: string, + options?: EventListenerOptions | ((...args: any[]) => T), + resultSelector?: (...args: any[]) => T +): Observable { + if (isFunction(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options as EventListenerOptions).pipe(mapOneOrManyArgs(resultSelector)); + } + + // Figure out our add and remove methods. In order to do this, + // we are going to analyze the target in a preferred order, if + // the target matches a given signature, we take the two "add" and "remove" + // method names and apply them to a map to create opposite versions of the + // same function. This is because they all operate in duplicate pairs, + // `addListener(name, handler)`, `removeListener(name, handler)`, for example. + // The call only differs by method name, as to whether or not you're adding or removing. + const [add, remove] = + // If it is an EventTarget, we need to use a slightly different method than the other two patterns. + isEventTarget(target) + ? eventTargetMethods.map((methodName) => (handler: any) => target[methodName](eventName, handler, options as EventListenerOptions)) + : // In all other cases, the call pattern is identical with the exception of the method names. + isNodeStyleEventEmitter(target) + ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) + : isJQueryStyleEventEmitter(target) + ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) + : []; + + // If add is falsy, it's because we didn't match a pattern above. + // Check to see if it is an ArrayLike, because if it is, we want to + // try to apply fromEvent to all of it's items. We do this check last, + // because there are may be some types that are both ArrayLike *and* implement + // event registry points, and we'd rather delegate to that when possible. + if (!add) { + if (isArrayLike(target)) { + return mergeMap((subTarget: any) => fromEvent(subTarget, eventName, options as EventListenerOptions))( + innerFrom(target) + ) as Observable; + } + } + + // If add is falsy and we made it here, it's because we didn't + // match any valid target objects above. + if (!add) { + throw new TypeError('Invalid event target'); + } + + return new Observable((subscriber) => { + // The handler we are going to register. Forwards the event object, by itself, or + // an array of arguments to the event handler, if there is more than one argument, + // to the consumer. + const handler = (...args: any[]) => subscriber.next(1 < args.length ? args : args[0]); + // Do the work of adding the handler to the target. + add(handler); + // When we finalize, we want to remove the handler and free up memory. + return () => remove!(handler); + }); +} + +/** + * Used to create `add` and `remove` functions to register and unregister event handlers + * from a target in the most common handler pattern, where there are only two arguments. + * (e.g. `on(name, fn)`, `off(name, fn)`, `addListener(name, fn)`, or `removeListener(name, fn)`) + * @param target The target we're calling methods on + * @param eventName The event name for the event we're creating register or unregister functions for + */ +function toCommonHandlerRegistry(target: any, eventName: string) { + return (methodName: string) => (handler: any) => target[methodName](eventName, handler); +} + +/** + * Checks to see if the target implements the required node-style EventEmitter methods + * for adding and removing event handlers. + * @param target the object to check + */ +function isNodeStyleEventEmitter(target: any): target is NodeStyleEventEmitter { + return isFunction(target.addListener) && isFunction(target.removeListener); +} + +/** + * Checks to see if the target implements the required jQuery-style EventEmitter methods + * for adding and removing event handlers. + * @param target the object to check + */ +function isJQueryStyleEventEmitter(target: any): target is JQueryStyleEventEmitter { + return isFunction(target.on) && isFunction(target.off); +} + +/** + * Checks to see if the target implements the required EventTarget methods + * for adding and removing event handlers. + * @param target the object to check + */ +function isEventTarget(target: any): target is HasEventTargetAddRemove { + return isFunction(target.addEventListener) && isFunction(target.removeEventListener); +} diff --git a/node_modules/rxjs/src/internal/observable/fromEventPattern.ts b/node_modules/rxjs/src/internal/observable/fromEventPattern.ts new file mode 100644 index 0000000..fee3847 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/fromEventPattern.ts @@ -0,0 +1,155 @@ +import { Observable } from '../Observable'; +import { isFunction } from '../util/isFunction'; +import { NodeEventHandler } from './fromEvent'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; + +/* tslint:disable:max-line-length */ +export function fromEventPattern( + addHandler: (handler: NodeEventHandler) => any, + removeHandler?: (handler: NodeEventHandler, signal?: any) => void +): Observable; +export function fromEventPattern( + addHandler: (handler: NodeEventHandler) => any, + removeHandler?: (handler: NodeEventHandler, signal?: any) => void, + resultSelector?: (...args: any[]) => T +): Observable; +/* tslint:enable:max-line-length */ + +/** + * Creates an Observable from an arbitrary API for registering event handlers. + * + * When that method for adding event handler was something {@link fromEvent} + * was not prepared for. + * + * ![](fromEventPattern.png) + * + * `fromEventPattern` allows you to convert into an Observable any API that supports registering handler functions + * for events. It is similar to {@link fromEvent}, but far + * more flexible. In fact, all use cases of {@link fromEvent} could be easily handled by + * `fromEventPattern` (although in slightly more verbose way). + * + * This operator accepts as a first argument an `addHandler` function, which will be injected with + * handler parameter. That handler is actually an event handler function that you now can pass + * to API expecting it. `addHandler` will be called whenever Observable + * returned by the operator is subscribed, so registering handler in API will not + * necessarily happen when `fromEventPattern` is called. + * + * After registration, every time an event that we listen to happens, + * Observable returned by `fromEventPattern` will emit value that event handler + * function was called with. Note that if event handler was called with more + * than one argument, second and following arguments will not appear in the Observable. + * + * If API you are using allows to unregister event handlers as well, you can pass to `fromEventPattern` + * another function - `removeHandler` - as a second parameter. It will be injected + * with the same handler function as before, which now you can use to unregister + * it from the API. `removeHandler` will be called when consumer of resulting Observable + * unsubscribes from it. + * + * In some APIs unregistering is actually handled differently. Method registering an event handler + * returns some kind of token, which is later used to identify which function should + * be unregistered or it itself has method that unregisters event handler. + * If that is the case with your API, make sure token returned + * by registering method is returned by `addHandler`. Then it will be passed + * as a second argument to `removeHandler`, where you will be able to use it. + * + * If you need access to all event handler parameters (not only the first one), + * or you need to transform them in any way, you can call `fromEventPattern` with optional + * third parameter - project function which will accept all arguments passed to + * event handler when it is called. Whatever is returned from project function will appear on + * resulting stream instead of usual event handlers first argument. This means + * that default project can be thought of as function that takes its first parameter + * and ignores the rest. + * + * ## Examples + * + * Emits clicks happening on the DOM document + * + * ```ts + * import { fromEventPattern } from 'rxjs'; + * + * function addClickHandler(handler) { + * document.addEventListener('click', handler); + * } + * + * function removeClickHandler(handler) { + * document.removeEventListener('click', handler); + * } + * + * const clicks = fromEventPattern( + * addClickHandler, + * removeClickHandler + * ); + * clicks.subscribe(x => console.log(x)); + * + * // Whenever you click anywhere in the browser, DOM MouseEvent + * // object will be logged. + * ``` + * + * Use with API that returns cancellation token + * + * ```ts + * import { fromEventPattern } from 'rxjs'; + * + * const token = someAPI.registerEventHandler(function() {}); + * someAPI.unregisterEventHandler(token); // this APIs cancellation method accepts + * // not handler itself, but special token. + * + * const someAPIObservable = fromEventPattern( + * function(handler) { return someAPI.registerEventHandler(handler); }, // Note that we return the token here... + * function(handler, token) { someAPI.unregisterEventHandler(token); } // ...to then use it here. + * ); + * ``` + * + * Use with project function + * + * ```ts + * import { fromEventPattern } from 'rxjs'; + * + * someAPI.registerEventHandler((eventType, eventMessage) => { + * console.log(eventType, eventMessage); // Logs 'EVENT_TYPE' 'EVENT_MESSAGE' to console. + * }); + * + * const someAPIObservable = fromEventPattern( + * handler => someAPI.registerEventHandler(handler), + * handler => someAPI.unregisterEventHandler(handler) + * (eventType, eventMessage) => eventType + ' --- ' + eventMessage // without that function only 'EVENT_TYPE' + * ); // would be emitted by the Observable + * + * someAPIObservable.subscribe(value => console.log(value)); + * + * // Logs: + * // 'EVENT_TYPE --- EVENT_MESSAGE' + * ``` + * + * @see {@link fromEvent} + * @see {@link bindCallback} + * @see {@link bindNodeCallback} + * + * @param {function(handler: Function): any} addHandler A function that takes + * a `handler` function as argument and attaches it somehow to the actual + * source of events. + * @param {function(handler: Function, token?: any): void} [removeHandler] A function that + * takes a `handler` function as an argument and removes it from the event source. If `addHandler` + * returns some kind of token, `removeHandler` function will have it as a second parameter. + * @param {function(...args: any): T} [project] A function to + * transform results. It takes the arguments from the event handler and + * should return a single value. + * @return {Observable} Observable which, when an event happens, emits first parameter + * passed to registered event handler. Alternatively it emits whatever project function returns + * at that moment. + */ +export function fromEventPattern( + addHandler: (handler: NodeEventHandler) => any, + removeHandler?: (handler: NodeEventHandler, signal?: any) => void, + resultSelector?: (...args: any[]) => T +): Observable { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); + } + + return new Observable((subscriber) => { + const handler = (...e: T[]) => subscriber.next(e.length === 1 ? e[0] : e); + const retValue = addHandler(handler); + return isFunction(removeHandler) ? () => removeHandler(handler, retValue) : undefined; + }); +} diff --git a/node_modules/rxjs/src/internal/observable/fromSubscribable.ts b/node_modules/rxjs/src/internal/observable/fromSubscribable.ts new file mode 100644 index 0000000..12e45bf --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/fromSubscribable.ts @@ -0,0 +1,17 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { Subscribable } from '../types'; + +/** + * Used to convert a subscribable to an observable. + * + * Currently, this is only used within internals. + * + * TODO: Discuss ObservableInput supporting "Subscribable". + * https://github.com/ReactiveX/rxjs/issues/5909 + * + * @param subscribable A subscribable + */ +export function fromSubscribable(subscribable: Subscribable) { + return new Observable((subscriber: Subscriber) => subscribable.subscribe(subscriber)); +} diff --git a/node_modules/rxjs/src/internal/observable/generate.ts b/node_modules/rxjs/src/internal/observable/generate.ts new file mode 100644 index 0000000..e8af303 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/generate.ts @@ -0,0 +1,384 @@ +import { Observable } from '../Observable'; +import { identity } from '../util/identity'; +import { ObservableInput, SchedulerLike } from '../types'; +import { isScheduler } from '../util/isScheduler'; +import { defer } from './defer'; +import { scheduleIterable } from '../scheduled/scheduleIterable'; + +type ConditionFunc = (state: S) => boolean; +type IterateFunc = (state: S) => S; +type ResultFunc = (state: S) => T; + +export interface GenerateBaseOptions { + /** + * Initial state. + */ + initialState: S; + /** + * Condition function that accepts state and returns boolean. + * When it returns false, the generator stops. + * If not specified, a generator never stops. + */ + condition?: ConditionFunc; + /** + * Iterate function that accepts state and returns new state. + */ + iterate: IterateFunc; + /** + * SchedulerLike to use for generation process. + * By default, a generator starts immediately. + */ + scheduler?: SchedulerLike; +} + +export interface GenerateOptions extends GenerateBaseOptions { + /** + * Result selection function that accepts state and returns a value to emit. + */ + resultSelector: ResultFunc; +} + +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * + * ![](generate.png) + * + * ## Examples + * + * Produces sequence of numbers + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1, x => x); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * ``` + * + * Use `asapScheduler` + * + * ```ts + * import { generate, asapScheduler } from 'rxjs'; + * + * const result = generate(1, x => x < 5, x => x * 2, x => x + 1, asapScheduler); + * + * result.subscribe(x => console.log(x)); + * + * // Logs: + * // 2 + * // 3 + * // 5 + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {S} initialState Initial state. + * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false). + * @param {function (state: S): S} iterate Iteration step function. + * @param {function (state: S): T} resultSelector Selector function for results produced in the sequence. (deprecated) + * @param {SchedulerLike} [scheduler] A {@link SchedulerLike} on which to run the generator loop. If not provided, defaults to emit immediately. + * @returns {Observable} The generated sequence. + * @deprecated Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8. + */ +export function generate( + initialState: S, + condition: ConditionFunc, + iterate: IterateFunc, + resultSelector: ResultFunc, + scheduler?: SchedulerLike +): Observable; + +/** + * Generates an Observable by running a state-driven loop + * that emits an element on each iteration. + * + * Use it instead of nexting values in a for loop. + * + * ![](generate.png) + * + * `generate` allows you to create a stream of values generated with a loop very similar to + * a traditional for loop. The first argument of `generate` is a beginning value. The second argument + * is a function that accepts this value and tests if some condition still holds. If it does, + * then the loop continues, if not, it stops. The third value is a function which takes the + * previously defined value and modifies it in some way on each iteration. Note how these three parameters + * are direct equivalents of three expressions in a traditional for loop: the first expression + * initializes some state (for example, a numeric index), the second tests if the loop can perform the next + * iteration (for example, if the index is lower than 10) and the third states how the defined value + * will be modified on every step (for example, the index will be incremented by one). + * + * Return value of a `generate` operator is an Observable that on each loop iteration + * emits a value. First of all, the condition function is ran. If it returns true, then the Observable + * emits the currently stored value (initial value at the first iteration) and finally updates + * that value with iterate function. If at some point the condition returns false, then the Observable + * completes at that moment. + * + * Optionally you can pass a fourth parameter to `generate` - a result selector function which allows you + * to immediately map the value that would normally be emitted by an Observable. + * + * If you find three anonymous functions in `generate` call hard to read, you can provide + * a single object to the operator instead where the object has the properties: `initialState`, + * `condition`, `iterate` and `resultSelector`, which should have respective values that you + * would normally pass to `generate`. `resultSelector` is still optional, but that form + * of calling `generate` allows you to omit `condition` as well. If you omit it, that means + * condition always holds, or in other words the resulting Observable will never complete. + * + * Both forms of `generate` can optionally accept a scheduler. In case of a multi-parameter call, + * scheduler simply comes as a last argument (no matter if there is a `resultSelector` + * function or not). In case of a single-parameter call, you can provide it as a + * `scheduler` property on the object passed to the operator. In both cases, a scheduler decides when + * the next iteration of the loop will happen and therefore when the next value will be emitted + * by the Observable. For example, to ensure that each value is pushed to the Observer + * on a separate task in the event loop, you could use the `async` scheduler. Note that + * by default (when no scheduler is passed) values are simply emitted synchronously. + * + * + * ## Examples + * + * Use with condition and iterate functions + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * Use with condition, iterate and resultSelector functions + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate(0, x => x < 3, x => x + 1, x => x * 1000); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 'Complete!' + * ``` + * + * Use with options object + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition(value) { return value < 3; }, + * iterate(value) { return value + 1; }, + * resultSelector(value) { return value * 1000; } + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 'Complete!' + * ``` + * + * Use options object without condition function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * iterate(value) { return value + 1; }, + * resultSelector(value) { return value * 1000; } + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') // This will never run + * }); + * + * // Logs: + * // 0 + * // 1000 + * // 2000 + * // 3000 + * // ...and never stops. + * ``` + * + * @see {@link from} + * + * @param {S} initialState Initial state. + * @param {function (state: S): boolean} condition Condition to terminate generation (upon returning false). + * @param {function (state: S): S} iterate Iteration step function. + * @param {function (state: S): T} [resultSelector] Selector function for results produced in the sequence. + * @param {Scheduler} [scheduler] A {@link Scheduler} on which to run the generator loop. If not provided, defaults to emitting immediately. + * @return {Observable} The generated sequence. + * @deprecated Instead of passing separate arguments, use the options argument. Signatures taking separate arguments will be removed in v8. + */ +export function generate( + initialState: S, + condition: ConditionFunc, + iterate: IterateFunc, + scheduler?: SchedulerLike +): Observable; + +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * The overload accepts options object that might contain initial state, iterate, + * condition and scheduler. + * + * ![](generate.png) + * + * ## Examples + * + * Use options object with condition function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition: x => x < 3, + * iterate: x => x + 1 + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {GenerateBaseOptions} options Object that must contain initialState, iterate and might contain condition and scheduler. + * @returns {Observable} The generated sequence. + */ +export function generate(options: GenerateBaseOptions): Observable; + +/** + * Generates an observable sequence by running a state-driven loop + * producing the sequence's elements, using the specified scheduler + * to send out observer messages. + * The overload accepts options object that might contain initial state, iterate, + * condition, result selector and scheduler. + * + * ![](generate.png) + * + * ## Examples + * + * Use options object with condition and iterate function + * + * ```ts + * import { generate } from 'rxjs'; + * + * const result = generate({ + * initialState: 0, + * condition: x => x < 3, + * iterate: x => x + 1, + * resultSelector: x => x + * }); + * + * result.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 'Complete!' + * ``` + * + * @see {@link from} + * @see {@link Observable} + * + * @param {GenerateOptions} options Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler. + * @returns {Observable} The generated sequence. + */ +export function generate(options: GenerateOptions): Observable; + +export function generate( + initialStateOrOptions: S | GenerateOptions, + condition?: ConditionFunc, + iterate?: IterateFunc, + resultSelectorOrScheduler?: ResultFunc | SchedulerLike, + scheduler?: SchedulerLike +): Observable { + let resultSelector: ResultFunc; + let initialState: S; + + // TODO: Remove this as we move away from deprecated signatures + // and move towards a configuration object argument. + if (arguments.length === 1) { + // If we only have one argument, we can assume it is a configuration object. + // Note that folks not using TypeScript may trip over this. + ({ + initialState, + condition, + iterate, + resultSelector = identity as ResultFunc, + scheduler, + } = initialStateOrOptions as GenerateOptions); + } else { + // Deprecated arguments path. Figure out what the user + // passed and set it here. + initialState = initialStateOrOptions as S; + if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity as ResultFunc; + scheduler = resultSelectorOrScheduler as SchedulerLike; + } else { + resultSelector = resultSelectorOrScheduler as ResultFunc; + } + } + + // The actual generator used to "generate" values. + function* gen() { + for (let state = initialState; !condition || condition(state); state = iterate!(state)) { + yield resultSelector(state); + } + } + + // We use `defer` because we want to defer the creation of the iterator from the iterable. + return defer( + (scheduler + ? // If a scheduler was provided, use `scheduleIterable` to ensure that iteration/generation + // happens on the scheduler. + () => scheduleIterable(gen(), scheduler!) + : // Otherwise, if there's no scheduler, we can just use the generator function directly in + // `defer` and executing it will return the generator (which is iterable). + gen) as () => ObservableInput + ); +} diff --git a/node_modules/rxjs/src/internal/observable/iif.ts b/node_modules/rxjs/src/internal/observable/iif.ts new file mode 100644 index 0000000..d9ea9f1 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/iif.ts @@ -0,0 +1,85 @@ +import { Observable } from '../Observable'; +import { defer } from './defer'; +import { ObservableInput } from '../types'; + +/** + * Checks a boolean at subscription time, and chooses between one of two observable sources + * + * `iif` expects a function that returns a boolean (the `condition` function), and two sources, + * the `trueResult` and the `falseResult`, and returns an Observable. + * + * At the moment of subscription, the `condition` function is called. If the result is `true`, the + * subscription will be to the source passed as the `trueResult`, otherwise, the subscription will be + * to the source passed as the `falseResult`. + * + * If you need to check more than two options to choose between more than one observable, have a look at the {@link defer} creation method. + * + * ## Examples + * + * Change at runtime which Observable will be subscribed + * + * ```ts + * import { iif, of } from 'rxjs'; + * + * let subscribeToFirst; + * const firstOrSecond = iif( + * () => subscribeToFirst, + * of('first'), + * of('second') + * ); + * + * subscribeToFirst = true; + * firstOrSecond.subscribe(value => console.log(value)); + * + * // Logs: + * // 'first' + * + * subscribeToFirst = false; + * firstOrSecond.subscribe(value => console.log(value)); + * + * // Logs: + * // 'second' + * ``` + * + * Control access to an Observable + * + * ```ts + * import { iif, of, EMPTY } from 'rxjs'; + * + * let accessGranted; + * const observableIfYouHaveAccess = iif( + * () => accessGranted, + * of('It seems you have an access...'), + * EMPTY + * ); + * + * accessGranted = true; + * observableIfYouHaveAccess.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('The end') + * }); + * + * // Logs: + * // 'It seems you have an access...' + * // 'The end' + * + * accessGranted = false; + * observableIfYouHaveAccess.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('The end') + * }); + * + * // Logs: + * // 'The end' + * ``` + * + * @see {@link defer} + * + * @param condition Condition which Observable should be chosen. + * @param trueResult An Observable that will be subscribed if condition is true. + * @param falseResult An Observable that will be subscribed if condition is false. + * @return An observable that proxies to `trueResult` or `falseResult`, depending on the result of the `condition` function. + */ +export function iif(condition: () => boolean, trueResult: ObservableInput, falseResult: ObservableInput): Observable { + return defer(() => (condition() ? trueResult : falseResult)); +} diff --git a/node_modules/rxjs/src/internal/observable/innerFrom.ts b/node_modules/rxjs/src/internal/observable/innerFrom.ts new file mode 100644 index 0000000..c3852c1 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/innerFrom.ts @@ -0,0 +1,132 @@ +import { isArrayLike } from '../util/isArrayLike'; +import { isPromise } from '../util/isPromise'; +import { Observable } from '../Observable'; +import { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isIterable } from '../util/isIterable'; +import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; +import { Subscriber } from '../Subscriber'; +import { isFunction } from '../util/isFunction'; +import { reportUnhandledError } from '../util/reportUnhandledError'; +import { observable as Symbol_observable } from '../symbol/observable'; + +export function innerFrom>(input: O): Observable>; +export function innerFrom(input: ObservableInput): Observable { + if (input instanceof Observable) { + return input; + } + if (input != null) { + if (isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + + throw createInvalidObservableTypeError(input); +} + +/** + * Creates an RxJS Observable from an object that implements `Symbol.observable`. + * @param obj An object that properly implements `Symbol.observable`. + */ +export function fromInteropObservable(obj: any) { + return new Observable((subscriber: Subscriber) => { + const obs = obj[Symbol_observable](); + if (isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + // Should be caught by observable subscribe function error handling. + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} + +/** + * Synchronously emits the values of an array like and completes. + * This is exported because there are creation functions and operators that need to + * make direct use of the same logic, and there's no reason to make them run through + * `from` conditionals because we *know* they're dealing with an array. + * @param array The array to emit values from + */ +export function fromArrayLike(array: ArrayLike) { + return new Observable((subscriber: Subscriber) => { + // Loop over the array and emit each value. Note two things here: + // 1. We're making sure that the subscriber is not closed on each loop. + // This is so we don't continue looping over a very large array after + // something like a `take`, `takeWhile`, or other synchronous unsubscription + // has already unsubscribed. + // 2. In this form, reentrant code can alter that array we're looping over. + // This is a known issue, but considered an edge case. The alternative would + // be to copy the array before executing the loop, but this has + // performance implications. + for (let i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} + +export function fromPromise(promise: PromiseLike) { + return new Observable((subscriber: Subscriber) => { + promise + .then( + (value) => { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, + (err: any) => subscriber.error(err) + ) + .then(null, reportUnhandledError); + }); +} + +export function fromIterable(iterable: Iterable) { + return new Observable((subscriber: Subscriber) => { + for (const value of iterable) { + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + subscriber.complete(); + }); +} + +export function fromAsyncIterable(asyncIterable: AsyncIterable) { + return new Observable((subscriber: Subscriber) => { + process(asyncIterable, subscriber).catch((err) => subscriber.error(err)); + }); +} + +export function fromReadableStreamLike(readableStream: ReadableStreamLike) { + return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); +} + +async function process(asyncIterable: AsyncIterable, subscriber: Subscriber) { + for await (const value of asyncIterable) { + subscriber.next(value); + // A side-effect may have closed our subscriber, + // check before the next iteration. + if (subscriber.closed) { + return; + } + } + subscriber.complete(); +} diff --git a/node_modules/rxjs/src/internal/observable/interval.ts b/node_modules/rxjs/src/internal/observable/interval.ts new file mode 100644 index 0000000..fc1b3e0 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/interval.ts @@ -0,0 +1,58 @@ +import { Observable } from '../Observable'; +import { asyncScheduler } from '../scheduler/async'; +import { SchedulerLike } from '../types'; +import { timer } from './timer'; + +/** + * Creates an Observable that emits sequential numbers every specified + * interval of time, on a specified {@link SchedulerLike}. + * + * Emits incremental numbers periodically in time. + * + * ![](interval.png) + * + * `interval` returns an Observable that emits an infinite sequence of + * ascending integers, with a constant interval of time of your choosing + * between those emissions. The first emission is not sent immediately, but + * only after the first period has passed. By default, this operator uses the + * `async` {@link SchedulerLike} to provide a notion of time, but you may pass any + * {@link SchedulerLike} to it. + * + * ## Example + * + * Emits ascending numbers, one every second (1000ms) up to the number 3 + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const numbers = interval(1000); + * + * const takeFourNumbers = numbers.pipe(take(4)); + * + * takeFourNumbers.subscribe(x => console.log('Next: ', x)); + * + * // Logs: + * // Next: 0 + * // Next: 1 + * // Next: 2 + * // Next: 3 + * ``` + * + * @see {@link timer} + * @see {@link delay} + * + * @param {number} [period=0] The interval size in milliseconds (by default) + * or the time unit determined by the scheduler's clock. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for scheduling + * the emission of values, and providing a notion of "time". + * @return {Observable} An Observable that emits a sequential number each time + * interval. + */ +export function interval(period = 0, scheduler: SchedulerLike = asyncScheduler): Observable { + if (period < 0) { + // We cannot schedule an interval in the past. + period = 0; + } + + return timer(period, period, scheduler); +} diff --git a/node_modules/rxjs/src/internal/observable/merge.ts b/node_modules/rxjs/src/internal/observable/merge.ts new file mode 100644 index 0000000..26d35f4 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/merge.ts @@ -0,0 +1,102 @@ +import { Observable } from '../Observable'; +import { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types'; +import { mergeAll } from '../operators/mergeAll'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from './from'; + +export function merge(...sources: [...ObservableInputTuple]): Observable; +export function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number?]): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function merge( + ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike?] +): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function merge( + ...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number?, SchedulerLike?] +): Observable; + +/** + * Creates an output Observable which concurrently emits all values from every + * given input Observable. + * + * Flattens multiple Observables together by blending + * their values into one Observable. + * + * ![](merge.png) + * + * `merge` subscribes to each given input Observable (as arguments), and simply + * forwards (without doing any transformation) all the values from all the input + * Observables to the output Observable. The output Observable only completes + * once all input Observables have completed. Any error delivered by an input + * Observable will be immediately emitted on the output Observable. + * + * ## Examples + * + * Merge together two Observables: 1s interval and clicks + * + * ```ts + * import { merge, fromEvent, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const timer = interval(1000); + * const clicksOrTimer = merge(clicks, timer); + * clicksOrTimer.subscribe(x => console.log(x)); + * + * // Results in the following: + * // timer will emit ascending values, one every second(1000ms) to console + * // clicks logs MouseEvents to console every time the "document" is clicked + * // Since the two streams are merged you see these happening + * // as they occur. + * ``` + * + * Merge together 3 Observables, but run only 2 concurrently + * + * ```ts + * import { interval, take, merge } from 'rxjs'; + * + * const timer1 = interval(1000).pipe(take(10)); + * const timer2 = interval(2000).pipe(take(6)); + * const timer3 = interval(500).pipe(take(10)); + * + * const concurrent = 2; // the argument + * const merged = merge(timer1, timer2, timer3, concurrent); + * merged.subscribe(x => console.log(x)); + * + * // Results in the following: + * // - First timer1 and timer2 will run concurrently + * // - timer1 will emit a value every 1000ms for 10 iterations + * // - timer2 will emit a value every 2000ms for 6 iterations + * // - after timer1 hits its max iteration, timer2 will + * // continue, and timer3 will start to run concurrently with timer2 + * // - when timer2 hits its max iteration it terminates, and + * // timer3 will continue to emit a value every 500ms until it is complete + * ``` + * + * @see {@link mergeAll} + * @see {@link mergeMap} + * @see {@link mergeMapTo} + * @see {@link mergeScan} + * + * @param {...ObservableInput} observables Input Observables to merge together. + * @param {number} [concurrent=Infinity] Maximum number of input + * Observables being subscribed to concurrently. + * @param {SchedulerLike} [scheduler=null] The {@link SchedulerLike} to use for managing + * concurrency of input Observables. + * @return {Observable} an Observable that emits items that are the result of + * every input Observable. + */ +export function merge(...args: (ObservableInput | number | SchedulerLike)[]): Observable { + const scheduler = popScheduler(args); + const concurrent = popNumber(args, Infinity); + const sources = args as ObservableInput[]; + return !sources.length + ? // No source provided + EMPTY + : sources.length === 1 + ? // One source? Just return it. + innerFrom(sources[0]) + : // Merge all sources + mergeAll(concurrent)(from(sources, scheduler)); +} diff --git a/node_modules/rxjs/src/internal/observable/never.ts b/node_modules/rxjs/src/internal/observable/never.ts new file mode 100644 index 0000000..cfbec7d --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/never.ts @@ -0,0 +1,44 @@ +import { Observable } from '../Observable'; +import { noop } from '../util/noop'; + +/** + * An Observable that emits no items to the Observer and never completes. + * + * ![](never.png) + * + * A simple Observable that emits neither values nor errors nor the completion + * notification. It can be used for testing purposes or for composing with other + * Observables. Please note that by never emitting a complete notification, this + * Observable keeps the subscription from being disposed automatically. + * Subscriptions need to be manually disposed. + * + * ## Example + * + * Emit the number 7, then never emit anything else (not even complete) + * + * ```ts + * import { NEVER, startWith } from 'rxjs'; + * + * const info = () => console.log('Will not be called'); + * + * const result = NEVER.pipe(startWith(7)); + * result.subscribe({ + * next: x => console.log(x), + * error: info, + * complete: info + * }); + * ``` + * + * @see {@link Observable} + * @see {@link EMPTY} + * @see {@link of} + * @see {@link throwError} + */ +export const NEVER = new Observable(noop); + +/** + * @deprecated Replaced with the {@link NEVER} constant. Will be removed in v8. + */ +export function never() { + return NEVER; +} diff --git a/node_modules/rxjs/src/internal/observable/of.ts b/node_modules/rxjs/src/internal/observable/of.ts new file mode 100644 index 0000000..dc0c918 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/of.ts @@ -0,0 +1,83 @@ +import { SchedulerLike, ValueFromArray } from '../types'; +import { Observable } from '../Observable'; +import { popScheduler } from '../util/args'; +import { from } from './from'; + +// Devs are more likely to pass null or undefined than they are a scheduler +// without accompanying values. To make things easier for (naughty) devs who +// use the `strictNullChecks: false` TypeScript compiler option, these +// overloads with explicit null and undefined values are included. + +export function of(value: null): Observable; +export function of(value: undefined): Observable; + +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function of(scheduler: SchedulerLike): Observable; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function of(...valuesAndScheduler: [...A, SchedulerLike]): Observable>; + +export function of(): Observable; +/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ +export function of(): Observable; +export function of(value: T): Observable; +export function of(...values: A): Observable>; + +/** + * Converts the arguments to an observable sequence. + * + * Each argument becomes a `next` notification. + * + * ![](of.png) + * + * Unlike {@link from}, it does not do any flattening and emits each argument in whole + * as a separate `next` notification. + * + * ## Examples + * + * Emit the values `10, 20, 30` + * + * ```ts + * import { of } from 'rxjs'; + * + * of(10, 20, 30) + * .subscribe({ + * next: value => console.log('next:', value), + * error: err => console.log('error:', err), + * complete: () => console.log('the end'), + * }); + * + * // Outputs + * // next: 10 + * // next: 20 + * // next: 30 + * // the end + * ``` + * + * Emit the array `[1, 2, 3]` + * + * ```ts + * import { of } from 'rxjs'; + * + * of([1, 2, 3]) + * .subscribe({ + * next: value => console.log('next:', value), + * error: err => console.log('error:', err), + * complete: () => console.log('the end'), + * }); + * + * // Outputs + * // next: [1, 2, 3] + * // the end + * ``` + * + * @see {@link from} + * @see {@link range} + * + * @param {...T} values A comma separated list of arguments you want to be emitted + * @return {Observable} An Observable that emits the arguments + * described above and then completes. + */ +export function of(...args: Array): Observable { + const scheduler = popScheduler(args); + return from(args as T[], scheduler); +} diff --git a/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts b/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts new file mode 100644 index 0000000..ef62c03 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts @@ -0,0 +1,101 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple } from '../types'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { OperatorSubscriber } from '../operators/OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from './innerFrom'; + +/* tslint:disable:max-line-length */ +export function onErrorResumeNext(sources: [...ObservableInputTuple]): Observable; +export function onErrorResumeNext(...sources: [...ObservableInputTuple]): Observable; + +/* tslint:enable:max-line-length */ + +/** + * When any of the provided Observable emits a complete or an error notification, it immediately subscribes to the next one + * that was passed. + * + * Execute series of Observables no matter what, even if it means swallowing errors. + * + * ![](onErrorResumeNext.png) + * + * `onErrorResumeNext` will subscribe to each observable source it is provided, in order. + * If the source it's subscribed to emits an error or completes, it will move to the next source + * without error. + * + * If `onErrorResumeNext` is provided no arguments, or a single, empty array, it will return {@link EMPTY}. + * + * `onErrorResumeNext` is basically {@link concat}, only it will continue, even if one of its + * sources emits an error. + * + * Note that there is no way to handle any errors thrown by sources via the result of + * `onErrorResumeNext`. If you want to handle errors thrown in any given source, you can + * always use the {@link catchError} operator on them before passing them into `onErrorResumeNext`. + * + * ## Example + * + * Subscribe to the next Observable after map fails + * + * ```ts + * import { onErrorResumeNext, of, map } from 'rxjs'; + * + * onErrorResumeNext( + * of(1, 2, 3, 0).pipe( + * map(x => { + * if (x === 0) { + * throw Error(); + * } + * return 10 / x; + * }) + * ), + * of(1, 2, 3) + * ) + * .subscribe({ + * next: value => console.log(value), + * error: err => console.log(err), // Will never be called. + * complete: () => console.log('done') + * }); + * + * // Logs: + * // 10 + * // 5 + * // 3.3333333333333335 + * // 1 + * // 2 + * // 3 + * // 'done' + * ``` + * + * @see {@link concat} + * @see {@link catchError} + * + * @param {...ObservableInput} sources Observables (or anything that *is* observable) passed either directly or as an array. + * @return {Observable} An Observable that concatenates all sources, one after the other, + * ignoring all errors, such that any error causes it to move on to the next source. + */ +export function onErrorResumeNext( + ...sources: [[...ObservableInputTuple]] | [...ObservableInputTuple] +): Observable { + const nextSources: ObservableInputTuple = argsOrArgArray(sources) as any; + + return new Observable((subscriber) => { + let sourceIndex = 0; + const subscribeNext = () => { + if (sourceIndex < nextSources.length) { + let nextSource: Observable; + try { + nextSource = innerFrom(nextSources[sourceIndex++]); + } catch (err) { + subscribeNext(); + return; + } + const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } else { + subscriber.complete(); + } + }; + subscribeNext(); + }); +} diff --git a/node_modules/rxjs/src/internal/observable/pairs.ts b/node_modules/rxjs/src/internal/observable/pairs.ts new file mode 100644 index 0000000..4dafb9f --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/pairs.ts @@ -0,0 +1,82 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +import { from } from './from'; + +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export function pairs(arr: readonly T[], scheduler?: SchedulerLike): Observable<[string, T]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export function pairs>(obj: O, scheduler?: SchedulerLike): Observable<[keyof O, O[keyof O]]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export function pairs(iterable: Iterable, scheduler?: SchedulerLike): Observable<[string, T]>; +/** + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export function pairs( + n: number | bigint | boolean | ((...args: any[]) => any) | symbol, + scheduler?: SchedulerLike +): Observable<[never, never]>; + +/** + * Convert an object into an Observable of `[key, value]` pairs. + * + * Turn entries of an object into a stream. + * + * ![](pairs.png) + * + * `pairs` takes an arbitrary object and returns an Observable that emits arrays. Each + * emitted array has exactly two elements - the first is a key from the object + * and the second is a value corresponding to that key. Keys are extracted from + * an object via `Object.keys` function, which means that they will be only + * enumerable keys that are present on an object directly - not ones inherited + * via prototype chain. + * + * By default, these arrays are emitted synchronously. To change that you can + * pass a {@link SchedulerLike} as a second argument to `pairs`. + * + * ## Example + * + * Converts an object to an Observable + * + * ```ts + * import { pairs } from 'rxjs'; + * + * const obj = { + * foo: 42, + * bar: 56, + * baz: 78 + * }; + * + * pairs(obj).subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // ['foo', 42] + * // ['bar', 56] + * // ['baz', 78] + * // 'Complete!' + * ``` + * + * ### Object.entries required + * + * In IE, you will need to polyfill `Object.entries` in order to use this. + * [MDN has a polyfill here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) + * + * @param {Object} obj The object to inspect and turn into an + * Observable sequence. + * @param {Scheduler} [scheduler] An optional IScheduler to schedule + * when resulting Observable will emit values. + * @returns {(Observable>)} An observable sequence of + * [key, value] pairs from the object. + * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. + */ +export function pairs(obj: any, scheduler?: SchedulerLike) { + return from(Object.entries(obj), scheduler as any); +} diff --git a/node_modules/rxjs/src/internal/observable/partition.ts b/node_modules/rxjs/src/internal/observable/partition.ts new file mode 100644 index 0000000..d69db66 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/partition.ts @@ -0,0 +1,88 @@ +import { not } from '../util/not'; +import { filter } from '../operators/filter'; +import { ObservableInput } from '../types'; +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; + +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function partition( + source: ObservableInput, + predicate: (this: A, value: T, index: number) => value is U, + thisArg: A +): [Observable, Observable>]; +export function partition( + source: ObservableInput, + predicate: (value: T, index: number) => value is U +): [Observable, Observable>]; + +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function partition( + source: ObservableInput, + predicate: (this: A, value: T, index: number) => boolean, + thisArg: A +): [Observable, Observable]; +export function partition(source: ObservableInput, predicate: (value: T, index: number) => boolean): [Observable, Observable]; + +/** + * Splits the source Observable into two, one with values that satisfy a + * predicate, and another with values that don't satisfy the predicate. + * + * It's like {@link filter}, but returns two Observables: + * one like the output of {@link filter}, and the other with values that did not + * pass the condition. + * + * ![](partition.png) + * + * `partition` outputs an array with two Observables that partition the values + * from the source Observable through the given `predicate` function. The first + * Observable in that array emits source values for which the predicate argument + * returns true. The second Observable emits source values for which the + * predicate returns false. The first behaves like {@link filter} and the second + * behaves like {@link filter} with the predicate negated. + * + * ## Example + * + * Partition a set of numbers into odds and evens observables + * + * ```ts + * import { of, partition } from 'rxjs'; + * + * const observableValues = of(1, 2, 3, 4, 5, 6); + * const [evens$, odds$] = partition(observableValues, value => value % 2 === 0); + * + * odds$.subscribe(x => console.log('odds', x)); + * evens$.subscribe(x => console.log('evens', x)); + * + * // Logs: + * // odds 1 + * // odds 3 + * // odds 5 + * // evens 2 + * // evens 4 + * // evens 6 + * ``` + * + * @see {@link filter} + * + * @param {function(value: T, index: number): boolean} predicate A function that + * evaluates each value emitted by the source Observable. If it returns `true`, + * the value is emitted on the first Observable in the returned array, if + * `false` the value is emitted on the second Observable in the array. The + * `index` parameter is the number `i` for the i-th source emission that has + * happened since the subscription, starting from the number `0`. + * @param {any} [thisArg] An optional argument to determine the value of `this` + * in the `predicate` function. + * @return {[Observable, Observable]} An array with two Observables: one + * with values that passed the predicate, and another with values that did not + * pass the predicate. + */ +export function partition( + source: ObservableInput, + predicate: (this: any, value: T, index: number) => boolean, + thisArg?: any +): [Observable, Observable] { + return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))] as [ + Observable, + Observable + ]; +} diff --git a/node_modules/rxjs/src/internal/observable/race.ts b/node_modules/rxjs/src/internal/observable/race.ts new file mode 100644 index 0000000..59b8d0b --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/race.ts @@ -0,0 +1,88 @@ +import { Observable } from '../Observable'; +import { innerFrom } from './innerFrom'; +import { Subscription } from '../Subscription'; +import { ObservableInput, ObservableInputTuple } from '../types'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { Subscriber } from '../Subscriber'; + +export function race(inputs: [...ObservableInputTuple]): Observable; +export function race(...inputs: [...ObservableInputTuple]): Observable; + +/** + * Returns an observable that mirrors the first source observable to emit an item. + * + * ![](race.png) + * + * `race` returns an observable, that when subscribed to, subscribes to all source observables immediately. + * As soon as one of the source observables emits a value, the result unsubscribes from the other sources. + * The resulting observable will forward all notifications, including error and completion, from the "winning" + * source observable. + * + * If one of the used source observable throws an errors before a first notification + * the race operator will also throw an error, no matter if another source observable + * could potentially win the race. + * + * `race` can be useful for selecting the response from the fastest network connection for + * HTTP or WebSockets. `race` can also be useful for switching observable context based on user + * input. + * + * ## Example + * + * Subscribes to the observable that was the first to start emitting. + * + * ```ts + * import { interval, map, race } from 'rxjs'; + * + * const obs1 = interval(7000).pipe(map(() => 'slow one')); + * const obs2 = interval(3000).pipe(map(() => 'fast one')); + * const obs3 = interval(5000).pipe(map(() => 'medium one')); + * + * race(obs1, obs2, obs3) + * .subscribe(winner => console.log(winner)); + * + * // Outputs + * // a series of 'fast one' + * ``` + * + * @param {...Observables} ...observables sources used to race for which Observable emits first. + * @return {Observable} an Observable that mirrors the output of the first Observable to emit an item. + */ +export function race(...sources: (ObservableInput | ObservableInput[])[]): Observable { + sources = argsOrArgArray(sources); + // If only one source was passed, just return it. Otherwise return the race. + return sources.length === 1 ? innerFrom(sources[0] as ObservableInput) : new Observable(raceInit(sources as ObservableInput[])); +} + +/** + * An observable initializer function for both the static version and the + * operator version of race. + * @param sources The sources to race + */ +export function raceInit(sources: ObservableInput[]) { + return (subscriber: Subscriber) => { + let subscriptions: Subscription[] = []; + + // Subscribe to all of the sources. Note that we are checking `subscriptions` here + // Is is an array of all actively "racing" subscriptions, and it is `null` after the + // race has been won. So, if we have racer that synchronously "wins", this loop will + // stop before it subscribes to any more. + for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + subscriptions.push( + innerFrom(sources[i] as ObservableInput).subscribe( + createOperatorSubscriber(subscriber, (value) => { + if (subscriptions) { + // We're still racing, but we won! So unsubscribe + // all other subscriptions that we have, except this one. + for (let s = 0; s < subscriptions.length; s++) { + s !== i && subscriptions[s].unsubscribe(); + } + subscriptions = null!; + } + subscriber.next(value); + }) + ) + ); + } + }; +} diff --git a/node_modules/rxjs/src/internal/observable/range.ts b/node_modules/rxjs/src/internal/observable/range.ts new file mode 100644 index 0000000..314ac1b --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/range.ts @@ -0,0 +1,94 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +import { EMPTY } from './empty'; + +export function range(start: number, count?: number): Observable; + +/** + * @deprecated The `scheduler` parameter will be removed in v8. Use `range(start, count).pipe(observeOn(scheduler))` instead. Details: Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export function range(start: number, count: number | undefined, scheduler: SchedulerLike): Observable; + +/** + * Creates an Observable that emits a sequence of numbers within a specified + * range. + * + * Emits a sequence of numbers in a range. + * + * ![](range.png) + * + * `range` operator emits a range of sequential integers, in order, where you + * select the `start` of the range and its `length`. By default, uses no + * {@link SchedulerLike} and just delivers the notifications synchronously, but may use + * an optional {@link SchedulerLike} to regulate those deliveries. + * + * ## Example + * + * Produce a range of numbers + * + * ```ts + * import { range } from 'rxjs'; + * + * const numbers = range(1, 3); + * + * numbers.subscribe({ + * next: value => console.log(value), + * complete: () => console.log('Complete!') + * }); + * + * // Logs: + * // 1 + * // 2 + * // 3 + * // 'Complete!' + * ``` + * + * @see {@link timer} + * @see {@link interval} + * + * @param {number} [start=0] The value of the first integer in the sequence. + * @param {number} count The number of sequential integers to generate. + * @param {SchedulerLike} [scheduler] A {@link SchedulerLike} to use for scheduling + * the emissions of the notifications. + * @return {Observable} An Observable of numbers that emits a finite range of + * sequential integers. + */ +export function range(start: number, count?: number, scheduler?: SchedulerLike): Observable { + if (count == null) { + // If one argument was passed, it's the count, not the start. + count = start; + start = 0; + } + + if (count <= 0) { + // No count? We're going nowhere. Return EMPTY. + return EMPTY; + } + + // Where the range should stop. + const end = count + start; + + return new Observable( + scheduler + ? // The deprecated scheduled path. + (subscriber) => { + let n = start; + return scheduler.schedule(function () { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } + : // Standard synchronous range. + (subscriber) => { + let n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + } + ); +} diff --git a/node_modules/rxjs/src/internal/observable/throwError.ts b/node_modules/rxjs/src/internal/observable/throwError.ts new file mode 100644 index 0000000..a307f5a --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/throwError.ts @@ -0,0 +1,125 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { SchedulerLike } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** + * Creates an observable that will create an error instance and push it to the consumer as an error + * immediately upon subscription. + * + * Just errors and does nothing else + * + * ![](throw.png) + * + * This creation function is useful for creating an observable that will create an error and error every + * time it is subscribed to. Generally, inside of most operators when you might want to return an errored + * observable, this is unnecessary. In most cases, such as in the inner return of {@link concatMap}, + * {@link mergeMap}, {@link defer}, and many others, you can simply throw the error, and RxJS will pick + * that up and notify the consumer of the error. + * + * ## Example + * + * Create a simple observable that will create a new error with a timestamp and log it + * and the message every time you subscribe to it + * + * ```ts + * import { throwError } from 'rxjs'; + * + * let errorCount = 0; + * + * const errorWithTimestamp$ = throwError(() => { + * const error: any = new Error(`This is error number ${ ++errorCount }`); + * error.timestamp = Date.now(); + * return error; + * }); + * + * errorWithTimestamp$.subscribe({ + * error: err => console.log(err.timestamp, err.message) + * }); + * + * errorWithTimestamp$.subscribe({ + * error: err => console.log(err.timestamp, err.message) + * }); + * + * // Logs the timestamp and a new error message for each subscription + * ``` + * + * ### Unnecessary usage + * + * Using `throwError` inside of an operator or creation function + * with a callback, is usually not necessary + * + * ```ts + * import { of, concatMap, timer, throwError } from 'rxjs'; + * + * const delays$ = of(1000, 2000, Infinity, 3000); + * + * delays$.pipe( + * concatMap(ms => { + * if (ms < 10000) { + * return timer(ms); + * } else { + * // This is probably overkill. + * return throwError(() => new Error(`Invalid time ${ ms }`)); + * } + * }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * You can just throw the error instead + * + * ```ts + * import { of, concatMap, timer } from 'rxjs'; + * + * const delays$ = of(1000, 2000, Infinity, 3000); + * + * delays$.pipe( + * concatMap(ms => { + * if (ms < 10000) { + * return timer(ms); + * } else { + * // Cleaner and easier to read for most folks. + * throw new Error(`Invalid time ${ ms }`); + * } + * }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * @param errorFactory A factory function that will create the error instance that is pushed. + */ +export function throwError(errorFactory: () => any): Observable; + +/** + * Returns an observable that will error with the specified error immediately upon subscription. + * + * @param error The error instance to emit + * @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is + * because it will create the error at the moment it should be created and capture a more appropriate stack trace. If + * for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`. + */ +export function throwError(error: any): Observable; + +/** + * Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription. + * + * @param errorOrErrorFactory An error instance or error factory + * @param scheduler A scheduler to use to schedule the error notification + * @deprecated The `scheduler` parameter will be removed in v8. + * Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`. + * Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable; + +export function throwError(errorOrErrorFactory: any, scheduler?: SchedulerLike): Observable { + const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; + const init = (subscriber: Subscriber) => subscriber.error(errorFactory()); + return new Observable(scheduler ? (subscriber) => scheduler.schedule(init as any, 0, subscriber) : init); +} diff --git a/node_modules/rxjs/src/internal/observable/timer.ts b/node_modules/rxjs/src/internal/observable/timer.ts new file mode 100644 index 0000000..dcc2745 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/timer.ts @@ -0,0 +1,186 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +import { async as asyncScheduler } from '../scheduler/async'; +import { isScheduler } from '../util/isScheduler'; +import { isValidDate } from '../util/isDate'; + +/** + * Creates an observable that will wait for a specified time period, or exact date, before + * emitting the number 0. + * + * Used to emit a notification after a delay. + * + * This observable is useful for creating delays in code, or racing against other values + * for ad-hoc timeouts. + * + * The `delay` is specified by default in milliseconds, however providing a custom scheduler could + * create a different behavior. + * + * ## Examples + * + * Wait 3 seconds and start another observable + * + * You might want to use `timer` to delay subscription to an + * observable by a set amount of time. Here we use a timer with + * {@link concatMapTo} or {@link concatMap} in order to wait + * a few seconds and start a subscription to a source. + * + * ```ts + * import { of, timer, concatMap } from 'rxjs'; + * + * // This could be any observable + * const source = of(1, 2, 3); + * + * timer(3000) + * .pipe(concatMap(() => source)) + * .subscribe(console.log); + * ``` + * + * Take all values until the start of the next minute + * + * Using a `Date` as the trigger for the first emission, you can + * do things like wait until midnight to fire an event, or in this case, + * wait until a new minute starts (chosen so the example wouldn't take + * too long to run) in order to stop watching a stream. Leveraging + * {@link takeUntil}. + * + * ```ts + * import { interval, takeUntil, timer } from 'rxjs'; + * + * // Build a Date object that marks the + * // next minute. + * const currentDate = new Date(); + * const startOfNextMinute = new Date( + * currentDate.getFullYear(), + * currentDate.getMonth(), + * currentDate.getDate(), + * currentDate.getHours(), + * currentDate.getMinutes() + 1 + * ); + * + * // This could be any observable stream + * const source = interval(1000); + * + * const result = source.pipe( + * takeUntil(timer(startOfNextMinute)) + * ); + * + * result.subscribe(console.log); + * ``` + * + * ### Known Limitations + * + * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. + * + * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and + * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission + * should occur will be incorrect. In this case, it would be best to do your own calculations + * ahead of time, and pass a `number` in as the `dueTime`. + * + * @param due If a `number`, the amount of time in milliseconds to wait before emitting. + * If a `Date`, the exact time at which to emit. + * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. + */ +export function timer(due: number | Date, scheduler?: SchedulerLike): Observable<0>; + +/** + * Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` -- + * on each interval after words. + * + * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could + * create a different behavior. + * + * ## Example + * + * ### Start an interval that starts right away + * + * Since {@link interval} waits for the passed delay before starting, + * sometimes that's not ideal. You may want to start an interval immediately. + * `timer` works well for this. Here we have both side-by-side so you can + * see them in comparison. + * + * Note that this observable will never complete. + * + * ```ts + * import { timer, interval } from 'rxjs'; + * + * timer(0, 1000).subscribe(n => console.log('timer', n)); + * interval(1000).subscribe(n => console.log('interval', n)); + * ``` + * + * ### Known Limitations + * + * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. + * + * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and + * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission + * should occur will be incorrect. In this case, it would be best to do your own calculations + * ahead of time, and pass a `number` in as the `startDue`. + * @param startDue If a `number`, is the time to wait before starting the interval. + * If a `Date`, is the exact time at which to start the interval. + * @param intervalDuration The delay between each value emitted in the interval. Passing a + * negative number here will result in immediate completion after the first value is emitted, as though + * no `intervalDuration` was passed at all. + * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. + */ +export function timer(startDue: number | Date, intervalDuration: number, scheduler?: SchedulerLike): Observable; + +/** + * @deprecated The signature allowing `undefined` to be passed for `intervalDuration` will be removed in v8. Use the `timer(dueTime, scheduler?)` signature instead. + */ +export function timer(dueTime: number | Date, unused: undefined, scheduler?: SchedulerLike): Observable<0>; + +export function timer( + dueTime: number | Date = 0, + intervalOrScheduler?: number | SchedulerLike, + scheduler: SchedulerLike = asyncScheduler +): Observable { + // Since negative intervalDuration is treated as though no + // interval was specified at all, we start with a negative number. + let intervalDuration = -1; + + if (intervalOrScheduler != null) { + // If we have a second argument, and it's a scheduler, + // override the scheduler we had defaulted. Otherwise, + // it must be an interval. + if (isScheduler(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } else { + // Note that this *could* be negative, in which case + // it's like not passing an intervalDuration at all. + intervalDuration = intervalOrScheduler; + } + } + + return new Observable((subscriber) => { + // If a valid date is passed, calculate how long to wait before + // executing the first value... otherwise, if it's a number just schedule + // that many milliseconds (or scheduler-specified unit size) in the future. + let due = isValidDate(dueTime) ? +dueTime - scheduler!.now() : dueTime; + + if (due < 0) { + // Ensure we don't schedule in the future. + due = 0; + } + + // The incrementing value we emit. + let n = 0; + + // Start the timer. + return scheduler.schedule(function () { + if (!subscriber.closed) { + // Emit the next value and increment. + subscriber.next(n++); + + if (0 <= intervalDuration) { + // If we have a interval after the initial timer, + // reschedule with the period. + this.schedule(undefined, intervalDuration); + } else { + // We didn't have an interval. So just complete. + subscriber.complete(); + } + } + }, due); + }); +} diff --git a/node_modules/rxjs/src/internal/observable/using.ts b/node_modules/rxjs/src/internal/observable/using.ts new file mode 100644 index 0000000..437fed9 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/using.ts @@ -0,0 +1,51 @@ +import { Observable } from '../Observable'; +import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types'; +import { innerFrom } from './innerFrom'; +import { EMPTY } from './empty'; + +/** + * Creates an Observable that uses a resource which will be disposed at the same time as the Observable. + * + * Use it when you catch yourself cleaning up after an Observable. + * + * `using` is a factory operator, which accepts two functions. First function returns a disposable resource. + * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with + * that object and should return an Observable. That Observable can use resource object during its execution. + * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor + * resource object will be shared in any way between subscriptions. + * + * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed + * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output + * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself, + * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which + * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone + * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make + * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time. + * + * @see {@link defer} + * + * @param {function(): ISubscription} resourceFactory A function which creates any resource object + * that implements `unsubscribe` method. + * @param {function(resource: ISubscription): Observable} observableFactory A function which + * creates an Observable, that can use injected resource object. + * @return {Observable} An Observable that behaves the same as Observable returned by `observableFactory`, but + * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object. + */ +export function using>( + resourceFactory: () => Unsubscribable | void, + observableFactory: (resource: Unsubscribable | void) => T | void +): Observable> { + return new Observable>((subscriber) => { + const resource = resourceFactory(); + const result = observableFactory(resource); + const source = result ? innerFrom(result) : EMPTY; + source.subscribe(subscriber); + return () => { + // NOTE: Optional chaining did not work here. + // Related TS Issue: https://github.com/microsoft/TypeScript/issues/40818 + if (resource) { + resource.unsubscribe(); + } + }; + }); +} diff --git a/node_modules/rxjs/src/internal/observable/zip.ts b/node_modules/rxjs/src/internal/observable/zip.ts new file mode 100644 index 0000000..e7c5849 --- /dev/null +++ b/node_modules/rxjs/src/internal/observable/zip.ts @@ -0,0 +1,115 @@ +import { Observable } from '../Observable'; +import { ObservableInputTuple } from '../types'; +import { innerFrom } from './innerFrom'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { EMPTY } from './empty'; +import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; +import { popResultSelector } from '../util/args'; + +export function zip(sources: [...ObservableInputTuple]): Observable; +export function zip( + sources: [...ObservableInputTuple], + resultSelector: (...values: A) => R +): Observable; +export function zip(...sources: [...ObservableInputTuple]): Observable; +export function zip( + ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] +): Observable; + +/** + * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each + * of its input Observables. + * + * If the last parameter is a function, this function is used to compute the created value from the input values. + * Otherwise, an array of the input values is returned. + * + * ## Example + * + * Combine age and name from different sources + * + * ```ts + * import { of, zip, map } from 'rxjs'; + * + * const age$ = of(27, 25, 29); + * const name$ = of('Foo', 'Bar', 'Beer'); + * const isDev$ = of(true, true, false); + * + * zip(age$, name$, isDev$).pipe( + * map(([age, name, isDev]) => ({ age, name, isDev })) + * ) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // { age: 27, name: 'Foo', isDev: true } + * // { age: 25, name: 'Bar', isDev: true } + * // { age: 29, name: 'Beer', isDev: false } + * ``` + * + * @param sources + * @return {Observable} + */ +export function zip(...args: unknown[]): Observable { + const resultSelector = popResultSelector(args); + + const sources = argsOrArgArray(args) as Observable[]; + + return sources.length + ? new Observable((subscriber) => { + // A collection of buffers of values from each source. + // Keyed by the same index with which the sources were passed in. + let buffers: unknown[][] = sources.map(() => []); + + // An array of flags of whether or not the sources have completed. + // This is used to check to see if we should complete the result. + // Keyed by the same index with which the sources were passed in. + let completed = sources.map(() => false); + + // When everything is done, release the arrays above. + subscriber.add(() => { + buffers = completed = null!; + }); + + // Loop over our sources and subscribe to each one. The index `i` is + // especially important here, because we use it in closures below to + // access the related buffers and completion properties + for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + innerFrom(sources[sourceIndex]).subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + buffers[sourceIndex].push(value); + // if every buffer has at least one value in it, then we + // can shift out the oldest value from each buffer and emit + // them as an array. + if (buffers.every((buffer) => buffer.length)) { + const result: any = buffers.map((buffer) => buffer.shift()!); + // Emit the array. If theres' a result selector, use that. + subscriber.next(resultSelector ? resultSelector(...result) : result); + // If any one of the sources is both complete and has an empty buffer + // then we complete the result. This is because we cannot possibly have + // any more values to zip together. + if (buffers.some((buffer, i) => !buffer.length && completed[i])) { + subscriber.complete(); + } + } + }, + () => { + // This source completed. Mark it as complete so we can check it later + // if we have to. + completed[sourceIndex] = true; + // But, if this complete source has nothing in its buffer, then we + // can complete the result, because we can't possibly have any more + // values from this to zip together with the other values. + !buffers[sourceIndex].length && subscriber.complete(); + } + ) + ); + } + + // When everything is done, release the arrays above. + return () => { + buffers = completed = null!; + }; + }) + : EMPTY; +} diff --git a/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts b/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts new file mode 100644 index 0000000..593b937 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts @@ -0,0 +1,112 @@ +import { Subscriber } from '../Subscriber'; + +/** + * Creates an instance of an `OperatorSubscriber`. + * @param destination The downstream subscriber. + * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any + * error that occurs in this function is caught and sent to the `error` method of this subscriber. + * @param onError Handles errors from the subscription, any errors that occur in this handler are caught + * and send to the `destination` error handler. + * @param onComplete Handles completion notification from the subscription. Any errors that occur in + * this handler are sent to the `destination` error handler. + * @param onFinalize Additional teardown logic here. This will only be called on teardown if the + * subscriber itself is not already closed. This is called after all other teardown logic is executed. + */ +export function createOperatorSubscriber( + destination: Subscriber, + onNext?: (value: T) => void, + onComplete?: () => void, + onError?: (err: any) => void, + onFinalize?: () => void +): Subscriber { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} + +/** + * A generic helper for allowing operators to be created with a Subscriber and + * use closures to capture necessary state from the operator function itself. + */ +export class OperatorSubscriber extends Subscriber { + /** + * Creates an instance of an `OperatorSubscriber`. + * @param destination The downstream subscriber. + * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any + * error that occurs in this function is caught and sent to the `error` method of this subscriber. + * @param onError Handles errors from the subscription, any errors that occur in this handler are caught + * and send to the `destination` error handler. + * @param onComplete Handles completion notification from the subscription. Any errors that occur in + * this handler are sent to the `destination` error handler. + * @param onFinalize Additional finalization logic here. This will only be called on finalization if the + * subscriber itself is not already closed. This is called after all other finalization logic is executed. + * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe. + * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription + * to the resulting observable does not actually disconnect from the source if there are active subscriptions + * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!) + */ + constructor( + destination: Subscriber, + onNext?: (value: T) => void, + onComplete?: () => void, + onError?: (err: any) => void, + private onFinalize?: () => void, + private shouldUnsubscribe?: () => boolean + ) { + // It's important - for performance reasons - that all of this class's + // members are initialized and that they are always initialized in the same + // order. This will ensure that all OperatorSubscriber instances have the + // same hidden class in V8. This, in turn, will help keep the number of + // hidden classes involved in property accesses within the base class as + // low as possible. If the number of hidden classes involved exceeds four, + // the property accesses will become megamorphic and performance penalties + // will be incurred - i.e. inline caches won't be used. + // + // The reasons for ensuring all instances have the same hidden class are + // further discussed in this blog post from Benedikt Meurer: + // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/ + super(destination); + this._next = onNext + ? function (this: OperatorSubscriber, value: T) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } + : super._next; + this._error = onError + ? function (this: OperatorSubscriber, err: any) { + try { + onError(err); + } catch (err) { + // Send any errors that occur down stream. + destination.error(err); + } finally { + // Ensure finalization. + this.unsubscribe(); + } + } + : super._error; + this._complete = onComplete + ? function (this: OperatorSubscriber) { + try { + onComplete(); + } catch (err) { + // Send any errors that occur down stream. + destination.error(err); + } finally { + // Ensure finalization. + this.unsubscribe(); + } + } + : super._complete; + } + + unsubscribe() { + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + const { closed } = this; + super.unsubscribe(); + // Execute additional teardown if we have any and we didn't already do so. + !closed && this.onFinalize?.(); + } + } +} diff --git a/node_modules/rxjs/src/internal/operators/audit.ts b/node_modules/rxjs/src/internal/operators/audit.ts new file mode 100644 index 0000000..da13800 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/audit.ts @@ -0,0 +1,96 @@ +import { Subscriber } from '../Subscriber'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; + +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Ignores source values for a duration determined by another Observable, then + * emits the most recent value from the source Observable, then repeats this + * process. + * + * It's like {@link auditTime}, but the silencing + * duration is determined by a second Observable. + * + * ![](audit.svg) + * + * `audit` is similar to `throttle`, but emits the last value from the silenced + * time window, instead of the first value. `audit` emits the most recent value + * from the source Observable on the output Observable as soon as its internal + * timer becomes disabled, and ignores source values while the timer is enabled. + * Initially, the timer is disabled. As soon as the first source value arrives, + * the timer is enabled by calling the `durationSelector` function with the + * source value, which returns the "duration" Observable. When the duration + * Observable emits a value, the timer is disabled, then the most + * recent source value is emitted on the output Observable, and this process + * repeats for the next source value. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, audit, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(audit(ev => interval(1000))); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounce} + * @see {@link delayWhen} + * @see {@link sample} + * @see {@link throttle} + * + * @param durationSelector A function + * that receives a value from the source Observable, for computing the silencing + * duration, returned as an Observable or a Promise. + * @return A function that returns an Observable that performs rate-limiting of + * emissions from the source Observable. + */ +export function audit(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue: T | null = null; + let durationSubscriber: Subscriber | null = null; + let isComplete = false; + + const endDuration = () => { + durationSubscriber?.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + const value = lastValue!; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + + const cleanupDuration = () => { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom(durationSelector(value)).subscribe( + (durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)) + ); + } + }, + () => { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/auditTime.ts b/node_modules/rxjs/src/internal/operators/auditTime.ts new file mode 100644 index 0000000..af83889 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/auditTime.ts @@ -0,0 +1,55 @@ +import { asyncScheduler } from '../scheduler/async'; +import { audit } from './audit'; +import { timer } from '../observable/timer'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; + +/** + * Ignores source values for `duration` milliseconds, then emits the most recent + * value from the source Observable, then repeats this process. + * + * When it sees a source value, it ignores that plus + * the next ones for `duration` milliseconds, and then it emits the most recent + * value from the source. + * + * ![](auditTime.png) + * + * `auditTime` is similar to `throttleTime`, but emits the last value from the + * silenced time window, instead of the first value. `auditTime` emits the most + * recent value from the source Observable on the output Observable as soon as + * its internal timer becomes disabled, and ignores source values while the + * timer is enabled. Initially, the timer is disabled. As soon as the first + * source value arrives, the timer is enabled. After `duration` milliseconds (or + * the time unit determined internally by the optional `scheduler`) has passed, + * the timer is disabled, then the most recent source value is emitted on the + * output Observable, and this process repeats for the next source value. + * Optionally takes a {@link SchedulerLike} for managing timers. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, auditTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(auditTime(1000)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sampleTime} + * @see {@link throttleTime} + * + * @param {number} duration Time to wait before emitting the most recent source + * value, measured in milliseconds or the time unit determined internally + * by the optional `scheduler`. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the rate-limiting behavior. + * @return A function that returns an Observable that performs rate-limiting of + * emissions from the source Observable. + */ +export function auditTime(duration: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { + return audit(() => timer(duration, scheduler)); +} diff --git a/node_modules/rxjs/src/internal/operators/buffer.ts b/node_modules/rxjs/src/internal/operators/buffer.ts new file mode 100644 index 0000000..2ca2fde --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/buffer.ts @@ -0,0 +1,81 @@ +import { OperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Buffers the source Observable values until `closingNotifier` emits. + * + * Collects values from the past as an array, and emits + * that array only when another Observable emits. + * + * ![](buffer.png) + * + * Buffers the incoming Observable values until the given `closingNotifier` + * `ObservableInput` (that internally gets converted to an Observable) + * emits a value, at which point it emits the buffer on the output + * Observable and starts a new buffer internally, awaiting the next time + * `closingNotifier` emits. + * + * ## Example + * + * On every click, emit array of most recent interval events + * + * ```ts + * import { fromEvent, interval, buffer } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const intervalEvents = interval(1000); + * const buffered = intervalEvents.pipe(buffer(clicks)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link bufferWhen} + * @see {@link window} + * + * @param closingNotifier An `ObservableInput` that signals the + * buffer to be emitted on the output Observable. + * @return A function that returns an Observable of buffers, which are arrays + * of values. + */ +export function buffer(closingNotifier: ObservableInput): OperatorFunction { + return operate((source, subscriber) => { + // The current buffered values. + let currentBuffer: T[] = []; + + // Subscribe to our source. + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => currentBuffer.push(value), + () => { + subscriber.next(currentBuffer); + subscriber.complete(); + } + ) + ); + + // Subscribe to the closing notifier. + innerFrom(closingNotifier).subscribe( + createOperatorSubscriber( + subscriber, + () => { + // Start a new buffer and emit the previous one. + const b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, + noop + ) + ); + + return () => { + // Ensure buffered values are released on finalization. + currentBuffer = null!; + }; + }); +} diff --git a/node_modules/rxjs/src/internal/operators/bufferCount.ts b/node_modules/rxjs/src/internal/operators/bufferCount.ts new file mode 100644 index 0000000..4983fec --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/bufferCount.ts @@ -0,0 +1,120 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; + +/** + * Buffers the source Observable values until the size hits the maximum + * `bufferSize` given. + * + * Collects values from the past as an array, and emits + * that array only when its size reaches `bufferSize`. + * + * ![](bufferCount.png) + * + * Buffers a number of values from the source Observable by `bufferSize` then + * emits the buffer and clears it, and starts a new buffer each + * `startBufferEvery` values. If `startBufferEvery` is not provided or is + * `null`, then new buffers are started immediately at the start of the source + * and when each buffer closes and is emitted. + * + * ## Examples + * + * Emit the last two click events as an array + * + * ```ts + * import { fromEvent, bufferCount } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferCount(2)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * On every click, emit the last two click events as an array + * + * ```ts + * import { fromEvent, bufferCount } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferCount(2, 1)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link bufferWhen} + * @see {@link pairwise} + * @see {@link windowCount} + * + * @param {number} bufferSize The maximum size of the buffer emitted. + * @param {number} [startBufferEvery] Interval at which to start a new buffer. + * For example if `startBufferEvery` is `2`, then a new buffer will be started + * on every other value from the source. A new buffer is started at the + * beginning of the source by default. + * @return A function that returns an Observable of arrays of buffered values. + */ +export function bufferCount(bufferSize: number, startBufferEvery: number | null = null): OperatorFunction { + // If no `startBufferEvery` value was supplied, then we're + // opening and closing on the bufferSize itself. + startBufferEvery = startBufferEvery ?? bufferSize; + + return operate((source, subscriber) => { + let buffers: T[][] = []; + let count = 0; + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + let toEmit: T[][] | null = null; + + // Check to see if we need to start a buffer. + // This will start one at the first value, and then + // a new one every N after that. + if (count++ % startBufferEvery! === 0) { + buffers.push([]); + } + + // Push our value into our active buffers. + for (const buffer of buffers) { + buffer.push(value); + // Check to see if we're over the bufferSize + // if we are, record it so we can emit it later. + // If we emitted it now and removed it, it would + // mutate the `buffers` array while we're looping + // over it. + if (bufferSize <= buffer.length) { + toEmit = toEmit ?? []; + toEmit.push(buffer); + } + } + + if (toEmit) { + // We have found some buffers that are over the + // `bufferSize`. Emit them, and remove them from our + // buffers list. + for (const buffer of toEmit) { + arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } + }, + () => { + // When the source completes, emit all of our + // active buffers. + for (const buffer of buffers) { + subscriber.next(buffer); + } + subscriber.complete(); + }, + // Pass all errors through to consumer. + undefined, + () => { + // Clean up our memory when we finalize + buffers = null!; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/bufferTime.ts b/node_modules/rxjs/src/internal/operators/bufferTime.ts new file mode 100644 index 0000000..3e547b7 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/bufferTime.ts @@ -0,0 +1,168 @@ +import { Subscription } from '../Subscription'; +import { OperatorFunction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { asyncScheduler } from '../scheduler/async'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; + +/* tslint:disable:max-line-length */ +export function bufferTime(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction; +export function bufferTime( + bufferTimeSpan: number, + bufferCreationInterval: number | null | undefined, + scheduler?: SchedulerLike +): OperatorFunction; +export function bufferTime( + bufferTimeSpan: number, + bufferCreationInterval: number | null | undefined, + maxBufferSize: number, + scheduler?: SchedulerLike +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Buffers the source Observable values for a specific time period. + * + * Collects values from the past as an array, and emits + * those arrays periodically in time. + * + * ![](bufferTime.png) + * + * Buffers values from the source for a specific time duration `bufferTimeSpan`. + * Unless the optional argument `bufferCreationInterval` is given, it emits and + * resets the buffer every `bufferTimeSpan` milliseconds. If + * `bufferCreationInterval` is given, this operator opens the buffer every + * `bufferCreationInterval` milliseconds and closes (emits and resets) the + * buffer every `bufferTimeSpan` milliseconds. When the optional argument + * `maxBufferSize` is specified, the buffer will be closed either after + * `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements. + * + * ## Examples + * + * Every second, emit an array of the recent click events + * + * ```ts + * import { fromEvent, bufferTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferTime(1000)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * Every 5 seconds, emit the click events from the next 2 seconds + * + * ```ts + * import { fromEvent, bufferTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe(bufferTime(2000, 5000)); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * @see {@link bufferToggle} + * @see {@link bufferWhen} + * @see {@link windowTime} + * + * @param {number} bufferTimeSpan The amount of time to fill each buffer array. + * @param {number} [bufferCreationInterval] The interval at which to start new + * buffers. + * @param {number} [maxBufferSize] The maximum buffer size. + * @param {SchedulerLike} [scheduler=async] The scheduler on which to schedule the + * intervals that determine buffer boundaries. + * @return A function that returns an Observable of arrays of buffered values. + */ +export function bufferTime(bufferTimeSpan: number, ...otherArgs: any[]): OperatorFunction { + const scheduler = popScheduler(otherArgs) ?? asyncScheduler; + const bufferCreationInterval = (otherArgs[0] as number) ?? null; + const maxBufferSize = (otherArgs[1] as number) || Infinity; + + return operate((source, subscriber) => { + // The active buffers, their related subscriptions, and removal functions. + let bufferRecords: { buffer: T[]; subs: Subscription }[] | null = []; + // If true, it means that every time we emit a buffer, we want to start a new buffer + // this is only really used for when *just* the buffer time span is passed. + let restartOnEmit = false; + + /** + * Does the work of emitting the buffer from the record, ensuring that the + * record is removed before the emission so reentrant code (from some custom scheduling, perhaps) + * does not alter the buffer. Also checks to see if a new buffer needs to be started + * after the emit. + */ + const emit = (record: { buffer: T[]; subs: Subscription }) => { + const { buffer, subs } = record; + subs.unsubscribe(); + arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + + /** + * Called every time we start a new buffer. This does + * the work of scheduling a job at the requested bufferTimeSpan + * that will emit the buffer (if it's not unsubscribed before then). + */ + const startBuffer = () => { + if (bufferRecords) { + const subs = new Subscription(); + subscriber.add(subs); + const buffer: T[] = []; + const record = { + buffer, + subs, + }; + bufferRecords.push(record); + executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan); + } + }; + + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + // The user passed both a bufferTimeSpan (required), and a creation interval + // That means we need to start new buffers on the interval, and those buffers need + // to wait the required time span before emitting. + executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); + } else { + restartOnEmit = true; + } + + startBuffer(); + + const bufferTimeSubscriber = createOperatorSubscriber( + subscriber, + (value: T) => { + // Copy the records, so if we need to remove one we + // don't mutate the array. It's hard, but not impossible to + // set up a buffer time that could mutate the array and + // cause issues here. + const recordsCopy = bufferRecords!.slice(); + for (const record of recordsCopy) { + // Loop over all buffers and + const { buffer } = record; + buffer.push(value); + // If the buffer is over the max size, we need to emit it. + maxBufferSize <= buffer.length && emit(record); + } + }, + () => { + // The source completed, emit all of the active + // buffers we have before we complete. + while (bufferRecords?.length) { + subscriber.next(bufferRecords.shift()!.buffer); + } + bufferTimeSubscriber?.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, + // Pass all errors through to consumer. + undefined, + // Clean up + () => (bufferRecords = null) + ); + + source.subscribe(bufferTimeSubscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/bufferToggle.ts b/node_modules/rxjs/src/internal/operators/bufferToggle.ts new file mode 100644 index 0000000..fabefbc --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/bufferToggle.ts @@ -0,0 +1,102 @@ +import { Subscription } from '../Subscription'; +import { OperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; + +/** + * Buffers the source Observable values starting from an emission from + * `openings` and ending when the output of `closingSelector` emits. + * + * Collects values from the past as an array. Starts + * collecting only when `opening` emits, and calls the `closingSelector` + * function to get an Observable that tells when to close the buffer. + * + * ![](bufferToggle.png) + * + * Buffers values from the source by opening the buffer via signals from an + * Observable provided to `openings`, and closing and sending the buffers when + * a Subscribable or Promise returned by the `closingSelector` function emits. + * + * ## Example + * + * Every other second, emit the click events from the next 500ms + * + * ```ts + * import { fromEvent, interval, bufferToggle, EMPTY } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const openings = interval(1000); + * const buffered = clicks.pipe(bufferToggle(openings, i => + * i % 2 ? interval(500) : EMPTY + * )); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferWhen} + * @see {@link windowToggle} + * + * @param openings A Subscribable or Promise of notifications to start new + * buffers. + * @param closingSelector A function that takes + * the value emitted by the `openings` observable and returns a Subscribable or Promise, + * which, when it emits, signals that the associated buffer should be emitted + * and cleared. + * @return A function that returns an Observable of arrays of buffered values. + */ +export function bufferToggle( + openings: ObservableInput, + closingSelector: (value: O) => ObservableInput +): OperatorFunction { + return operate((source, subscriber) => { + const buffers: T[][] = []; + + // Subscribe to the openings notifier first + innerFrom(openings).subscribe( + createOperatorSubscriber( + subscriber, + (openValue) => { + const buffer: T[] = []; + buffers.push(buffer); + // We use this composite subscription, so that + // when the closing notifier emits, we can tear it down. + const closingSubscription = new Subscription(); + + const emitBuffer = () => { + arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + + // The line below will add the subscription to the parent subscriber *and* the closing subscription. + closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); + }, + noop + ) + ); + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // Value from our source. Add it to all pending buffers. + for (const buffer of buffers) { + buffer.push(value); + } + }, + () => { + // Source complete. Emit all pending buffers. + while (buffers.length > 0) { + subscriber.next(buffers.shift()!); + } + subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/bufferWhen.ts b/node_modules/rxjs/src/internal/operators/bufferWhen.ts new file mode 100644 index 0000000..00e8c13 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/bufferWhen.ts @@ -0,0 +1,94 @@ +import { Subscriber } from '../Subscriber'; +import { ObservableInput, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Buffers the source Observable values, using a factory function of closing + * Observables to determine when to close, emit, and reset the buffer. + * + * Collects values from the past as an array. When it + * starts collecting values, it calls a function that returns an Observable that + * tells when to close the buffer and restart collecting. + * + * ![](bufferWhen.svg) + * + * Opens a buffer immediately, then closes the buffer when the observable + * returned by calling `closingSelector` function emits a value. When it closes + * the buffer, it immediately opens a new buffer and repeats the process. + * + * ## Example + * + * Emit an array of the last clicks every [1-5] random seconds + * + * ```ts + * import { fromEvent, bufferWhen, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const buffered = clicks.pipe( + * bufferWhen(() => interval(1000 + Math.random() * 4000)) + * ); + * buffered.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * @see {@link bufferTime} + * @see {@link bufferToggle} + * @see {@link windowWhen} + * + * @param {function(): Observable} closingSelector A function that takes no + * arguments and returns an Observable that signals buffer closure. + * @return A function that returns an Observable of arrays of buffered values. + */ +export function bufferWhen(closingSelector: () => ObservableInput): OperatorFunction { + return operate((source, subscriber) => { + // The buffer we keep and emit. + let buffer: T[] | null = null; + // A reference to the subscriber used to subscribe to + // the closing notifier. We need to hold this so we can + // end the subscription after the first notification. + let closingSubscriber: Subscriber | null = null; + + // Ends the previous closing notifier subscription, so it + // terminates after the first emission, then emits + // the current buffer if there is one, starts a new buffer, and starts a + // new closing notifier. + const openBuffer = () => { + // Make sure to finalize the closing subscription, we only cared + // about one notification. + closingSubscriber?.unsubscribe(); + // emit the buffer if we have one, and start a new buffer. + const b = buffer; + buffer = []; + b && subscriber.next(b); + + // Get a new closing notifier and subscribe to it. + innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); + }; + + // Start the first buffer. + openBuffer(); + + // Subscribe to our source. + source.subscribe( + createOperatorSubscriber( + subscriber, + // Add every new value to the current buffer. + (value) => buffer?.push(value), + // When we complete, emit the buffer if we have one, + // then complete the result. + () => { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, + // Pass all errors through to consumer. + undefined, + // Release memory on finalization + () => (buffer = closingSubscriber = null!) + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/catchError.ts b/node_modules/rxjs/src/internal/operators/catchError.ts new file mode 100644 index 0000000..39eeb98 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/catchError.ts @@ -0,0 +1,141 @@ +import { Observable } from '../Observable'; + +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { Subscription } from '../Subscription'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { operate } from '../util/lift'; + +/* tslint:disable:max-line-length */ +export function catchError>( + selector: (err: any, caught: Observable) => O +): OperatorFunction>; +/* tslint:enable:max-line-length */ + +/** + * Catches errors on the observable to be handled by returning a new observable or throwing an error. + * + * + * It only listens to the error channel and ignores notifications. + * Handles errors from the source observable, and maps them to a new observable. + * The error may also be rethrown, or a new error can be thrown to emit an error from the result. + * + * + * ![](catch.png) + * + * This operator handles errors, but forwards along all other events to the resulting observable. + * If the source observable terminates with an error, it will map that error to a new observable, + * subscribe to it, and forward all of its events to the resulting observable. + * + * ## Examples + * + * Continue with a different Observable when there's an error + * + * ```ts + * import { of, map, catchError } from 'rxjs'; + * + * of(1, 2, 3, 4, 5) + * .pipe( + * map(n => { + * if (n === 4) { + * throw 'four!'; + * } + * return n; + * }), + * catchError(err => of('I', 'II', 'III', 'IV', 'V')) + * ) + * .subscribe(x => console.log(x)); + * // 1, 2, 3, I, II, III, IV, V + * ``` + * + * Retry the caught source Observable again in case of error, similar to `retry()` operator + * + * ```ts + * import { of, map, catchError, take } from 'rxjs'; + * + * of(1, 2, 3, 4, 5) + * .pipe( + * map(n => { + * if (n === 4) { + * throw 'four!'; + * } + * return n; + * }), + * catchError((err, caught) => caught), + * take(30) + * ) + * .subscribe(x => console.log(x)); + * // 1, 2, 3, 1, 2, 3, ... + * ``` + * + * Throw a new error when the source Observable throws an error + * + * ```ts + * import { of, map, catchError } from 'rxjs'; + * + * of(1, 2, 3, 4, 5) + * .pipe( + * map(n => { + * if (n === 4) { + * throw 'four!'; + * } + * return n; + * }), + * catchError(err => { + * throw 'error in source. Details: ' + err; + * }) + * ) + * .subscribe({ + * next: x => console.log(x), + * error: err => console.log(err) + * }); + * // 1, 2, 3, error in source. Details: four! + * ``` + * + * @see {@link onErrorResumeNext} + * @see {@link repeat} + * @see {@link repeatWhen} + * @see {@link retry } + * @see {@link retryWhen} + * + * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which + * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable + * is returned by the `selector` will be used to continue the observable chain. + * @return A function that returns an Observable that originates from either + * the source or the Observable returned by the `selector` function. + */ +export function catchError>( + selector: (err: any, caught: Observable) => O +): OperatorFunction> { + return operate((source, subscriber) => { + let innerSub: Subscription | null = null; + let syncUnsub = false; + let handledResult: Observable>; + + innerSub = source.subscribe( + createOperatorSubscriber(subscriber, undefined, undefined, (err) => { + handledResult = innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + // We don't have an innerSub yet, that means the error was synchronous + // because the subscribe call hasn't returned yet. + syncUnsub = true; + } + }) + ); + + if (syncUnsub) { + // We have a synchronous error, we need to make sure to + // finalize right away. This ensures that callbacks in the `finalize` operator are called + // at the right time, and that finalization occurs at the expected + // time between the source error and the subscription to the + // next observable. + innerSub.unsubscribe(); + innerSub = null; + handledResult!.subscribe(subscriber); + } + }); +} diff --git a/node_modules/rxjs/src/internal/operators/combineAll.ts b/node_modules/rxjs/src/internal/operators/combineAll.ts new file mode 100644 index 0000000..c24157e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/combineAll.ts @@ -0,0 +1,6 @@ +import { combineLatestAll } from './combineLatestAll'; + +/** + * @deprecated Renamed to {@link combineLatestAll}. Will be removed in v8. + */ +export const combineAll = combineLatestAll; diff --git a/node_modules/rxjs/src/internal/operators/combineLatest.ts b/node_modules/rxjs/src/internal/operators/combineLatest.ts new file mode 100644 index 0000000..3f0f3a6 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/combineLatest.ts @@ -0,0 +1,34 @@ +import { combineLatestInit } from '../observable/combineLatest'; +import { ObservableInput, ObservableInputTuple, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { popResultSelector } from '../util/args'; + +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export function combineLatest( + sources: [...ObservableInputTuple], + project: (...values: [T, ...A]) => R +): OperatorFunction; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export function combineLatest(sources: [...ObservableInputTuple]): OperatorFunction; + +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export function combineLatest( + ...sourcesAndProject: [...ObservableInputTuple, (...values: [T, ...A]) => R] +): OperatorFunction; +/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ +export function combineLatest(...sources: [...ObservableInputTuple]): OperatorFunction; + +/** + * @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. + */ +export function combineLatest(...args: (ObservableInput | ((...values: any[]) => R))[]): OperatorFunction { + const resultSelector = popResultSelector(args); + return resultSelector + ? pipe(combineLatest(...(args as Array>)), mapOneOrManyArgs(resultSelector)) + : operate((source, subscriber) => { + combineLatestInit([source, ...argsOrArgArray(args)])(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/combineLatestAll.ts b/node_modules/rxjs/src/internal/operators/combineLatestAll.ts new file mode 100644 index 0000000..434f621 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/combineLatestAll.ts @@ -0,0 +1,50 @@ +import { combineLatest } from '../observable/combineLatest'; +import { OperatorFunction, ObservableInput } from '../types'; +import { joinAllInternals } from './joinAllInternals'; + +export function combineLatestAll(): OperatorFunction, T[]>; +export function combineLatestAll(): OperatorFunction; +export function combineLatestAll(project: (...values: T[]) => R): OperatorFunction, R>; +export function combineLatestAll(project: (...values: Array) => R): OperatorFunction; + +/** + * Flattens an Observable-of-Observables by applying {@link combineLatest} when the Observable-of-Observables completes. + * + * `combineLatestAll` takes an Observable of Observables, and collects all Observables from it. Once the outer Observable completes, + * it subscribes to all collected Observables and combines their values using the {@link combineLatest} strategy, such that: + * + * * Every time an inner Observable emits, the output Observable emits + * * When the returned observable emits, it emits all of the latest values by: + * * If a `project` function is provided, it is called with each recent value from each inner Observable in whatever order they + * arrived, and the result of the `project` function is what is emitted by the output Observable. + * * If there is no `project` function, an array of all the most recent values is emitted by the output Observable. + * + * ## Example + * + * Map two click events to a finite interval Observable, then apply `combineLatestAll` + * + * ```ts + * import { fromEvent, map, interval, take, combineLatestAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(Math.random() * 2000).pipe(take(3))), + * take(2) + * ); + * const result = higherOrder.pipe(combineLatestAll()); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatest} + * @see {@link combineLatestWith} + * @see {@link mergeAll} + * + * @param project optional function to map the most recent values from each inner Observable into a new result. + * Takes each of the most recent values from each collected inner Observable as arguments, in order. + * @return A function that returns an Observable that flattens Observables + * emitted by the source Observable. + */ +export function combineLatestAll(project?: (...values: Array) => R) { + return joinAllInternals(combineLatest, project); +} diff --git a/node_modules/rxjs/src/internal/operators/combineLatestWith.ts b/node_modules/rxjs/src/internal/operators/combineLatestWith.ts new file mode 100644 index 0000000..b262f89 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/combineLatestWith.ts @@ -0,0 +1,48 @@ +import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; +import { combineLatest } from './combineLatest'; + +/** + * Create an observable that combines the latest values from all passed observables and the source + * into arrays and emits them. + * + * Returns an observable, that when subscribed to, will subscribe to the source observable and all + * sources provided as arguments. Once all sources emit at least one value, all of the latest values + * will be emitted as an array. After that, every time any source emits a value, all of the latest values + * will be emitted as an array. + * + * This is a useful operator for eagerly calculating values based off of changed inputs. + * + * ## Example + * + * Simple concatenation of values from two inputs + * + * ```ts + * import { fromEvent, combineLatestWith, map } from 'rxjs'; + * + * // Setup: Add two inputs to the page + * const input1 = document.createElement('input'); + * document.body.appendChild(input1); + * const input2 = document.createElement('input'); + * document.body.appendChild(input2); + * + * // Get streams of changes + * const input1Changes$ = fromEvent(input1, 'change'); + * const input2Changes$ = fromEvent(input2, 'change'); + * + * // Combine the changes by adding them together + * input1Changes$.pipe( + * combineLatestWith(input2Changes$), + * map(([e1, e2]) => (e1.target).value + ' - ' + (e2.target).value) + * ) + * .subscribe(x => console.log(x)); + * ``` + * + * @param otherSources the other sources to subscribe to. + * @return A function that returns an Observable that emits the latest + * emissions from both source and provided Observables. + */ +export function combineLatestWith( + ...otherSources: [...ObservableInputTuple] +): OperatorFunction> { + return combineLatest(...otherSources); +} diff --git a/node_modules/rxjs/src/internal/operators/concat.ts b/node_modules/rxjs/src/internal/operators/concat.ts new file mode 100644 index 0000000..eadb595 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/concat.ts @@ -0,0 +1,22 @@ +import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { concatAll } from './concatAll'; +import { popScheduler } from '../util/args'; +import { from } from '../observable/from'; + +/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ +export function concat(...sources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ +export function concat( + ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] +): OperatorFunction; + +/** + * @deprecated Replaced with {@link concatWith}. Will be removed in v8. + */ +export function concat(...args: any[]): OperatorFunction { + const scheduler = popScheduler(args); + return operate((source, subscriber) => { + concatAll()(from([source, ...args], scheduler)).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/concatAll.ts b/node_modules/rxjs/src/internal/operators/concatAll.ts new file mode 100644 index 0000000..05be4fc --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/concatAll.ts @@ -0,0 +1,62 @@ +import { mergeAll } from './mergeAll'; +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; + +/** + * Converts a higher-order Observable into a first-order Observable by + * concatenating the inner Observables in order. + * + * Flattens an Observable-of-Observables by putting one + * inner Observable after the other. + * + * ![](concatAll.svg) + * + * Joins every Observable emitted by the source (a higher-order Observable), in + * a serial fashion. It subscribes to each inner Observable only after the + * previous inner Observable has completed, and merges all of their values into + * the returned observable. + * + * __Warning:__ If the source Observable emits Observables quickly and + * endlessly, and the inner Observables it emits generally complete slower than + * the source emits, you can run into memory issues as the incoming Observables + * collect in an unbounded buffer. + * + * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set + * to `1`. + * + * ## Example + * + * For each click event, tick every second from 0 to 3, with no concurrency + * + * ```ts + * import { fromEvent, map, interval, take, concatAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(4))) + * ); + * const firstOrder = higherOrder.pipe(concatAll()); + * firstOrder.subscribe(x => console.log(x)); + * + * // Results in the following: + * // (results are not concurrent) + * // For every click on the "document" it will emit values 0 to 3 spaced + * // on a 1000ms interval + * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concat} + * @see {@link concatMap} + * @see {@link concatMapTo} + * @see {@link exhaustAll} + * @see {@link mergeAll} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link zipAll} + * + * @return A function that returns an Observable emitting values from all the + * inner Observables concatenated. + */ +export function concatAll>(): OperatorFunction> { + return mergeAll(1); +} diff --git a/node_modules/rxjs/src/internal/operators/concatMap.ts b/node_modules/rxjs/src/internal/operators/concatMap.ts new file mode 100644 index 0000000..21bbf42 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/concatMap.ts @@ -0,0 +1,84 @@ +import { mergeMap } from './mergeMap'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { isFunction } from '../util/isFunction'; + +/* tslint:disable:max-line-length */ +export function concatMap>( + project: (value: T, index: number) => O +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function concatMap>( + project: (value: T, index: number) => O, + resultSelector: undefined +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function concatMap>( + project: (value: T, index: number) => O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Projects each source value to an Observable which is merged in the output + * Observable, in a serialized fashion waiting for each one to complete before + * merging the next. + * + * Maps each value to an Observable, then flattens all of + * these inner Observables using {@link concatAll}. + * + * ![](concatMap.png) + * + * Returns an Observable that emits items based on applying a function that you + * supply to each item emitted by the source Observable, where that function + * returns an (so-called "inner") Observable. Each new inner Observable is + * concatenated with the previous inner Observable. + * + * __Warning:__ if source values arrive endlessly and faster than their + * corresponding inner Observables can complete, it will result in memory issues + * as inner Observables amass in an unbounded buffer waiting for their turn to + * be subscribed to. + * + * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set + * to `1`. + * + * ## Example + * + * For each click event, tick every second from 0 to 3, with no concurrency + * + * ```ts + * import { fromEvent, concatMap, interval, take } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * concatMap(ev => interval(1000).pipe(take(4))) + * ); + * result.subscribe(x => console.log(x)); + * + * // Results in the following: + * // (results are not concurrent) + * // For every click on the "document" it will emit values 0 to 3 spaced + * // on a 1000ms interval + * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 + * ``` + * + * @see {@link concat} + * @see {@link concatAll} + * @see {@link concatMapTo} + * @see {@link exhaustMap} + * @see {@link mergeMap} + * @see {@link switchMap} + * + * @param {function(value: T, ?index: number): ObservableInput} project A function + * that, when applied to an item emitted by the source Observable, returns an + * Observable. + * @return A function that returns an Observable that emits the result of + * applying the projection function (and the optional deprecated + * `resultSelector`) to each item emitted by the source Observable and taking + * values from each projected inner Observable sequentially. + */ +export function concatMap>( + project: (value: T, index: number) => O, + resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction | R> { + return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); +} diff --git a/node_modules/rxjs/src/internal/operators/concatMapTo.ts b/node_modules/rxjs/src/internal/operators/concatMapTo.ts new file mode 100644 index 0000000..00798c6 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/concatMapTo.ts @@ -0,0 +1,79 @@ +import { concatMap } from './concatMap'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */ +export function concatMapTo>(observable: O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function concatMapTo>( + observable: O, + resultSelector: undefined +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function concatMapTo>( + observable: O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction; + +/** + * Projects each source value to the same Observable which is merged multiple + * times in a serialized fashion on the output Observable. + * + * It's like {@link concatMap}, but maps each value + * always to the same inner Observable. + * + * ![](concatMapTo.png) + * + * Maps each source value to the given Observable `innerObservable` regardless + * of the source value, and then flattens those resulting Observables into one + * single Observable, which is the output Observable. Each new `innerObservable` + * instance emitted on the output Observable is concatenated with the previous + * `innerObservable` instance. + * + * __Warning:__ if source values arrive endlessly and faster than their + * corresponding inner Observables can complete, it will result in memory issues + * as inner Observables amass in an unbounded buffer waiting for their turn to + * be subscribed to. + * + * Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter + * set to `1`. + * + * ## Example + * + * For each click event, tick every second from 0 to 3, with no concurrency + * + * ```ts + * import { fromEvent, concatMapTo, interval, take } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * concatMapTo(interval(1000).pipe(take(4))) + * ); + * result.subscribe(x => console.log(x)); + * + * // Results in the following: + * // (results are not concurrent) + * // For every click on the "document" it will emit values 0 to 3 spaced + * // on a 1000ms interval + * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 + * ``` + * + * @see {@link concat} + * @see {@link concatAll} + * @see {@link concatMap} + * @see {@link mergeMapTo} + * @see {@link switchMapTo} + * + * @param {ObservableInput} innerObservable An Observable to replace each value from + * the source Observable. + * @return A function that returns an Observable of values merged together by + * joining the passed Observable with itself, one after the other, for each + * value emitted from the source. + * @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` + */ +export function concatMapTo>( + innerObservable: O, + resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction | R> { + return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable); +} diff --git a/node_modules/rxjs/src/internal/operators/concatWith.ts b/node_modules/rxjs/src/internal/operators/concatWith.ts new file mode 100644 index 0000000..b836b29 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/concatWith.ts @@ -0,0 +1,48 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +import { concat } from './concat'; + +/** + * Emits all of the values from the source observable, then, once it completes, subscribes + * to each observable source provided, one at a time, emitting all of their values, and not subscribing + * to the next one until it completes. + * + * `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`. + * + * ## Example + * + * Listen for one mouse click, then listen for all mouse moves. + * + * ```ts + * import { fromEvent, map, take, concatWith } from 'rxjs'; + * + * const clicks$ = fromEvent(document, 'click'); + * const moves$ = fromEvent(document, 'mousemove'); + * + * clicks$.pipe( + * map(() => 'click'), + * take(1), + * concatWith( + * moves$.pipe( + * map(() => 'move') + * ) + * ) + * ) + * .subscribe(x => console.log(x)); + * + * // 'click' + * // 'move' + * // 'move' + * // 'move' + * // ... + * ``` + * + * @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete. + * @return A function that returns an Observable that concatenates + * subscriptions to the source and provided Observables subscribing to the next + * only once the current subscription completes. + */ +export function concatWith( + ...otherSources: [...ObservableInputTuple] +): OperatorFunction { + return concat(...otherSources); +} diff --git a/node_modules/rxjs/src/internal/operators/connect.ts b/node_modules/rxjs/src/internal/operators/connect.ts new file mode 100644 index 0000000..4a6b3c4 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/connect.ts @@ -0,0 +1,109 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types'; +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { fromSubscribable } from '../observable/fromSubscribable'; + +/** + * An object used to configure {@link connect} operator. + */ +export interface ConnectConfig { + /** + * A factory function used to create the Subject through which the source + * is multicast. By default, this creates a {@link Subject}. + */ + connector: () => SubjectLike; +} + +/** + * The default configuration for `connect`. + */ +const DEFAULT_CONFIG: ConnectConfig = { + connector: () => new Subject(), +}; + +/** + * Creates an observable by multicasting the source within a function that + * allows the developer to define the usage of the multicast prior to connection. + * + * This is particularly useful if the observable source you wish to multicast could + * be synchronous or asynchronous. This sets it apart from {@link share}, which, in the + * case of totally synchronous sources will fail to share a single subscription with + * multiple consumers, as by the time the subscription to the result of {@link share} + * has returned, if the source is synchronous its internal reference count will jump from + * 0 to 1 back to 0 and reset. + * + * To use `connect`, you provide a `selector` function that will give you + * a multicast observable that is not yet connected. You then use that multicast observable + * to create a resulting observable that, when subscribed, will set up your multicast. This is + * generally, but not always, accomplished with {@link merge}. + * + * Note that using a {@link takeUntil} inside of `connect`'s `selector` _might_ mean you were looking + * to use the {@link takeWhile} operator instead. + * + * When you subscribe to the result of `connect`, the `selector` function will be called. After + * the `selector` function returns, the observable it returns will be subscribed to, _then_ the + * multicast will be connected to the source. + * + * ## Example + * + * Sharing a totally synchronous observable + * + * ```ts + * import { of, tap, connect, merge, map, filter } from 'rxjs'; + * + * const source$ = of(1, 2, 3, 4, 5).pipe( + * tap({ + * subscribe: () => console.log('subscription started'), + * next: n => console.log(`source emitted ${ n }`) + * }) + * ); + * + * source$.pipe( + * // Notice in here we're merging 3 subscriptions to `shared$`. + * connect(shared$ => merge( + * shared$.pipe(map(n => `all ${ n }`)), + * shared$.pipe(filter(n => n % 2 === 0), map(n => `even ${ n }`)), + * shared$.pipe(filter(n => n % 2 === 1), map(n => `odd ${ n }`)) + * )) + * ) + * .subscribe(console.log); + * + * // Expected output: (notice only one subscription) + * 'subscription started' + * 'source emitted 1' + * 'all 1' + * 'odd 1' + * 'source emitted 2' + * 'all 2' + * 'even 2' + * 'source emitted 3' + * 'all 3' + * 'odd 3' + * 'source emitted 4' + * 'all 4' + * 'even 4' + * 'source emitted 5' + * 'all 5' + * 'odd 5' + * ``` + * + * @param selector A function used to set up the multicast. Gives you a multicast observable + * that is not yet connected. With that, you're expected to create and return + * and Observable, that when subscribed to, will utilize the multicast observable. + * After this function is executed -- and its return value subscribed to -- the + * operator will subscribe to the source, and the connection will be made. + * @param config The configuration object for `connect`. + */ +export function connect>( + selector: (shared: Observable) => O, + config: ConnectConfig = DEFAULT_CONFIG +): OperatorFunction> { + const { connector } = config; + return operate((source, subscriber) => { + const subject = connector(); + innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/count.ts b/node_modules/rxjs/src/internal/operators/count.ts new file mode 100644 index 0000000..8b764f8 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/count.ts @@ -0,0 +1,61 @@ +import { OperatorFunction } from '../types'; +import { reduce } from './reduce'; + +/** + * Counts the number of emissions on the source and emits that number when the + * source completes. + * + * Tells how many values were emitted, when the source + * completes. + * + * ![](count.png) + * + * `count` transforms an Observable that emits values into an Observable that + * emits a single value that represents the number of values emitted by the + * source Observable. If the source Observable terminates with an error, `count` + * will pass this error notification along without emitting a value first. If + * the source Observable does not terminate at all, `count` will neither emit + * a value nor terminate. This operator takes an optional `predicate` function + * as argument, in which case the output emission will represent the number of + * source values that matched `true` with the `predicate`. + * + * ## Examples + * + * Counts how many seconds have passed before the first click happened + * + * ```ts + * import { interval, fromEvent, takeUntil, count } from 'rxjs'; + * + * const seconds = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const secondsBeforeClick = seconds.pipe(takeUntil(clicks)); + * const result = secondsBeforeClick.pipe(count()); + * result.subscribe(x => console.log(x)); + * ``` + * + * Counts how many odd numbers are there between 1 and 7 + * + * ```ts + * import { range, count } from 'rxjs'; + * + * const numbers = range(1, 7); + * const result = numbers.pipe(count(i => i % 2 === 1)); + * result.subscribe(x => console.log(x)); + * // Results in: + * // 4 + * ``` + * + * @see {@link max} + * @see {@link min} + * @see {@link reduce} + * + * @param predicate A function that is used to analyze the value and the index and + * determine whether or not to increment the count. Return `true` to increment the count, + * and return `false` to keep the count the same. + * If the predicate is not provided, every value will be counted. + * @return A function that returns an Observable that emits one number that + * represents the count of emissions. + */ +export function count(predicate?: (value: T, index: number) => boolean): OperatorFunction { + return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0); +} diff --git a/node_modules/rxjs/src/internal/operators/debounce.ts b/node_modules/rxjs/src/internal/operators/debounce.ts new file mode 100644 index 0000000..b644855 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/debounce.ts @@ -0,0 +1,119 @@ +import { Subscriber } from '../Subscriber'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Emits a notification from the source Observable only after a particular time span + * determined by another Observable has passed without another source emission. + * + * It's like {@link debounceTime}, but the time span of + * emission silence is determined by a second Observable. + * + * ![](debounce.svg) + * + * `debounce` delays notifications emitted by the source Observable, but drops previous + * pending delayed emissions if a new notification arrives on the source Observable. + * This operator keeps track of the most recent notification from the source + * Observable, and spawns a duration Observable by calling the + * `durationSelector` function. The notification is emitted only when the duration + * Observable emits a next notification, and if no other notification was emitted on + * the source Observable since the duration Observable was spawned. If a new + * notification appears before the duration Observable emits, the previous notification will + * not be emitted and a new duration is scheduled from `durationSelector` is scheduled. + * If the completing event happens during the scheduled duration the last cached notification + * is emitted before the completion event is forwarded to the output observable. + * If the error event happens during the scheduled duration or after it only the error event is + * forwarded to the output observable. The cache notification is not emitted in this case. + * + * Like {@link debounceTime}, this is a rate-limiting operator, and also a + * delay-like operator since output emissions do not necessarily occur at the + * same time as they did on the source Observable. + * + * ## Example + * + * Emit the most recent click after a burst of clicks + * + * ```ts + * import { fromEvent, scan, debounce, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * scan(i => ++i, 1), + * debounce(i => interval(200 * i)) + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link throttle} + * @see {@link throttleTime} + * + * @param durationSelector A function + * that receives a value from the source Observable, for computing the timeout + * duration for each source value, returned as an Observable or a Promise. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified duration Observable returned by + * `durationSelector`, and may drop some values if they occur too frequently. + */ +export function debounce(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue: T | null = null; + // The subscriber/subscription for the current debounce, if there is one. + let durationSubscriber: Subscriber | null = null; + + const emit = () => { + // Unsubscribe any current debounce subscription we have, + // we only cared about the first notification from it, and we + // want to clean that subscription up as soon as possible. + durationSubscriber?.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + // We have a value! Free up memory first, then emit the value. + hasValue = false; + const value = lastValue!; + lastValue = null; + subscriber.next(value); + } + }; + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + // Cancel any pending debounce duration. We don't + // need to null it out here yet tho, because we're just going + // to create another one in a few lines. + durationSubscriber?.unsubscribe(); + hasValue = true; + lastValue = value; + // Capture our duration subscriber, so we can unsubscribe it when we're notified + // and we're going to emit the value. + durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); + // Subscribe to the duration. + innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, + () => { + // Source completed. + // Emit any pending debounced values then complete + emit(); + subscriber.complete(); + }, + // Pass all errors through to consumer + undefined, + () => { + // Finalization. + lastValue = durationSubscriber = null; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/debounceTime.ts b/node_modules/rxjs/src/internal/operators/debounceTime.ts new file mode 100644 index 0000000..1bbbe4d --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/debounceTime.ts @@ -0,0 +1,124 @@ +import { asyncScheduler } from '../scheduler/async'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits a notification from the source Observable only after a particular time span + * has passed without another source emission. + * + * It's like {@link delay}, but passes only the most + * recent notification from each burst of emissions. + * + * ![](debounceTime.png) + * + * `debounceTime` delays notifications emitted by the source Observable, but drops + * previous pending delayed emissions if a new notification arrives on the source + * Observable. This operator keeps track of the most recent notification from the + * source Observable, and emits that only when `dueTime` has passed + * without any other notification appearing on the source Observable. If a new value + * appears before `dueTime` silence occurs, the previous notification will be dropped + * and will not be emitted and a new `dueTime` is scheduled. + * If the completing event happens during `dueTime` the last cached notification + * is emitted before the completion event is forwarded to the output observable. + * If the error event happens during `dueTime` or after it only the error event is + * forwarded to the output observable. The cache notification is not emitted in this case. + * + * This is a rate-limiting operator, because it is impossible for more than one + * notification to be emitted in any time window of duration `dueTime`, but it is also + * a delay-like operator since output emissions do not occur at the same time as + * they did on the source Observable. Optionally takes a {@link SchedulerLike} for + * managing timers. + * + * ## Example + * + * Emit the most recent click after a burst of clicks + * + * ```ts + * import { fromEvent, debounceTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(debounceTime(1000)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link auditTime} + * @see {@link debounce} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link throttle} + * @see {@link throttleTime} + * + * @param {number} dueTime The timeout duration in milliseconds (or the time + * unit determined internally by the optional `scheduler`) for the window of + * time required to wait for emission silence before emitting the most recent + * source value. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the timeout for each value. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified `dueTime`, and may drop some values + * if they occur too frequently. + */ +export function debounceTime(dueTime: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let activeTask: Subscription | null = null; + let lastValue: T | null = null; + let lastTime: number | null = null; + + const emit = () => { + if (activeTask) { + // We have a value! Free up memory first, then emit the value. + activeTask.unsubscribe(); + activeTask = null; + const value = lastValue!; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle(this: SchedulerAction) { + // This is called `dueTime` after the first value + // but we might have received new values during this window! + + const targetTime = lastTime! + dueTime; + const now = scheduler.now(); + if (now < targetTime) { + // On that case, re-schedule to the new target + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + + emit(); + } + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + lastValue = value; + lastTime = scheduler.now(); + + // Only set up a task if it's not already up + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, + () => { + // Source completed. + // Emit any pending debounced values then complete + emit(); + subscriber.complete(); + }, + // Pass all errors through to consumer. + undefined, + () => { + // Finalization. + lastValue = activeTask = null; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts b/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts new file mode 100644 index 0000000..9e0d277 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts @@ -0,0 +1,59 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits a given value if the source Observable completes without emitting any + * `next` value, otherwise mirrors the source Observable. + * + * If the source Observable turns out to be empty, then + * this operator will emit a default value. + * + * ![](defaultIfEmpty.png) + * + * `defaultIfEmpty` emits the values emitted by the source Observable or a + * specified default value if the source Observable is empty (completes without + * having emitted any `next` value). + * + * ## Example + * + * If no clicks happen in 5 seconds, then emit 'no clicks' + * + * ```ts + * import { fromEvent, takeUntil, interval, defaultIfEmpty } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000))); + * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks')); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link empty} + * @see {@link last} + * + * @param defaultValue The default value used if the source + * Observable is empty. + * @return A function that returns an Observable that emits either the + * specified `defaultValue` if the source Observable emits no items, or the + * values emitted by the source Observable. + */ +export function defaultIfEmpty(defaultValue: R): OperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + subscriber.next(value); + }, + () => { + if (!hasValue) { + subscriber.next(defaultValue!); + } + subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/delay.ts b/node_modules/rxjs/src/internal/operators/delay.ts new file mode 100644 index 0000000..64dd894 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/delay.ts @@ -0,0 +1,65 @@ +import { asyncScheduler } from '../scheduler/async'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { delayWhen } from './delayWhen'; +import { timer } from '../observable/timer'; + +/** + * Delays the emission of items from the source Observable by a given timeout or + * until a given Date. + * + * Time shifts each item by some specified amount of + * milliseconds. + * + * ![](delay.svg) + * + * If the delay argument is a Number, this operator time shifts the source + * Observable by that amount of time expressed in milliseconds. The relative + * time intervals between the values are preserved. + * + * If the delay argument is a Date, this operator time shifts the start of the + * Observable execution until the given date occurs. + * + * ## Examples + * + * Delay each click by one second + * + * ```ts + * import { fromEvent, delay } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second + * delayedClicks.subscribe(x => console.log(x)); + * ``` + * + * Delay all clicks until a future date happens + * + * ```ts + * import { fromEvent, delay } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const date = new Date('March 15, 2050 12:00:00'); // in the future + * const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date + * delayedClicks.subscribe(x => console.log(x)); + * ``` + * + * @see {@link delayWhen} + * @see {@link throttle} + * @see {@link throttleTime} + * @see {@link debounce} + * @see {@link debounceTime} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link audit} + * @see {@link auditTime} + * + * @param {number|Date} due The delay duration in milliseconds (a `number`) or + * a `Date` until which the emission of the source items is delayed. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the time-shift for each item. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by the specified timeout or Date. + */ +export function delay(due: number | Date, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { + const duration = timer(due, scheduler); + return delayWhen(() => duration); +} diff --git a/node_modules/rxjs/src/internal/operators/delayWhen.ts b/node_modules/rxjs/src/internal/operators/delayWhen.ts new file mode 100644 index 0000000..0755507 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/delayWhen.ts @@ -0,0 +1,103 @@ +import { Observable } from '../Observable'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { concat } from '../observable/concat'; +import { take } from './take'; +import { ignoreElements } from './ignoreElements'; +import { mapTo } from './mapTo'; +import { mergeMap } from './mergeMap'; +import { innerFrom } from '../observable/innerFrom'; + +/** @deprecated The `subscriptionDelay` parameter will be removed in v8. */ +export function delayWhen( + delayDurationSelector: (value: T, index: number) => ObservableInput, + subscriptionDelay: Observable +): MonoTypeOperatorFunction; +export function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput): MonoTypeOperatorFunction; + +/** + * Delays the emission of items from the source Observable by a given time span + * determined by the emissions of another Observable. + * + * It's like {@link delay}, but the time span of the + * delay duration is determined by a second Observable. + * + * ![](delayWhen.png) + * + * `delayWhen` operator shifts each emitted value from the source Observable by + * a time span determined by another Observable. When the source emits a value, + * the `delayDurationSelector` function is called with the value emitted from + * the source Observable as the first argument to the `delayDurationSelector`. + * The `delayDurationSelector` function should return an {@link ObservableInput}, + * that is internally converted to an Observable that is called the "duration" + * Observable. + * + * The source value is emitted on the output Observable only when the "duration" + * Observable emits ({@link guide/glossary-and-semantics#next next}s) any value. + * Upon that, the "duration" Observable gets unsubscribed. + * + * Before RxJS V7, the {@link guide/glossary-and-semantics#complete completion} + * of the "duration" Observable would have been triggering the emission of the + * source value to the output Observable, but with RxJS V7, this is not the case + * anymore. + * + * Only next notifications (from the "duration" Observable) trigger values from + * the source Observable to be passed to the output Observable. If the "duration" + * Observable only emits the complete notification (without next), the value + * emitted by the source Observable will never get to the output Observable - it + * will be swallowed. If the "duration" Observable errors, the error will be + * propagated to the output Observable. + * + * Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which + * is an Observable. When `subscriptionDelay` emits its first value or + * completes, the source Observable is subscribed to and starts behaving like + * described in the previous paragraph. If `subscriptionDelay` is not provided, + * `delayWhen` will subscribe to the source Observable as soon as the output + * Observable is subscribed. + * + * ## Example + * + * Delay each click by a random amount of time, between 0 and 5 seconds + * + * ```ts + * import { fromEvent, delayWhen, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const delayedClicks = clicks.pipe( + * delayWhen(() => interval(Math.random() * 5000)) + * ); + * delayedClicks.subscribe(x => console.log(x)); + * ``` + * + * @see {@link delay} + * @see {@link throttle} + * @see {@link throttleTime} + * @see {@link debounce} + * @see {@link debounceTime} + * @see {@link sample} + * @see {@link sampleTime} + * @see {@link audit} + * @see {@link auditTime} + * + * @param delayDurationSelector A function that returns an `ObservableInput` for + * each `value` emitted by the source Observable, which is then used to delay the + * emission of that `value` on the output Observable until the `ObservableInput` + * returned from this function emits a next value. When called, beside `value`, + * this function receives a zero-based `index` of the emission order. + * @param subscriptionDelay An Observable that triggers the subscription to the + * source Observable once it emits any value. + * @return A function that returns an Observable that delays the emissions of + * the source Observable by an amount of time specified by the Observable + * returned by `delayDurationSelector`. + */ +export function delayWhen( + delayDurationSelector: (value: T, index: number) => ObservableInput, + subscriptionDelay?: Observable +): MonoTypeOperatorFunction { + if (subscriptionDelay) { + // DEPRECATED PATH + return (source: Observable) => + concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + } + + return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value))); +} diff --git a/node_modules/rxjs/src/internal/operators/dematerialize.ts b/node_modules/rxjs/src/internal/operators/dematerialize.ts new file mode 100644 index 0000000..3a4e17f --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/dematerialize.ts @@ -0,0 +1,58 @@ +import { observeNotification } from '../Notification'; +import { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Converts an Observable of {@link ObservableNotification} objects into the emissions + * that they represent. + * + * Unwraps {@link ObservableNotification} objects as actual `next`, + * `error` and `complete` emissions. The opposite of {@link materialize}. + * + * ![](dematerialize.png) + * + * `dematerialize` is assumed to operate an Observable that only emits + * {@link ObservableNotification} objects as `next` emissions, and does not emit any + * `error`. Such Observable is the output of a `materialize` operation. Those + * notifications are then unwrapped using the metadata they contain, and emitted + * as `next`, `error`, and `complete` on the output Observable. + * + * Use this operator in conjunction with {@link materialize}. + * + * ## Example + * + * Convert an Observable of Notifications to an actual Observable + * + * ```ts + * import { NextNotification, ErrorNotification, of, dematerialize } from 'rxjs'; + * + * const notifA: NextNotification = { kind: 'N', value: 'A' }; + * const notifB: NextNotification = { kind: 'N', value: 'B' }; + * const notifE: ErrorNotification = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') }; + * + * const materialized = of(notifA, notifB, notifE); + * + * const upperCase = materialized.pipe(dematerialize()); + * upperCase.subscribe({ + * next: x => console.log(x), + * error: e => console.error(e) + * }); + * + * // Results in: + * // A + * // B + * // TypeError: x.toUpperCase is not a function + * ``` + * + * @see {@link materialize} + * + * @return A function that returns an Observable that emits items and + * notifications embedded in Notification objects emitted by the source + * Observable. + */ +export function dematerialize>(): OperatorFunction> { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber))); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/distinct.ts b/node_modules/rxjs/src/internal/operators/distinct.ts new file mode 100644 index 0000000..70ed2c2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/distinct.ts @@ -0,0 +1,79 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. + * + * If a `keySelector` function is provided, then it will project each value from the source observable into a new value that it will + * check for equality with previously projected values. If the `keySelector` function is not provided, it will use each value from the + * source observable directly with an equality check against previous values. + * + * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking. + * + * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the + * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct` + * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so + * that the internal `Set` can be "flushed", basically clearing it of values. + * + * ## Examples + * + * A simple example with numbers + * + * ```ts + * import { of, distinct } from 'rxjs'; + * + * of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1) + * .pipe(distinct()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 1 + * // 2 + * // 3 + * // 4 + * ``` + * + * An example using the `keySelector` function + * + * ```ts + * import { of, distinct } from 'rxjs'; + * + * of( + * { age: 4, name: 'Foo'}, + * { age: 7, name: 'Bar'}, + * { age: 5, name: 'Foo'} + * ) + * .pipe(distinct(({ name }) => name)) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // { age: 4, name: 'Foo' } + * // { age: 7, name: 'Bar' } + * ``` + * @see {@link distinctUntilChanged} + * @see {@link distinctUntilKeyChanged} + * + * @param keySelector Optional `function` to select which value you want to check as distinct. + * @param flushes Optional `ObservableInput` for flushing the internal HashSet of the operator. + * @return A function that returns an Observable that emits items from the + * source Observable with distinct values. + */ +export function distinct(keySelector?: (value: T) => K, flushes?: ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + const distinctKeys = new Set(); + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + const key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + }) + ); + + flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop)); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts b/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts new file mode 100644 index 0000000..5db2f98 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts @@ -0,0 +1,182 @@ +import { MonoTypeOperatorFunction } from '../types'; +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function distinctUntilChanged(comparator?: (previous: T, current: T) => boolean): MonoTypeOperatorFunction; +export function distinctUntilChanged( + comparator: (previous: K, current: K) => boolean, + keySelector: (value: T) => K +): MonoTypeOperatorFunction; + +/** + * Returns a result {@link Observable} that emits all values pushed by the source observable if they + * are distinct in comparison to the last value the result observable emitted. + * + * When provided without parameters or with the first parameter (`{@link distinctUntilChanged#comparator comparator}`), + * it behaves like this: + * + * 1. It will always emit the first value from the source. + * 2. For all subsequent values pushed by the source, they will be compared to the previously emitted values + * using the provided `comparator` or an `===` equality check. + * 3. If the value pushed by the source is determined to be unequal by this check, that value is emitted and + * becomes the new "previously emitted value" internally. + * + * When the second parameter (`{@link distinctUntilChanged#keySelector keySelector}`) is provided, the behavior + * changes: + * + * 1. It will always emit the first value from the source. + * 2. The `keySelector` will be run against all values, including the first value. + * 3. For all values after the first, the selected key will be compared against the key selected from + * the previously emitted value using the `comparator`. + * 4. If the keys are determined to be unequal by this check, the value (not the key), is emitted + * and the selected key from that value is saved for future comparisons against other keys. + * + * ## Examples + * + * A very basic example with no `{@link distinctUntilChanged#comparator comparator}`. Note that `1` is emitted more than once, + * because it's distinct in comparison to the _previously emitted_ value, + * not in comparison to _all other emitted values_. + * + * ```ts + * import { of, distinctUntilChanged } from 'rxjs'; + * + * of(1, 1, 1, 2, 2, 2, 1, 1, 3, 3) + * .pipe(distinctUntilChanged()) + * .subscribe(console.log); + * // Logs: 1, 2, 1, 3 + * ``` + * + * With a `{@link distinctUntilChanged#comparator comparator}`, you can do custom comparisons. Let's say + * you only want to emit a value when all of its components have + * changed: + * + * ```ts + * import { of, distinctUntilChanged } from 'rxjs'; + * + * const totallyDifferentBuilds$ = of( + * { engineVersion: '1.1.0', transmissionVersion: '1.2.0' }, + * { engineVersion: '1.1.0', transmissionVersion: '1.4.0' }, + * { engineVersion: '1.3.0', transmissionVersion: '1.4.0' }, + * { engineVersion: '1.3.0', transmissionVersion: '1.5.0' }, + * { engineVersion: '2.0.0', transmissionVersion: '1.5.0' } + * ).pipe( + * distinctUntilChanged((prev, curr) => { + * return ( + * prev.engineVersion === curr.engineVersion || + * prev.transmissionVersion === curr.transmissionVersion + * ); + * }) + * ); + * + * totallyDifferentBuilds$.subscribe(console.log); + * + * // Logs: + * // { engineVersion: '1.1.0', transmissionVersion: '1.2.0' } + * // { engineVersion: '1.3.0', transmissionVersion: '1.4.0' } + * // { engineVersion: '2.0.0', transmissionVersion: '1.5.0' } + * ``` + * + * You can also provide a custom `{@link distinctUntilChanged#comparator comparator}` to check that emitted + * changes are only in one direction. Let's say you only want to get + * the next record temperature: + * + * ```ts + * import { of, distinctUntilChanged } from 'rxjs'; + * + * const temps$ = of(30, 31, 20, 34, 33, 29, 35, 20); + * + * const recordHighs$ = temps$.pipe( + * distinctUntilChanged((prevHigh, temp) => { + * // If the current temp is less than + * // or the same as the previous record, + * // the record hasn't changed. + * return temp <= prevHigh; + * }) + * ); + * + * recordHighs$.subscribe(console.log); + * // Logs: 30, 31, 34, 35 + * ``` + * + * Selecting update events only when the `updatedBy` field shows + * the account changed hands. + * + * ```ts + * import { of, distinctUntilChanged } from 'rxjs'; + * + * // A stream of updates to a given account + * const accountUpdates$ = of( + * { updatedBy: 'blesh', data: [] }, + * { updatedBy: 'blesh', data: [] }, + * { updatedBy: 'ncjamieson', data: [] }, + * { updatedBy: 'ncjamieson', data: [] }, + * { updatedBy: 'blesh', data: [] } + * ); + * + * // We only want the events where it changed hands + * const changedHands$ = accountUpdates$.pipe( + * distinctUntilChanged(undefined, update => update.updatedBy) + * ); + * + * changedHands$.subscribe(console.log); + * // Logs: + * // { updatedBy: 'blesh', data: Array[0] } + * // { updatedBy: 'ncjamieson', data: Array[0] } + * // { updatedBy: 'blesh', data: Array[0] } + * ``` + * + * @see {@link distinct} + * @see {@link distinctUntilKeyChanged} + * + * @param comparator A function used to compare the previous and current keys for + * equality. Defaults to a `===` check. + * @param keySelector Used to select a key value to be passed to the `comparator`. + * + * @return A function that returns an Observable that emits items from the + * source Observable with distinct values. + */ +export function distinctUntilChanged( + comparator?: (previous: K, current: K) => boolean, + keySelector: (value: T) => K = identity as (value: T) => K +): MonoTypeOperatorFunction { + // We've been allowing `null` do be passed as the `compare`, so we can't do + // a default value for the parameter, because that will only work + // for `undefined`. + comparator = comparator ?? defaultCompare; + + return operate((source, subscriber) => { + // The previous key, used to compare against keys selected + // from new arrivals to determine "distinctiveness". + let previousKey: K; + // Whether or not this is the first value we've gotten. + let first = true; + + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + // We always call the key selector. + const currentKey = keySelector(value); + + // If it's the first value, we always emit it. + // Otherwise, we compare this key to the previous key, and + // if the comparer returns false, we emit. + if (first || !comparator!(previousKey, currentKey)) { + // Update our state *before* we emit the value + // as emission can be the source of re-entrant code + // in functional libraries like this. We only really + // need to do this if it's the first value, or if the + // key we're tracking in previous needs to change. + first = false; + previousKey = currentKey; + + // Emit the value! + subscriber.next(value); + } + }) + ); + }); +} + +function defaultCompare(a: any, b: any) { + return a === b; +} diff --git a/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts b/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts new file mode 100644 index 0000000..0f67082 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts @@ -0,0 +1,71 @@ +import { distinctUntilChanged } from './distinctUntilChanged'; +import { MonoTypeOperatorFunction } from '../types'; + +/* tslint:disable:max-line-length */ +export function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction; +export function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item, + * using a property accessed by using the key provided to check if the two items are distinct. + * + * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted. + * + * If a comparator function is not provided, an equality check is used by default. + * + * ## Examples + * + * An example comparing the name of persons + * + * ```ts + * import { of, distinctUntilKeyChanged } from 'rxjs'; + * + * of( + * { age: 4, name: 'Foo' }, + * { age: 7, name: 'Bar' }, + * { age: 5, name: 'Foo' }, + * { age: 6, name: 'Foo' } + * ).pipe( + * distinctUntilKeyChanged('name') + * ) + * .subscribe(x => console.log(x)); + * + * // displays: + * // { age: 4, name: 'Foo' } + * // { age: 7, name: 'Bar' } + * // { age: 5, name: 'Foo' } + * ``` + * + * An example comparing the first letters of the name + * + * ```ts + * import { of, distinctUntilKeyChanged } from 'rxjs'; + * + * of( + * { age: 4, name: 'Foo1' }, + * { age: 7, name: 'Bar' }, + * { age: 5, name: 'Foo2' }, + * { age: 6, name: 'Foo3' } + * ).pipe( + * distinctUntilKeyChanged('name', (x, y) => x.substring(0, 3) === y.substring(0, 3)) + * ) + * .subscribe(x => console.log(x)); + * + * // displays: + * // { age: 4, name: 'Foo1' } + * // { age: 7, name: 'Bar' } + * // { age: 5, name: 'Foo2' } + * ``` + * + * @see {@link distinct} + * @see {@link distinctUntilChanged} + * + * @param {string} key String key for object property lookup on each item. + * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source. + * @return A function that returns an Observable that emits items from the + * source Observable with distinct values based on the key specified. + */ +export function distinctUntilKeyChanged(key: K, compare?: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction { + return distinctUntilChanged((x: T, y: T) => compare ? compare(x[key], y[key]) : x[key] === y[key]); +} diff --git a/node_modules/rxjs/src/internal/operators/elementAt.ts b/node_modules/rxjs/src/internal/operators/elementAt.ts new file mode 100644 index 0000000..6a817fc --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/elementAt.ts @@ -0,0 +1,68 @@ +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; +import { Observable } from '../Observable'; +import { OperatorFunction } from '../types'; +import { filter } from './filter'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { take } from './take'; + +/** + * Emits the single value at the specified `index` in a sequence of emissions + * from the source Observable. + * + * Emits only the i-th value, then completes. + * + * ![](elementAt.png) + * + * `elementAt` returns an Observable that emits the item at the specified + * `index` in the source Observable, or a default value if that `index` is out + * of range and the `default` argument is provided. If the `default` argument is + * not given and the `index` is out of range, the output Observable will emit an + * `ArgumentOutOfRangeError` error. + * + * ## Example + * + * Emit only the third click event + * + * ```ts + * import { fromEvent, elementAt } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(elementAt(2)); + * result.subscribe(x => console.log(x)); + * + * // Results in: + * // click 1 = nothing + * // click 2 = nothing + * // click 3 = MouseEvent object logged to console + * ``` + * + * @see {@link first} + * @see {@link last} + * @see {@link skip} + * @see {@link single} + * @see {@link take} + * + * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an + * ArgumentOutOfRangeError to the Observer's `error` callback if `i < 0` or the + * Observable has completed before emitting the i-th `next` notification. + * + * @param {number} index Is the number `i` for the i-th source emission that has + * happened since the subscription, starting from the number `0`. + * @param {T} [defaultValue] The default value returned for missing indices. + * @return A function that returns an Observable that emits a single item, if + * it is found. Otherwise, it will emit the default value if given. If not, it + * emits an error. + */ +export function elementAt(index: number, defaultValue?: D): OperatorFunction { + if (index < 0) { + throw new ArgumentOutOfRangeError(); + } + const hasDefaultValue = arguments.length >= 2; + return (source: Observable) => + source.pipe( + filter((v, i) => i === index), + take(1), + hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new ArgumentOutOfRangeError()) + ); +} diff --git a/node_modules/rxjs/src/internal/operators/endWith.ts b/node_modules/rxjs/src/internal/operators/endWith.ts new file mode 100644 index 0000000..436e5b3 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/endWith.ts @@ -0,0 +1,68 @@ +/** prettier */ +import { Observable } from '../Observable'; +import { concat } from '../observable/concat'; +import { of } from '../observable/of'; +import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types'; + +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function endWith( + ...valuesAndScheduler: [...A, SchedulerLike] +): OperatorFunction>; + +export function endWith(...values: A): OperatorFunction>; + +/** + * Returns an observable that will emit all values from the source, then synchronously emit + * the provided value(s) immediately after the source completes. + * + * NOTE: Passing a last argument of a Scheduler is _deprecated_, and may result in incorrect + * types in TypeScript. + * + * This is useful for knowing when an observable ends. Particularly when paired with an + * operator like {@link takeUntil} + * + * ![](endWith.png) + * + * ## Example + * + * Emit values to know when an interval starts and stops. The interval will + * stop when a user clicks anywhere on the document. + * + * ```ts + * import { interval, map, fromEvent, startWith, takeUntil, endWith } from 'rxjs'; + * + * const ticker$ = interval(5000).pipe( + * map(() => 'tick') + * ); + * + * const documentClicks$ = fromEvent(document, 'click'); + * + * ticker$.pipe( + * startWith('interval started'), + * takeUntil(documentClicks$), + * endWith('interval ended by click') + * ) + * .subscribe(x => console.log(x)); + * + * // Result (assuming a user clicks after 15 seconds) + * // 'interval started' + * // 'tick' + * // 'tick' + * // 'tick' + * // 'interval ended by click' + * ``` + * + * @see {@link startWith} + * @see {@link concat} + * @see {@link takeUntil} + * + * @param values Items you want the modified Observable to emit last. + * @return A function that returns an Observable that emits all values from the + * source, then synchronously emits the provided value(s) immediately after the + * source completes. + */ +export function endWith(...values: Array): MonoTypeOperatorFunction { + return (source: Observable) => concat(source, of(...values)) as Observable; +} diff --git a/node_modules/rxjs/src/internal/operators/every.ts b/node_modules/rxjs/src/internal/operators/every.ts new file mode 100644 index 0000000..be3d9ea --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/every.ts @@ -0,0 +1,66 @@ +import { Observable } from '../Observable'; +import { Falsy, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function every( + predicate: BooleanConstructor, + thisArg: any +): OperatorFunction extends never ? false : boolean>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function every( + predicate: (this: A, value: T, index: number, source: Observable) => boolean, + thisArg: A +): OperatorFunction; +export function every(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; + +/** + * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. + * + * If all values pass predicate before the source completes, emits true before completion, + * otherwise emit false, then complete. + * + * ![](every.png) + * + * ## Example + * + * A simple example emitting true if all elements are less than 5, false otherwise + * + * ```ts + * import { of, every } from 'rxjs'; + * + * of(1, 2, 3, 4, 5, 6) + * .pipe(every(x => x < 5)) + * .subscribe(x => console.log(x)); // -> false + * ``` + * + * @param {function} predicate A function for determining if an item meets a specified condition. + * @param {any} [thisArg] Optional object to use for `this` in the callback. + * @return A function that returns an Observable of booleans that determines if + * all items of the source Observable meet the condition specified. + */ +export function every( + predicate: (value: T, index: number, source: Observable) => boolean, + thisArg?: any +): OperatorFunction { + return operate((source, subscriber) => { + let index = 0; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, + () => { + subscriber.next(true); + subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/exhaust.ts b/node_modules/rxjs/src/internal/operators/exhaust.ts new file mode 100644 index 0000000..a4410db --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/exhaust.ts @@ -0,0 +1,6 @@ +import { exhaustAll } from './exhaustAll'; + +/** + * @deprecated Renamed to {@link exhaustAll}. Will be removed in v8. + */ +export const exhaust = exhaustAll; diff --git a/node_modules/rxjs/src/internal/operators/exhaustAll.ts b/node_modules/rxjs/src/internal/operators/exhaustAll.ts new file mode 100644 index 0000000..4a58a5e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/exhaustAll.ts @@ -0,0 +1,51 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +import { exhaustMap } from './exhaustMap'; +import { identity } from '../util/identity'; + +/** + * Converts a higher-order Observable into a first-order Observable by dropping + * inner Observables while the previous inner Observable has not yet completed. + * + * Flattens an Observable-of-Observables by dropping the + * next inner Observables while the current inner is still executing. + * + * ![](exhaustAll.svg) + * + * `exhaustAll` subscribes to an Observable that emits Observables, also known as a + * higher-order Observable. Each time it observes one of these emitted inner + * Observables, the output Observable begins emitting the items emitted by that + * inner Observable. So far, it behaves like {@link mergeAll}. However, + * `exhaustAll` ignores every new inner Observable if the previous Observable has + * not yet completed. Once that one completes, it will accept and flatten the + * next inner Observable and repeat this process. + * + * ## Example + * + * Run a finite timer for each click, only if there is no currently active timer + * + * ```ts + * import { fromEvent, map, interval, take, exhaustAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(5))) + * ); + * const result = higherOrder.pipe(exhaustAll()); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link mergeAll} + * @see {@link exhaustMap} + * @see {@link zipAll} + * + * @return A function that returns an Observable that takes a source of + * Observables and propagates the first Observable exclusively until it + * completes before subscribing to the next. + */ +export function exhaustAll>(): OperatorFunction> { + return exhaustMap(identity); +} diff --git a/node_modules/rxjs/src/internal/operators/exhaustMap.ts b/node_modules/rxjs/src/internal/operators/exhaustMap.ts new file mode 100644 index 0000000..69bc728 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/exhaustMap.ts @@ -0,0 +1,101 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/* tslint:disable:max-line-length */ +export function exhaustMap>( + project: (value: T, index: number) => O +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function exhaustMap>( + project: (value: T, index: number) => O, + resultSelector: undefined +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function exhaustMap( + project: (value: T, index: number) => ObservableInput, + resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Projects each source value to an Observable which is merged in the output + * Observable only if the previous projected Observable has completed. + * + * Maps each value to an Observable, then flattens all of + * these inner Observables using {@link exhaustAll}. + * + * ![](exhaustMap.png) + * + * Returns an Observable that emits items based on applying a function that you + * supply to each item emitted by the source Observable, where that function + * returns an (so-called "inner") Observable. When it projects a source value to + * an Observable, the output Observable begins emitting the items emitted by + * that projected Observable. However, `exhaustMap` ignores every new projected + * Observable if the previous projected Observable has not yet completed. Once + * that one completes, it will accept and flatten the next projected Observable + * and repeat this process. + * + * ## Example + * + * Run a finite timer for each click, only if there is no currently active timer + * + * ```ts + * import { fromEvent, exhaustMap, interval, take } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * exhaustMap(() => interval(1000).pipe(take(5))) + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link concatMap} + * @see {@link exhaust} + * @see {@link mergeMap} + * @see {@link switchMap} + * + * @param {function(value: T, ?index: number): ObservableInput} project A function + * that, when applied to an item emitted by the source Observable, returns an + * Observable. + * @return A function that returns an Observable containing projected + * Observables of each item of the source, ignoring projected Observables that + * start before their preceding Observable has completed. + */ +export function exhaustMap>( + project: (value: T, index: number) => O, + resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction | R> { + if (resultSelector) { + // DEPRECATED PATH + return (source: Observable) => + source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b: any, ii: any) => resultSelector(a, b, i, ii))))); + } + return operate((source, subscriber) => { + let index = 0; + let innerSub: Subscriber | null = null; + let isComplete = false; + source.subscribe( + createOperatorSubscriber( + subscriber, + (outerValue) => { + if (!innerSub) { + innerSub = createOperatorSubscriber(subscriber, undefined, () => { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, + () => { + isComplete = true; + !innerSub && subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/expand.ts b/node_modules/rxjs/src/internal/operators/expand.ts new file mode 100644 index 0000000..84b7e34 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/expand.ts @@ -0,0 +1,96 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; + +/* tslint:disable:max-line-length */ +export function expand>( + project: (value: T, index: number) => O, + concurrent?: number, + scheduler?: SchedulerLike +): OperatorFunction>; +/** + * @deprecated The `scheduler` parameter will be removed in v8. If you need to schedule the inner subscription, + * use `subscribeOn` within the projection function: `expand((value) => fn(value).pipe(subscribeOn(scheduler)))`. + * Details: Details: https://rxjs.dev/deprecations/scheduler-argument + */ +export function expand>( + project: (value: T, index: number) => O, + concurrent: number | undefined, + scheduler: SchedulerLike +): OperatorFunction>; +/* tslint:enable:max-line-length */ + +/** + * Recursively projects each source value to an Observable which is merged in + * the output Observable. + * + * It's similar to {@link mergeMap}, but applies the + * projection function to every source value as well as every output value. + * It's recursive. + * + * ![](expand.png) + * + * Returns an Observable that emits items based on applying a function that you + * supply to each item emitted by the source Observable, where that function + * returns an Observable, and then merging those resulting Observables and + * emitting the results of this merger. *Expand* will re-emit on the output + * Observable every source value. Then, each output value is given to the + * `project` function which returns an inner Observable to be merged on the + * output Observable. Those output values resulting from the projection are also + * given to the `project` function to produce new output values. This is how + * *expand* behaves recursively. + * + * ## Example + * + * Start emitting the powers of two on every click, at most 10 of them + * + * ```ts + * import { fromEvent, map, expand, of, delay, take } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const powersOfTwo = clicks.pipe( + * map(() => 1), + * expand(x => of(2 * x).pipe(delay(1000))), + * take(10) + * ); + * powersOfTwo.subscribe(x => console.log(x)); + * ``` + * + * @see {@link mergeMap} + * @see {@link mergeScan} + * + * @param {function(value: T, index: number) => Observable} project A function + * that, when applied to an item emitted by the source or the output Observable, + * returns an Observable. + * @param {number} [concurrent=Infinity] Maximum number of input + * Observables being subscribed to concurrently. + * @param {SchedulerLike} [scheduler=null] The {@link SchedulerLike} to use for subscribing to + * each projected inner Observable. + * @return A function that returns an Observable that emits the source values + * and also result of applying the projection function to each value emitted on + * the output Observable and merging the results of the Observables obtained + * from this transformation. + */ +export function expand>( + project: (value: T, index: number) => O, + concurrent = Infinity, + scheduler?: SchedulerLike +): OperatorFunction> { + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return operate((source, subscriber) => + mergeInternals( + // General merge params + source, + subscriber, + project, + concurrent, + + // onBeforeNext + undefined, + + // Expand-specific + true, // Use expand path + scheduler // Inner subscription scheduler + ) + ); +} diff --git a/node_modules/rxjs/src/internal/operators/filter.ts b/node_modules/rxjs/src/internal/operators/filter.ts new file mode 100644 index 0000000..ccc1dec --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/filter.ts @@ -0,0 +1,75 @@ +import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function filter(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction; +export function filter(predicate: (value: T, index: number) => value is S): OperatorFunction; +export function filter(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function filter(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction; +export function filter(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; + +/** + * Filter items emitted by the source Observable by only emitting those that + * satisfy a specified predicate. + * + * Like + * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), + * it only emits a value from the source if it passes a criterion function. + * + * ![](filter.png) + * + * Similar to the well-known `Array.prototype.filter` method, this operator + * takes values from the source Observable, passes them through a `predicate` + * function and only emits those values that yielded `true`. + * + * ## Example + * + * Emit only click events whose target was a DIV element + * + * ```ts + * import { fromEvent, filter } from 'rxjs'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const clicksOnDivs = clicks.pipe(filter(ev => (ev.target).tagName === 'DIV')); + * clicksOnDivs.subscribe(x => console.log(x)); + * ``` + * + * @see {@link distinct} + * @see {@link distinctUntilChanged} + * @see {@link distinctUntilKeyChanged} + * @see {@link ignoreElements} + * @see {@link partition} + * @see {@link skip} + * + * @param predicate A function that + * evaluates each value emitted by the source Observable. If it returns `true`, + * the value is emitted, if `false` the value is not passed to the output + * Observable. The `index` parameter is the number `i` for the i-th source + * emission that has happened since the subscription, starting from the number + * `0`. + * @param thisArg An optional argument to determine the value of `this` + * in the `predicate` function. + * @return A function that returns an Observable that emits items from the + * source Observable that satisfy the specified `predicate`. + */ +export function filter(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + // An index passed to our predicate function on each call. + let index = 0; + + // Subscribe to the source, all errors and completions are + // forwarded to the consumer. + source.subscribe( + // Call the predicate with the appropriate `this` context, + // if the predicate returns `true`, then send the value + // to the consumer. + createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/finalize.ts b/node_modules/rxjs/src/internal/operators/finalize.ts new file mode 100644 index 0000000..7ab08b2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/finalize.ts @@ -0,0 +1,75 @@ +import { MonoTypeOperatorFunction } from '../types'; +import { operate } from '../util/lift'; + +/** + * Returns an Observable that mirrors the source Observable, but will call a specified function when + * the source terminates on complete or error. + * The specified function will also be called when the subscriber explicitly unsubscribes. + * + * ## Examples + * + * Execute callback function when the observable completes + * + * ```ts + * import { interval, take, finalize } from 'rxjs'; + * + * // emit value in sequence every 1 second + * const source = interval(1000); + * const example = source.pipe( + * take(5), //take only the first 5 values + * finalize(() => console.log('Sequence complete')) // Execute when the observable completes + * ); + * const subscribe = example.subscribe(val => console.log(val)); + * + * // results: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 'Sequence complete' + * ``` + * + * Execute callback function when the subscriber explicitly unsubscribes + * + * ```ts + * import { interval, finalize, tap, noop, timer } from 'rxjs'; + * + * const source = interval(100).pipe( + * finalize(() => console.log('[finalize] Called')), + * tap({ + * next: () => console.log('[next] Called'), + * error: () => console.log('[error] Not called'), + * complete: () => console.log('[tap complete] Not called') + * }) + * ); + * + * const sub = source.subscribe({ + * next: x => console.log(x), + * error: noop, + * complete: () => console.log('[complete] Not called') + * }); + * + * timer(150).subscribe(() => sub.unsubscribe()); + * + * // results: + * // '[next] Called' + * // 0 + * // '[finalize] Called' + * ``` + * + * @param {function} callback Function to be called when source terminates. + * @return A function that returns an Observable that mirrors the source, but + * will call the specified function on termination. + */ +export function finalize(callback: () => void): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + // TODO: This try/finally was only added for `useDeprecatedSynchronousErrorHandling`. + // REMOVE THIS WHEN THAT HOT GARBAGE IS REMOVED IN V8. + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); +} diff --git a/node_modules/rxjs/src/internal/operators/find.ts b/node_modules/rxjs/src/internal/operators/find.ts new file mode 100644 index 0000000..d91a3d8 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/find.ts @@ -0,0 +1,97 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function find(predicate: BooleanConstructor): OperatorFunction>; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function find( + predicate: (this: A, value: T, index: number, source: Observable) => value is S, + thisArg: A +): OperatorFunction; +export function find( + predicate: (value: T, index: number, source: Observable) => value is S +): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function find( + predicate: (this: A, value: T, index: number, source: Observable) => boolean, + thisArg: A +): OperatorFunction; +export function find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; +/** + * Emits only the first value emitted by the source Observable that meets some + * condition. + * + * Finds the first value that passes some test and emits + * that. + * + * ![](find.png) + * + * `find` searches for the first item in the source Observable that matches the + * specified condition embodied by the `predicate`, and returns the first + * occurrence in the source. Unlike {@link first}, the `predicate` is required + * in `find`, and does not emit an error if a valid value is not found + * (emits `undefined` instead). + * + * ## Example + * + * Find and emit the first click that happens on a DIV element + * + * ```ts + * import { fromEvent, find } from 'rxjs'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(find(ev => (ev.target).tagName === 'DIV')); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link filter} + * @see {@link first} + * @see {@link findIndex} + * @see {@link take} + * + * @param {function(value: T, index: number, source: Observable): boolean} predicate + * A function called with each item to test for condition matching. + * @param {any} [thisArg] An optional argument to determine the value of `this` + * in the `predicate` function. + * @return A function that returns an Observable that emits the first item that + * matches the condition. + */ +export function find( + predicate: (value: T, index: number, source: Observable) => boolean, + thisArg?: any +): OperatorFunction { + return operate(createFind(predicate, thisArg, 'value')); +} + +export function createFind( + predicate: (value: T, index: number, source: Observable) => boolean, + thisArg: any, + emit: 'value' | 'index' +) { + const findIndex = emit === 'index'; + return (source: Observable, subscriber: Subscriber) => { + let index = 0; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + const i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, + () => { + subscriber.next(findIndex ? -1 : undefined); + subscriber.complete(); + } + ) + ); + }; +} diff --git a/node_modules/rxjs/src/internal/operators/findIndex.ts b/node_modules/rxjs/src/internal/operators/findIndex.ts new file mode 100644 index 0000000..7a9d943 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/findIndex.ts @@ -0,0 +1,64 @@ +import { Observable } from '../Observable'; +import { Falsy, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createFind } from './find'; + +export function findIndex(predicate: BooleanConstructor): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function findIndex( + predicate: (this: A, value: T, index: number, source: Observable) => boolean, + thisArg: A +): OperatorFunction; +export function findIndex(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; + +/** + * Emits only the index of the first value emitted by the source Observable that + * meets some condition. + * + * It's like {@link find}, but emits the index of the + * found value, not the value itself. + * + * ![](findIndex.png) + * + * `findIndex` searches for the first item in the source Observable that matches + * the specified condition embodied by the `predicate`, and returns the + * (zero-based) index of the first occurrence in the source. Unlike + * {@link first}, the `predicate` is required in `findIndex`, and does not emit + * an error if a valid value is not found. + * + * ## Example + * + * Emit the index of first click that happens on a DIV element + * + * ```ts + * import { fromEvent, findIndex } from 'rxjs'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(findIndex(ev => (ev.target).tagName === 'DIV')); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link filter} + * @see {@link find} + * @see {@link first} + * @see {@link take} + * + * @param {function(value: T, index: number, source: Observable): boolean} predicate + * A function called with each item to test for condition matching. + * @param {any} [thisArg] An optional argument to determine the value of `this` + * in the `predicate` function. + * @return A function that returns an Observable that emits the index of the + * first item that matches the condition. + */ +export function findIndex( + predicate: (value: T, index: number, source: Observable) => boolean, + thisArg?: any +): OperatorFunction { + return operate(createFind(predicate, thisArg, 'index')); +} diff --git a/node_modules/rxjs/src/internal/operators/first.ts b/node_modules/rxjs/src/internal/operators/first.ts new file mode 100644 index 0000000..b3ca1f8 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/first.ts @@ -0,0 +1,92 @@ +import { Observable } from '../Observable'; +import { EmptyError } from '../util/EmptyError'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +import { filter } from './filter'; +import { take } from './take'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { throwIfEmpty } from './throwIfEmpty'; +import { identity } from '../util/identity'; + +export function first(predicate?: null, defaultValue?: D): OperatorFunction; +export function first(predicate: BooleanConstructor): OperatorFunction>; +export function first(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; +export function first( + predicate: (value: T, index: number, source: Observable) => value is S, + defaultValue?: S +): OperatorFunction; +export function first( + predicate: (value: T, index: number, source: Observable) => value is S, + defaultValue: D +): OperatorFunction; +export function first( + predicate: (value: T, index: number, source: Observable) => boolean, + defaultValue?: D +): OperatorFunction; + +/** + * Emits only the first value (or the first value that meets some condition) + * emitted by the source Observable. + * + * Emits only the first value. Or emits only the first + * value that passes some test. + * + * ![](first.png) + * + * If called with no arguments, `first` emits the first value of the source + * Observable, then completes. If called with a `predicate` function, `first` + * emits the first value of the source that matches the specified condition. Throws an error if + * `defaultValue` was not provided and a matching element is not found. + * + * ## Examples + * + * Emit only the first click that happens on the DOM + * + * ```ts + * import { fromEvent, first } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(first()); + * result.subscribe(x => console.log(x)); + * ``` + * + * Emits the first click that happens on a DIV + * + * ```ts + * import { fromEvent, first } from 'rxjs'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(first(ev => (ev.target).tagName === 'DIV')); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link filter} + * @see {@link find} + * @see {@link take} + * + * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` + * callback if the Observable completes before any `next` notification was sent. + * This is how `first()` is different from {@link take}(1) which completes instead. + * + * @param {function(value: T, index: number, source: Observable): boolean} [predicate] + * An optional function called with each item to test for condition matching. + * @param {D} [defaultValue] The default value emitted in case no valid value + * was found on the source. + * @return A function that returns an Observable that emits the first item that + * matches the condition. + */ +export function first( + predicate?: ((value: T, index: number, source: Observable) => boolean) | null, + defaultValue?: D +): OperatorFunction { + const hasDefaultValue = arguments.length >= 2; + return (source: Observable) => + source.pipe( + predicate ? filter((v, i) => predicate(v, i, source)) : identity, + take(1), + hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError()) + ); +} diff --git a/node_modules/rxjs/src/internal/operators/flatMap.ts b/node_modules/rxjs/src/internal/operators/flatMap.ts new file mode 100644 index 0000000..817917c --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/flatMap.ts @@ -0,0 +1,6 @@ +import { mergeMap } from './mergeMap'; + +/** + * @deprecated Renamed to {@link mergeMap}. Will be removed in v8. + */ +export const flatMap = mergeMap; diff --git a/node_modules/rxjs/src/internal/operators/groupBy.ts b/node_modules/rxjs/src/internal/operators/groupBy.ts new file mode 100644 index 0000000..17bbb9a --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/groupBy.ts @@ -0,0 +1,288 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; + +export interface BasicGroupByOptions { + element?: undefined; + duration?: (grouped: GroupedObservable) => ObservableInput; + connector?: () => SubjectLike; +} + +export interface GroupByOptionsWithElement { + element: (value: T) => E; + duration?: (grouped: GroupedObservable) => ObservableInput; + connector?: () => SubjectLike; +} + +export function groupBy(key: (value: T) => K, options: BasicGroupByOptions): OperatorFunction>; + +export function groupBy( + key: (value: T) => K, + options: GroupByOptionsWithElement +): OperatorFunction>; + +export function groupBy( + key: (value: T) => value is K +): OperatorFunction | GroupedObservable>>; + +export function groupBy(key: (value: T) => K): OperatorFunction>; + +/** + * @deprecated use the options parameter instead. + */ +export function groupBy( + key: (value: T) => K, + element: void, + duration: (grouped: GroupedObservable) => Observable +): OperatorFunction>; + +/** + * @deprecated use the options parameter instead. + */ +export function groupBy( + key: (value: T) => K, + element?: (value: T) => R, + duration?: (grouped: GroupedObservable) => Observable +): OperatorFunction>; + +/** + * Groups the items emitted by an Observable according to a specified criterion, + * and emits these grouped items as `GroupedObservables`, one + * {@link GroupedObservable} per group. + * + * ![](groupBy.png) + * + * When the Observable emits an item, a key is computed for this item with the key function. + * + * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new + * {@link GroupedObservable} for this key is created and emits. + * + * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common + * key is available as the `key` field of a {@link GroupedObservable} instance. + * + * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements + * returned by the element function. + * + * ## Examples + * + * Group objects by `id` and return as array + * + * ```ts + * import { of, groupBy, mergeMap, reduce } from 'rxjs'; + * + * of( + * { id: 1, name: 'JavaScript' }, + * { id: 2, name: 'Parcel' }, + * { id: 2, name: 'webpack' }, + * { id: 1, name: 'TypeScript' }, + * { id: 3, name: 'TSLint' } + * ).pipe( + * groupBy(p => p.id), + * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], []))) + * ) + * .subscribe(p => console.log(p)); + * + * // displays: + * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}] + * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}] + * // [{ id: 3, name: 'TSLint' }] + * ``` + * + * Pivot data on the `id` field + * + * ```ts + * import { of, groupBy, mergeMap, reduce, map } from 'rxjs'; + * + * of( + * { id: 1, name: 'JavaScript' }, + * { id: 2, name: 'Parcel' }, + * { id: 2, name: 'webpack' }, + * { id: 1, name: 'TypeScript' }, + * { id: 3, name: 'TSLint' } + * ).pipe( + * groupBy(p => p.id, { element: p => p.name }), + * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))), + * map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) })) + * ) + * .subscribe(p => console.log(p)); + * + * // displays: + * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] } + * // { id: 2, values: [ 'Parcel', 'webpack' ] } + * // { id: 3, values: [ 'TSLint' ] } + * ``` + * + * @param key A function that extracts the key + * for each item. + * @param element A function that extracts the + * return element for each item. + * @param duration + * A function that returns an Observable to determine how long each group should + * exist. + * @param connector Factory function to create an + * intermediate Subject through which grouped elements are emitted. + * @return A function that returns an Observable that emits GroupedObservables, + * each of which corresponds to a unique key value and each of which emits + * those items from the source Observable that share that key value. + * + * @deprecated Use the options parameter instead. + */ +export function groupBy( + key: (value: T) => K, + element?: (value: T) => R, + duration?: (grouped: GroupedObservable) => Observable, + connector?: () => Subject +): OperatorFunction>; + +// Impl +export function groupBy( + keySelector: (value: T) => K, + elementOrOptions?: ((value: any) => any) | void | BasicGroupByOptions | GroupByOptionsWithElement, + duration?: (grouped: GroupedObservable) => ObservableInput, + connector?: () => SubjectLike +): OperatorFunction> { + return operate((source, subscriber) => { + let element: ((value: any) => any) | void; + if (!elementOrOptions || typeof elementOrOptions === 'function') { + element = elementOrOptions as ((value: any) => any); + } else { + ({ duration, element, connector } = elementOrOptions); + } + + // A lookup for the groups that we have so far. + const groups = new Map>(); + + // Used for notifying all groups and the subscriber in the same way. + const notify = (cb: (group: Observer) => void) => { + groups.forEach(cb); + cb(subscriber); + }; + + // Used to handle errors from the source, AND errors that occur during the + // next call from the source. + const handleError = (err: any) => notify((consumer) => consumer.error(err)); + + // The number of actively subscribed groups + let activeGroups = 0; + + // Whether or not teardown was attempted on this subscription. + let teardownAttempted = false; + + // Capturing a reference to this, because we need a handle to it + // in `createGroupedObservable` below. This is what we use to + // subscribe to our source observable. This sometimes needs to be unsubscribed + // out-of-band with our `subscriber` which is the downstream subscriber, or destination, + // in cases where a user unsubscribes from the main resulting subscription, but + // still has groups from this subscription subscribed and would expect values from it + // Consider: `source.pipe(groupBy(fn), take(2))`. + const groupBySourceSubscriber = new OperatorSubscriber( + subscriber, + (value: T) => { + // Because we have to notify all groups of any errors that occur in here, + // we have to add our own try/catch to ensure that those errors are propagated. + // OperatorSubscriber will only send the error to the main subscriber. + try { + const key = keySelector(value); + + let group = groups.get(key); + if (!group) { + // Create our group subject + groups.set(key, (group = connector ? connector() : new Subject())); + + // Emit the grouped observable. Note that we can't do a simple `asObservable()` here, + // because the grouped observable has special semantics around reference counting + // to ensure we don't sever our connection to the source prematurely. + const grouped = createGroupedObservable(key, group); + subscriber.next(grouped); + + if (duration) { + const durationSubscriber = createOperatorSubscriber( + // Providing the group here ensures that it is disposed of -- via `unsubscribe` -- + // when the duration subscription is torn down. That is important, because then + // if someone holds a handle to the grouped observable and tries to subscribe to it + // after the connection to the source has been severed, they will get an + // `ObjectUnsubscribedError` and know they can't possibly get any notifications. + group as any, + () => { + // Our duration notified! We can complete the group. + // The group will be removed from the map in the finalization phase. + group!.complete(); + durationSubscriber?.unsubscribe(); + }, + // Completions are also sent to the group, but just the group. + undefined, + // Errors on the duration subscriber are sent to the group + // but only the group. They are not sent to the main subscription. + undefined, + // Finalization: Remove this group from our map. + () => groups.delete(key) + ); + + // Start our duration notifier. + groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber)); + } + } + + // Send the value to our group. + group.next(element ? element(value) : value); + } catch (err) { + handleError(err); + } + }, + // Source completes. + () => notify((consumer) => consumer.complete()), + // Error from the source. + handleError, + // Free up memory. + // When the source subscription is _finally_ torn down, release the subjects and keys + // in our groups Map, they may be quite large and we don't want to keep them around if we + // don't have to. + () => groups.clear(), + () => { + teardownAttempted = true; + // We only kill our subscription to the source if we have + // no active groups. As stated above, consider this scenario: + // source$.pipe(groupBy(fn), take(2)). + return activeGroups === 0; + } + ); + + // Subscribe to the source + source.subscribe(groupBySourceSubscriber); + + /** + * Creates the actual grouped observable returned. + * @param key The key of the group + * @param groupSubject The subject that fuels the group + */ + function createGroupedObservable(key: K, groupSubject: SubjectLike) { + const result: any = new Observable((groupSubscriber) => { + activeGroups++; + const innerSub = groupSubject.subscribe(groupSubscriber); + return () => { + innerSub.unsubscribe(); + // We can kill the subscription to our source if we now have no more + // active groups subscribed, and a finalization was already attempted on + // the source. + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); +} + +/** + * An observable of values that is the emitted by the result of a {@link groupBy} operator, + * contains a `key` property for the grouping. + */ +export interface GroupedObservable extends Observable { + /** + * The key value for the grouped notifications. + */ + readonly key: K; +} diff --git a/node_modules/rxjs/src/internal/operators/ignoreElements.ts b/node_modules/rxjs/src/internal/operators/ignoreElements.ts new file mode 100644 index 0000000..d4977ac --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/ignoreElements.ts @@ -0,0 +1,45 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; + +/** + * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. + * + * ![](ignoreElements.png) + * + * The `ignoreElements` operator suppresses all items emitted by the source Observable, + * but allows its termination notification (either `error` or `complete`) to pass through unchanged. + * + * If you do not care about the items being emitted by an Observable, but you do want to be notified + * when it completes or when it terminates with an error, you can apply the `ignoreElements` operator + * to the Observable, which will ensure that it will never call its observers’ `next` handlers. + * + * ## Example + * + * Ignore all `next` emissions from the source + * + * ```ts + * import { of, ignoreElements } from 'rxjs'; + * + * of('you', 'talking', 'to', 'me') + * .pipe(ignoreElements()) + * .subscribe({ + * next: word => console.log(word), + * error: err => console.log('error:', err), + * complete: () => console.log('the end'), + * }); + * + * // result: + * // 'the end' + * ``` + * + * @return A function that returns an empty Observable that only calls + * `complete` or `error`, based on which one is called by the source + * Observable. + */ +export function ignoreElements(): OperatorFunction { + return operate((source, subscriber) => { + source.subscribe(createOperatorSubscriber(subscriber, noop)); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/isEmpty.ts b/node_modules/rxjs/src/internal/operators/isEmpty.ts new file mode 100644 index 0000000..5de8deb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/isEmpty.ts @@ -0,0 +1,82 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits `false` if the input Observable emits any values, or emits `true` if the + * input Observable completes without emitting any values. + * + * Tells whether any values are emitted by an Observable. + * + * ![](isEmpty.png) + * + * `isEmpty` transforms an Observable that emits values into an Observable that + * emits a single boolean value representing whether or not any values were + * emitted by the source Observable. As soon as the source Observable emits a + * value, `isEmpty` will emit a `false` and complete. If the source Observable + * completes having not emitted anything, `isEmpty` will emit a `true` and + * complete. + * + * A similar effect could be achieved with {@link count}, but `isEmpty` can emit + * a `false` value sooner. + * + * ## Examples + * + * Emit `false` for a non-empty Observable + * + * ```ts + * import { Subject, isEmpty } from 'rxjs'; + * + * const source = new Subject(); + * const result = source.pipe(isEmpty()); + * + * source.subscribe(x => console.log(x)); + * result.subscribe(x => console.log(x)); + * + * source.next('a'); + * source.next('b'); + * source.next('c'); + * source.complete(); + * + * // Outputs + * // 'a' + * // false + * // 'b' + * // 'c' + * ``` + * + * Emit `true` for an empty Observable + * + * ```ts + * import { EMPTY, isEmpty } from 'rxjs'; + * + * const result = EMPTY.pipe(isEmpty()); + * result.subscribe(x => console.log(x)); + * + * // Outputs + * // true + * ``` + * + * @see {@link count} + * @see {@link EMPTY} + * + * @return A function that returns an Observable that emits boolean value + * indicating whether the source Observable was empty or not. + */ +export function isEmpty(): OperatorFunction { + return operate((source, subscriber) => { + source.subscribe( + createOperatorSubscriber( + subscriber, + () => { + subscriber.next(false); + subscriber.complete(); + }, + () => { + subscriber.next(true); + subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/joinAllInternals.ts b/node_modules/rxjs/src/internal/operators/joinAllInternals.ts new file mode 100644 index 0000000..74876e9 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/joinAllInternals.ts @@ -0,0 +1,29 @@ +import { Observable } from '../Observable'; +import { ObservableInput, OperatorFunction } from '../types'; +import { identity } from '../util/identity'; +import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; +import { pipe } from '../util/pipe'; +import { mergeMap } from './mergeMap'; +import { toArray } from './toArray'; + +/** + * Collects all of the inner sources from source observable. Then, once the + * source completes, joins the values using the given static. + * + * This is used for {@link combineLatestAll} and {@link zipAll} which both have the + * same behavior of collecting all inner observables, then operating on them. + * + * @param joinFn The type of static join to apply to the sources collected + * @param project The projection function to apply to the values, if any + */ +export function joinAllInternals(joinFn: (sources: ObservableInput[]) => Observable, project?: (...args: any[]) => R) { + return pipe( + // Collect all inner sources into an array, and emit them when the + // source completes. + toArray() as OperatorFunction, ObservableInput[]>, + // Run the join function on the collected array of inner sources. + mergeMap((sources) => joinFn(sources)), + // If a projection function was supplied, apply it to each result. + project ? mapOneOrManyArgs(project) : (identity as any) + ); +} diff --git a/node_modules/rxjs/src/internal/operators/last.ts b/node_modules/rxjs/src/internal/operators/last.ts new file mode 100644 index 0000000..a046922 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/last.ts @@ -0,0 +1,90 @@ +import { Observable } from '../Observable'; +import { EmptyError } from '../util/EmptyError'; +import { OperatorFunction, TruthyTypesOf } from '../types'; +import { filter } from './filter'; +import { takeLast } from './takeLast'; +import { throwIfEmpty } from './throwIfEmpty'; +import { defaultIfEmpty } from './defaultIfEmpty'; +import { identity } from '../util/identity'; + +export function last(predicate: BooleanConstructor): OperatorFunction>; +export function last(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; +export function last(predicate?: null, defaultValue?: D): OperatorFunction; +export function last( + predicate: (value: T, index: number, source: Observable) => value is S, + defaultValue?: S +): OperatorFunction; +export function last( + predicate: (value: T, index: number, source: Observable) => boolean, + defaultValue?: D +): OperatorFunction; + +/** + * Returns an Observable that emits only the last item emitted by the source Observable. + * It optionally takes a predicate function as a parameter, in which case, rather than emitting + * the last item from the source Observable, the resulting Observable will emit the last item + * from the source Observable that satisfies the predicate. + * + * ![](last.png) + * + * It will throw an error if the source completes without notification or one that matches the predicate. It + * returns the last value or if a predicate is provided last value that matches the predicate. It returns the + * given default value if no notification is emitted or matches the predicate. + * + * ## Examples + * + * Last alphabet from the sequence + * + * ```ts + * import { from, last } from 'rxjs'; + * + * const source = from(['x', 'y', 'z']); + * const result = source.pipe(last()); + * + * result.subscribe(value => console.log(`Last alphabet: ${ value }`)); + * + * // Outputs + * // Last alphabet: z + * ``` + * + * Default value when the value in the predicate is not matched + * + * ```ts + * import { from, last } from 'rxjs'; + * + * const source = from(['x', 'y', 'z']); + * const result = source.pipe(last(char => char === 'a', 'not found')); + * + * result.subscribe(value => console.log(`'a' is ${ value }.`)); + * + * // Outputs + * // 'a' is not found. + * ``` + * + * @see {@link skip} + * @see {@link skipUntil} + * @see {@link skipLast} + * @see {@link skipWhile} + * + * @throws {EmptyError} Delivers an EmptyError to the Observer's `error` + * callback if the Observable completes before any `next` notification was sent. + * @param {function} [predicate] - The condition any source emitted item has to satisfy. + * @param {any} [defaultValue] - An optional default value to provide if last + * predicate isn't met or no values were emitted. + * @return A function that returns an Observable that emits only the last item + * satisfying the given condition from the source, or a NoSuchElementException + * if no such items are emitted. + * @throws - Throws if no items that match the predicate are emitted by the source Observable. + */ +export function last( + predicate?: ((value: T, index: number, source: Observable) => boolean) | null, + defaultValue?: D +): OperatorFunction { + const hasDefaultValue = arguments.length >= 2; + return (source: Observable) => + source.pipe( + predicate ? filter((v, i) => predicate(v, i, source)) : identity, + takeLast(1), + hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError()) + ); +} diff --git a/node_modules/rxjs/src/internal/operators/map.ts b/node_modules/rxjs/src/internal/operators/map.ts new file mode 100644 index 0000000..35b548f --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/map.ts @@ -0,0 +1,62 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function map(project: (value: T, index: number) => R): OperatorFunction; +/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ +export function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; + +/** + * Applies a given `project` function to each value emitted by the source + * Observable, and emits the resulting values as an Observable. + * + * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), + * it passes each source value through a transformation function to get + * corresponding output values. + * + * ![](map.png) + * + * Similar to the well known `Array.prototype.map` function, this operator + * applies a projection to each value and emits that projection in the output + * Observable. + * + * ## Example + * + * Map every click to the `clientX` position of that click + * + * ```ts + * import { fromEvent, map } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const positions = clicks.pipe(map(ev => ev.clientX)); + * + * positions.subscribe(x => console.log(x)); + * ``` + * + * @see {@link mapTo} + * @see {@link pluck} + * + * @param {function(value: T, index: number): R} project The function to apply + * to each `value` emitted by the source Observable. The `index` parameter is + * the number `i` for the i-th emission that has happened since the + * subscription, starting from the number `0`. + * @param {any} [thisArg] An optional argument to define what `this` is in the + * `project` function. + * @return A function that returns an Observable that emits the values from the + * source Observable transformed by the given `project` function. + */ +export function map(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction { + return operate((source, subscriber) => { + // The index of the value from the source. Used with projection. + let index = 0; + // Subscribe to the source, all errors and completions are sent along + // to the consumer. + source.subscribe( + createOperatorSubscriber(subscriber, (value: T) => { + // Call the projection function with the appropriate this context, + // and send the resulting value to the consumer. + subscriber.next(project.call(thisArg, value, index++)); + }) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/mapTo.ts b/node_modules/rxjs/src/internal/operators/mapTo.ts new file mode 100644 index 0000000..9fb8a8e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mapTo.ts @@ -0,0 +1,48 @@ +import { OperatorFunction } from '../types'; +import { map } from './map'; + +/** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */ +export function mapTo(value: R): OperatorFunction; +/** + * @deprecated Do not specify explicit type parameters. Signatures with type parameters + * that cannot be inferred will be removed in v8. `mapTo` itself will be removed in v9, + * use {@link map} instead: `map(() => value)`. + * */ +export function mapTo(value: R): OperatorFunction; + +/** + * Emits the given constant value on the output Observable every time the source + * Observable emits a value. + * + * Like {@link map}, but it maps every source value to + * the same output value every time. + * + * ![](mapTo.png) + * + * Takes a constant `value` as argument, and emits that whenever the source + * Observable emits a value. In other words, ignores the actual source value, + * and simply uses the emission moment to know when to emit the given `value`. + * + * ## Example + * + * Map every click to the string `'Hi'` + * + * ```ts + * import { fromEvent, mapTo } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const greetings = clicks.pipe(mapTo('Hi')); + * + * greetings.subscribe(x => console.log(x)); + * ``` + * + * @see {@link map} + * + * @param value The value to map each source value to. + * @return A function that returns an Observable that emits the given `value` + * every time the source Observable emits. + * @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. + */ +export function mapTo(value: R): OperatorFunction { + return map(() => value); +} diff --git a/node_modules/rxjs/src/internal/operators/materialize.ts b/node_modules/rxjs/src/internal/operators/materialize.ts new file mode 100644 index 0000000..5f9a629 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/materialize.ts @@ -0,0 +1,73 @@ +import { Notification } from '../Notification'; +import { OperatorFunction, ObservableNotification } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Represents all of the notifications from the source Observable as `next` + * emissions marked with their original types within {@link Notification} + * objects. + * + * Wraps `next`, `error` and `complete` emissions in + * {@link Notification} objects, emitted as `next` on the output Observable. + * + * + * ![](materialize.png) + * + * `materialize` returns an Observable that emits a `next` notification for each + * `next`, `error`, or `complete` emission of the source Observable. When the + * source Observable emits `complete`, the output Observable will emit `next` as + * a Notification of type "complete", and then it will emit `complete` as well. + * When the source Observable emits `error`, the output will emit `next` as a + * Notification of type "error", and then `complete`. + * + * This operator is useful for producing metadata of the source Observable, to + * be consumed as `next` emissions. Use it in conjunction with + * {@link dematerialize}. + * + * ## Example + * + * Convert a faulty Observable to an Observable of Notifications + * + * ```ts + * import { of, materialize, map } from 'rxjs'; + * + * const letters = of('a', 'b', 13, 'd'); + * const upperCase = letters.pipe(map((x: any) => x.toUpperCase())); + * const materialized = upperCase.pipe(materialize()); + * + * materialized.subscribe(x => console.log(x)); + * + * // Results in the following: + * // - Notification { kind: 'N', value: 'A', error: undefined, hasValue: true } + * // - Notification { kind: 'N', value: 'B', error: undefined, hasValue: true } + * // - Notification { kind: 'E', value: undefined, error: TypeError { message: x.toUpperCase is not a function }, hasValue: false } + * ``` + * + * @see {@link Notification} + * @see {@link dematerialize} + * + * @return A function that returns an Observable that emits + * {@link Notification} objects that wrap the original emissions from the + * source Observable with metadata. + */ +export function materialize(): OperatorFunction & ObservableNotification> { + return operate((source, subscriber) => { + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + subscriber.next(Notification.createNext(value)); + }, + () => { + subscriber.next(Notification.createComplete()); + subscriber.complete(); + }, + (err) => { + subscriber.next(Notification.createError(err)); + subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/max.ts b/node_modules/rxjs/src/internal/operators/max.ts new file mode 100644 index 0000000..b3c5fcb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/max.ts @@ -0,0 +1,53 @@ +import { reduce } from './reduce'; +import { MonoTypeOperatorFunction } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** + * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), + * and when source Observable completes it emits a single item: the item with the largest value. + * + * ![](max.png) + * + * ## Examples + * + * Get the maximal value of a series of numbers + * + * ```ts + * import { of, max } from 'rxjs'; + * + * of(5, 4, 7, 2, 8) + * .pipe(max()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 8 + * ``` + * + * Use a comparer function to get the maximal item + * + * ```ts + * import { of, max } from 'rxjs'; + * + * of( + * { age: 7, name: 'Foo' }, + * { age: 5, name: 'Bar' }, + * { age: 9, name: 'Beer' } + * ).pipe( + * max((a, b) => a.age < b.age ? -1 : 1) + * ) + * .subscribe(x => console.log(x.name)); + * + * // Outputs + * // 'Beer' + * ``` + * + * @see {@link min} + * + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return A function that returns an Observable that emits item with the + * largest value. + */ +export function max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction { + return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) > 0 ? x : y) : (x, y) => (x > y ? x : y)); +} diff --git a/node_modules/rxjs/src/internal/operators/merge.ts b/node_modules/rxjs/src/internal/operators/merge.ts new file mode 100644 index 0000000..d7cae4e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/merge.ts @@ -0,0 +1,31 @@ +import { ObservableInput, ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { mergeAll } from './mergeAll'; +import { popNumber, popScheduler } from '../util/args'; +import { from } from '../observable/from'; + +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export function merge(...sources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export function merge( + ...sourcesAndConcurrency: [...ObservableInputTuple, number] +): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export function merge( + ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] +): OperatorFunction; +/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ +export function merge( + ...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number, SchedulerLike] +): OperatorFunction; + +export function merge(...args: unknown[]): OperatorFunction { + const scheduler = popScheduler(args); + const concurrent = popNumber(args, Infinity); + args = argsOrArgArray(args); + + return operate((source, subscriber) => { + mergeAll(concurrent)(from([source, ...(args as ObservableInput[])], scheduler)).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/mergeAll.ts b/node_modules/rxjs/src/internal/operators/mergeAll.ts new file mode 100644 index 0000000..9183bad --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeAll.ts @@ -0,0 +1,66 @@ +import { mergeMap } from './mergeMap'; +import { identity } from '../util/identity'; +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; + +/** + * Converts a higher-order Observable into a first-order Observable which + * concurrently delivers all values that are emitted on the inner Observables. + * + * Flattens an Observable-of-Observables. + * + * ![](mergeAll.png) + * + * `mergeAll` subscribes to an Observable that emits Observables, also known as + * a higher-order Observable. Each time it observes one of these emitted inner + * Observables, it subscribes to that and delivers all the values from the + * inner Observable on the output Observable. The output Observable only + * completes once all inner Observables have completed. Any error delivered by + * a inner Observable will be immediately emitted on the output Observable. + * + * ## Examples + * + * Spawn a new interval Observable for each click event, and blend their outputs as one Observable + * + * ```ts + * import { fromEvent, map, interval, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe(map(() => interval(1000))); + * const firstOrder = higherOrder.pipe(mergeAll()); + * + * firstOrder.subscribe(x => console.log(x)); + * ``` + * + * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers + * + * ```ts + * import { fromEvent, map, interval, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const higherOrder = clicks.pipe( + * map(() => interval(1000).pipe(take(10))) + * ); + * const firstOrder = higherOrder.pipe(mergeAll(2)); + * + * firstOrder.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link exhaustAll} + * @see {@link merge} + * @see {@link mergeMap} + * @see {@link mergeMapTo} + * @see {@link mergeScan} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link zipAll} + * + * @param {number} [concurrent=Infinity] Maximum number of inner + * Observables being subscribed to concurrently. + * @return A function that returns an Observable that emits values coming from + * all the inner Observables emitted by the source Observable. + */ +export function mergeAll>(concurrent: number = Infinity): OperatorFunction> { + return mergeMap(identity, concurrent); +} diff --git a/node_modules/rxjs/src/internal/operators/mergeInternals.ts b/node_modules/rxjs/src/internal/operators/mergeInternals.ts new file mode 100644 index 0000000..dab3a2b --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeInternals.ts @@ -0,0 +1,149 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subscriber } from '../Subscriber'; +import { ObservableInput, SchedulerLike } from '../types'; +import { executeSchedule } from '../util/executeSchedule'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * A process embodying the general "merge" strategy. This is used in + * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical. + * @param source The original source observable + * @param subscriber The consumer subscriber + * @param project The projection function to get our inner sources + * @param concurrent The number of concurrent inner subscriptions + * @param onBeforeNext Additional logic to apply before nexting to our consumer + * @param expand If `true` this will perform an "expand" strategy, which differs only + * in that it recurses, and the inner subscription must be schedule-able. + * @param innerSubScheduler A scheduler to use to schedule inner subscriptions, + * this is to support the expand strategy, mostly, and should be deprecated + */ +export function mergeInternals( + source: Observable, + subscriber: Subscriber, + project: (value: T, index: number) => ObservableInput, + concurrent: number, + onBeforeNext?: (innerValue: R) => void, + expand?: boolean, + innerSubScheduler?: SchedulerLike, + additionalFinalizer?: () => void +) { + // Buffered values, in the event of going over our concurrency limit + const buffer: T[] = []; + // The number of active inner subscriptions. + let active = 0; + // An index to pass to our accumulator function + let index = 0; + // Whether or not the outer source has completed. + let isComplete = false; + + /** + * Checks to see if we can complete our result or not. + */ + const checkComplete = () => { + // If the outer has completed, and nothing is left in the buffer, + // and we don't have any active inner subscriptions, then we can + // Emit the state and complete. + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + + // If we're under our concurrency limit, just start the inner subscription, otherwise buffer and wait. + const outerNext = (value: T) => (active < concurrent ? doInnerSub(value) : buffer.push(value)); + + const doInnerSub = (value: T) => { + // If we're expanding, we need to emit the outer values and the inner values + // as the inners will "become outers" in a way as they are recursively fed + // back to the projection mechanism. + expand && subscriber.next(value as any); + + // Increment the number of active subscriptions so we can track it + // against our concurrency limit later. + active++; + + // A flag used to show that the inner observable completed. + // This is checked during finalization to see if we should + // move to the next item in the buffer, if there is on. + let innerComplete = false; + + // Start our inner subscription. + innerFrom(project(value, index++)).subscribe( + createOperatorSubscriber( + subscriber, + (innerValue) => { + // `mergeScan` has additional handling here. For example + // taking the inner value and updating state. + onBeforeNext?.(innerValue); + + if (expand) { + // If we're expanding, then just recurse back to our outer + // handler. It will emit the value first thing. + outerNext(innerValue as any); + } else { + // Otherwise, emit the inner value. + subscriber.next(innerValue); + } + }, + () => { + // Flag that we have completed, so we know to check the buffer + // during finalization. + innerComplete = true; + }, + // Errors are passed to the destination. + undefined, + () => { + // During finalization, if the inner completed (it wasn't errored or + // cancelled), then we want to try the next item in the buffer if + // there is one. + if (innerComplete) { + // We have to wrap this in a try/catch because it happens during + // finalization, possibly asynchronously, and we want to pass + // any errors that happen (like in a projection function) to + // the outer Subscriber. + try { + // INNER SOURCE COMPLETE + // Decrement the active count to ensure that the next time + // we try to call `doInnerSub`, the number is accurate. + active--; + // If we have more values in the buffer, try to process those + // Note that this call will increment `active` ahead of the + // next conditional, if there were any more inner subscriptions + // to start. + while (buffer.length && active < concurrent) { + const bufferedValue = buffer.shift()!; + // Particularly for `expand`, we need to check to see if a scheduler was provided + // for when we want to start our inner subscription. Otherwise, we just start + // are next inner subscription. + if (innerSubScheduler) { + executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); + } else { + doInnerSub(bufferedValue); + } + } + // Check to see if we can complete, and complete if so. + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + } + ) + ); + }; + + // Subscribe to our source observable. + source.subscribe( + createOperatorSubscriber(subscriber, outerNext, () => { + // Outer completed, make a note of it, and check to see if we can complete everything. + isComplete = true; + checkComplete(); + }) + ); + + // Additional finalization (for when the destination is torn down). + // Other finalization is added implicitly via subscription above. + return () => { + additionalFinalizer?.(); + }; +} diff --git a/node_modules/rxjs/src/internal/operators/mergeMap.ts b/node_modules/rxjs/src/internal/operators/mergeMap.ts new file mode 100644 index 0000000..6a88076 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeMap.ts @@ -0,0 +1,96 @@ +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { map } from './map'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; +import { isFunction } from '../util/isFunction'; + +/* tslint:disable:max-line-length */ +export function mergeMap>( + project: (value: T, index: number) => O, + concurrent?: number +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function mergeMap>( + project: (value: T, index: number) => O, + resultSelector: undefined, + concurrent?: number +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function mergeMap>( + project: (value: T, index: number) => O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, + concurrent?: number +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Projects each source value to an Observable which is merged in the output + * Observable. + * + * Maps each value to an Observable, then flattens all of + * these inner Observables using {@link mergeAll}. + * + * ![](mergeMap.png) + * + * Returns an Observable that emits items based on applying a function that you + * supply to each item emitted by the source Observable, where that function + * returns an Observable, and then merging those resulting Observables and + * emitting the results of this merger. + * + * ## Example + * + * Map and flatten each letter to an Observable ticking every 1 second + * + * ```ts + * import { of, mergeMap, interval, map } from 'rxjs'; + * + * const letters = of('a', 'b', 'c'); + * const result = letters.pipe( + * mergeMap(x => interval(1000).pipe(map(i => x + i))) + * ); + * + * result.subscribe(x => console.log(x)); + * + * // Results in the following: + * // a0 + * // b0 + * // c0 + * // a1 + * // b1 + * // c1 + * // continues to list a, b, c every second with respective ascending integers + * ``` + * + * @see {@link concatMap} + * @see {@link exhaustMap} + * @see {@link merge} + * @see {@link mergeAll} + * @see {@link mergeMapTo} + * @see {@link mergeScan} + * @see {@link switchMap} + * + * @param {function(value: T, ?index: number): ObservableInput} project A function + * that, when applied to an item emitted by the source Observable, returns an + * Observable. + * @param {number} [concurrent=Infinity] Maximum number of input + * Observables being subscribed to concurrently. + * @return A function that returns an Observable that emits the result of + * applying the projection function (and the optional deprecated + * `resultSelector`) to each item emitted by the source Observable and merging + * the results of the Observables obtained from this transformation. + */ +export function mergeMap>( + project: (value: T, index: number) => O, + resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number, + concurrent: number = Infinity +): OperatorFunction | R> { + if (isFunction(resultSelector)) { + // DEPRECATED PATH + return mergeMap((a, i) => map((b: any, ii: number) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent); + } else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + + return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent)); +} diff --git a/node_modules/rxjs/src/internal/operators/mergeMapTo.ts b/node_modules/rxjs/src/internal/operators/mergeMapTo.ts new file mode 100644 index 0000000..b457401 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeMapTo.ts @@ -0,0 +1,74 @@ +import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types'; +import { mergeMap } from './mergeMap'; +import { isFunction } from '../util/isFunction'; + +/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */ +export function mergeMapTo>( + innerObservable: O, + concurrent?: number +): OperatorFunction>; +/** + * @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. + * Details: https://rxjs.dev/deprecations/resultSelector + */ +export function mergeMapTo>( + innerObservable: O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, + concurrent?: number +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Projects each source value to the same Observable which is merged multiple + * times in the output Observable. + * + * It's like {@link mergeMap}, but maps each value always + * to the same inner Observable. + * + * ![](mergeMapTo.png) + * + * Maps each source value to the given Observable `innerObservable` regardless + * of the source value, and then merges those resulting Observables into one + * single Observable, which is the output Observable. + * + * ## Example + * + * For each click event, start an interval Observable ticking every 1 second + * + * ```ts + * import { fromEvent, mergeMapTo, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(mergeMapTo(interval(1000))); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link concatMapTo} + * @see {@link merge} + * @see {@link mergeAll} + * @see {@link mergeMap} + * @see {@link mergeScan} + * @see {@link switchMapTo} + * + * @param {ObservableInput} innerObservable An Observable to replace each value from + * the source Observable. + * @param {number} [concurrent=Infinity] Maximum number of input + * Observables being subscribed to concurrently. + * @return A function that returns an Observable that emits items from the + * given `innerObservable`. + * @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` + */ +export function mergeMapTo>( + innerObservable: O, + resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number, + concurrent: number = Infinity +): OperatorFunction | R> { + if (isFunction(resultSelector)) { + return mergeMap(() => innerObservable, resultSelector, concurrent); + } + if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return mergeMap(() => innerObservable, concurrent); +} diff --git a/node_modules/rxjs/src/internal/operators/mergeScan.ts b/node_modules/rxjs/src/internal/operators/mergeScan.ts new file mode 100644 index 0000000..6e1e37c --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeScan.ts @@ -0,0 +1,93 @@ +import { ObservableInput, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { mergeInternals } from './mergeInternals'; + +/** + * Applies an accumulator function over the source Observable where the + * accumulator function itself returns an Observable, then each intermediate + * Observable returned is merged into the output Observable. + * + * It's like {@link scan}, but the Observables returned + * by the accumulator are merged into the outer Observable. + * + * The first parameter of the `mergeScan` is an `accumulator` function which is + * being called every time the source Observable emits a value. `mergeScan` will + * subscribe to the value returned by the `accumulator` function and will emit + * values to the subscriber emitted by inner Observable. + * + * The `accumulator` function is being called with three parameters passed to it: + * `acc`, `value` and `index`. The `acc` parameter is used as the state parameter + * whose value is initially set to the `seed` parameter (the second parameter + * passed to the `mergeScan` operator). + * + * `mergeScan` internally keeps the value of the `acc` parameter: as long as the + * source Observable emits without inner Observable emitting, the `acc` will be + * set to `seed`. The next time the inner Observable emits a value, `mergeScan` + * will internally remember it and it will be passed to the `accumulator` + * function as `acc` parameter the next time source emits. + * + * The `value` parameter of the `accumulator` function is the value emitted by the + * source Observable, while the `index` is a number which represent the order of the + * current emission by the source Observable. It starts with 0. + * + * The last parameter to the `mergeScan` is the `concurrent` value which defaults + * to Infinity. It represents the maximum number of inner Observable subscriptions + * at a time. + * + * ## Example + * + * Count the number of click events + * + * ```ts + * import { fromEvent, map, mergeScan, of } from 'rxjs'; + * + * const click$ = fromEvent(document, 'click'); + * const one$ = click$.pipe(map(() => 1)); + * const seed = 0; + * const count$ = one$.pipe( + * mergeScan((acc, one) => of(acc + one), seed) + * ); + * + * count$.subscribe(x => console.log(x)); + * + * // Results: + * // 1 + * // 2 + * // 3 + * // 4 + * // ...and so on for each click + * ``` + * + * @see {@link scan} + * @see {@link switchScan} + * + * @param {function(acc: R, value: T): Observable} accumulator + * The accumulator function called on each source value. + * @param seed The initial accumulation value. + * @param {number} [concurrent=Infinity] Maximum number of + * input Observables being subscribed to concurrently. + * @return A function that returns an Observable of the accumulated values. + */ +export function mergeScan( + accumulator: (acc: R, value: T, index: number) => ObservableInput, + seed: R, + concurrent = Infinity +): OperatorFunction { + return operate((source, subscriber) => { + // The accumulated state. + let state = seed; + + return mergeInternals( + source, + subscriber, + (value, index) => accumulator(state, value, index), + concurrent, + (value) => { + state = value; + }, + false, + undefined, + () => (state = null!) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/mergeWith.ts b/node_modules/rxjs/src/internal/operators/mergeWith.ts new file mode 100644 index 0000000..b0c8142 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/mergeWith.ts @@ -0,0 +1,49 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +import { merge } from './merge'; + +/** + * Merge the values from all observables to a single observable result. + * + * Creates an observable, that when subscribed to, subscribes to the source + * observable, and all other sources provided as arguments. All values from + * every source are emitted from the resulting subscription. + * + * When all sources complete, the resulting observable will complete. + * + * When any source errors, the resulting observable will error. + * + * ## Example + * + * Joining all outputs from multiple user input event streams + * + * ```ts + * import { fromEvent, map, mergeWith } from 'rxjs'; + * + * const clicks$ = fromEvent(document, 'click').pipe(map(() => 'click')); + * const mousemoves$ = fromEvent(document, 'mousemove').pipe(map(() => 'mousemove')); + * const dblclicks$ = fromEvent(document, 'dblclick').pipe(map(() => 'dblclick')); + * + * mousemoves$ + * .pipe(mergeWith(clicks$, dblclicks$)) + * .subscribe(x => console.log(x)); + * + * // result (assuming user interactions) + * // 'mousemove' + * // 'mousemove' + * // 'mousemove' + * // 'click' + * // 'click' + * // 'dblclick' + * ``` + * + * @see {@link merge} + * + * @param otherSources the sources to combine the current source with. + * @return A function that returns an Observable that merges the values from + * all given Observables. + */ +export function mergeWith( + ...otherSources: [...ObservableInputTuple] +): OperatorFunction { + return merge(...otherSources); +} diff --git a/node_modules/rxjs/src/internal/operators/min.ts b/node_modules/rxjs/src/internal/operators/min.ts new file mode 100644 index 0000000..bef78d1 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/min.ts @@ -0,0 +1,53 @@ +import { reduce } from './reduce'; +import { MonoTypeOperatorFunction } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** + * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), + * and when source Observable completes it emits a single item: the item with the smallest value. + * + * ![](min.png) + * + * ## Examples + * + * Get the minimal value of a series of numbers + * + * ```ts + * import { of, min } from 'rxjs'; + * + * of(5, 4, 7, 2, 8) + * .pipe(min()) + * .subscribe(x => console.log(x)); + * + * // Outputs + * // 2 + * ``` + * + * Use a comparer function to get the minimal item + * + * ```ts + * import { of, min } from 'rxjs'; + * + * of( + * { age: 7, name: 'Foo' }, + * { age: 5, name: 'Bar' }, + * { age: 9, name: 'Beer' } + * ).pipe( + * min((a, b) => a.age < b.age ? -1 : 1) + * ) + * .subscribe(x => console.log(x.name)); + * + * // Outputs + * // 'Bar' + * ``` + * + * @see {@link max} + * + * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the + * value of two items. + * @return A function that returns an Observable that emits item with the + * smallest value. + */ +export function min(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction { + return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) < 0 ? x : y) : (x, y) => (x < y ? x : y)); +} diff --git a/node_modules/rxjs/src/internal/operators/multicast.ts b/node_modules/rxjs/src/internal/operators/multicast.ts new file mode 100644 index 0000000..4ea03d2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/multicast.ts @@ -0,0 +1,98 @@ +import { Subject } from '../Subject'; +import { Observable } from '../Observable'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { OperatorFunction, UnaryFunction, ObservedValueOf, ObservableInput } from '../types'; +import { isFunction } from '../util/isFunction'; +import { connect } from './connect'; + +/** + * An operator that creates a {@link ConnectableObservable}, that when connected, + * with the `connect` method, will use the provided subject to multicast the values + * from the source to all consumers. + * + * @param subject The subject to multicast through. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. + * `multicast(subject), refCount()` is equivalent to + * `share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function multicast(subject: Subject): UnaryFunction, ConnectableObservable>; + +/** + * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, + * rather than duplicate the effort of documenting the same behavior, please see documentation for the + * {@link connect} operator. + * + * @param subject The subject used to multicast. + * @param selector A setup function to setup the multicast + * @return A function that returns an observable that mirrors the observable returned by the selector. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `multicast(subject, selector)` is equivalent to + * `connect(selector, { connector: () => subject })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function multicast>( + subject: Subject, + selector: (shared: Observable) => O +): OperatorFunction>; + +/** + * An operator that creates a {@link ConnectableObservable}, that when connected, + * with the `connect` method, will use the provided subject to multicast the values + * from the source to all consumers. + * + * @param subjectFactory A factory that will be called to create the subject. Passing a function here + * will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of + * the source. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. + * `multicast(() => new BehaviorSubject('test')), refCount()` is equivalent to + * `share({ connector: () => new BehaviorSubject('test') })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function multicast(subjectFactory: () => Subject): UnaryFunction, ConnectableObservable>; + +/** + * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, + * rather than duplicate the effort of documenting the same behavior, please see documentation for the + * {@link connect} operator. + * + * @param subjectFactory A factory that creates the subject used to multicast. + * @param selector A function to setup the multicast and select the output. + * @return A function that returns an observable that mirrors the observable returned by the selector. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `multicast(subjectFactory, selector)` is equivalent to + * `connect(selector, { connector: subjectFactory })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function multicast>( + subjectFactory: () => Subject, + selector: (shared: Observable) => O +): OperatorFunction>; + +/** + * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the + * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's + * behaviors. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function multicast( + subjectOrSubjectFactory: Subject | (() => Subject), + selector?: (source: Observable) => Observable +): OperatorFunction { + const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory; + + if (isFunction(selector)) { + // If a selector function is provided, then we're a "normal" operator that isn't + // going to return a ConnectableObservable. We can use `connect` to do what we + // need to do. + return connect(selector, { + connector: subjectFactory, + }); + } + + return (source: Observable) => new ConnectableObservable(source, subjectFactory); +} diff --git a/node_modules/rxjs/src/internal/operators/observeOn.ts b/node_modules/rxjs/src/internal/operators/observeOn.ts new file mode 100644 index 0000000..bd37111 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/observeOn.ts @@ -0,0 +1,70 @@ +/** @prettier */ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { executeSchedule } from '../util/executeSchedule'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Re-emits all notifications from source Observable with specified scheduler. + * + * Ensure a specific scheduler is used, from outside of an Observable. + * + * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule + * notifications emitted by the source Observable. It might be useful, if you do not have control over + * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless. + * + * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, + * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal + * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits + * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`. + * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split + * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source + * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a + * little bit more, to ensure that they are emitted at expected moments. + * + * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications + * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn` + * will delay all notifications - including error notifications - while `delay` will pass through error + * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator + * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used + * for notification emissions in general. + * + * ## Example + * + * Ensure values in subscribe are called just before browser repaint + * + * ```ts + * import { interval, observeOn, animationFrameScheduler } from 'rxjs'; + * + * const someDiv = document.createElement('div'); + * someDiv.style.cssText = 'width: 200px;background: #09c'; + * document.body.appendChild(someDiv); + * const intervals = interval(10); // Intervals are scheduled + * // with async scheduler by default... + * intervals.pipe( + * observeOn(animationFrameScheduler) // ...but we will observe on animationFrame + * ) // scheduler to ensure smooth animation. + * .subscribe(val => { + * someDiv.style.height = val + 'px'; + * }); + * ``` + * + * @see {@link delay} + * + * @param scheduler Scheduler that will be used to reschedule notifications from source Observable. + * @param delay Number of milliseconds that states with what delay every notification should be rescheduled. + * @return A function that returns an Observable that emits the same + * notifications as the source Observable, but with provided scheduler. + */ +export function observeOn(scheduler: SchedulerLike, delay = 0): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), + () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), + (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay) + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts b/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts new file mode 100644 index 0000000..9bcac81 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts @@ -0,0 +1,99 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; + +export function onErrorResumeNextWith( + sources: [...ObservableInputTuple] +): OperatorFunction; +export function onErrorResumeNextWith( + ...sources: [...ObservableInputTuple] +): OperatorFunction; + +/** + * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one + * that was passed. + * + * Execute series of Observables, subscribes to next one on error or complete. + * + * ![](onErrorResumeNext.png) + * + * `onErrorResumeNext` is an operator that accepts a series of Observables, provided either directly as + * arguments or as an array. If no single Observable is provided, returned Observable will simply behave the same + * as the source. + * + * `onErrorResumeNext` returns an Observable that starts by subscribing and re-emitting values from the source Observable. + * When its stream of values ends - no matter if Observable completed or emitted an error - `onErrorResumeNext` + * will subscribe to the first Observable that was passed as an argument to the method. It will start re-emitting + * its values as well and - again - when that stream ends, `onErrorResumeNext` will proceed to subscribing yet another + * Observable in provided series, no matter if previous Observable completed or ended with an error. This will + * be happening until there is no more Observables left in the series, at which point returned Observable will + * complete - even if the last subscribed stream ended with an error. + * + * `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive + * when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable + * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with + * an error. + * + * Note that you do not get any access to errors emitted by the Observables. In particular do not + * expect these errors to appear in error callback passed to {@link Observable#subscribe}. If you want to take + * specific actions based on what error was emitted by an Observable, you should try out {@link catchError} instead. + * + * + * ## Example + * + * Subscribe to the next Observable after map fails + * + * ```ts + * import { of, onErrorResumeNext, map } from 'rxjs'; + * + * of(1, 2, 3, 0) + * .pipe( + * map(x => { + * if (x === 0) { + * throw Error(); + * } + * + * return 10 / x; + * }), + * onErrorResumeNext(of(1, 2, 3)) + * ) + * .subscribe({ + * next: val => console.log(val), + * error: err => console.log(err), // Will never be called. + * complete: () => console.log('that\'s it!') + * }); + * + * // Logs: + * // 10 + * // 5 + * // 3.3333333333333335 + * // 1 + * // 2 + * // 3 + * // 'that's it!' + * ``` + * + * @see {@link concat} + * @see {@link catchError} + * + * @param {...ObservableInput} sources Observables passed either directly or as an array. + * @return A function that returns an Observable that emits values from source + * Observable, but - if it errors - subscribes to the next passed Observable + * and so on, until it completes or runs out of Observables. + */ +export function onErrorResumeNextWith( + ...sources: [[...ObservableInputTuple]] | [...ObservableInputTuple] +): OperatorFunction { + // For some reason, TS 4.1 RC gets the inference wrong here and infers the + // result to be `A[number][]` - completely dropping the ObservableInput part + // of the type. This makes no sense whatsoever. As a workaround, the type is + // asserted explicitly. + const nextSources = argsOrArgArray(sources) as unknown as ObservableInputTuple; + + return (source) => oERNCreate(source, ...nextSources); +} + +/** + * @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8. + */ +export const onErrorResumeNext = onErrorResumeNextWith; diff --git a/node_modules/rxjs/src/internal/operators/pairwise.ts b/node_modules/rxjs/src/internal/operators/pairwise.ts new file mode 100644 index 0000000..e2b0eba --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/pairwise.ts @@ -0,0 +1,61 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Groups pairs of consecutive emissions together and emits them as an array of + * two values. + * + * Puts the current value and previous value together as + * an array, and emits that. + * + * ![](pairwise.png) + * + * The Nth emission from the source Observable will cause the output Observable + * to emit an array [(N-1)th, Nth] of the previous and the current value, as a + * pair. For this reason, `pairwise` emits on the second and subsequent + * emissions from the source Observable, but not on the first emission, because + * there is no previous value in that case. + * + * ## Example + * + * On every click (starting from the second), emit the relative distance to the previous click + * + * ```ts + * import { fromEvent, pairwise, map } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const pairs = clicks.pipe(pairwise()); + * const distance = pairs.pipe( + * map(([first, second]) => { + * const x0 = first.clientX; + * const y0 = first.clientY; + * const x1 = second.clientX; + * const y1 = second.clientY; + * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2)); + * }) + * ); + * + * distance.subscribe(x => console.log(x)); + * ``` + * + * @see {@link buffer} + * @see {@link bufferCount} + * + * @return A function that returns an Observable of pairs (as arrays) of + * consecutive values from the source Observable. + */ +export function pairwise(): OperatorFunction { + return operate((source, subscriber) => { + let prev: T; + let hasPrev = false; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + const p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + }) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/partition.ts b/node_modules/rxjs/src/internal/operators/partition.ts new file mode 100644 index 0000000..9b02a0c --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/partition.ts @@ -0,0 +1,63 @@ +import { not } from '../util/not'; +import { filter } from './filter'; +import { Observable } from '../Observable'; +import { UnaryFunction } from '../types'; + +/** + * Splits the source Observable into two, one with values that satisfy a + * predicate, and another with values that don't satisfy the predicate. + * + * It's like {@link filter}, but returns two Observables: + * one like the output of {@link filter}, and the other with values that did not + * pass the condition. + * + * ![](partition.png) + * + * `partition` outputs an array with two Observables that partition the values + * from the source Observable through the given `predicate` function. The first + * Observable in that array emits source values for which the predicate argument + * returns true. The second Observable emits source values for which the + * predicate returns false. The first behaves like {@link filter} and the second + * behaves like {@link filter} with the predicate negated. + * + * ## Example + * + * Partition click events into those on DIV elements and those elsewhere + * + * ```ts + * import { fromEvent } from 'rxjs'; + * import { partition } from 'rxjs/operators'; + * + * const div = document.createElement('div'); + * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; + * document.body.appendChild(div); + * + * const clicks = fromEvent(document, 'click'); + * const [clicksOnDivs, clicksElsewhere] = clicks.pipe(partition(ev => (ev.target).tagName === 'DIV')); + * + * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x)); + * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x)); + * ``` + * + * @see {@link filter} + * + * @param {function(value: T, index: number): boolean} predicate A function that + * evaluates each value emitted by the source Observable. If it returns `true`, + * the value is emitted on the first Observable in the returned array, if + * `false` the value is emitted on the second Observable in the array. The + * `index` parameter is the number `i` for the i-th source emission that has + * happened since the subscription, starting from the number `0`. + * @param {any} [thisArg] An optional argument to determine the value of `this` + * in the `predicate` function. + * @return A function that returns an array with two Observables: one with + * values that passed the predicate, and another with values that did not pass + * the predicate. + * @deprecated Replaced with the `partition` static creation function. Will be removed in v8. + */ +export function partition( + predicate: (value: T, index: number) => boolean, + thisArg?: any +): UnaryFunction, [Observable, Observable]> { + return (source: Observable) => + [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)] as [Observable, Observable]; +} diff --git a/node_modules/rxjs/src/internal/operators/pluck.ts b/node_modules/rxjs/src/internal/operators/pluck.ts new file mode 100644 index 0000000..b80da73 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/pluck.ts @@ -0,0 +1,106 @@ +import { map } from './map'; +import { OperatorFunction } from '../types'; + +/* tslint:disable:max-line-length */ +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck(k1: K1): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck(k1: K1, k2: K2): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck( + k1: K1, + k2: K2, + k3: K3 +): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck( + k1: K1, + k2: K2, + k3: K3, + k4: K4 +): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck< + T, + K1 extends keyof T, + K2 extends keyof T[K1], + K3 extends keyof T[K1][K2], + K4 extends keyof T[K1][K2][K3], + K5 extends keyof T[K1][K2][K3][K4] +>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck< + T, + K1 extends keyof T, + K2 extends keyof T[K1], + K3 extends keyof T[K1][K2], + K4 extends keyof T[K1][K2][K3], + K5 extends keyof T[K1][K2][K3][K4], + K6 extends keyof T[K1][K2][K3][K4][K5] +>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck< + T, + K1 extends keyof T, + K2 extends keyof T[K1], + K3 extends keyof T[K1][K2], + K4 extends keyof T[K1][K2][K3], + K5 extends keyof T[K1][K2][K3][K4], + K6 extends keyof T[K1][K2][K3][K4][K5] +>(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6, ...rest: string[]): OperatorFunction; +/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ +export function pluck(...properties: string[]): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Maps each source value to its specified nested property. + * + * Like {@link map}, but meant only for picking one of + * the nested properties of every emitted value. + * + * ![](pluck.png) + * + * Given a list of strings or numbers describing a path to a property, retrieves + * the value of a specified nested property from all values in the source + * Observable. If a property can't be resolved, it will return `undefined` for + * that value. + * + * ## Example + * + * Map every click to the tagName of the clicked target element + * + * ```ts + * import { fromEvent, pluck } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const tagNames = clicks.pipe(pluck('target', 'tagName')); + * + * tagNames.subscribe(x => console.log(x)); + * ``` + * + * @see {@link map} + * + * @param properties The nested properties to pluck from each source + * value. + * @return A function that returns an Observable of property values from the + * source values. + * @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. + */ +export function pluck(...properties: Array): OperatorFunction { + const length = properties.length; + if (length === 0) { + throw new Error('list of properties cannot be empty.'); + } + return map((x) => { + let currentProp: any = x; + for (let i = 0; i < length; i++) { + const p = currentProp?.[properties[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }); +} diff --git a/node_modules/rxjs/src/internal/operators/publish.ts b/node_modules/rxjs/src/internal/operators/publish.ts new file mode 100644 index 0000000..105cd36 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/publish.ts @@ -0,0 +1,93 @@ +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { multicast } from './multicast'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction, ObservableInput, ObservedValueOf } from '../types'; +import { connect } from './connect'; + +/** + * Returns a connectable observable that, when connected, will multicast + * all values through a single underlying {@link Subject} instance. + * + * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. + * `source.pipe(publish())` is equivalent to + * `connectable(source, { connector: () => new Subject(), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publish`, use {@link share} operator instead. + * `source.pipe(publish(), refCount())` is equivalent to + * `source.pipe(share({ resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publish(): UnaryFunction, ConnectableObservable>; + +/** + * Returns an observable, that when subscribed to, creates an underlying {@link Subject}, + * provides an observable view of it to a `selector` function, takes the observable result of + * that selector function and subscribes to it, sending its values to the consumer, _then_ connects + * the subject to the original source. + * + * @param selector A function used to setup multicasting prior to automatic connection. + * + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `publish(selector)` is equivalent to `connect(selector)`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publish>(selector: (shared: Observable) => O): OperatorFunction>; + +/** + * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called + * before it begins emitting items to those Observers that have subscribed to it. + * + * Makes a cold Observable hot + * + * ![](publish.png) + * + * ## Examples + * + * Make `source$` hot by applying `publish` operator, then merge each inner observable into a single one + * and subscribe + * + * ```ts + * import { zip, interval, of, map, publish, merge, tap } from 'rxjs'; + * + * const source$ = zip(interval(2000), of(1, 2, 3, 4, 5, 6, 7, 8, 9)) + * .pipe(map(([, number]) => number)); + * + * source$ + * .pipe( + * publish(multicasted$ => + * merge( + * multicasted$.pipe(tap(x => console.log('Stream 1:', x))), + * multicasted$.pipe(tap(x => console.log('Stream 2:', x))), + * multicasted$.pipe(tap(x => console.log('Stream 3:', x))) + * ) + * ) + * ) + * .subscribe(); + * + * // Results every two seconds + * // Stream 1: 1 + * // Stream 2: 1 + * // Stream 3: 1 + * // ... + * // Stream 1: 9 + * // Stream 2: 9 + * // Stream 3: 9 + * ``` + * + * @see {@link publishLast} + * @see {@link publishReplay} + * @see {@link publishBehavior} + * + * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times + * as needed, without causing multiple subscriptions to the source sequence. + * Subscribers to the given source will receive all notifications of the source from the time of the subscription on. + * @return A function that returns a ConnectableObservable that upon connection + * causes the source Observable to emit items to its Observers. + * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the + * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's + * behaviors. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publish(selector?: OperatorFunction): MonoTypeOperatorFunction | OperatorFunction { + return selector ? (source) => connect(selector)(source) : (source) => multicast(new Subject())(source); +} diff --git a/node_modules/rxjs/src/internal/operators/publishBehavior.ts b/node_modules/rxjs/src/internal/operators/publishBehavior.ts new file mode 100644 index 0000000..d94589c --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/publishBehavior.ts @@ -0,0 +1,26 @@ +import { Observable } from '../Observable'; +import { BehaviorSubject } from '../BehaviorSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { UnaryFunction } from '../types'; + +/** + * Creates a {@link ConnectableObservable} that utilizes a {@link BehaviorSubject}. + * + * @param initialValue The initial value passed to the {@link BehaviorSubject}. + * @return A function that returns a {@link ConnectableObservable} + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link BehaviorSubject} under the hood, use {@link connectable}. + * `source.pipe(publishBehavior(initValue))` is equivalent to + * `connectable(source, { connector: () => new BehaviorSubject(initValue), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishBehavior`, use the {@link share} operator instead. + * `source.pipe(publishBehavior(initValue), refCount())` is equivalent to + * `source.pipe(share({ connector: () => new BehaviorSubject(initValue), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishBehavior(initialValue: T): UnaryFunction, ConnectableObservable> { + // Note that this has *never* supported the selector function. + return (source) => { + const subject = new BehaviorSubject(initialValue); + return new ConnectableObservable(source, () => subject); + }; +} diff --git a/node_modules/rxjs/src/internal/operators/publishLast.ts b/node_modules/rxjs/src/internal/operators/publishLast.ts new file mode 100644 index 0000000..ded47fb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/publishLast.ts @@ -0,0 +1,76 @@ +import { Observable } from '../Observable'; +import { AsyncSubject } from '../AsyncSubject'; +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { UnaryFunction } from '../types'; + +/** + * Returns a connectable observable sequence that shares a single subscription to the + * underlying sequence containing only the last notification. + * + * ![](publishLast.png) + * + * Similar to {@link publish}, but it waits until the source observable completes and stores + * the last emitted value. + * Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last + * value even if it has no more subscribers. If subsequent subscriptions happen, they will + * immediately get that last stored value and complete. + * + * ## Example + * + * ```ts + * import { ConnectableObservable, interval, publishLast, tap, take } from 'rxjs'; + * + * const connectable = >interval(1000) + * .pipe( + * tap(x => console.log('side effect', x)), + * take(3), + * publishLast() + * ); + * + * connectable.subscribe({ + * next: x => console.log('Sub. A', x), + * error: err => console.log('Sub. A Error', err), + * complete: () => console.log('Sub. A Complete') + * }); + * + * connectable.subscribe({ + * next: x => console.log('Sub. B', x), + * error: err => console.log('Sub. B Error', err), + * complete: () => console.log('Sub. B Complete') + * }); + * + * connectable.connect(); + * + * // Results: + * // 'side effect 0' - after one second + * // 'side effect 1' - after two seconds + * // 'side effect 2' - after three seconds + * // 'Sub. A 2' - immediately after 'side effect 2' + * // 'Sub. B 2' + * // 'Sub. A Complete' + * // 'Sub. B Complete' + * ``` + * + * @see {@link ConnectableObservable} + * @see {@link publish} + * @see {@link publishReplay} + * @see {@link publishBehavior} + * + * @return A function that returns an Observable that emits elements of a + * sequence produced by multicasting the source sequence. + * @deprecated Will be removed in v8. To create a connectable observable with an + * {@link AsyncSubject} under the hood, use {@link connectable}. + * `source.pipe(publishLast())` is equivalent to + * `connectable(source, { connector: () => new AsyncSubject(), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishLast`, use the {@link share} operator instead. + * `source.pipe(publishLast(), refCount())` is equivalent to + * `source.pipe(share({ connector: () => new AsyncSubject(), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishLast(): UnaryFunction, ConnectableObservable> { + // Note that this has *never* supported a selector function like `publish` and `publishReplay`. + return (source) => { + const subject = new AsyncSubject(); + return new ConnectableObservable(source, () => subject); + }; +} diff --git a/node_modules/rxjs/src/internal/operators/publishReplay.ts b/node_modules/rxjs/src/internal/operators/publishReplay.ts new file mode 100644 index 0000000..47494e2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/publishReplay.ts @@ -0,0 +1,96 @@ +import { Observable } from '../Observable'; +import { ReplaySubject } from '../ReplaySubject'; +import { multicast } from './multicast'; +import { MonoTypeOperatorFunction, OperatorFunction, TimestampProvider, ObservableInput, ObservedValueOf } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** + * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} + * internally. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link ReplaySubject} under the hood, use {@link connectable}. + * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to + * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. + * `publishReplay(size, time, scheduler), refCount()` is equivalent to + * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishReplay( + bufferSize?: number, + windowTime?: number, + timestampProvider?: TimestampProvider +): MonoTypeOperatorFunction; + +/** + * Creates an observable, that when subscribed to, will create a {@link ReplaySubject}, + * and pass an observable from it (using [asObservable](api/index/class/Subject#asObservable)) to + * the `selector` function, which then returns an observable that is subscribed to before + * "connecting" the source to the internal `ReplaySubject`. + * + * Since this is deprecated, for additional details see the documentation for {@link connect}. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param selector A function used to setup the multicast. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. Use the {@link connect} operator instead. + * `source.pipe(publishReplay(size, window, selector, scheduler))` is equivalent to + * `source.pipe(connect(selector, { connector: () => new ReplaySubject(size, window, scheduler) }))`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishReplay>( + bufferSize: number | undefined, + windowTime: number | undefined, + selector: (shared: Observable) => O, + timestampProvider?: TimestampProvider +): OperatorFunction>; + +/** + * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} + * internally. + * + * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. + * @param windowTime The window time for the underlying {@link ReplaySubject}. + * @param selector Passing `undefined` here determines that this operator will return a {@link ConnectableObservable}. + * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. + * @deprecated Will be removed in v8. To create a connectable observable that uses a + * {@link ReplaySubject} under the hood, use {@link connectable}. + * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to + * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. + * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. + * `publishReplay(size, time, scheduler), refCount()` is equivalent to + * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishReplay>( + bufferSize: number | undefined, + windowTime: number | undefined, + selector: undefined, + timestampProvider: TimestampProvider +): OperatorFunction>; + +/** + * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the + * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's + * behaviors. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function publishReplay( + bufferSize?: number, + windowTime?: number, + selectorOrScheduler?: TimestampProvider | OperatorFunction, + timestampProvider?: TimestampProvider +) { + if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; + // Note, we're passing `selector!` here, because at runtime, `undefined` is an acceptable argument + // but it makes our TypeScript signature for `multicast` unhappy (as it should, because it's gross). + return (source: Observable) => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector!)(source); +} diff --git a/node_modules/rxjs/src/internal/operators/race.ts b/node_modules/rxjs/src/internal/operators/race.ts new file mode 100644 index 0000000..efa8cd9 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/race.ts @@ -0,0 +1,20 @@ +import { ObservableInputTuple, OperatorFunction } from '../types'; +import { argsOrArgArray } from '../util/argsOrArgArray'; +import { raceWith } from './raceWith'; + +/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ +export function race(otherSources: [...ObservableInputTuple]): OperatorFunction; +/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ +export function race(...otherSources: [...ObservableInputTuple]): OperatorFunction; + +/** + * Returns an Observable that mirrors the first source Observable to emit a next, + * error or complete notification from the combination of this Observable and supplied Observables. + * @param args Sources used to race for which Observable emits first. + * @return A function that returns an Observable that mirrors the output of the + * first Observable to emit an item. + * @deprecated Replaced with {@link raceWith}. Will be removed in v8. + */ +export function race(...args: any[]): OperatorFunction { + return raceWith(...argsOrArgArray(args)); +} diff --git a/node_modules/rxjs/src/internal/operators/raceWith.ts b/node_modules/rxjs/src/internal/operators/raceWith.ts new file mode 100644 index 0000000..6e72929 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/raceWith.ts @@ -0,0 +1,40 @@ +import { OperatorFunction, ObservableInputTuple } from '../types'; +import { raceInit } from '../observable/race'; +import { operate } from '../util/lift'; +import { identity } from '../util/identity'; + +/** + * Creates an Observable that mirrors the first source Observable to emit a next, + * error or complete notification from the combination of the Observable to which + * the operator is applied and supplied Observables. + * + * ## Example + * + * ```ts + * import { interval, map, raceWith } from 'rxjs'; + * + * const obs1 = interval(7000).pipe(map(() => 'slow one')); + * const obs2 = interval(3000).pipe(map(() => 'fast one')); + * const obs3 = interval(5000).pipe(map(() => 'medium one')); + * + * obs1 + * .pipe(raceWith(obs2, obs3)) + * .subscribe(winner => console.log(winner)); + * + * // Outputs + * // a series of 'fast one' + * ``` + * + * @param otherSources Sources used to race for which Observable emits first. + * @return A function that returns an Observable that mirrors the output of the + * first Observable to emit an item. + */ +export function raceWith( + ...otherSources: [...ObservableInputTuple] +): OperatorFunction { + return !otherSources.length + ? identity + : operate((source, subscriber) => { + raceInit([source, ...otherSources])(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/reduce.ts b/node_modules/rxjs/src/internal/operators/reduce.ts new file mode 100644 index 0000000..c9bdda0 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/reduce.ts @@ -0,0 +1,62 @@ +import { scanInternals } from './scanInternals'; +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; + +export function reduce(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; +export function reduce(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; +export function reduce(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; + +/** + * Applies an accumulator function over the source Observable, and returns the + * accumulated result when the source completes, given an optional seed value. + * + * Combines together all values emitted on the source, + * using an accumulator function that knows how to join a new source value into + * the accumulation from the past. + * + * ![](reduce.png) + * + * Like + * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce), + * `reduce` applies an `accumulator` function against an accumulation and each + * value of the source Observable (from the past) to reduce it to a single + * value, emitted on the output Observable. Note that `reduce` will only emit + * one value, only when the source Observable completes. It is equivalent to + * applying operator {@link scan} followed by operator {@link last}. + * + * Returns an Observable that applies a specified `accumulator` function to each + * item emitted by the source Observable. If a `seed` value is specified, then + * that value will be used as the initial value for the accumulator. If no seed + * value is specified, the first item of the source is used as the seed. + * + * ## Example + * + * Count the number of click events that happened in 5 seconds + * + * ```ts + * import { fromEvent, takeUntil, interval, map, reduce } from 'rxjs'; + * + * const clicksInFiveSeconds = fromEvent(document, 'click') + * .pipe(takeUntil(interval(5000))); + * + * const ones = clicksInFiveSeconds.pipe(map(() => 1)); + * const seed = 0; + * const count = ones.pipe(reduce((acc, one) => acc + one, seed)); + * + * count.subscribe(x => console.log(x)); + * ``` + * + * @see {@link count} + * @see {@link expand} + * @see {@link mergeScan} + * @see {@link scan} + * + * @param {function(acc: A, value: V, index: number): A} accumulator The accumulator function + * called on each source value. + * @param {A} [seed] The initial accumulation value. + * @return A function that returns an Observable that emits a single value that + * is the result of accumulating the values emitted by the source Observable. + */ +export function reduce(accumulator: (acc: V | A, value: V, index: number) => A, seed?: any): OperatorFunction { + return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); +} diff --git a/node_modules/rxjs/src/internal/operators/refCount.ts b/node_modules/rxjs/src/internal/operators/refCount.ts new file mode 100644 index 0000000..c4162c0 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/refCount.ts @@ -0,0 +1,119 @@ +import { ConnectableObservable } from '../observable/ConnectableObservable'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way + * you can connect to it. + * + * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if + * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it + * unsubscribes from the source. This way you can make sure that everything before the *published* + * refCount has only a single subscription independently of the number of subscribers to the target + * observable. + * + * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator + * (making the observable hot) and the *refCount* operator in a sequence. + * + * ![](refCount.png) + * + * ## Example + * + * In the following example there are two intervals turned into connectable observables + * by using the *publish* operator. The first one uses the *refCount* operator, the + * second one does not use it. You will notice that a connectable observable does nothing + * until you call its connect function. + * + * ```ts + * import { interval, tap, publish, refCount } from 'rxjs'; + * + * // Turn the interval observable into a ConnectableObservable (hot) + * const refCountInterval = interval(400).pipe( + * tap(num => console.log(`refCount ${ num }`)), + * publish(), + * refCount() + * ); + * + * const publishedInterval = interval(400).pipe( + * tap(num => console.log(`publish ${ num }`)), + * publish() + * ); + * + * refCountInterval.subscribe(); + * refCountInterval.subscribe(); + * // 'refCount 0' -----> 'refCount 1' -----> etc + * // All subscriptions will receive the same value and the tap (and + * // every other operator) before the `publish` operator will be executed + * // only once per event independently of the number of subscriptions. + * + * publishedInterval.subscribe(); + * // Nothing happens until you call .connect() on the observable. + * ``` + * + * @return A function that returns an Observable that automates the connection + * to ConnectableObservable. + * @see {@link ConnectableObservable} + * @see {@link share} + * @see {@link publish} + * @deprecated Replaced with the {@link share} operator. How `share` is used + * will depend on the connectable observable you created just prior to the + * `refCount` operator. + * Details: https://rxjs.dev/deprecations/multicasting + */ +export function refCount(): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let connection: Subscription | null = null; + + (source as any)._refCount++; + + const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => { + if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) { + connection = null; + return; + } + + /// + // Compare the local RefCountSubscriber's connection Subscription to the + // connection Subscription on the shared ConnectableObservable. In cases + // where the ConnectableObservable source synchronously emits values, and + // the RefCountSubscriber's downstream Observers synchronously unsubscribe, + // execution continues to here before the RefCountOperator has a chance to + // supply the RefCountSubscriber with the shared connection Subscription. + // For example: + // ``` + // range(0, 10).pipe( + // publish(), + // refCount(), + // take(5), + // ) + // .subscribe(); + // ``` + // In order to account for this case, RefCountSubscriber should only dispose + // the ConnectableObservable's shared connection Subscription if the + // connection Subscription exists, *and* either: + // a. RefCountSubscriber doesn't have a reference to the shared connection + // Subscription yet, or, + // b. RefCountSubscriber's connection Subscription reference is identical + // to the shared connection Subscription + /// + + const sharedConnection = (source as any)._connection; + const conn = connection; + connection = null; + + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + + subscriber.unsubscribe(); + }); + + source.subscribe(refCounter); + + if (!refCounter.closed) { + connection = (source as ConnectableObservable).connect(); + } + }); +} diff --git a/node_modules/rxjs/src/internal/operators/repeat.ts b/node_modules/rxjs/src/internal/operators/repeat.ts new file mode 100644 index 0000000..fa0b3a3 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/repeat.ts @@ -0,0 +1,172 @@ +import { Subscription } from '../Subscription'; +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { timer } from '../observable/timer'; + +export interface RepeatConfig { + /** + * The number of times to repeat the source. Defaults to `Infinity`. + */ + count?: number; + + /** + * If a `number`, will delay the repeat of the source by that number of milliseconds. + * If a function, it will provide the number of times the source has been subscribed to, + * and the return value should be a valid observable input that will notify when the source + * should be repeated. If the notifier observable is empty, the result will complete. + */ + delay?: number | ((count: number) => ObservableInput); +} + +/** + * Returns an Observable that will resubscribe to the source stream when the source stream completes. + * + * Repeats all values emitted on the source. It's like {@link retry}, but for non error cases. + * + * ![](repeat.png) + * + * Repeat will output values from a source until the source completes, then it will resubscribe to the + * source a specified number of times, with a specified delay. Repeat can be particularly useful in + * combination with closing operators like {@link take}, {@link takeUntil}, {@link first}, or {@link takeWhile}, + * as it can be used to restart a source again from scratch. + * + * Repeat is very similar to {@link retry}, where {@link retry} will resubscribe to the source in the error case, but + * `repeat` will resubscribe if the source completes. + * + * Note that `repeat` will _not_ catch errors. Use {@link retry} for that. + * + * - `repeat(0)` returns an empty observable + * - `repeat()` will repeat forever + * - `repeat({ delay: 200 })` will repeat forever, with a delay of 200ms between repetitions. + * - `repeat({ count: 2, delay: 400 })` will repeat twice, with a delay of 400ms between repetitions. + * - `repeat({ delay: (count) => timer(count * 1000) })` will repeat forever, but will have a delay that grows by one second for each repetition. + * + * ## Example + * + * Repeat a message stream + * + * ```ts + * import { of, repeat } from 'rxjs'; + * + * const source = of('Repeat message'); + * const result = source.pipe(repeat(3)); + * + * result.subscribe(x => console.log(x)); + * + * // Results + * // 'Repeat message' + * // 'Repeat message' + * // 'Repeat message' + * ``` + * + * Repeat 3 values, 2 times + * + * ```ts + * import { interval, take, repeat } from 'rxjs'; + * + * const source = interval(1000); + * const result = source.pipe(take(3), repeat(2)); + * + * result.subscribe(x => console.log(x)); + * + * // Results every second + * // 0 + * // 1 + * // 2 + * // 0 + * // 1 + * // 2 + * ``` + * + * Defining two complex repeats with delays on the same source. + * Note that the second repeat cannot be called until the first + * repeat as exhausted it's count. + * + * ```ts + * import { defer, of, repeat } from 'rxjs'; + * + * const source = defer(() => { + * return of(`Hello, it is ${new Date()}`) + * }); + * + * source.pipe( + * // Repeat 3 times with a delay of 1 second between repetitions + * repeat({ + * count: 3, + * delay: 1000, + * }), + * + * // *Then* repeat forever, but with an exponential step-back + * // maxing out at 1 minute. + * repeat({ + * delay: (count) => timer(Math.min(60000, 2 ^ count * 1000)) + * }) + * ) + * ``` + * + * @see {@link repeatWhen} + * @see {@link retry} + * + * @param count The number of times the source Observable items are repeated, a count of 0 will yield + * an empty Observable. + */ +export function repeat(countOrConfig?: number | RepeatConfig): MonoTypeOperatorFunction { + let count = Infinity; + let delay: RepeatConfig['delay']; + + if (countOrConfig != null) { + if (typeof countOrConfig === 'object') { + ({ count = Infinity, delay } = countOrConfig); + } else { + count = countOrConfig; + } + } + + return count <= 0 + ? () => EMPTY + : operate((source, subscriber) => { + let soFar = 0; + let sourceSub: Subscription | null; + + const resubscribe = () => { + sourceSub?.unsubscribe(); + sourceSub = null; + if (delay != null) { + const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); + const notifierSubscriber = createOperatorSubscriber(subscriber, () => { + notifierSubscriber.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber); + } else { + subscribeToSource(); + } + }; + + const subscribeToSource = () => { + let syncUnsub = false; + sourceSub = source.subscribe( + createOperatorSubscriber(subscriber, undefined, () => { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + }) + ); + + if (syncUnsub) { + resubscribe(); + } + }; + + subscribeToSource(); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/repeatWhen.ts b/node_modules/rxjs/src/internal/operators/repeatWhen.ts new file mode 100644 index 0000000..5e55ca0 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/repeatWhen.ts @@ -0,0 +1,125 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; + +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source + * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable + * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise + * this method will resubscribe to the source Observable. + * + * ![](repeatWhen.png) + * + * ## Example + * + * Repeat a message stream on click + * + * ```ts + * import { of, fromEvent, repeatWhen } from 'rxjs'; + * + * const source = of('Repeat message'); + * const documentClick$ = fromEvent(document, 'click'); + * + * const result = source.pipe(repeatWhen(() => documentClick$)); + * + * result.subscribe(data => console.log(data)) + * ``` + * + * @see {@link repeat} + * @see {@link retry} + * @see {@link retryWhen} + * + * @param notifier Function that receives an Observable of notifications with + * which a user can `complete` or `error`, aborting the repetition. + * @return A function that returns an `ObservableInput` that mirrors the source + * Observable with the exception of a `complete`. + * @deprecated Will be removed in v9 or v10. Use {@link repeat}'s {@link RepeatConfig#delay delay} option instead. + * Instead of `repeatWhen(() => notify$)`, use: `repeat({ delay: () => notify$ })`. + */ +export function repeatWhen(notifier: (notifications: Observable) => ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let innerSub: Subscription | null; + let syncResub = false; + let completions$: Subject; + let isNotifierComplete = false; + let isMainComplete = false; + + /** + * Checks to see if we can complete the result, completes it, and returns `true` if it was completed. + */ + const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true); + /** + * Gets the subject to send errors through. If it doesn't exist, + * we know we need to setup the notifier. + */ + const getCompletionSubject = () => { + if (!completions$) { + completions$ = new Subject(); + + // If the call to `notifier` throws, it will be caught by the OperatorSubscriber + // In the main subscription -- in `subscribeForRepeatWhen`. + innerFrom(notifier(completions$)).subscribe( + createOperatorSubscriber( + subscriber, + () => { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + // If we don't have an innerSub yet, that's because the inner subscription + // call hasn't even returned yet. We've arrived here synchronously. + // So we flag that we want to resub, such that we can ensure finalization + // happens before we resubscribe. + syncResub = true; + } + }, + () => { + isNotifierComplete = true; + checkComplete(); + } + ) + ); + } + return completions$; + }; + + const subscribeForRepeatWhen = () => { + isMainComplete = false; + + innerSub = source.subscribe( + createOperatorSubscriber(subscriber, undefined, () => { + isMainComplete = true; + // Check to see if we are complete, and complete if so. + // If we are not complete. Get the subject. This calls the `notifier` function. + // If that function fails, it will throw and `.next()` will not be reached on this + // line. The thrown error is caught by the _complete handler in this + // `OperatorSubscriber` and handled appropriately. + !checkComplete() && getCompletionSubject().next(); + }) + ); + + if (syncResub) { + // Ensure that the inner subscription is torn down before + // moving on to the next subscription in the synchronous case. + // If we don't do this here, all inner subscriptions will not be + // torn down until the entire observable is done. + innerSub.unsubscribe(); + // It is important to null this out. Not only to free up memory, but + // to make sure code above knows we are in a subscribing state to + // handle synchronous resubscription. + innerSub = null; + // We may need to do this multiple times, so reset the flags. + syncResub = false; + // Resubscribe + subscribeForRepeatWhen(); + } + }; + + // Start the subscription + subscribeForRepeatWhen(); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/retry.ts b/node_modules/rxjs/src/internal/operators/retry.ts new file mode 100644 index 0000000..fe03385 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/retry.ts @@ -0,0 +1,167 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { Subscription } from '../Subscription'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; +import { timer } from '../observable/timer'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * The {@link retry} operator configuration object. `retry` either accepts a `number` + * or an object described by this interface. + */ +export interface RetryConfig { + /** + * The maximum number of times to retry. If `count` is omitted, `retry` will try to + * resubscribe on errors infinite number of times. + */ + count?: number; + /** + * The number of milliseconds to delay before retrying, OR a function to + * return a notifier for delaying. If a function is given, that function should + * return a notifier that, when it emits will retry the source. If the notifier + * completes _without_ emitting, the resulting observable will complete without error, + * if the notifier errors, the error will be pushed to the result. + */ + delay?: number | ((error: any, retryCount: number) => ObservableInput); + /** + * Whether or not to reset the retry counter when the retried subscription + * emits its first value. + */ + resetOnSuccess?: boolean; +} + +export function retry(count?: number): MonoTypeOperatorFunction; +export function retry(config: RetryConfig): MonoTypeOperatorFunction; + +/** + * Returns an Observable that mirrors the source Observable with the exception of an `error`. + * + * If the source Observable calls `error`, this method will resubscribe to the source Observable for a maximum of + * `count` resubscriptions rather than propagating the `error` call. + * + * ![](retry.png) + * + * The number of retries is determined by the `count` parameter. It can be set either by passing a number to + * `retry` function or by setting `count` property when `retry` is configured using {@link RetryConfig}. If + * `count` is omitted, `retry` will try to resubscribe on errors infinite number of times. + * + * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those + * emitted during failed subscriptions. For example, if an Observable fails at first but emits `[1, 2]` then + * succeeds the second time and emits: `[1, 2, 3, 4, 5, complete]` then the complete stream of emissions and + * notifications would be: `[1, 2, 1, 2, 3, 4, 5, complete]`. + * + * ## Example + * + * ```ts + * import { interval, mergeMap, throwError, of, retry } from 'rxjs'; + * + * const source = interval(1000); + * const result = source.pipe( + * mergeMap(val => val > 5 ? throwError(() => 'Error!') : of(val)), + * retry(2) // retry 2 times on error + * ); + * + * result.subscribe({ + * next: value => console.log(value), + * error: err => console.log(`${ err }: Retried 2 times then quit!`) + * }); + * + * // Output: + * // 0..1..2..3..4..5.. + * // 0..1..2..3..4..5.. + * // 0..1..2..3..4..5.. + * // 'Error!: Retried 2 times then quit!' + * ``` + * + * @see {@link retryWhen} + * + * @param configOrCount - Either number of retry attempts before failing or a {@link RetryConfig} object. + * @return A function that returns an Observable that will resubscribe to the + * source stream when the source stream errors, at most `count` times. + */ +export function retry(configOrCount: number | RetryConfig = Infinity): MonoTypeOperatorFunction { + let config: RetryConfig; + if (configOrCount && typeof configOrCount === 'object') { + config = configOrCount; + } else { + config = { + count: configOrCount as number, + }; + } + const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; + + return count <= 0 + ? identity + : operate((source, subscriber) => { + let soFar = 0; + let innerSub: Subscription | null; + const subscribeForRetry = () => { + let syncUnsub = false; + innerSub = source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // If we're resetting on success + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, + // Completions are passed through to consumer. + undefined, + (err) => { + if (soFar++ < count) { + // We are still under our retry count + const resub = () => { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + + if (delay != null) { + // The user specified a retry delay. + // They gave us a number, use a timer, otherwise, it's a function, + // and we're going to call it to get a notifier. + const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); + const notifierSubscriber = createOperatorSubscriber( + subscriber, + () => { + // After we get the first notification, we + // unsubscribe from the notifier, because we don't want anymore + // and we resubscribe to the source. + notifierSubscriber.unsubscribe(); + resub(); + }, + () => { + // The notifier completed without emitting. + // The author is telling us they want to complete. + subscriber.complete(); + } + ); + notifier.subscribe(notifierSubscriber); + } else { + // There was no notifier given. Just resub immediately. + resub(); + } + } else { + // We're past our maximum number of retries. + // Just send along the error. + subscriber.error(err); + } + } + ) + ); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/retryWhen.ts b/node_modules/rxjs/src/internal/operators/retryWhen.ts new file mode 100644 index 0000000..8090e5f --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/retryWhen.ts @@ -0,0 +1,113 @@ +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; + +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable + * calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`. + * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child + * subscription. Otherwise this method will resubscribe to the source Observable. + * + * ![](retryWhen.png) + * + * Retry an observable sequence on error based on custom criteria. + * + * ## Example + * + * ```ts + * import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs'; + * + * const source = interval(1000); + * const result = source.pipe( + * map(value => { + * if (value > 5) { + * // error will be picked up by retryWhen + * throw value; + * } + * return value; + * }), + * retryWhen(errors => + * errors.pipe( + * // log error message + * tap(value => console.log(`Value ${ value } was too high!`)), + * // restart in 5 seconds + * delayWhen(value => timer(value * 1000)) + * ) + * ) + * ); + * + * result.subscribe(value => console.log(value)); + * + * // results: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * // 'Value 6 was too high!' + * // - Wait 5 seconds then repeat + * ``` + * + * @see {@link retry} + * + * @param notifier Function that receives an Observable of notifications with which a + * user can `complete` or `error`, aborting the retry. + * @return A function that returns an `ObservableInput` that mirrors the source + * Observable with the exception of an `error`. + * @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead. + * Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead. + * Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`. + */ +export function retryWhen(notifier: (errors: Observable) => ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let innerSub: Subscription | null; + let syncResub = false; + let errors$: Subject; + + const subscribeForRetryWhen = () => { + innerSub = source.subscribe( + createOperatorSubscriber(subscriber, undefined, undefined, (err) => { + if (!errors$) { + errors$ = new Subject(); + innerFrom(notifier(errors$)).subscribe( + createOperatorSubscriber(subscriber, () => + // If we have an innerSub, this was an asynchronous call, kick off the retry. + // Otherwise, if we don't have an innerSub yet, that's because the inner subscription + // call hasn't even returned yet. We've arrived here synchronously. + // So we flag that we want to resub, such that we can ensure finalization + // happens before we resubscribe. + innerSub ? subscribeForRetryWhen() : (syncResub = true) + ) + ); + } + if (errors$) { + // We have set up the notifier without error. + errors$.next(err); + } + }) + ); + + if (syncResub) { + // Ensure that the inner subscription is torn down before + // moving on to the next subscription in the synchronous case. + // If we don't do this here, all inner subscriptions will not be + // torn down until the entire observable is done. + innerSub.unsubscribe(); + innerSub = null; + // We may need to do this multiple times, so reset the flag. + syncResub = false; + // Resubscribe + subscribeForRetryWhen(); + } + }; + + // Start the subscription + subscribeForRetryWhen(); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/sample.ts b/node_modules/rxjs/src/internal/operators/sample.ts new file mode 100644 index 0000000..9008af2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/sample.ts @@ -0,0 +1,72 @@ +import { innerFrom } from '../observable/innerFrom'; +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { noop } from '../util/noop'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits the most recently emitted value from the source Observable whenever + * another Observable, the `notifier`, emits. + * + * It's like {@link sampleTime}, but samples whenever + * the `notifier` `ObservableInput` emits something. + * + * ![](sample.png) + * + * Whenever the `notifier` `ObservableInput` emits a value, `sample` + * looks at the source Observable and emits whichever value it has most recently + * emitted since the previous sampling, unless the source has not emitted + * anything since the previous sampling. The `notifier` is subscribed to as soon + * as the output Observable is subscribed. + * + * ## Example + * + * On every click, sample the most recent `seconds` timer + * + * ```ts + * import { fromEvent, interval, sample } from 'rxjs'; + * + * const seconds = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const result = seconds.pipe(sample(clicks)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounce} + * @see {@link sampleTime} + * @see {@link throttle} + * + * @param notifier The `ObservableInput` to use for sampling the + * source Observable. + * @return A function that returns an Observable that emits the results of + * sampling the values emitted by the source Observable whenever the notifier + * Observable emits value or completes. + */ +export function sample(notifier: ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + let lastValue: T | null = null; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + hasValue = true; + lastValue = value; + }) + ); + innerFrom(notifier).subscribe( + createOperatorSubscriber( + subscriber, + () => { + if (hasValue) { + hasValue = false; + const value = lastValue!; + lastValue = null; + subscriber.next(value); + } + }, + noop + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/sampleTime.ts b/node_modules/rxjs/src/internal/operators/sampleTime.ts new file mode 100644 index 0000000..6558fa0 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/sampleTime.ts @@ -0,0 +1,51 @@ +import { asyncScheduler } from '../scheduler/async'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { sample } from './sample'; +import { interval } from '../observable/interval'; + +/** + * Emits the most recently emitted value from the source Observable within + * periodic time intervals. + * + * Samples the source Observable at periodic time + * intervals, emitting what it samples. + * + * ![](sampleTime.png) + * + * `sampleTime` periodically looks at the source Observable and emits whichever + * value it has most recently emitted since the previous sampling, unless the + * source has not emitted anything since the previous sampling. The sampling + * happens periodically in time every `period` milliseconds (or the time unit + * defined by the optional `scheduler` argument). The sampling starts as soon as + * the output Observable is subscribed. + * + * ## Example + * + * Every second, emit the most recent click at most once + * + * ```ts + * import { fromEvent, sampleTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(sampleTime(1000)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sample} + * @see {@link throttleTime} + * + * @param {number} period The sampling period expressed in milliseconds or the + * time unit determined internally by the optional `scheduler`. + * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for + * managing the timers that handle the sampling. + * @return A function that returns an Observable that emits the results of + * sampling the values emitted by the source Observable at the specified time + * interval. + */ +export function sampleTime(period: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { + return sample(interval(period, scheduler)); +} diff --git a/node_modules/rxjs/src/internal/operators/scan.ts b/node_modules/rxjs/src/internal/operators/scan.ts new file mode 100644 index 0000000..ce30695 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/scan.ts @@ -0,0 +1,95 @@ +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { scanInternals } from './scanInternals'; + +export function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; +export function scan(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; +export function scan(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; + +// TODO: link to a "redux pattern" section in the guide (location TBD) + +/** + * Useful for encapsulating and managing state. Applies an accumulator (or "reducer function") + * to each value from the source after an initial state is established -- either via + * a `seed` value (second argument), or from the first value from the source. + * + * It's like {@link reduce}, but emits the current + * accumulation state after each update + * + * ![](scan.png) + * + * This operator maintains an internal state and emits it after processing each value as follows: + * + * 1. First value arrives + * - If a `seed` value was supplied (as the second argument to `scan`), let `state = seed` and `value = firstValue`. + * - If NO `seed` value was supplied (no second argument), let `state = firstValue` and go to 3. + * 2. Let `state = accumulator(state, value)`. + * - If an error is thrown by `accumulator`, notify the consumer of an error. The process ends. + * 3. Emit `state`. + * 4. Next value arrives, let `value = nextValue`, go to 2. + * + * ## Examples + * + * An average of previous numbers. This example shows how + * not providing a `seed` can prime the stream with the + * first value from the source. + * + * ```ts + * import { of, scan, map } from 'rxjs'; + * + * const numbers$ = of(1, 2, 3); + * + * numbers$ + * .pipe( + * // Get the sum of the numbers coming in. + * scan((total, n) => total + n), + * // Get the average by dividing the sum by the total number + * // received so far (which is 1 more than the zero-based index). + * map((sum, index) => sum / (index + 1)) + * ) + * .subscribe(console.log); + * ``` + * + * The Fibonacci sequence. This example shows how you can use + * a seed to prime accumulation process. Also... you know... Fibonacci. + * So important to like, computers and stuff that its whiteboarded + * in job interviews. Now you can show them the Rx version! (Please don't, haha) + * + * ```ts + * import { interval, scan, map, startWith } from 'rxjs'; + * + * const firstTwoFibs = [0, 1]; + * // An endless stream of Fibonacci numbers. + * const fibonacci$ = interval(1000).pipe( + * // Scan to get the fibonacci numbers (after 0, 1) + * scan(([a, b]) => [b, a + b], firstTwoFibs), + * // Get the second number in the tuple, it's the one you calculated + * map(([, n]) => n), + * // Start with our first two digits :) + * startWith(...firstTwoFibs) + * ); + * + * fibonacci$.subscribe(console.log); + * ``` + * + * @see {@link expand} + * @see {@link mergeScan} + * @see {@link reduce} + * @see {@link switchScan} + * + * @param accumulator A "reducer function". This will be called for each value after an initial state is + * acquired. + * @param seed The initial state. If this is not provided, the first value from the source will + * be used as the initial state, and emitted without going through the accumulator. All subsequent values + * will be processed by the accumulator function. If this is provided, all values will go through + * the accumulator function. + * @return A function that returns an Observable of the accumulated values. + */ +export function scan(accumulator: (acc: V | A | S, value: V, index: number) => A, seed?: S): OperatorFunction { + // providing a seed of `undefined` *should* be valid and trigger + // hasSeed! so don't use `seed !== undefined` checks! + // For this reason, we have to check it here at the original call site + // otherwise inside Operator/Subscriber we won't know if `undefined` + // means they didn't provide anything or if they literally provided `undefined` + return operate(scanInternals(accumulator, seed as S, arguments.length >= 2, true)); +} diff --git a/node_modules/rxjs/src/internal/operators/scanInternals.ts b/node_modules/rxjs/src/internal/operators/scanInternals.ts new file mode 100644 index 0000000..f2c2e5a --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/scanInternals.ts @@ -0,0 +1,62 @@ +import { Observable } from '../Observable'; +import { Subscriber } from '../Subscriber'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * A basic scan operation. This is used for `scan` and `reduce`. + * @param accumulator The accumulator to use + * @param seed The seed value for the state to accumulate + * @param hasSeed Whether or not a seed was provided + * @param emitOnNext Whether or not to emit the state on next + * @param emitBeforeComplete Whether or not to emit the before completion + */ + +export function scanInternals( + accumulator: (acc: V | A | S, value: V, index: number) => A, + seed: S, + hasSeed: boolean, + emitOnNext: boolean, + emitBeforeComplete?: undefined | true +) { + return (source: Observable, subscriber: Subscriber) => { + // Whether or not we have state yet. This will only be + // false before the first value arrives if we didn't get + // a seed value. + let hasState = hasSeed; + // The state that we're tracking, starting with the seed, + // if there is one, and then updated by the return value + // from the accumulator on each emission. + let state: any = seed; + // An index to pass to the accumulator function. + let index = 0; + + // Subscribe to our source. All errors and completions are passed through. + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // Always increment the index. + const i = index++; + // Set the state + state = hasState + ? // We already have state, so we can get the new state from the accumulator + accumulator(state, value, i) + : // We didn't have state yet, a seed value was not provided, so + + // we set the state to the first value, and mark that we have state now + ((hasState = true), value); + + // Maybe send it to the consumer. + emitOnNext && subscriber.next(state); + }, + // If an onComplete was given, call it, otherwise + // just pass through the complete notification to the consumer. + emitBeforeComplete && + (() => { + hasState && subscriber.next(state); + subscriber.complete(); + }) + ) + ); + }; +} diff --git a/node_modules/rxjs/src/internal/operators/sequenceEqual.ts b/node_modules/rxjs/src/internal/operators/sequenceEqual.ts new file mode 100644 index 0000000..a6f9bec --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/sequenceEqual.ts @@ -0,0 +1,146 @@ +import { OperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Compares all values of two observables in sequence using an optional comparator function + * and returns an observable of a single boolean value representing whether or not the two sequences + * are equal. + * + * Checks to see of all values emitted by both observables are equal, in order. + * + * ![](sequenceEqual.png) + * + * `sequenceEqual` subscribes to source observable and `compareTo` `ObservableInput` (that internally + * gets converted to an observable) and buffers incoming values from each observable. Whenever either + * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom + * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the + * observables completes, the operator will wait for the other observable to complete; If the other + * observable emits before completing, the returned observable will emit `false` and complete. If one observable never + * completes or emits after the other completes, the returned observable will never complete. + * + * ## Example + * + * Figure out if the Konami code matches + * + * ```ts + * import { from, fromEvent, map, bufferCount, mergeMap, sequenceEqual } from 'rxjs'; + * + * const codes = from([ + * 'ArrowUp', + * 'ArrowUp', + * 'ArrowDown', + * 'ArrowDown', + * 'ArrowLeft', + * 'ArrowRight', + * 'ArrowLeft', + * 'ArrowRight', + * 'KeyB', + * 'KeyA', + * 'Enter', // no start key, clearly. + * ]); + * + * const keys = fromEvent(document, 'keyup').pipe(map(e => e.code)); + * const matches = keys.pipe( + * bufferCount(11, 1), + * mergeMap(last11 => from(last11).pipe(sequenceEqual(codes))) + * ); + * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched)); + * ``` + * + * @see {@link combineLatest} + * @see {@link zip} + * @see {@link withLatestFrom} + * + * @param compareTo The `ObservableInput` sequence to compare the source sequence to. + * @param comparator An optional function to compare each value pair. + * + * @return A function that returns an Observable that emits a single boolean + * value representing whether or not the values emitted by the source + * Observable and provided `ObservableInput` were equal in sequence. + */ +export function sequenceEqual( + compareTo: ObservableInput, + comparator: (a: T, b: T) => boolean = (a, b) => a === b +): OperatorFunction { + return operate((source, subscriber) => { + // The state for the source observable + const aState = createState(); + // The state for the compareTo observable; + const bState = createState(); + + /** A utility to emit and complete */ + const emit = (isEqual: boolean) => { + subscriber.next(isEqual); + subscriber.complete(); + }; + + /** + * Creates a subscriber that subscribes to one of the sources, and compares its collected + * state -- `selfState` -- to the other source's collected state -- `otherState`. This + * is used for both streams. + */ + const createSubscriber = (selfState: SequenceState, otherState: SequenceState) => { + const sequenceEqualSubscriber = createOperatorSubscriber( + subscriber, + (a: T) => { + const { buffer, complete } = otherState; + if (buffer.length === 0) { + // If there's no values in the other buffer + // and the other stream is complete, we know + // this isn't a match, because we got one more value. + // Otherwise, we push onto our buffer, so when the other + // stream emits, it can pull this value off our buffer and check it + // at the appropriate time. + complete ? emit(false) : selfState.buffer.push(a); + } else { + // If the other stream *does* have values in its buffer, + // pull the oldest one off so we can compare it to what we + // just got. If it wasn't a match, emit `false` and complete. + !comparator(a, buffer.shift()!) && emit(false); + } + }, + () => { + // Or observable completed + selfState.complete = true; + const { complete, buffer } = otherState; + // If the other observable is also complete, and there's + // still stuff left in their buffer, it doesn't match, if their + // buffer is empty, then it does match. This is because we can't + // possibly get more values here anymore. + complete && emit(buffer.length === 0); + // Be sure to clean up our stream as soon as possible if we can. + sequenceEqualSubscriber?.unsubscribe(); + } + ); + + return sequenceEqualSubscriber; + }; + + // Subscribe to each source. + source.subscribe(createSubscriber(aState, bState)); + innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); +} + +/** + * A simple structure for the data used to test each sequence + */ +interface SequenceState { + /** A temporary store for arrived values before they are checked */ + buffer: T[]; + /** Whether or not the sequence source has completed. */ + complete: boolean; +} + +/** + * Creates a simple structure that is used to represent + * data used to test each sequence. + */ +function createState(): SequenceState { + return { + buffer: [], + complete: false, + }; +} diff --git a/node_modules/rxjs/src/internal/operators/share.ts b/node_modules/rxjs/src/internal/operators/share.ts new file mode 100644 index 0000000..bc0c270 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/share.ts @@ -0,0 +1,267 @@ +import { innerFrom } from '../observable/innerFrom'; +import { Subject } from '../Subject'; +import { SafeSubscriber } from '../Subscriber'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types'; +import { operate } from '../util/lift'; + +export interface ShareConfig { + /** + * The factory used to create the subject that will connect the source observable to + * multicast consumers. + */ + connector?: () => SubjectLike; + /** + * If `true`, the resulting observable will reset internal state on error from source and return to a "cold" state. This + * allows the resulting observable to be "retried" in the event of an error. + * If `false`, when an error comes from the source it will push the error into the connecting subject, and the subject + * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent retries + * or resubscriptions will resubscribe to that same subject. In all cases, RxJS subjects will emit the same error again, however + * {@link ReplaySubject} will also push its buffered values before pushing the error. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnError?: boolean | ((error: any) => ObservableInput); + /** + * If `true`, the resulting observable will reset internal state on completion from source and return to a "cold" state. This + * allows the resulting observable to be "repeated" after it is done. + * If `false`, when the source completes, it will push the completion through the connecting subject, and the subject + * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent repeats + * or resubscriptions will resubscribe to that same subject. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnComplete?: boolean | (() => ObservableInput); + /** + * If `true`, when the number of subscribers to the resulting observable reaches zero due to those subscribers unsubscribing, the + * internal state will be reset and the resulting observable will return to a "cold" state. This means that the next + * time the resulting observable is subscribed to, a new subject will be created and the source will be subscribed to + * again. + * If `false`, when the number of subscribers to the resulting observable reaches zero due to unsubscription, the subject + * will remain connected to the source, and new subscriptions to the result will be connected through that same subject. + * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained + * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. + */ + resetOnRefCountZero?: boolean | (() => ObservableInput); +} + +export function share(): MonoTypeOperatorFunction; + +export function share(options: ShareConfig): MonoTypeOperatorFunction; + +/** + * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one + * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will + * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`. + * This is an alias for `multicast(() => new Subject()), refCount()`. + * + * The subscription to the underlying source Observable can be reset (unsubscribe and resubscribe for new subscribers), + * if the subscriber count to the shared observable drops to 0, or if the source Observable errors or completes. It is + * possible to use notifier factories for the resets to allow for behaviors like conditional or delayed resets. Please + * note that resetting on error or complete of the source Observable does not behave like a transparent retry or restart + * of the source because the error or complete will be forwarded to all subscribers and their subscription will be + * closed. Only new subscribers after a reset on error or complete happened will cause a fresh subscription to the + * source. To achieve transparent retries or restarts pipe the source through appropriate operators before sharing. + * + * ![](share.png) + * + * ## Example + * + * Generate new multicast Observable from the `source` Observable value + * + * ```ts + * import { interval, tap, map, take, share } from 'rxjs'; + * + * const source = interval(1000).pipe( + * tap(x => console.log('Processing: ', x)), + * map(x => x * x), + * take(6), + * share() + * ); + * + * source.subscribe(x => console.log('subscription 1: ', x)); + * source.subscribe(x => console.log('subscription 2: ', x)); + * + * // Logs: + * // Processing: 0 + * // subscription 1: 0 + * // subscription 2: 0 + * // Processing: 1 + * // subscription 1: 1 + * // subscription 2: 1 + * // Processing: 2 + * // subscription 1: 4 + * // subscription 2: 4 + * // Processing: 3 + * // subscription 1: 9 + * // subscription 2: 9 + * // Processing: 4 + * // subscription 1: 16 + * // subscription 2: 16 + * // Processing: 5 + * // subscription 1: 25 + * // subscription 2: 25 + * ``` + * + * ## Example with notifier factory: Delayed reset + * + * ```ts + * import { interval, take, share, timer } from 'rxjs'; + * + * const source = interval(1000).pipe( + * take(3), + * share({ + * resetOnRefCountZero: () => timer(1000) + * }) + * ); + * + * const subscriptionOne = source.subscribe(x => console.log('subscription 1: ', x)); + * setTimeout(() => subscriptionOne.unsubscribe(), 1300); + * + * setTimeout(() => source.subscribe(x => console.log('subscription 2: ', x)), 1700); + * + * setTimeout(() => source.subscribe(x => console.log('subscription 3: ', x)), 5000); + * + * // Logs: + * // subscription 1: 0 + * // (subscription 1 unsubscribes here) + * // (subscription 2 subscribes here ~400ms later, source was not reset) + * // subscription 2: 1 + * // subscription 2: 2 + * // (subscription 2 unsubscribes here) + * // (subscription 3 subscribes here ~2000ms later, source did reset before) + * // subscription 3: 0 + * // subscription 3: 1 + * // subscription 3: 2 + * ``` + * + * @see {@link shareReplay} + * + * @return A function that returns an Observable that mirrors the source. + */ +export function share(options: ShareConfig = {}): MonoTypeOperatorFunction { + const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options; + // It's necessary to use a wrapper here, as the _operator_ must be + // referentially transparent. Otherwise, it cannot be used in calls to the + // static `pipe` function - to create a partial pipeline. + // + // The _operator function_ - the function returned by the _operator_ - will + // not be referentially transparent - as it shares its source - but the + // _operator function_ is called when the complete pipeline is composed via a + // call to a source observable's `pipe` method - not when the static `pipe` + // function is called. + return (wrapperSource) => { + let connection: SafeSubscriber | undefined; + let resetConnection: Subscription | undefined; + let subject: SubjectLike | undefined; + let refCount = 0; + let hasCompleted = false; + let hasErrored = false; + + const cancelReset = () => { + resetConnection?.unsubscribe(); + resetConnection = undefined; + }; + // Used to reset the internal state to a "cold" + // state, as though it had never been subscribed to. + const reset = () => { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + const resetAndUnsubscribe = () => { + // We need to capture the connection before + // we reset (if we need to reset). + const conn = connection; + reset(); + conn?.unsubscribe(); + }; + + return operate((source, subscriber) => { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + + // Create the subject if we don't have one yet. Grab a local reference to + // it as well, which avoids non-null assertions when using it and, if we + // connect to it now, then error/complete need a reference after it was + // reset. + const dest = (subject = subject ?? connector()); + + // Add the finalization directly to the subscriber - instead of returning it - + // so that the handling of the subscriber's unsubscription will be wired + // up _before_ the subscription to the source occurs. This is done so that + // the assignment to the source connection's `closed` property will be seen + // by synchronous firehose sources. + subscriber.add(() => { + refCount--; + + // If we're resetting on refCount === 0, and it's 0, we only want to do + // that on "unsubscribe", really. Resetting on error or completion is a different + // configuration. + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + + // The following line adds the subscription to the subscriber passed. + // Basically, `subscriber === dest.subscribe(subscriber)` is `true`. + dest.subscribe(subscriber); + + if ( + !connection && + // Check this shareReplay is still activate - it can be reset to 0 + // and be "unsubscribed" _before_ it actually subscribes. + // If we were to subscribe then, it'd leak and get stuck. + refCount > 0 + ) { + // We need to create a subscriber here - rather than pass an observer and + // assign the returned subscription to connection - because it's possible + // for reentrant subscriptions to the shared observable to occur and in + // those situations we want connection to be already-assigned so that we + // don't create another connection to the source. + connection = new SafeSubscriber({ + next: (value) => dest.next(value), + error: (err) => { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: () => { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + }, + }); + innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; +} + +function handleReset( + reset: () => void, + on: boolean | ((...args: T) => ObservableInput), + ...args: T +): Subscription | undefined { + if (on === true) { + reset(); + return; + } + + if (on === false) { + return; + } + + const onSubscriber = new SafeSubscriber({ + next: () => { + onSubscriber.unsubscribe(); + reset(); + }, + }); + + return innerFrom(on(...args)).subscribe(onSubscriber); +} diff --git a/node_modules/rxjs/src/internal/operators/shareReplay.ts b/node_modules/rxjs/src/internal/operators/shareReplay.ts new file mode 100644 index 0000000..b43f363 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/shareReplay.ts @@ -0,0 +1,173 @@ +import { ReplaySubject } from '../ReplaySubject'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { share } from './share'; + +export interface ShareReplayConfig { + bufferSize?: number; + windowTime?: number; + refCount: boolean; + scheduler?: SchedulerLike; +} + +export function shareReplay(config: ShareReplayConfig): MonoTypeOperatorFunction; +export function shareReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; + +/** + * Share source and replay specified number of emissions on subscription. + * + * This operator is a specialization of `replay` that connects to a source observable + * and multicasts through a `ReplaySubject` constructed with the specified arguments. + * A successfully completed source will stay cached in the `shareReplay`ed observable forever, + * but an errored source can be retried. + * + * ## Why use `shareReplay`? + * + * You generally want to use `shareReplay` when you have side-effects or taxing computations + * that you do not wish to be executed amongst multiple subscribers. + * It may also be valuable in situations where you know you will have late subscribers to + * a stream that need access to previously emitted values. + * This ability to replay values on subscription is what differentiates {@link share} and `shareReplay`. + * + * ## Reference counting + * + * By default `shareReplay` will use `refCount` of false, meaning that it will _not_ unsubscribe the + * source when the reference counter drops to zero, i.e. the inner `ReplaySubject` will _not_ be unsubscribed + * (and potentially run for ever). + * This is the default as it is expected that `shareReplay` is often used to keep around expensive to setup + * observables which we want to keep running instead of having to do the expensive setup again. + * + * As of RXJS version 6.4.0 a new overload signature was added to allow for manual control over what + * happens when the operators internal reference counter drops to zero. + * If `refCount` is true, the source will be unsubscribed from once the reference count drops to zero, i.e. + * the inner `ReplaySubject` will be unsubscribed. All new subscribers will receive value emissions from a + * new `ReplaySubject` which in turn will cause a new subscription to the source observable. + * + * ## Examples + * + * Example with a third subscriber coming late to the party + * + * ```ts + * import { interval, take, shareReplay } from 'rxjs'; + * + * const shared$ = interval(2000).pipe( + * take(6), + * shareReplay(3) + * ); + * + * shared$.subscribe(x => console.log('sub A: ', x)); + * shared$.subscribe(y => console.log('sub B: ', y)); + * + * setTimeout(() => { + * shared$.subscribe(y => console.log('sub C: ', y)); + * }, 11000); + * + * // Logs: + * // (after ~2000 ms) + * // sub A: 0 + * // sub B: 0 + * // (after ~4000 ms) + * // sub A: 1 + * // sub B: 1 + * // (after ~6000 ms) + * // sub A: 2 + * // sub B: 2 + * // (after ~8000 ms) + * // sub A: 3 + * // sub B: 3 + * // (after ~10000 ms) + * // sub A: 4 + * // sub B: 4 + * // (after ~11000 ms, sub C gets the last 3 values) + * // sub C: 2 + * // sub C: 3 + * // sub C: 4 + * // (after ~12000 ms) + * // sub A: 5 + * // sub B: 5 + * // sub C: 5 + * ``` + * + * Example for `refCount` usage + * + * ```ts + * import { Observable, tap, interval, shareReplay, take } from 'rxjs'; + * + * const log = (name: string, source: Observable) => source.pipe( + * tap({ + * subscribe: () => console.log(`${ name }: subscribed`), + * next: value => console.log(`${ name }: ${ value }`), + * complete: () => console.log(`${ name }: completed`), + * finalize: () => console.log(`${ name }: unsubscribed`) + * }) + * ); + * + * const obs$ = log('source', interval(1000)); + * + * const shared$ = log('shared', obs$.pipe( + * shareReplay({ bufferSize: 1, refCount: true }), + * take(2) + * )); + * + * shared$.subscribe(x => console.log('sub A: ', x)); + * shared$.subscribe(y => console.log('sub B: ', y)); + * + * // PRINTS: + * // shared: subscribed <-- reference count = 1 + * // source: subscribed + * // shared: subscribed <-- reference count = 2 + * // source: 0 + * // shared: 0 + * // sub A: 0 + * // shared: 0 + * // sub B: 0 + * // source: 1 + * // shared: 1 + * // sub A: 1 + * // shared: completed <-- take(2) completes the subscription for sub A + * // shared: unsubscribed <-- reference count = 1 + * // shared: 1 + * // sub B: 1 + * // shared: completed <-- take(2) completes the subscription for sub B + * // shared: unsubscribed <-- reference count = 0 + * // source: unsubscribed <-- replaySubject unsubscribes from source observable because the reference count dropped to 0 and refCount is true + * + * // In case of refCount being false, the unsubscribe is never called on the source and the source would keep on emitting, even if no subscribers + * // are listening. + * // source: 2 + * // source: 3 + * // source: 4 + * // ... + * ``` + * + * @see {@link publish} + * @see {@link share} + * @see {@link publishReplay} + * + * @param configOrBufferSize Maximum element count of the replay buffer or {@link ShareReplayConfig configuration} + * object. + * @param windowTime Maximum time length of the replay buffer in milliseconds. + * @param scheduler Scheduler where connected observers within the selector function + * will be invoked on. + * @return A function that returns an Observable sequence that contains the + * elements of a sequence produced by multicasting the source sequence within a + * selector function. + */ +export function shareReplay( + configOrBufferSize?: ShareReplayConfig | number, + windowTime?: number, + scheduler?: SchedulerLike +): MonoTypeOperatorFunction { + let bufferSize: number; + let refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize); + } else { + bufferSize = (configOrBufferSize ?? Infinity) as number; + } + return share({ + connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount, + }); +} diff --git a/node_modules/rxjs/src/internal/operators/single.ts b/node_modules/rxjs/src/internal/operators/single.ts new file mode 100644 index 0000000..b91ab2a --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/single.ts @@ -0,0 +1,117 @@ +import { Observable } from '../Observable'; +import { EmptyError } from '../util/EmptyError'; + +import { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types'; +import { SequenceError } from '../util/SequenceError'; +import { NotFoundError } from '../util/NotFoundError'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function single(predicate: BooleanConstructor): OperatorFunction>; +export function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction; + +/** + * Returns an observable that asserts that only one value is + * emitted from the observable that matches the predicate. If no + * predicate is provided, then it will assert that the observable + * only emits one value. + * + * In the event that the observable is empty, it will throw an + * {@link EmptyError}. + * + * In the event that two values are found that match the predicate, + * or when there are two values emitted and no predicate, it will + * throw a {@link SequenceError} + * + * In the event that no values match the predicate, if one is provided, + * it will throw a {@link NotFoundError} + * + * ## Example + * + * Expect only `name` beginning with `'B'` + * + * ```ts + * import { of, single } from 'rxjs'; + * + * const source1 = of( + * { name: 'Ben' }, + * { name: 'Tracy' }, + * { name: 'Laney' }, + * { name: 'Lily' } + * ); + * + * source1 + * .pipe(single(x => x.name.startsWith('B'))) + * .subscribe(x => console.log(x)); + * // Emits 'Ben' + * + * + * const source2 = of( + * { name: 'Ben' }, + * { name: 'Tracy' }, + * { name: 'Bradley' }, + * { name: 'Lincoln' } + * ); + * + * source2 + * .pipe(single(x => x.name.startsWith('B'))) + * .subscribe({ error: err => console.error(err) }); + * // Error emitted: SequenceError('Too many values match') + * + * + * const source3 = of( + * { name: 'Laney' }, + * { name: 'Tracy' }, + * { name: 'Lily' }, + * { name: 'Lincoln' } + * ); + * + * source3 + * .pipe(single(x => x.name.startsWith('B'))) + * .subscribe({ error: err => console.error(err) }); + * // Error emitted: NotFoundError('No values match') + * ``` + * + * @see {@link first} + * @see {@link find} + * @see {@link findIndex} + * @see {@link elementAt} + * + * @throws {NotFoundError} Delivers an NotFoundError to the Observer's `error` + * callback if the Observable completes before any `next` notification was sent. + * @throws {SequenceError} Delivers a SequenceError if more than one value is emitted that matches the + * provided predicate. If no predicate is provided, will deliver a SequenceError if more + * than one value comes from the source + * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable. + * @return A function that returns an Observable that emits the single item + * emitted by the source Observable that matches the predicate. + */ +export function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + let singleValue: T; + let seenValue = false; + let index = 0; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError('Too many matching values')); + hasValue = true; + singleValue = value; + } + }, + () => { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); + } + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/skip.ts b/node_modules/rxjs/src/internal/operators/skip.ts new file mode 100644 index 0000000..76e3eff --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/skip.ts @@ -0,0 +1,39 @@ +import { MonoTypeOperatorFunction } from '../types'; +import { filter } from './filter'; + +/** + * Returns an Observable that skips the first `count` items emitted by the source Observable. + * + * ![](skip.png) + * + * Skips the values until the sent notifications are equal or less than provided skip count. It raises + * an error if skip count is equal or more than the actual number of emits and source raises an error. + * + * ## Example + * + * Skip the values before the emission + * + * ```ts + * import { interval, skip } from 'rxjs'; + * + * // emit every half second + * const source = interval(500); + * // skip the first 10 emitted values + * const result = source.pipe(skip(10)); + * + * result.subscribe(value => console.log(value)); + * // output: 10...11...12...13... + * ``` + * + * @see {@link last} + * @see {@link skipWhile} + * @see {@link skipUntil} + * @see {@link skipLast} + * + * @param {Number} count - The number of times, items emitted by source Observable should be skipped. + * @return A function that returns an Observable that skips the first `count` + * values emitted by the source Observable. + */ +export function skip(count: number): MonoTypeOperatorFunction { + return filter((_, index) => count <= index); +} diff --git a/node_modules/rxjs/src/internal/operators/skipLast.ts b/node_modules/rxjs/src/internal/operators/skipLast.ts new file mode 100644 index 0000000..e0f75b5 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/skipLast.ts @@ -0,0 +1,95 @@ +import { MonoTypeOperatorFunction } from '../types'; +import { identity } from '../util/identity'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Skip a specified number of values before the completion of an observable. + * + * ![](skipLast.png) + * + * Returns an observable that will emit values as soon as it can, given a number of + * skipped values. For example, if you `skipLast(3)` on a source, when the source + * emits its fourth value, the first value the source emitted will finally be emitted + * from the returned observable, as it is no longer part of what needs to be skipped. + * + * All values emitted by the result of `skipLast(N)` will be delayed by `N` emissions, + * as each value is held in a buffer until enough values have been emitted that that + * the buffered value may finally be sent to the consumer. + * + * After subscribing, unsubscribing will not result in the emission of the buffered + * skipped values. + * + * ## Example + * + * Skip the last 2 values of an observable with many values + * + * ```ts + * import { of, skipLast } from 'rxjs'; + * + * const numbers = of(1, 2, 3, 4, 5); + * const skipLastTwo = numbers.pipe(skipLast(2)); + * skipLastTwo.subscribe(x => console.log(x)); + * + * // Results in: + * // 1 2 3 + * // (4 and 5 are skipped) + * ``` + * + * @see {@link skip} + * @see {@link skipUntil} + * @see {@link skipWhile} + * @see {@link take} + * + * @param skipCount Number of elements to skip from the end of the source Observable. + * @return A function that returns an Observable that skips the last `count` + * values emitted by the source Observable. + */ +export function skipLast(skipCount: number): MonoTypeOperatorFunction { + return skipCount <= 0 + ? // For skipCounts less than or equal to zero, we are just mirroring the source. + identity + : operate((source, subscriber) => { + // A ring buffer to hold the values while we wait to see + // if we can emit it or it's part of the "skipped" last values. + // Note that it is the _same size_ as the skip count. + let ring: T[] = new Array(skipCount); + // The number of values seen so far. This is used to get + // the index of the current value when it arrives. + let seen = 0; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + // Get the index of the value we have right now + // relative to all other values we've seen, then + // increment `seen`. This ensures we've moved to + // the next slot in our ring buffer. + const valueIndex = seen++; + if (valueIndex < skipCount) { + // If we haven't seen enough values to fill our buffer yet, + // Then we aren't to a number of seen values where we can + // emit anything, so let's just start by filling the ring buffer. + ring[valueIndex] = value; + } else { + // We are traversing over the ring array in such + // a way that when we get to the end, we loop back + // and go to the start. + const index = valueIndex % skipCount; + // Pull the oldest value out so we can emit it, + // and stuff the new value in it's place. + const oldValue = ring[index]; + ring[index] = value; + // Emit the old value. It is important that this happens + // after we swap the value in the buffer, if it happens + // before we swap the value in the buffer, then a synchronous + // source can get the buffer out of whack. + subscriber.next(oldValue); + } + }) + ); + + return () => { + // Release our values in memory + ring = null!; + }; + }); +} diff --git a/node_modules/rxjs/src/internal/operators/skipUntil.ts b/node_modules/rxjs/src/internal/operators/skipUntil.ts new file mode 100644 index 0000000..e6984e5 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/skipUntil.ts @@ -0,0 +1,69 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; + +/** + * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. + * + * The `skipUntil` operator causes the observable stream to skip the emission of values until the passed in observable + * emits the first value. This can be particularly useful in combination with user interactions, responses of HTTP + * requests or waiting for specific times to pass by. + * + * ![](skipUntil.png) + * + * Internally, the `skipUntil` operator subscribes to the passed in `notifier` `ObservableInput` (which gets converted + * to an Observable) in order to recognize the emission of its first value. When `notifier` emits next, the operator + * unsubscribes from it and starts emitting the values of the *source* observable until it completes or errors. It + * will never let the *source* observable emit any values if the `notifier` completes or throws an error without + * emitting a value before. + * + * ## Example + * + * In the following example, all emitted values of the interval observable are skipped until the user clicks anywhere + * within the page + * + * ```ts + * import { interval, fromEvent, skipUntil } from 'rxjs'; + * + * const intervalObservable = interval(1000); + * const click = fromEvent(document, 'click'); + * + * const emitAfterClick = intervalObservable.pipe( + * skipUntil(click) + * ); + * // clicked at 4.6s. output: 5...6...7...8........ or + * // clicked at 7.3s. output: 8...9...10..11....... + * emitAfterClick.subscribe(value => console.log(value)); + * ``` + * + * @see {@link last} + * @see {@link skip} + * @see {@link skipWhile} + * @see {@link skipLast} + * + * @param notifier An `ObservableInput` that has to emit an item before the source Observable elements begin to + * be mirrored by the resulting Observable. + * @return A function that returns an Observable that skips items from the + * source Observable until the `notifier` Observable emits an item, then emits the + * remaining items. + */ +export function skipUntil(notifier: ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let taking = false; + + const skipSubscriber = createOperatorSubscriber( + subscriber, + () => { + skipSubscriber?.unsubscribe(); + taking = true; + }, + noop + ); + + innerFrom(notifier).subscribe(skipSubscriber); + + source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/skipWhile.ts b/node_modules/rxjs/src/internal/operators/skipWhile.ts new file mode 100644 index 0000000..68aeca6 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/skipWhile.ts @@ -0,0 +1,60 @@ +import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function skipWhile(predicate: BooleanConstructor): OperatorFunction extends never ? never : T>; +export function skipWhile(predicate: (value: T, index: number) => true): OperatorFunction; +export function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; + +/** + * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds + * true, but emits all further source items as soon as the condition becomes false. + * + * ![](skipWhile.png) + * + * Skips all the notifications with a truthy predicate. It will not skip the notifications when the predicate is falsy. + * It can also be skipped using index. Once the predicate is true, it will not be called again. + * + * ## Example + * + * Skip some super heroes + * + * ```ts + * import { from, skipWhile } from 'rxjs'; + * + * const source = from(['Green Arrow', 'SuperMan', 'Flash', 'SuperGirl', 'Black Canary']) + * // Skip the heroes until SuperGirl + * const example = source.pipe(skipWhile(hero => hero !== 'SuperGirl')); + * // output: SuperGirl, Black Canary + * example.subscribe(femaleHero => console.log(femaleHero)); + * ``` + * + * Skip values from the array until index 5 + * + * ```ts + * import { from, skipWhile } from 'rxjs'; + * + * const source = from([1, 2, 3, 4, 5, 6, 7, 9, 10]); + * const example = source.pipe(skipWhile((_, i) => i !== 5)); + * // output: 6, 7, 9, 10 + * example.subscribe(value => console.log(value)); + * ``` + * + * @see {@link last} + * @see {@link skip} + * @see {@link skipUntil} + * @see {@link skipLast} + * + * @param {Function} predicate - A function to test each item emitted from the source Observable. + * @return A function that returns an Observable that begins emitting items + * emitted by the source Observable when the specified predicate becomes false. + */ +export function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let taking = false; + let index = 0; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/startWith.ts b/node_modules/rxjs/src/internal/operators/startWith.ts new file mode 100644 index 0000000..8c11ddb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/startWith.ts @@ -0,0 +1,67 @@ +import { concat } from '../observable/concat'; +import { OperatorFunction, SchedulerLike, ValueFromArray } from '../types'; +import { popScheduler } from '../util/args'; +import { operate } from '../util/lift'; + +// Devs are more likely to pass null or undefined than they are a scheduler +// without accompanying values. To make things easier for (naughty) devs who +// use the `strictNullChecks: false` TypeScript compiler option, these +// overloads with explicit null and undefined values are included. + +export function startWith(value: null): OperatorFunction; +export function startWith(value: undefined): OperatorFunction; + +/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ +export function startWith( + ...valuesAndScheduler: [...A, SchedulerLike] +): OperatorFunction>; +export function startWith(...values: A): OperatorFunction>; + +/** + * Returns an observable that, at the moment of subscription, will synchronously emit all + * values provided to this operator, then subscribe to the source and mirror all of its emissions + * to subscribers. + * + * This is a useful way to know when subscription has occurred on an existing observable. + * + * First emits its arguments in order, and then any + * emissions from the source. + * + * ![](startWith.png) + * + * ## Examples + * + * Emit a value when a timer starts. + * + * ```ts + * import { timer, map, startWith } from 'rxjs'; + * + * timer(1000) + * .pipe( + * map(() => 'timer emit'), + * startWith('timer start') + * ) + * .subscribe(x => console.log(x)); + * + * // results: + * // 'timer start' + * // 'timer emit' + * ``` + * + * @param values Items you want the modified Observable to emit first. + * @return A function that returns an Observable that synchronously emits + * provided values before subscribing to the source Observable. + * + * @see {@link endWith} + * @see {@link finalize} + * @see {@link concat} + */ +export function startWith(...values: D[]): OperatorFunction { + const scheduler = popScheduler(values); + return operate((source, subscriber) => { + // Here we can't pass `undefined` as a scheduler, because if we did, the + // code inside of `concat` would be confused by the `undefined`, and treat it + // like an invalid observable. So we have to split it two different ways. + (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/subscribeOn.ts b/node_modules/rxjs/src/internal/operators/subscribeOn.ts new file mode 100644 index 0000000..17240d0 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/subscribeOn.ts @@ -0,0 +1,67 @@ +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; + +/** + * Asynchronously subscribes Observers to this Observable on the specified {@link SchedulerLike}. + * + * With `subscribeOn` you can decide what type of scheduler a specific Observable will be using when it is subscribed to. + * + * Schedulers control the speed and order of emissions to observers from an Observable stream. + * + * ![](subscribeOn.png) + * + * ## Example + * + * Given the following code: + * + * ```ts + * import { of, merge } from 'rxjs'; + * + * const a = of(1, 2, 3); + * const b = of(4, 5, 6); + * + * merge(a, b).subscribe(console.log); + * + * // Outputs + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * // 6 + * ``` + * + * Both Observable `a` and `b` will emit their values directly and synchronously once they are subscribed to. + * + * If we instead use the `subscribeOn` operator declaring that we want to use the {@link asyncScheduler} for values emitted by Observable `a`: + * + * ```ts + * import { of, subscribeOn, asyncScheduler, merge } from 'rxjs'; + * + * const a = of(1, 2, 3).pipe(subscribeOn(asyncScheduler)); + * const b = of(4, 5, 6); + * + * merge(a, b).subscribe(console.log); + * + * // Outputs + * // 4 + * // 5 + * // 6 + * // 1 + * // 2 + * // 3 + * ``` + * + * The reason for this is that Observable `b` emits its values directly and synchronously like before + * but the emissions from `a` are scheduled on the event loop because we are now using the {@link asyncScheduler} for that specific Observable. + * + * @param scheduler The {@link SchedulerLike} to perform subscription actions on. + * @param delay A delay to pass to the scheduler to delay subscriptions + * @return A function that returns an Observable modified so that its + * subscriptions happen on the specified {@link SchedulerLike}. + */ +export function subscribeOn(scheduler: SchedulerLike, delay: number = 0): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay)); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/switchAll.ts b/node_modules/rxjs/src/internal/operators/switchAll.ts new file mode 100644 index 0000000..69e9cbb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/switchAll.ts @@ -0,0 +1,65 @@ +import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +import { switchMap } from './switchMap'; +import { identity } from '../util/identity'; + +/** + * Converts a higher-order Observable into a first-order Observable + * producing values only from the most recent observable sequence + * + * Flattens an Observable-of-Observables. + * + * ![](switchAll.png) + * + * `switchAll` subscribes to a source that is an observable of observables, also known as a + * "higher-order observable" (or `Observable>`). It subscribes to the most recently + * provided "inner observable" emitted by the source, unsubscribing from any previously subscribed + * to inner observable, such that only the most recent inner observable may be subscribed to at + * any point in time. The resulting observable returned by `switchAll` will only complete if the + * source observable completes, *and* any currently subscribed to inner observable also has completed, + * if there are any. + * + * ## Examples + * + * Spawn a new interval observable for each click event, but for every new + * click, cancel the previous interval and subscribe to the new one + * + * ```ts + * import { fromEvent, tap, map, interval, switchAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click'))); + * const source = clicks.pipe(map(() => interval(1000))); + * + * source + * .pipe(switchAll()) + * .subscribe(x => console.log(x)); + * + * // Output + * // click + * // 0 + * // 1 + * // 2 + * // 3 + * // ... + * // click + * // 0 + * // 1 + * // 2 + * // ... + * // click + * // ... + * ``` + * + * @see {@link combineLatestAll} + * @see {@link concatAll} + * @see {@link exhaustAll} + * @see {@link switchMap} + * @see {@link switchMapTo} + * @see {@link mergeAll} + * + * @return A function that returns an Observable that converts a higher-order + * Observable into a first-order Observable producing values only from the most + * recent Observable sequence. + */ +export function switchAll>(): OperatorFunction> { + return switchMap(identity); +} diff --git a/node_modules/rxjs/src/internal/operators/switchMap.ts b/node_modules/rxjs/src/internal/operators/switchMap.ts new file mode 100644 index 0000000..4ba293e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/switchMap.ts @@ -0,0 +1,133 @@ +import { Subscriber } from '../Subscriber'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { innerFrom } from '../observable/innerFrom'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/* tslint:disable:max-line-length */ +export function switchMap>( + project: (value: T, index: number) => O +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function switchMap>( + project: (value: T, index: number) => O, + resultSelector: undefined +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function switchMap>( + project: (value: T, index: number) => O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction; +/* tslint:enable:max-line-length */ + +/** + * Projects each source value to an Observable which is merged in the output + * Observable, emitting values only from the most recently projected Observable. + * + * Maps each value to an Observable, then flattens all of + * these inner Observables using {@link switchAll}. + * + * ![](switchMap.png) + * + * Returns an Observable that emits items based on applying a function that you + * supply to each item emitted by the source Observable, where that function + * returns an (so-called "inner") Observable. Each time it observes one of these + * inner Observables, the output Observable begins emitting the items emitted by + * that inner Observable. When a new inner Observable is emitted, `switchMap` + * stops emitting items from the earlier-emitted inner Observable and begins + * emitting items from the new one. It continues to behave like this for + * subsequent inner Observables. + * + * ## Example + * + * Generate new Observable according to source Observable values + * + * ```ts + * import { of, switchMap } from 'rxjs'; + * + * const switched = of(1, 2, 3).pipe(switchMap(x => of(x, x ** 2, x ** 3))); + * switched.subscribe(x => console.log(x)); + * // outputs + * // 1 + * // 1 + * // 1 + * // 2 + * // 4 + * // 8 + * // 3 + * // 9 + * // 27 + * ``` + * + * Restart an interval Observable on every click event + * + * ```ts + * import { fromEvent, switchMap, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(switchMap(() => interval(1000))); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link concatMap} + * @see {@link exhaustMap} + * @see {@link mergeMap} + * @see {@link switchAll} + * @see {@link switchMapTo} + * + * @param {function(value: T, index: number): ObservableInput} project A function + * that, when applied to an item emitted by the source Observable, returns an + * Observable. + * @return A function that returns an Observable that emits the result of + * applying the projection function (and the optional deprecated + * `resultSelector`) to each item emitted by the source Observable and taking + * only the values from the most recently projected inner Observable. + */ +export function switchMap>( + project: (value: T, index: number) => O, + resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction | R> { + return operate((source, subscriber) => { + let innerSubscriber: Subscriber> | null = null; + let index = 0; + // Whether or not the source subscription has completed + let isComplete = false; + + // We only complete the result if the source is complete AND we don't have an active inner subscription. + // This is called both when the source completes and when the inners complete. + const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // Cancel the previous inner subscription if there was one + innerSubscriber?.unsubscribe(); + let innerIndex = 0; + const outerIndex = index++; + // Start the next inner subscription + innerFrom(project(value, outerIndex)).subscribe( + (innerSubscriber = createOperatorSubscriber( + subscriber, + // When we get a new inner value, next it through. Note that this is + // handling the deprecate result selector here. This is because with this architecture + // it ends up being smaller than using the map operator. + (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), + () => { + // The inner has completed. Null out the inner subscriber to + // free up memory and to signal that we have no inner subscription + // currently. + innerSubscriber = null!; + checkComplete(); + } + )) + ); + }, + () => { + isComplete = true; + checkComplete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/switchMapTo.ts b/node_modules/rxjs/src/internal/operators/switchMapTo.ts new file mode 100644 index 0000000..28a45c1 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/switchMapTo.ts @@ -0,0 +1,64 @@ +import { switchMap } from './switchMap'; +import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; +import { isFunction } from '../util/isFunction'; + +/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */ +export function switchMapTo>(observable: O): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function switchMapTo>( + observable: O, + resultSelector: undefined +): OperatorFunction>; +/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ +export function switchMapTo>( + observable: O, + resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction; + +/** + * Projects each source value to the same Observable which is flattened multiple + * times with {@link switchMap} in the output Observable. + * + * It's like {@link switchMap}, but maps each value + * always to the same inner Observable. + * + * ![](switchMapTo.png) + * + * Maps each source value to the given Observable `innerObservable` regardless + * of the source value, and then flattens those resulting Observables into one + * single Observable, which is the output Observable. The output Observables + * emits values only from the most recently emitted instance of + * `innerObservable`. + * + * ## Example + * + * Restart an interval Observable on every click event + * + * ```ts + * import { fromEvent, switchMapTo, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(switchMapTo(interval(1000))); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link concatMapTo} + * @see {@link switchAll} + * @see {@link switchMap} + * @see {@link mergeMapTo} + * + * @param {ObservableInput} innerObservable An Observable to replace each value from + * the source Observable. + * @return A function that returns an Observable that emits items from the + * given `innerObservable` (and optionally transformed through the deprecated + * `resultSelector`) every time a value is emitted on the source Observable, + * and taking only the values from the most recently projected inner + * Observable. + * @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` + */ +export function switchMapTo>( + innerObservable: O, + resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R +): OperatorFunction | R> { + return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable); +} diff --git a/node_modules/rxjs/src/internal/operators/switchScan.ts b/node_modules/rxjs/src/internal/operators/switchScan.ts new file mode 100644 index 0000000..902a2a7 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/switchScan.ts @@ -0,0 +1,50 @@ +import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types'; +import { switchMap } from './switchMap'; +import { operate } from '../util/lift'; + +// TODO: Generate a marble diagram for these docs. + +/** + * Applies an accumulator function over the source Observable where the + * accumulator function itself returns an Observable, emitting values + * only from the most recently returned Observable. + * + * It's like {@link mergeScan}, but only the most recent + * Observable returned by the accumulator is merged into the outer Observable. + * + * @see {@link scan} + * @see {@link mergeScan} + * @see {@link switchMap} + * + * @param accumulator + * The accumulator function called on each source value. + * @param seed The initial accumulation value. + * @return A function that returns an observable of the accumulated values. + */ +export function switchScan>( + accumulator: (acc: R, value: T, index: number) => O, + seed: R +): OperatorFunction> { + return operate((source, subscriber) => { + // The state we will keep up to date to pass into our + // accumulator function at each new value from the source. + let state = seed; + + // Use `switchMap` on our `source` to do the work of creating + // this operator. Note the backwards order here of `switchMap()(source)` + // to avoid needing to use `pipe` unnecessarily + switchMap( + // On each value from the source, call the accumulator with + // our previous state, the value and the index. + (value: T, index) => accumulator(state, value, index), + // Using the deprecated result selector here as a dirty trick + // to update our state with the flattened value. + (_, innerValue) => ((state = innerValue), innerValue) + )(source).subscribe(subscriber); + + return () => { + // Release state on finalization + state = null!; + }; + }); +} diff --git a/node_modules/rxjs/src/internal/operators/take.ts b/node_modules/rxjs/src/internal/operators/take.ts new file mode 100644 index 0000000..b2054e7 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/take.ts @@ -0,0 +1,71 @@ +import { MonoTypeOperatorFunction } from '../types'; +import { EMPTY } from '../observable/empty'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits only the first `count` values emitted by the source Observable. + * + * Takes the first `count` values from the source, then + * completes. + * + * ![](take.png) + * + * `take` returns an Observable that emits only the first `count` values emitted + * by the source Observable. If the source emits fewer than `count` values then + * all of its values are emitted. After that, it completes, regardless if the + * source completes. + * + * ## Example + * + * Take the first 5 seconds of an infinite 1-second interval Observable + * + * ```ts + * import { interval, take } from 'rxjs'; + * + * const intervalCount = interval(1000); + * const takeFive = intervalCount.pipe(take(5)); + * takeFive.subscribe(x => console.log(x)); + * + * // Logs: + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * ``` + * + * @see {@link takeLast} + * @see {@link takeUntil} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param count The maximum number of `next` values to emit. + * @return A function that returns an Observable that emits only the first + * `count` values emitted by the source Observable, or all of the values from + * the source if the source emits fewer than `count` values. + */ +export function take(count: number): MonoTypeOperatorFunction { + return count <= 0 + ? // If we are taking no values, that's empty. + () => EMPTY + : operate((source, subscriber) => { + let seen = 0; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + // Increment the number of values we have seen, + // then check it against the allowed count to see + // if we are still letting values through. + if (++seen <= count) { + subscriber.next(value); + // If we have met or passed our allowed count, + // we need to complete. We have to do <= here, + // because re-entrant code will increment `seen` twice. + if (count <= seen) { + subscriber.complete(); + } + } + }) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/takeLast.ts b/node_modules/rxjs/src/internal/operators/takeLast.ts new file mode 100644 index 0000000..972d147 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/takeLast.ts @@ -0,0 +1,81 @@ +import { EMPTY } from '../observable/empty'; +import { MonoTypeOperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Waits for the source to complete, then emits the last N values from the source, + * as specified by the `count` argument. + * + * ![](takeLast.png) + * + * `takeLast` results in an observable that will hold values up to `count` values in memory, + * until the source completes. It then pushes all values in memory to the consumer, in the + * order they were received from the source, then notifies the consumer that it is + * complete. + * + * If for some reason the source completes before the `count` supplied to `takeLast` is reached, + * all values received until that point are emitted, and then completion is notified. + * + * **Warning**: Using `takeLast` with an observable that never completes will result + * in an observable that never emits a value. + * + * ## Example + * + * Take the last 3 values of an Observable with many values + * + * ```ts + * import { range, takeLast } from 'rxjs'; + * + * const many = range(1, 100); + * const lastThree = many.pipe(takeLast(3)); + * lastThree.subscribe(x => console.log(x)); + * ``` + * + * @see {@link take} + * @see {@link takeUntil} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param count The maximum number of values to emit from the end of + * the sequence of values emitted by the source Observable. + * @return A function that returns an Observable that emits at most the last + * `count` values emitted by the source Observable. + */ +export function takeLast(count: number): MonoTypeOperatorFunction { + return count <= 0 + ? () => EMPTY + : operate((source, subscriber) => { + // This buffer will hold the values we are going to emit + // when the source completes. Since we only want to take the + // last N values, we can't emit until we're sure we're not getting + // any more values. + let buffer: T[] = []; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + // Add the most recent value onto the end of our buffer. + buffer.push(value); + // If our buffer is now larger than the number of values we + // want to take, we remove the oldest value from the buffer. + count < buffer.length && buffer.shift(); + }, + () => { + // The source completed, we now know what are last values + // are, emit them in the order they were received. + for (const value of buffer) { + subscriber.next(value); + } + subscriber.complete(); + }, + // Errors are passed through to the consumer + undefined, + () => { + // During finalization release the values in our buffer. + buffer = null!; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/takeUntil.ts b/node_modules/rxjs/src/internal/operators/takeUntil.ts new file mode 100644 index 0000000..8ac6c23 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/takeUntil.ts @@ -0,0 +1,51 @@ +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { noop } from '../util/noop'; + +/** + * Emits the values emitted by the source Observable until a `notifier` + * Observable emits a value. + * + * Lets values pass until a second Observable, + * `notifier`, emits a value. Then, it completes. + * + * ![](takeUntil.png) + * + * `takeUntil` subscribes and begins mirroring the source Observable. It also + * monitors a second Observable, `notifier` that you provide. If the `notifier` + * emits a value, the output Observable stops mirroring the source Observable + * and completes. If the `notifier` doesn't emit any value and completes + * then `takeUntil` will pass all values. + * + * ## Example + * + * Tick every second until the first click happens + * + * ```ts + * import { interval, fromEvent, takeUntil } from 'rxjs'; + * + * const source = interval(1000); + * const clicks = fromEvent(document, 'click'); + * const result = source.pipe(takeUntil(clicks)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link take} + * @see {@link takeLast} + * @see {@link takeWhile} + * @see {@link skip} + * + * @param {Observable} notifier The Observable whose first emitted value will + * cause the output Observable of `takeUntil` to stop emitting values from the + * source Observable. + * @return A function that returns an Observable that emits the values from the + * source Observable until `notifier` emits its first value. + */ +export function takeUntil(notifier: ObservableInput): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/takeWhile.ts b/node_modules/rxjs/src/internal/operators/takeWhile.ts new file mode 100644 index 0000000..27da59d --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/takeWhile.ts @@ -0,0 +1,66 @@ +import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +export function takeWhile(predicate: BooleanConstructor, inclusive: true): MonoTypeOperatorFunction; +export function takeWhile(predicate: BooleanConstructor, inclusive: false): OperatorFunction>; +export function takeWhile(predicate: BooleanConstructor): OperatorFunction>; +export function takeWhile(predicate: (value: T, index: number) => value is S): OperatorFunction; +export function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; +export function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; + +/** + * Emits values emitted by the source Observable so long as each value satisfies + * the given `predicate`, and then completes as soon as this `predicate` is not + * satisfied. + * + * Takes values from the source only while they pass the + * condition given. When the first value does not satisfy, it completes. + * + * ![](takeWhile.png) + * + * `takeWhile` subscribes and begins mirroring the source Observable. Each value + * emitted on the source is given to the `predicate` function which returns a + * boolean, representing a condition to be satisfied by the source values. The + * output Observable emits the source values until such time as the `predicate` + * returns false, at which point `takeWhile` stops mirroring the source + * Observable and completes the output Observable. + * + * ## Example + * + * Emit click events only while the clientX property is greater than 200 + * + * ```ts + * import { fromEvent, takeWhile } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(takeWhile(ev => ev.clientX > 200)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link take} + * @see {@link takeLast} + * @see {@link takeUntil} + * @see {@link skip} + * + * @param {function(value: T, index: number): boolean} predicate A function that + * evaluates a value emitted by the source Observable and returns a boolean. + * Also takes the (zero-based) index as the second argument. + * @param {boolean} inclusive When set to `true` the value that caused + * `predicate` to return `false` will also be emitted. + * @return A function that returns an Observable that emits values from the + * source Observable so long as each value satisfies the condition defined by + * the `predicate`, then completes. + */ +export function takeWhile(predicate: (value: T, index: number) => boolean, inclusive = false): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let index = 0; + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + const result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + }) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/tap.ts b/node_modules/rxjs/src/internal/operators/tap.ts new file mode 100644 index 0000000..bc6243e --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/tap.ts @@ -0,0 +1,215 @@ +import { MonoTypeOperatorFunction, Observer } from '../types'; +import { isFunction } from '../util/isFunction'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { identity } from '../util/identity'; + +/** + * An extension to the {@link Observer} interface used only by the {@link tap} operator. + * + * It provides a useful set of callbacks a user can register to do side-effects in + * cases other than what the usual {@link Observer} callbacks are + * ({@link guide/glossary-and-semantics#next next}, + * {@link guide/glossary-and-semantics#error error} and/or + * {@link guide/glossary-and-semantics#complete complete}). + * + * ## Example + * + * ```ts + * import { fromEvent, switchMap, tap, interval, take } from 'rxjs'; + * + * const source$ = fromEvent(document, 'click'); + * const result$ = source$.pipe( + * switchMap((_, i) => i % 2 === 0 + * ? fromEvent(document, 'mousemove').pipe( + * tap({ + * subscribe: () => console.log('Subscribed to the mouse move events after click #' + i), + * unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'), + * finalize: () => console.log('Mouse move events #' + i + ' finalized') + * }) + * ) + * : interval(1_000).pipe( + * take(5), + * tap({ + * subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i), + * unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'), + * finalize: () => console.log('1-second interval events #' + i + ' finalized') + * }) + * ) + * ) + * ); + * + * const subscription = result$.subscribe({ + * next: console.log + * }); + * + * setTimeout(() => { + * console.log('Unsubscribe after 60 seconds'); + * subscription.unsubscribe(); + * }, 60_000); + * ``` + */ +export interface TapObserver extends Observer { + /** + * The callback that `tap` operator invokes at the moment when the source Observable + * gets subscribed to. + */ + subscribe: () => void; + /** + * The callback that `tap` operator invokes when an explicit + * {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on + * `error` or `complete` events. + */ + unsubscribe: () => void; + /** + * The callback that `tap` operator invokes when any kind of + * {@link guide/glossary-and-semantics#finalization finalization} happens - either when + * the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed + * by the user. There is no difference in using this callback or the {@link finalize} + * operator, but if you're already using `tap` operator, you can use this callback + * instead. You'd get the same result in either case. + */ + finalize: () => void; +} +export function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; +/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ +export function tap( + next?: ((value: T) => void) | null, + error?: ((error: any) => void) | null, + complete?: (() => void) | null +): MonoTypeOperatorFunction; + +/** + * Used to perform side-effects for notifications from the source observable + * + * Used when you want to affect outside state with a notification without altering the notification + * + * ![](tap.png) + * + * Tap is designed to allow the developer a designated place to perform side effects. While you _could_ perform side-effects + * inside of a `map` or a `mergeMap`, that would make their mapping functions impure, which isn't always a big deal, but will + * make it so you can't do things like memoize those functions. The `tap` operator is designed solely for such side-effects to + * help you remove side-effects from other operations. + * + * For any notification, next, error, or complete, `tap` will call the appropriate callback you have provided to it, via a function + * reference, or a partial observer, then pass that notification down the stream. + * + * The observable returned by `tap` is an exact mirror of the source, with one exception: Any error that occurs -- synchronously -- in a handler + * provided to `tap` will be emitted as an error from the returned observable. + * + * > Be careful! You can mutate objects as they pass through the `tap` operator's handlers. + * + * The most common use of `tap` is actually for debugging. You can place a `tap(console.log)` anywhere + * in your observable `pipe`, log out the notifications as they are emitted by the source returned by the previous + * operation. + * + * ## Examples + * + * Check a random number before it is handled. Below is an observable that will use a random number between 0 and 1, + * and emit `'big'` or `'small'` depending on the size of that number. But we wanted to log what the original number + * was, so we have added a `tap(console.log)`. + * + * ```ts + * import { of, tap, map } from 'rxjs'; + * + * of(Math.random()).pipe( + * tap(console.log), + * map(n => n > 0.5 ? 'big' : 'small') + * ).subscribe(console.log); + * ``` + * + * Using `tap` to analyze a value and force an error. Below is an observable where in our system we only + * want to emit numbers 3 or less we get from another source. We can force our observable to error + * using `tap`. + * + * ```ts + * import { of, tap } from 'rxjs'; + * + * const source = of(1, 2, 3, 4, 5); + * + * source.pipe( + * tap(n => { + * if (n > 3) { + * throw new TypeError(`Value ${ n } is greater than 3`); + * } + * }) + * ) + * .subscribe({ next: console.log, error: err => console.log(err.message) }); + * ``` + * + * We want to know when an observable completes before moving on to the next observable. The system + * below will emit a random series of `'X'` characters from 3 different observables in sequence. The + * only way we know when one observable completes and moves to the next one, in this case, is because + * we have added a `tap` with the side effect of logging to console. + * + * ```ts + * import { of, concatMap, interval, take, map, tap } from 'rxjs'; + * + * of(1, 2, 3).pipe( + * concatMap(n => interval(1000).pipe( + * take(Math.round(Math.random() * 10)), + * map(() => 'X'), + * tap({ complete: () => console.log(`Done with ${ n }`) }) + * )) + * ) + * .subscribe(console.log); + * ``` + * + * @see {@link finalize} + * @see {@link TapObserver} + * + * @param observerOrNext A next handler or partial observer + * @param error An error handler + * @param complete A completion handler + * @return A function that returns an Observable identical to the source, but + * runs the specified Observer or callback(s) for each item. + */ +export function tap( + observerOrNext?: Partial> | ((value: T) => void) | null, + error?: ((e: any) => void) | null, + complete?: (() => void) | null +): MonoTypeOperatorFunction { + // We have to check to see not only if next is a function, + // but if error or complete were passed. This is because someone + // could technically call tap like `tap(null, fn)` or `tap(null, null, fn)`. + const tapObserver = + isFunction(observerOrNext) || error || complete + ? // tslint:disable-next-line: no-object-literal-type-assertion + ({ next: observerOrNext as Exclude>>, error, complete } as Partial>) + : observerOrNext; + + return tapObserver + ? operate((source, subscriber) => { + tapObserver.subscribe?.(); + let isUnsub = true; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + tapObserver.next?.(value); + subscriber.next(value); + }, + () => { + isUnsub = false; + tapObserver.complete?.(); + subscriber.complete(); + }, + (err) => { + isUnsub = false; + tapObserver.error?.(err); + subscriber.error(err); + }, + () => { + if (isUnsub) { + tapObserver.unsubscribe?.(); + } + tapObserver.finalize?.(); + } + ) + ); + }) + : // Tap was called with no valid tap observer or handler + // (e.g. `tap(null, null, null)` or `tap(null)` or `tap()`) + // so we're going to just mirror the source. + identity; +} diff --git a/node_modules/rxjs/src/internal/operators/throttle.ts b/node_modules/rxjs/src/internal/operators/throttle.ts new file mode 100644 index 0000000..8c53a1c --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/throttle.ts @@ -0,0 +1,143 @@ +import { Subscription } from '../Subscription'; + +import { MonoTypeOperatorFunction, ObservableInput } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * An object interface used by {@link throttle} or {@link throttleTime} that ensure + * configuration options of these operators. + * + * @see {@link throttle} + * @see {@link throttleTime} + */ +export interface ThrottleConfig { + /** + * If `true`, the resulting Observable will emit the first value from the source + * Observable at the **start** of the "throttling" process (when starting an + * internal timer that prevents other emissions from the source to pass through). + * If `false`, it will not emit the first value from the source Observable at the + * start of the "throttling" process. + * + * If not provided, defaults to: `true`. + */ + leading?: boolean; + /** + * If `true`, the resulting Observable will emit the last value from the source + * Observable at the **end** of the "throttling" process (when ending an internal + * timer that prevents other emissions from the source to pass through). + * If `false`, it will not emit the last value from the source Observable at the + * end of the "throttling" process. + * + * If not provided, defaults to: `false`. + */ + trailing?: boolean; +} + +/** + * Emits a value from the source Observable, then ignores subsequent source + * values for a duration determined by another Observable, then repeats this + * process. + * + * It's like {@link throttleTime}, but the silencing + * duration is determined by a second Observable. + * + * ![](throttle.svg) + * + * `throttle` emits the source Observable values on the output Observable + * when its internal timer is disabled, and ignores source values when the timer + * is enabled. Initially, the timer is disabled. As soon as the first source + * value arrives, it is forwarded to the output Observable, and then the timer + * is enabled by calling the `durationSelector` function with the source value, + * which returns the "duration" Observable. When the duration Observable emits a + * value, the timer is disabled, and this process repeats for the + * next source value. + * + * ## Example + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, throttle, interval } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(throttle(() => interval(1000))); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link audit} + * @see {@link debounce} + * @see {@link delayWhen} + * @see {@link sample} + * @see {@link throttleTime} + * + * @param durationSelector A function that receives a value from the source + * Observable, for computing the silencing duration for each source value, + * returned as an `ObservableInput`. + * @param config A configuration object to define `leading` and `trailing` + * behavior. Defaults to `{ leading: true, trailing: false }`. + * @return A function that returns an Observable that performs the throttle + * operation to limit the rate of emissions from the source. + */ +export function throttle(durationSelector: (value: T) => ObservableInput, config?: ThrottleConfig): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + const { leading = true, trailing = false } = config ?? {}; + let hasValue = false; + let sendValue: T | null = null; + let throttled: Subscription | null = null; + let isComplete = false; + + const endThrottling = () => { + throttled?.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + + const cleanupThrottling = () => { + throttled = null; + isComplete && subscriber.complete(); + }; + + const startThrottle = (value: T) => + (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); + + const send = () => { + if (hasValue) { + // Ensure we clear out our value and hasValue flag + // before we emit, otherwise reentrant code can cause + // issues here. + hasValue = false; + const value = sendValue!; + sendValue = null; + // Emit the value. + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + + source.subscribe( + createOperatorSubscriber( + subscriber, + // Regarding the presence of throttled.closed in the following + // conditions, if a synchronous duration selector is specified - weird, + // but legal - an already-closed subscription will be assigned to + // throttled, so the subscription's closed property needs to be checked, + // too. + (value) => { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, + () => { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/throttleTime.ts b/node_modules/rxjs/src/internal/operators/throttleTime.ts new file mode 100644 index 0000000..de325fe --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/throttleTime.ts @@ -0,0 +1,62 @@ +import { asyncScheduler } from '../scheduler/async'; +import { throttle, ThrottleConfig } from './throttle'; +import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; +import { timer } from '../observable/timer'; + +/** + * Emits a value from the source Observable, then ignores subsequent source + * values for `duration` milliseconds, then repeats this process. + * + * Lets a value pass, then ignores source values for the + * next `duration` milliseconds. + * + * ![](throttleTime.png) + * + * `throttleTime` emits the source Observable values on the output Observable + * when its internal timer is disabled, and ignores source values when the timer + * is enabled. Initially, the timer is disabled. As soon as the first source + * value arrives, it is forwarded to the output Observable, and then the timer + * is enabled. After `duration` milliseconds (or the time unit determined + * internally by the optional `scheduler`) has passed, the timer is disabled, + * and this process repeats for the next source value. Optionally takes a + * {@link SchedulerLike} for managing timers. + * + * ## Examples + * + * ### Limit click rate + * + * Emit clicks at a rate of at most one click per second + * + * ```ts + * import { fromEvent, throttleTime } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe(throttleTime(1000)); + * + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link auditTime} + * @see {@link debounceTime} + * @see {@link delay} + * @see {@link sampleTime} + * @see {@link throttle} + * + * @param duration Time to wait before emitting another value after + * emitting the last value, measured in milliseconds or the time unit determined + * internally by the optional `scheduler`. + * @param scheduler The {@link SchedulerLike} to use for + * managing the timers that handle the throttling. Defaults to {@link asyncScheduler}. + * @param config A configuration object to define `leading` and + * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`. + * @return A function that returns an Observable that performs the throttle + * operation to limit the rate of emissions from the source. + */ +export function throttleTime( + duration: number, + scheduler: SchedulerLike = asyncScheduler, + config?: ThrottleConfig +): MonoTypeOperatorFunction { + const duration$ = timer(duration, scheduler); + return throttle(() => duration$, config); +} diff --git a/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts b/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts new file mode 100644 index 0000000..76497a2 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts @@ -0,0 +1,60 @@ +import { EmptyError } from '../util/EmptyError'; +import { MonoTypeOperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * If the source observable completes without emitting a value, it will emit + * an error. The error will be created at that time by the optional + * `errorFactory` argument, otherwise, the error will be {@link EmptyError}. + * + * ![](throwIfEmpty.png) + * + * ## Example + * + * Throw an error if the document wasn't clicked within 1 second + * + * ```ts + * import { fromEvent, takeUntil, timer, throwIfEmpty } from 'rxjs'; + * + * const click$ = fromEvent(document, 'click'); + * + * click$.pipe( + * takeUntil(timer(1000)), + * throwIfEmpty(() => new Error('The document was not clicked within 1 second')) + * ) + * .subscribe({ + * next() { + * console.log('The document was clicked'); + * }, + * error(err) { + * console.error(err.message); + * } + * }); + * ``` + * + * @param errorFactory A factory function called to produce the + * error to be thrown when the source observable completes without emitting a + * value. + * @return A function that returns an Observable that throws an error if the + * source Observable completed without emitting. + */ +export function throwIfEmpty(errorFactory: () => any = defaultErrorFactory): MonoTypeOperatorFunction { + return operate((source, subscriber) => { + let hasValue = false; + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + hasValue = true; + subscriber.next(value); + }, + () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory())) + ) + ); + }); +} + +function defaultErrorFactory() { + return new EmptyError(); +} diff --git a/node_modules/rxjs/src/internal/operators/timeInterval.ts b/node_modules/rxjs/src/internal/operators/timeInterval.ts new file mode 100644 index 0000000..5baa145 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/timeInterval.ts @@ -0,0 +1,67 @@ +import { asyncScheduler } from '../scheduler/async'; +import { SchedulerLike, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Emits an object containing the current value, and the time that has + * passed between emitting the current value and the previous value, which is + * calculated by using the provided `scheduler`'s `now()` method to retrieve + * the current time at each emission, then calculating the difference. The `scheduler` + * defaults to {@link asyncScheduler}, so by default, the `interval` will be in + * milliseconds. + * + * Convert an Observable that emits items into one that + * emits indications of the amount of time elapsed between those emissions. + * + * ![](timeInterval.png) + * + * ## Example + * + * Emit interval between current value with the last value + * + * ```ts + * import { interval, timeInterval } from 'rxjs'; + * + * const seconds = interval(1000); + * + * seconds + * .pipe(timeInterval()) + * .subscribe(value => console.log(value)); + * + * // NOTE: The values will never be this precise, + * // intervals created with `interval` or `setInterval` + * // are non-deterministic. + * + * // { value: 0, interval: 1000 } + * // { value: 1, interval: 1000 } + * // { value: 2, interval: 1000 } + * ``` + * + * @param {SchedulerLike} [scheduler] Scheduler used to get the current time. + * @return A function that returns an Observable that emits information about + * value and interval. + */ +export function timeInterval(scheduler: SchedulerLike = asyncScheduler): OperatorFunction> { + return operate((source, subscriber) => { + let last = scheduler.now(); + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + const now = scheduler.now(); + const interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + }) + ); + }); +} + +// TODO(benlesh): make this an interface, export the interface, but not the implemented class, +// there's no reason users should be manually creating this type. + +export class TimeInterval { + /** + * @deprecated Internal implementation detail, do not construct directly. Will be made an interface in v8. + */ + constructor(public value: T, public interval: number) {} +} diff --git a/node_modules/rxjs/src/internal/operators/timeout.ts b/node_modules/rxjs/src/internal/operators/timeout.ts new file mode 100644 index 0000000..2035cae --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/timeout.ts @@ -0,0 +1,405 @@ +import { asyncScheduler } from '../scheduler/async'; +import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; +import { isValidDate } from '../util/isDate'; +import { Subscription } from '../Subscription'; +import { operate } from '../util/lift'; +import { Observable } from '../Observable'; +import { innerFrom } from '../observable/innerFrom'; +import { createErrorClass } from '../util/createErrorClass'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { executeSchedule } from '../util/executeSchedule'; + +export interface TimeoutConfig = ObservableInput, M = unknown> { + /** + * The time allowed between values from the source before timeout is triggered. + */ + each?: number; + + /** + * The relative time as a `number` in milliseconds, or a specific time as a `Date` object, + * by which the first value must arrive from the source before timeout is triggered. + */ + first?: number | Date; + + /** + * The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} + */ + scheduler?: SchedulerLike; + + /** + * A factory used to create observable to switch to when timeout occurs. Provides + * a {@link TimeoutInfo} about the source observable's emissions and what delay or + * exact time triggered the timeout. + */ + with?: (info: TimeoutInfo) => O; + + /** + * Optional additional metadata you can provide to code that handles + * the timeout, will be provided through the {@link TimeoutError}. + * This can be used to help identify the source of a timeout or pass along + * other information related to the timeout. + */ + meta?: M; +} + +export interface TimeoutInfo { + /** Optional metadata that was provided to the timeout configuration. */ + readonly meta: M; + /** The number of messages seen before the timeout */ + readonly seen: number; + /** The last message seen */ + readonly lastValue: T | null; +} + +/** + * An error emitted when a timeout occurs. + */ +export interface TimeoutError extends Error { + /** + * The information provided to the error by the timeout + * operation that created the error. Will be `null` if + * used directly in non-RxJS code with an empty constructor. + * (Note that using this constructor directly is not recommended, + * you should create your own errors) + */ + info: TimeoutInfo | null; +} + +export interface TimeoutErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (info?: TimeoutInfo): TimeoutError; +} + +/** + * An error thrown by the {@link timeout} operator. + * + * Provided so users can use as a type and do quality comparisons. + * We recommend you do not subclass this or create instances of this class directly. + * If you have need of a error representing a timeout, you should + * create your own error class and use that. + * + * @see {@link timeout} + * + * @class TimeoutError + */ +export const TimeoutError: TimeoutErrorCtor = createErrorClass( + (_super) => + function TimeoutErrorImpl(this: any, info: TimeoutInfo | null = null) { + _super(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + this.info = info; + } +); + +/** + * If `with` is provided, this will return an observable that will switch to a different observable if the source + * does not push values within the specified time parameters. + * + * The most flexible option for creating a timeout behavior. + * + * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, + * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory + * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by + * the settings in `first` and `each`. + * + * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the + * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of + * the first value from the source _only_. The timings of all subsequent values from the source will be checked + * against the time period provided by `each`, if it was provided. + * + * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of + * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if + * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first + * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. + * + * ## Examples + * + * Emit a custom error if there is too much time between values + * + * ```ts + * import { interval, timeout, throwError } from 'rxjs'; + * + * class CustomTimeoutError extends Error { + * constructor() { + * super('It was too slow'); + * this.name = 'CustomTimeoutError'; + * } + * } + * + * const slow$ = interval(900); + * + * slow$.pipe( + * timeout({ + * each: 1000, + * with: () => throwError(() => new CustomTimeoutError()) + * }) + * ) + * .subscribe({ + * error: console.error + * }); + * ``` + * + * Switch to a faster observable if your source is slow. + * + * ```ts + * import { interval, timeout } from 'rxjs'; + * + * const slow$ = interval(900); + * const fast$ = interval(500); + * + * slow$.pipe( + * timeout({ + * each: 1000, + * with: () => fast$, + * }) + * ) + * .subscribe(console.log); + * ``` + * @param config The configuration for the timeout. + */ +export function timeout, M = unknown>( + config: TimeoutConfig & { with: (info: TimeoutInfo) => O } +): OperatorFunction>; + +/** + * Returns an observable that will error or switch to a different observable if the source does not push values + * within the specified time parameters. + * + * The most flexible option for creating a timeout behavior. + * + * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, + * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory + * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by + * the settings in `first` and `each`. + * + * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the + * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of + * the first value from the source _only_. The timings of all subsequent values from the source will be checked + * against the time period provided by `each`, if it was provided. + * + * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of + * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if + * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first + * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. + * + * ### Handling TimeoutErrors + * + * If no `with` property was provided, subscriptions to the resulting observable may emit an error of {@link TimeoutError}. + * The timeout error provides useful information you can examine when you're handling the error. The most common way to handle + * the error would be with {@link catchError}, although you could use {@link tap} or just the error handler in your `subscribe` call + * directly, if your error handling is only a side effect (such as notifying the user, or logging). + * + * In this case, you would check the error for `instanceof TimeoutError` to validate that the error was indeed from `timeout`, and + * not from some other source. If it's not from `timeout`, you should probably rethrow it if you're in a `catchError`. + * + * ## Examples + * + * Emit a {@link TimeoutError} if the first value, and _only_ the first value, does not arrive within 5 seconds + * + * ```ts + * import { interval, timeout } from 'rxjs'; + * + * // A random interval that lasts between 0 and 10 seconds per tick + * const source$ = interval(Math.round(Math.random() * 10_000)); + * + * source$.pipe( + * timeout({ first: 5_000 }) + * ) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * Emit a {@link TimeoutError} if the source waits longer than 5 seconds between any two values or the first value + * and subscription. + * + * ```ts + * import { timer, timeout, expand } from 'rxjs'; + * + * const getRandomTime = () => Math.round(Math.random() * 10_000); + * + * // An observable that waits a random amount of time between each delivered value + * const source$ = timer(getRandomTime()) + * .pipe(expand(() => timer(getRandomTime()))); + * + * source$ + * .pipe(timeout({ each: 5_000 })) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + * + * Emit a {@link TimeoutError} if the source does not emit before 7 seconds, _or_ if the source waits longer than + * 5 seconds between any two values after the first. + * + * ```ts + * import { timer, timeout, expand } from 'rxjs'; + * + * const getRandomTime = () => Math.round(Math.random() * 10_000); + * + * // An observable that waits a random amount of time between each delivered value + * const source$ = timer(getRandomTime()) + * .pipe(expand(() => timer(getRandomTime()))); + * + * source$ + * .pipe(timeout({ first: 7_000, each: 5_000 })) + * .subscribe({ + * next: console.log, + * error: console.error + * }); + * ``` + */ +export function timeout(config: Omit, 'with'>): OperatorFunction; + +/** + * Returns an observable that will error if the source does not push its first value before the specified time passed as a `Date`. + * This is functionally the same as `timeout({ first: someDate })`. + * + * Errors if the first value doesn't show up before the given date and time + * + * ![](timeout.png) + * + * @param first The date to at which the resulting observable will timeout if the source observable + * does not emit at least one value. + * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. + */ +export function timeout(first: Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; + +/** + * Returns an observable that will error if the source does not push a value within the specified time in milliseconds. + * This is functionally the same as `timeout({ each: milliseconds })`. + * + * Errors if it waits too long between any value + * + * ![](timeout.png) + * + * @param each The time allowed between each pushed value from the source before the resulting observable + * will timeout. + * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. + */ +export function timeout(each: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; + +/** + * + * Errors if Observable does not emit a value in given time span. + * + * Timeouts on Observable that doesn't emit values fast enough. + * + * ![](timeout.png) + * + * @see {@link timeoutWith} + * + * @return A function that returns an Observable that mirrors behaviour of the + * source Observable, unless timeout happens when it throws an error. + */ +export function timeout, M>( + config: number | Date | TimeoutConfig, + schedulerArg?: SchedulerLike +): OperatorFunction> { + // Intentionally terse code. + // If the first argument is a valid `Date`, then we use it as the `first` config. + // Otherwise, if the first argument is a `number`, then we use it as the `each` config. + // Otherwise, it can be assumed the first argument is the configuration object itself, and + // we destructure that into what we're going to use, setting important defaults as we do. + // NOTE: The default for `scheduler` will be the `scheduler` argument if it exists, or + // it will default to the `asyncScheduler`. + const { + first, + each, + with: _with = timeoutErrorFactory, + scheduler = schedulerArg ?? asyncScheduler, + meta = null!, + } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config) as TimeoutConfig; + + if (first == null && each == null) { + // Ensure timeout was provided at runtime. + throw new TypeError('No timeout provided.'); + } + + return operate((source, subscriber) => { + // This subscription encapsulates our subscription to the + // source for this operator. We're capturing it separately, + // because if there is a `with` observable to fail over to, + // we want to unsubscribe from our original subscription, and + // hand of the subscription to that one. + let originalSourceSubscription: Subscription; + // The subscription for our timeout timer. This changes + // every time we get a new value. + let timerSubscription: Subscription; + // A bit of state we pass to our with and error factories to + // tell what the last value we saw was. + let lastValue: T | null = null; + // A bit of state we pass to the with and error factories to + // tell how many values we have seen so far. + let seen = 0; + const startTimer = (delay: number) => { + timerSubscription = executeSchedule( + subscriber, + scheduler, + () => { + try { + originalSourceSubscription.unsubscribe(); + innerFrom( + _with!({ + meta, + lastValue, + seen, + }) + ).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, + delay + ); + }; + + originalSourceSubscription = source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + // clear the timer so we can emit and start another one. + timerSubscription?.unsubscribe(); + seen++; + // Emit + subscriber.next((lastValue = value)); + // null | undefined are both < 0. Thanks, JavaScript. + each! > 0 && startTimer(each!); + }, + undefined, + undefined, + () => { + if (!timerSubscription?.closed) { + timerSubscription?.unsubscribe(); + } + // Be sure not to hold the last value in memory after unsubscription + // it could be quite large. + lastValue = null; + } + ) + ); + + // Intentionally terse code. + // If we've `seen` a value, that means the "first" clause was met already, if it existed. + // it also means that a timer was already started for "each" (in the next handler above). + // If `first` was provided, and it's a number, then use it. + // If `first` was provided and it's not a number, it's a Date, and we get the difference between it and "now". + // If `first` was not provided at all, then our first timer will be the value from `each`. + !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler!.now()) : each!); + }); +} + +/** + * The default function to use to emit an error when timeout occurs and a `with` function + * is not specified. + * @param info The information about the timeout to pass along to the error + */ +function timeoutErrorFactory(info: TimeoutInfo): Observable { + throw new TimeoutError(info); +} diff --git a/node_modules/rxjs/src/internal/operators/timeoutWith.ts b/node_modules/rxjs/src/internal/operators/timeoutWith.ts new file mode 100644 index 0000000..1a4d0ca --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/timeoutWith.ts @@ -0,0 +1,116 @@ +import { async } from '../scheduler/async'; +import { isValidDate } from '../util/isDate'; +import { ObservableInput, OperatorFunction, SchedulerLike } from '../types'; +import { timeout } from './timeout'; + +/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(someDate, a$, scheduler)`, use the configuration object + * `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. */ +export function timeoutWith(dueBy: Date, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; +/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use the configuration object + * `timeout({ each: 100, with: () => a$, scheduler })`. Will be removed in v8. */ +export function timeoutWith(waitFor: number, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; + +/** + * When the passed timespan elapses before the source emits any given value, it will unsubscribe from the source, + * and switch the subscription to another observable. + * + * Used to switch to a different observable if your source is being slow. + * + * Useful in cases where: + * + * - You want to switch to a different source that may be faster. + * - You want to notify a user that the data stream is slow. + * - You want to emit a custom error rather than the {@link TimeoutError} emitted + * by the default usage of {@link timeout}. + * + * If the first parameter is passed as Date and the time of the Date arrives before the first value arrives from the source, + * it will unsubscribe from the source and switch the subscription to another observable. + * + * Use Date object to switch to a different observable if the first value doesn't arrive by a specific time. + * + * Can be used to set a timeout only for the first value, however it's recommended to use the {@link timeout} operator with + * the `first` configuration to get the same effect. + * + * ## Examples + * + * Fallback to a faster observable + * + * ```ts + * import { interval, timeoutWith } from 'rxjs'; + * + * const slow$ = interval(1000); + * const faster$ = interval(500); + * + * slow$ + * .pipe(timeoutWith(900, faster$)) + * .subscribe(console.log); + * ``` + * + * Emit your own custom timeout error + * + * ```ts + * import { interval, timeoutWith, throwError } from 'rxjs'; + * + * class CustomTimeoutError extends Error { + * constructor() { + * super('It was too slow'); + * this.name = 'CustomTimeoutError'; + * } + * } + * + * const slow$ = interval(1000); + * + * slow$ + * .pipe(timeoutWith(900, throwError(() => new CustomTimeoutError()))) + * .subscribe({ + * error: err => console.error(err.message) + * }); + * ``` + * + * @see {@link timeout} + * + * @param due When passed a number, used as the time (in milliseconds) allowed between each value from the source before timeout + * is triggered. When passed a Date, used as the exact time at which the timeout will be triggered if the first value does not arrive. + * @param withObservable The observable to switch to when timeout occurs. + * @param scheduler The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} + * @return A function that returns an Observable that mirrors behaviour of the + * source Observable, unless timeout happens when it starts emitting values + * from the `ObservableInput` passed as a second parameter. + * @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use {@link timeout} with the configuration + * object: `timeout({ each: 100, with: () => a$, scheduler })`. Instead of `timeoutWith(someDate, a$, scheduler)`, use {@link timeout} + * with the configuration object: `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. + */ +export function timeoutWith( + due: number | Date, + withObservable: ObservableInput, + scheduler?: SchedulerLike +): OperatorFunction { + let first: number | Date | undefined; + let each: number | undefined; + let _with: () => ObservableInput; + scheduler = scheduler ?? async; + + if (isValidDate(due)) { + first = due; + } else if (typeof due === 'number') { + each = due; + } + + if (withObservable) { + _with = () => withObservable; + } else { + throw new TypeError('No observable provided to switch to'); + } + + if (first == null && each == null) { + // Ensure timeout was provided at runtime. + throw new TypeError('No timeout provided.'); + } + + return timeout>({ + first, + each, + scheduler, + with: _with, + }); +} diff --git a/node_modules/rxjs/src/internal/operators/timestamp.ts b/node_modules/rxjs/src/internal/operators/timestamp.ts new file mode 100644 index 0000000..bb388de --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/timestamp.ts @@ -0,0 +1,39 @@ +import { OperatorFunction, TimestampProvider, Timestamp } from '../types'; +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { map } from './map'; + +/** + * Attaches a timestamp to each item emitted by an observable indicating when it was emitted + * + * The `timestamp` operator maps the *source* observable stream to an object of type + * `{value: T, timestamp: R}`. The properties are generically typed. The `value` property contains the value + * and type of the *source* observable. The `timestamp` is generated by the schedulers `now` function. By + * default, it uses the `asyncScheduler` which simply returns `Date.now()` (milliseconds since 1970/01/01 + * 00:00:00:000) and therefore is of type `number`. + * + * ![](timestamp.png) + * + * ## Example + * + * In this example there is a timestamp attached to the document's click events + * + * ```ts + * import { fromEvent, timestamp } from 'rxjs'; + * + * const clickWithTimestamp = fromEvent(document, 'click').pipe( + * timestamp() + * ); + * + * // Emits data of type { value: PointerEvent, timestamp: number } + * clickWithTimestamp.subscribe(data => { + * console.log(data); + * }); + * ``` + * + * @param timestampProvider An object with a `now()` method used to get the current timestamp. + * @return A function that returns an Observable that attaches a timestamp to + * each item emitted by the source Observable indicating when it was emitted. + */ +export function timestamp(timestampProvider: TimestampProvider = dateTimestampProvider): OperatorFunction> { + return map((value: T) => ({ value, timestamp: timestampProvider.now() })); +} diff --git a/node_modules/rxjs/src/internal/operators/toArray.ts b/node_modules/rxjs/src/internal/operators/toArray.ts new file mode 100644 index 0000000..2678472 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/toArray.ts @@ -0,0 +1,44 @@ +import { reduce } from './reduce'; +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; + +const arrReducer = (arr: any[], value: any) => (arr.push(value), arr); + +/** + * Collects all source emissions and emits them as an array when the source completes. + * + * Get all values inside an array when the source completes + * + * ![](toArray.png) + * + * `toArray` will wait until the source Observable completes before emitting + * the array containing all emissions. When the source Observable errors no + * array will be emitted. + * + * ## Example + * + * ```ts + * import { interval, take, toArray } from 'rxjs'; + * + * const source = interval(1000); + * const example = source.pipe( + * take(10), + * toArray() + * ); + * + * example.subscribe(value => console.log(value)); + * + * // output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + * ``` + * + * @return A function that returns an Observable that emits an array of items + * emitted by the source Observable when source completes. + */ +export function toArray(): OperatorFunction { + // Because arrays are mutable, and we're mutating the array in this + // reducer process, we have to encapsulate the creation of the initial + // array within this `operate` function. + return operate((source, subscriber) => { + reduce(arrReducer, [] as T[])(source).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/window.ts b/node_modules/rxjs/src/internal/operators/window.ts new file mode 100644 index 0000000..b8250cb --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/window.ts @@ -0,0 +1,98 @@ +import { Observable } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; +import { Subject } from '../Subject'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Branch out the source Observable values as a nested Observable whenever + * `windowBoundaries` emits. + * + * It's like {@link buffer}, but emits a nested Observable + * instead of an array. + * + * ![](window.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits connected, non-overlapping + * windows. It emits the current window and opens a new one whenever the + * `windowBoundaries` emits an item. `windowBoundaries` can be any type that + * `ObservableInput` accepts. It internally gets converted to an Observable. + * Because each window is an Observable, the output is a higher-order Observable. + * + * ## Example + * + * In every window of 1 second each, emit at most 2 click events + * + * ```ts + * import { fromEvent, interval, window, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const sec = interval(1000); + * const result = clicks.pipe( + * window(sec), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link windowWhen} + * @see {@link buffer} + * + * @param windowBoundaries An `ObservableInput` that completes the + * previous window and starts a new window. + * @return A function that returns an Observable of windows, which are + * Observables emitting values of the source Observable. + */ +export function window(windowBoundaries: ObservableInput): OperatorFunction> { + return operate((source, subscriber) => { + let windowSubject: Subject = new Subject(); + + subscriber.next(windowSubject.asObservable()); + + const errorHandler = (err: any) => { + windowSubject.error(err); + subscriber.error(err); + }; + + // Subscribe to our source + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => windowSubject?.next(value), + () => { + windowSubject.complete(); + subscriber.complete(); + }, + errorHandler + ) + ); + + // Subscribe to the window boundaries. + innerFrom(windowBoundaries).subscribe( + createOperatorSubscriber( + subscriber, + () => { + windowSubject.complete(); + subscriber.next((windowSubject = new Subject())); + }, + noop, + errorHandler + ) + ); + + return () => { + // Unsubscribing the subject ensures that anyone who has captured + // a reference to this window that tries to use it after it can + // no longer get values from the source will get an ObjectUnsubscribedError. + windowSubject?.unsubscribe(); + windowSubject = null!; + }; + }); +} diff --git a/node_modules/rxjs/src/internal/operators/windowCount.ts b/node_modules/rxjs/src/internal/operators/windowCount.ts new file mode 100644 index 0000000..e568d42 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/windowCount.ts @@ -0,0 +1,130 @@ +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; + +/** + * Branch out the source Observable values as a nested Observable with each + * nested Observable emitting at most `windowSize` values. + * + * It's like {@link bufferCount}, but emits a nested + * Observable instead of an array. + * + * ![](windowCount.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits windows every `startWindowEvery` + * items, each containing no more than `windowSize` items. When the source + * Observable completes or encounters an error, the output Observable emits + * the current window and propagates the notification from the source + * Observable. If `startWindowEvery` is not provided, then new windows are + * started immediately at the start of the source and when each window completes + * with size `windowSize`. + * + * ## Examples + * + * Ignore every 3rd click event, starting from the first one + * + * ```ts + * import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowCount(3), + * map(win => win.pipe(skip(1))), // skip first of every 3 clicks + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * Ignore every 3rd click event, starting from the third one + * + * ```ts + * import { fromEvent, windowCount, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowCount(2, 3), + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link windowWhen} + * @see {@link bufferCount} + * + * @param {number} windowSize The maximum number of values emitted by each + * window. + * @param {number} [startWindowEvery] Interval at which to start a new window. + * For example if `startWindowEvery` is `2`, then a new window will be started + * on every other value from the source. A new window is started at the + * beginning of the source by default. + * @return A function that returns an Observable of windows, which in turn are + * Observable of values. + */ +export function windowCount(windowSize: number, startWindowEvery: number = 0): OperatorFunction> { + const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + + return operate((source, subscriber) => { + let windows = [new Subject()]; + let starts: number[] = []; + let count = 0; + + // Open the first window. + subscriber.next(windows[0].asObservable()); + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + // Emit the value through all current windows. + // We don't need to create a new window yet, we + // do that as soon as we close one. + for (const window of windows) { + window.next(value); + } + // Here we're using the size of the window array to figure + // out if the oldest window has emitted enough values. We can do this + // because the size of the window array is a function of the values + // seen by the subscription. If it's time to close it, we complete + // it and remove it. + const c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift()!.complete(); + } + + // Look to see if the next count tells us it's time to open a new window. + // TODO: We need to figure out if this really makes sense. We're technically + // emitting windows *before* we have a value to emit them for. It's probably + // more expected that we should be emitting the window when the start + // count is reached -- not before. + if (++count % startEvery === 0) { + const window = new Subject(); + windows.push(window); + subscriber.next(window.asObservable()); + } + }, + () => { + while (windows.length > 0) { + windows.shift()!.complete(); + } + subscriber.complete(); + }, + (err) => { + while (windows.length > 0) { + windows.shift()!.error(err); + } + subscriber.error(err); + }, + () => { + starts = null!; + windows = null!; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/windowTime.ts b/node_modules/rxjs/src/internal/operators/windowTime.ts new file mode 100644 index 0000000..b54656b --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/windowTime.ts @@ -0,0 +1,207 @@ +import { Subject } from '../Subject'; +import { asyncScheduler } from '../scheduler/async'; +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { Observer, OperatorFunction, SchedulerLike } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { arrRemove } from '../util/arrRemove'; +import { popScheduler } from '../util/args'; +import { executeSchedule } from '../util/executeSchedule'; + +export function windowTime(windowTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction>; +export function windowTime( + windowTimeSpan: number, + windowCreationInterval: number, + scheduler?: SchedulerLike +): OperatorFunction>; +export function windowTime( + windowTimeSpan: number, + windowCreationInterval: number | null | void, + maxWindowSize: number, + scheduler?: SchedulerLike +): OperatorFunction>; + +/** + * Branch out the source Observable values as a nested Observable periodically + * in time. + * + * It's like {@link bufferTime}, but emits a nested + * Observable instead of an array. + * + * ![](windowTime.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable starts a new window periodically, as + * determined by the `windowCreationInterval` argument. It emits each window + * after a fixed timespan, specified by the `windowTimeSpan` argument. When the + * source Observable completes or encounters an error, the output Observable + * emits the current window and propagates the notification from the source + * Observable. If `windowCreationInterval` is not provided, the output + * Observable starts a new window when the previous window of duration + * `windowTimeSpan` completes. If `maxWindowCount` is provided, each window + * will emit at most fixed number of values. Window will complete immediately + * after emitting last value and next one still will open as specified by + * `windowTimeSpan` and `windowCreationInterval` arguments. + * + * ## Examples + * + * In every window of 1 second each, emit at most 2 click events + * + * ```ts + * import { fromEvent, windowTime, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowTime(1000), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * Every 5 seconds start a window 1 second long, and emit at most 2 click events per window + * + * ```ts + * import { fromEvent, windowTime, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowTime(1000, 5000), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * Same as example above but with `maxWindowCount` instead of `take` + * + * ```ts + * import { fromEvent, windowTime, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowTime(1000, 5000, 2), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowCount} + * @see {@link windowToggle} + * @see {@link windowWhen} + * @see {@link bufferTime} + * + * @param windowTimeSpan The amount of time, in milliseconds, to fill each window. + * @param windowCreationInterval The interval at which to start new + * windows. + * @param maxWindowSize Max number of + * values each window can emit before completion. + * @param scheduler The scheduler on which to schedule the + * intervals that determine window boundaries. + * @return A function that returns an Observable of windows, which in turn are + * Observables. + */ +export function windowTime(windowTimeSpan: number, ...otherArgs: any[]): OperatorFunction> { + const scheduler = popScheduler(otherArgs) ?? asyncScheduler; + const windowCreationInterval = (otherArgs[0] as number) ?? null; + const maxWindowSize = (otherArgs[1] as number) || Infinity; + + return operate((source, subscriber) => { + // The active windows, their related subscriptions, and removal functions. + let windowRecords: WindowRecord[] | null = []; + // If true, it means that every time we close a window, we want to start a new window. + // This is only really used for when *just* the time span is passed. + let restartOnClose = false; + + const closeWindow = (record: { window: Subject; subs: Subscription }) => { + const { window, subs } = record; + window.complete(); + subs.unsubscribe(); + arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + + /** + * Called every time we start a new window. This also does + * the work of scheduling the job to close the window. + */ + const startWindow = () => { + if (windowRecords) { + const subs = new Subscription(); + subscriber.add(subs); + const window = new Subject(); + const record = { + window, + subs, + seen: 0, + }; + windowRecords.push(record); + subscriber.next(window.asObservable()); + executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan); + } + }; + + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + // The user passed both a windowTimeSpan (required), and a creation interval + // That means we need to start new window on the interval, and those windows need + // to wait the required time span before completing. + executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); + } else { + restartOnClose = true; + } + + startWindow(); + + /** + * We need to loop over a copy of the window records several times in this operator. + * This is to save bytes over the wire more than anything. + * The reason we copy the array is that reentrant code could mutate the array while + * we are iterating over it. + */ + const loop = (cb: (record: WindowRecord) => void) => windowRecords!.slice().forEach(cb); + + /** + * Used to notify all of the windows and the subscriber in the same way + * in the error and complete handlers. + */ + const terminate = (cb: (consumer: Observer) => void) => { + loop(({ window }) => cb(window)); + cb(subscriber); + subscriber.unsubscribe(); + }; + + source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + // Notify all windows of the value. + loop((record) => { + record.window.next(value); + // If the window is over the max size, we need to close it. + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, + // Complete the windows and the downstream subscriber and clean up. + () => terminate((consumer) => consumer.complete()), + // Notify the windows and the downstream subscriber of the error and clean up. + (err) => terminate((consumer) => consumer.error(err)) + ) + ); + + // Additional finalization. This will be called when the + // destination tears down. Other finalizations are registered implicitly + // above via subscription. + return () => { + // Ensure that the buffer is released. + windowRecords = null!; + }; + }); +} + +interface WindowRecord { + seen: number; + window: Subject; + subs: Subscription; +} diff --git a/node_modules/rxjs/src/internal/operators/windowToggle.ts b/node_modules/rxjs/src/internal/operators/windowToggle.ts new file mode 100644 index 0000000..95e596d --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/windowToggle.ts @@ -0,0 +1,134 @@ +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { Subscription } from '../Subscription'; +import { ObservableInput, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { innerFrom } from '../observable/innerFrom'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { noop } from '../util/noop'; +import { arrRemove } from '../util/arrRemove'; + +/** + * Branch out the source Observable values as a nested Observable starting from + * an emission from `openings` and ending when the output of `closingSelector` + * emits. + * + * It's like {@link bufferToggle}, but emits a nested + * Observable instead of an array. + * + * ![](windowToggle.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits windows that contain those items + * emitted by the source Observable between the time when the `openings` + * Observable emits an item and when the Observable returned by + * `closingSelector` emits an item. + * + * ## Example + * + * Every other second, emit the click events from the next 500ms + * + * ```ts + * import { fromEvent, interval, windowToggle, EMPTY, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const openings = interval(1000); + * const result = clicks.pipe( + * windowToggle(openings, i => i % 2 ? interval(500) : EMPTY), + * mergeAll() + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowWhen} + * @see {@link bufferToggle} + * + * @param {Observable} openings An observable of notifications to start new + * windows. + * @param {function(value: O): Observable} closingSelector A function that takes + * the value emitted by the `openings` observable and returns an Observable, + * which, when it emits a next notification, signals that the + * associated window should complete. + * @return A function that returns an Observable of windows, which in turn are + * Observables. + */ +export function windowToggle( + openings: ObservableInput, + closingSelector: (openValue: O) => ObservableInput +): OperatorFunction> { + return operate((source, subscriber) => { + const windows: Subject[] = []; + + const handleError = (err: any) => { + while (0 < windows.length) { + windows.shift()!.error(err); + } + subscriber.error(err); + }; + + innerFrom(openings).subscribe( + createOperatorSubscriber( + subscriber, + (openValue) => { + const window = new Subject(); + windows.push(window); + const closingSubscription = new Subscription(); + const closeWindow = () => { + arrRemove(windows, window); + window.complete(); + closingSubscription.unsubscribe(); + }; + + let closingNotifier: Observable; + try { + closingNotifier = innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + + subscriber.next(window.asObservable()); + + closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); + }, + noop + ) + ); + + // Subscribe to the source to get things started. + source.subscribe( + createOperatorSubscriber( + subscriber, + (value: T) => { + // Copy the windows array before we emit to + // make sure we don't have issues with reentrant code. + const windowsCopy = windows.slice(); + for (const window of windowsCopy) { + window.next(value); + } + }, + () => { + // Complete all of our windows before we complete. + while (0 < windows.length) { + windows.shift()!.complete(); + } + subscriber.complete(); + }, + handleError, + () => { + // Add this finalization so that all window subjects are + // disposed of. This way, if a user tries to subscribe + // to a window *after* the outer subscription has been unsubscribed, + // they will get an error, instead of waiting forever to + // see if a value arrives. + while (0 < windows.length) { + windows.shift()!.unsubscribe(); + } + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/windowWhen.ts b/node_modules/rxjs/src/internal/operators/windowWhen.ts new file mode 100644 index 0000000..860143f --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/windowWhen.ts @@ -0,0 +1,124 @@ +import { Subscriber } from '../Subscriber'; +import { Observable } from '../Observable'; +import { Subject } from '../Subject'; +import { ObservableInput, OperatorFunction } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; + +/** + * Branch out the source Observable values as a nested Observable using a + * factory function of closing Observables to determine when to start a new + * window. + * + * It's like {@link bufferWhen}, but emits a nested + * Observable instead of an array. + * + * ![](windowWhen.png) + * + * Returns an Observable that emits windows of items it collects from the source + * Observable. The output Observable emits connected, non-overlapping windows. + * It emits the current window and opens a new one whenever the Observable + * produced by the specified `closingSelector` function emits an item. The first + * window is opened immediately when subscribing to the output Observable. + * + * ## Example + * + * Emit only the first two clicks events in every window of [1-5] random seconds + * + * ```ts + * import { fromEvent, windowWhen, interval, map, take, mergeAll } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const result = clicks.pipe( + * windowWhen(() => interval(1000 + Math.random() * 4000)), + * map(win => win.pipe(take(2))), // take at most 2 emissions from each window + * mergeAll() // flatten the Observable-of-Observables + * ); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link window} + * @see {@link windowCount} + * @see {@link windowTime} + * @see {@link windowToggle} + * @see {@link bufferWhen} + * + * @param {function(): Observable} closingSelector A function that takes no + * arguments and returns an Observable that signals (on either `next` or + * `complete`) when to close the previous window and start a new one. + * @return A function that returns an Observable of windows, which in turn are + * Observables. + */ +export function windowWhen(closingSelector: () => ObservableInput): OperatorFunction> { + return operate((source, subscriber) => { + let window: Subject | null; + let closingSubscriber: Subscriber | undefined; + + /** + * When we get an error, we have to notify both the + * destination subscriber and the window. + */ + const handleError = (err: any) => { + window!.error(err); + subscriber.error(err); + }; + + /** + * Called every time we need to open a window. + * Recursive, as it will start the closing notifier, which + * inevitably *should* call openWindow -- but may not if + * it is a "never" observable. + */ + const openWindow = () => { + // We need to clean up our closing subscription, + // we only cared about the first next or complete notification. + closingSubscriber?.unsubscribe(); + + // Close our window before starting a new one. + window?.complete(); + + // Start the new window. + window = new Subject(); + subscriber.next(window.asObservable()); + + // Get our closing notifier. + let closingNotifier: Observable; + try { + closingNotifier = innerFrom(closingSelector()); + } catch (err) { + handleError(err); + return; + } + + // Subscribe to the closing notifier, be sure + // to capture the subscriber (aka Subscription) + // so we can clean it up when we close the window + // and open a new one. + closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); + }; + + // Start the first window. + openWindow(); + + // Subscribe to the source + source.subscribe( + createOperatorSubscriber( + subscriber, + (value) => window!.next(value), + () => { + // The source completed, close the window and complete. + window!.complete(); + subscriber.complete(); + }, + handleError, + () => { + // Be sure to clean up our closing subscription + // when this tears down. + closingSubscriber?.unsubscribe(); + window = null!; + } + ) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/withLatestFrom.ts b/node_modules/rxjs/src/internal/operators/withLatestFrom.ts new file mode 100644 index 0000000..80576e1 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/withLatestFrom.ts @@ -0,0 +1,110 @@ +import { OperatorFunction, ObservableInputTuple } from '../types'; +import { operate } from '../util/lift'; +import { createOperatorSubscriber } from './OperatorSubscriber'; +import { innerFrom } from '../observable/innerFrom'; +import { identity } from '../util/identity'; +import { noop } from '../util/noop'; +import { popResultSelector } from '../util/args'; + +export function withLatestFrom(...inputs: [...ObservableInputTuple]): OperatorFunction; + +export function withLatestFrom( + ...inputs: [...ObservableInputTuple, (...value: [T, ...O]) => R] +): OperatorFunction; + +/** + * Combines the source Observable with other Observables to create an Observable + * whose values are calculated from the latest values of each, only when the + * source emits. + * + * Whenever the source Observable emits a value, it + * computes a formula using that value plus the latest values from other input + * Observables, then emits the output of that formula. + * + * ![](withLatestFrom.png) + * + * `withLatestFrom` combines each value from the source Observable (the + * instance) with the latest values from the other input Observables only when + * the source emits a value, optionally using a `project` function to determine + * the value to be emitted on the output Observable. All input Observables must + * emit at least one value before the output Observable will emit a value. + * + * ## Example + * + * On every click event, emit an array with the latest timer event plus the click event + * + * ```ts + * import { fromEvent, interval, withLatestFrom } from 'rxjs'; + * + * const clicks = fromEvent(document, 'click'); + * const timer = interval(1000); + * const result = clicks.pipe(withLatestFrom(timer)); + * result.subscribe(x => console.log(x)); + * ``` + * + * @see {@link combineLatest} + * + * @param {ObservableInput} other An input Observable to combine with the source + * Observable. More than one input Observables may be given as argument. + * @param {Function} [project] Projection function for combining values + * together. Receives all values in order of the Observables passed, where the + * first parameter is a value from the source Observable. (e.g. + * `a.pipe(withLatestFrom(b, c), map(([a1, b1, c1]) => a1 + b1 + c1))`). If this is not + * passed, arrays will be emitted on the output Observable. + * @return A function that returns an Observable of projected values from the + * most recent values from each input Observable, or an array of the most + * recent values from each input Observable. + */ +export function withLatestFrom(...inputs: any[]): OperatorFunction { + const project = popResultSelector(inputs) as ((...args: any[]) => R) | undefined; + + return operate((source, subscriber) => { + const len = inputs.length; + const otherValues = new Array(len); + // An array of whether or not the other sources have emitted. Matched with them by index. + // TODO: At somepoint, we should investigate the performance implications here, and look + // into using a `Set()` and checking the `size` to see if we're ready. + let hasValue = inputs.map(() => false); + // Flipped true when we have at least one value from all other sources and + // we are ready to start emitting values. + let ready = false; + + // Other sources. Note that here we are not checking `subscriber.closed`, + // this causes all inputs to be subscribed to, even if nothing can be emitted + // from them. This is an important distinction because subscription constitutes + // a side-effect. + for (let i = 0; i < len; i++) { + innerFrom(inputs[i]).subscribe( + createOperatorSubscriber( + subscriber, + (value) => { + otherValues[i] = value; + if (!ready && !hasValue[i]) { + // If we're not ready yet, flag to show this observable has emitted. + hasValue[i] = true; + // Intentionally terse code. + // If all of our other observables have emitted, set `ready` to `true`, + // so we know we can start emitting values, then clean up the `hasValue` array, + // because we don't need it anymore. + (ready = hasValue.every(identity)) && (hasValue = null!); + } + }, + // Completing one of the other sources has + // no bearing on the completion of our result. + noop + ) + ); + } + + // Source subscription + source.subscribe( + createOperatorSubscriber(subscriber, (value) => { + if (ready) { + // We have at least one value from the other sources. Go ahead and emit. + const values = [value, ...otherValues]; + subscriber.next(project ? project(...values) : values); + } + }) + ); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/zip.ts b/node_modules/rxjs/src/internal/operators/zip.ts new file mode 100644 index 0000000..f8c2f68 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/zip.ts @@ -0,0 +1,26 @@ +import { zip as zipStatic } from '../observable/zip'; +import { ObservableInput, ObservableInputTuple, OperatorFunction, Cons } from '../types'; +import { operate } from '../util/lift'; + +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export function zip(otherInputs: [...ObservableInputTuple]): OperatorFunction>; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export function zip( + otherInputsAndProject: [...ObservableInputTuple], + project: (...values: Cons) => R +): OperatorFunction; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export function zip(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; +/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ +export function zip( + ...otherInputsAndProject: [...ObservableInputTuple, (...values: Cons) => R] +): OperatorFunction; + +/** + * @deprecated Replaced with {@link zipWith}. Will be removed in v8. + */ +export function zip(...sources: Array | ((...values: Array) => R)>): OperatorFunction { + return operate((source, subscriber) => { + zipStatic(source as ObservableInput, ...(sources as Array>)).subscribe(subscriber); + }); +} diff --git a/node_modules/rxjs/src/internal/operators/zipAll.ts b/node_modules/rxjs/src/internal/operators/zipAll.ts new file mode 100644 index 0000000..697cff5 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/zipAll.ts @@ -0,0 +1,20 @@ +import { OperatorFunction, ObservableInput } from '../types'; +import { zip } from '../observable/zip'; +import { joinAllInternals } from './joinAllInternals'; + +/** + * Collects all observable inner sources from the source, once the source completes, + * it will subscribe to all inner sources, combining their values by index and emitting + * them. + * + * @see {@link zipWith} + * @see {@link zip} + */ +export function zipAll(): OperatorFunction, T[]>; +export function zipAll(): OperatorFunction; +export function zipAll(project: (...values: T[]) => R): OperatorFunction, R>; +export function zipAll(project: (...values: Array) => R): OperatorFunction; + +export function zipAll(project?: (...values: T[]) => R) { + return joinAllInternals(zip, project); +} diff --git a/node_modules/rxjs/src/internal/operators/zipWith.ts b/node_modules/rxjs/src/internal/operators/zipWith.ts new file mode 100644 index 0000000..22eaad7 --- /dev/null +++ b/node_modules/rxjs/src/internal/operators/zipWith.ts @@ -0,0 +1,29 @@ +import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; +import { zip } from './zip'; + +/** + * Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays. + * + * What is meant by "combine by index": The first value from each will be made into a single array, then emitted, + * then the second value from each will be combined into a single array and emitted, then the third value + * from each will be combined into a single array and emitted, and so on. + * + * This will continue until it is no longer able to combine values of the same index into an array. + * + * After the last value from any one completed source is emitted in an array, the resulting observable will complete, + * as there is no way to continue "zipping" values together by index. + * + * Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting + * values at a much faster rate than the others. Usage should likely be limited to streams that emit + * at a similar pace, or finite streams of known length. + * + * In many cases, authors want `combineLatestWith` and not `zipWith`. + * + * @param otherInputs other observable inputs to collate values from. + * @return A function that returns an Observable that emits items by index + * combined from the source Observable and provided Observables, in form of an + * array. + */ +export function zipWith(...otherInputs: [...ObservableInputTuple]): OperatorFunction> { + return zip(...otherInputs); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts b/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts new file mode 100644 index 0000000..ea8fa24 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts @@ -0,0 +1,27 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; + +export function scheduleArray(input: ArrayLike, scheduler: SchedulerLike) { + return new Observable((subscriber) => { + // The current array index. + let i = 0; + // Start iterating over the array like on a schedule. + return scheduler.schedule(function () { + if (i === input.length) { + // If we have hit the end of the array like in the + // previous job, we can complete. + subscriber.complete(); + } else { + // Otherwise let's next the value at the current index, + // then increment our index. + subscriber.next(input[i++]); + // If the last emission didn't cause us to close the subscriber + // (via take or some side effect), reschedule the job and we'll + // make another pass. + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts new file mode 100644 index 0000000..daa0346 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts @@ -0,0 +1,31 @@ +import { SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +import { executeSchedule } from '../util/executeSchedule'; + +export function scheduleAsyncIterable(input: AsyncIterable, scheduler: SchedulerLike) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new Observable((subscriber) => { + executeSchedule(subscriber, scheduler, () => { + const iterator = input[Symbol.asyncIterator](); + executeSchedule( + subscriber, + scheduler, + () => { + iterator.next().then((result) => { + if (result.done) { + // This will remove the subscriptions from + // the parent subscription. + subscriber.complete(); + } else { + subscriber.next(result.value); + } + }); + }, + 0, + true + ); + }); + }); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts new file mode 100644 index 0000000..aa1459d --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts @@ -0,0 +1,60 @@ +import { Observable } from '../Observable'; +import { SchedulerLike } from '../types'; +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from '../util/isFunction'; +import { executeSchedule } from '../util/executeSchedule'; + +/** + * Used in {@link scheduled} to create an observable from an Iterable. + * @param input The iterable to create an observable from + * @param scheduler The scheduler to use + */ +export function scheduleIterable(input: Iterable, scheduler: SchedulerLike) { + return new Observable((subscriber) => { + let iterator: Iterator; + + // Schedule the initial creation of the iterator from + // the iterable. This is so the code in the iterable is + // not called until the scheduled job fires. + executeSchedule(subscriber, scheduler, () => { + // Create the iterator. + iterator = (input as any)[Symbol_iterator](); + + executeSchedule( + subscriber, + scheduler, + () => { + let value: T; + let done: boolean | undefined; + try { + // Pull the value out of the iterator + ({ value, done } = iterator.next()); + } catch (err) { + // We got an error while pulling from the iterator + subscriber.error(err); + return; + } + + if (done) { + // If it is "done" we just complete. This mimics the + // behavior of JavaScript's `for..of` consumption of + // iterables, which will not emit the value from an iterator + // result of `{ done: true: value: 'here' }`. + subscriber.complete(); + } else { + // The iterable is not done, emit the value. + subscriber.next(value); + } + }, + 0, + true + ); + }); + + // During finalization, if we see this iterator has a `return` method, + // then we know it is a Generator, and not just an Iterator. So we call + // the `return()` function. This will ensure that any `finally { }` blocks + // inside of the generator we can hit will be hit properly. + return () => isFunction(iterator?.return) && iterator.return(); + }); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts new file mode 100644 index 0000000..29ba3b5 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts @@ -0,0 +1,8 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +import { InteropObservable, SchedulerLike } from '../types'; + +export function scheduleObservable(input: InteropObservable, scheduler: SchedulerLike) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} diff --git a/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts b/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts new file mode 100644 index 0000000..f1211d0 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts @@ -0,0 +1,8 @@ +import { innerFrom } from '../observable/innerFrom'; +import { observeOn } from '../operators/observeOn'; +import { subscribeOn } from '../operators/subscribeOn'; +import { SchedulerLike } from '../types'; + +export function schedulePromise(input: PromiseLike, scheduler: SchedulerLike) { + return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts b/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts new file mode 100644 index 0000000..d742f10 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts @@ -0,0 +1,8 @@ +import { SchedulerLike, ReadableStreamLike } from '../types'; +import { Observable } from '../Observable'; +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; + +export function scheduleReadableStreamLike(input: ReadableStreamLike, scheduler: SchedulerLike): Observable { + return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); +} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduled.ts b/node_modules/rxjs/src/internal/scheduled/scheduled.ts new file mode 100644 index 0000000..bb2e425 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduled/scheduled.ts @@ -0,0 +1,50 @@ +import { scheduleObservable } from './scheduleObservable'; +import { schedulePromise } from './schedulePromise'; +import { scheduleArray } from './scheduleArray'; +import { scheduleIterable } from './scheduleIterable'; +import { scheduleAsyncIterable } from './scheduleAsyncIterable'; +import { isInteropObservable } from '../util/isInteropObservable'; +import { isPromise } from '../util/isPromise'; +import { isArrayLike } from '../util/isArrayLike'; +import { isIterable } from '../util/isIterable'; +import { ObservableInput, SchedulerLike } from '../types'; +import { Observable } from '../Observable'; +import { isAsyncIterable } from '../util/isAsyncIterable'; +import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; +import { isReadableStreamLike } from '../util/isReadableStreamLike'; +import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; + +/** + * Converts from a common {@link ObservableInput} type to an observable where subscription and emissions + * are scheduled on the provided scheduler. + * + * @see {@link from} + * @see {@link of} + * + * @param input The observable, array, promise, iterable, etc you would like to schedule + * @param scheduler The scheduler to use to schedule the subscription and emissions from + * the returned observable. + */ +export function scheduled(input: ObservableInput, scheduler: SchedulerLike): Observable { + if (input != null) { + if (isInteropObservable(input)) { + return scheduleObservable(input, scheduler); + } + if (isArrayLike(input)) { + return scheduleArray(input, scheduler); + } + if (isPromise(input)) { + return schedulePromise(input, scheduler); + } + if (isAsyncIterable(input)) { + return scheduleAsyncIterable(input, scheduler); + } + if (isIterable(input)) { + return scheduleIterable(input, scheduler); + } + if (isReadableStreamLike(input)) { + return scheduleReadableStreamLike(input, scheduler); + } + } + throw createInvalidObservableTypeError(input); +} diff --git a/node_modules/rxjs/src/internal/scheduler/Action.ts b/node_modules/rxjs/src/internal/scheduler/Action.ts new file mode 100644 index 0000000..6cf91bc --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/Action.ts @@ -0,0 +1,36 @@ +import { Scheduler } from '../Scheduler'; +import { Subscription } from '../Subscription'; +import { SchedulerAction } from '../types'; + +/** + * A unit of work to be executed in a `scheduler`. An action is typically + * created from within a {@link SchedulerLike} and an RxJS user does not need to concern + * themselves about creating and manipulating an Action. + * + * ```ts + * class Action extends Subscription { + * new (scheduler: Scheduler, work: (state?: T) => void); + * schedule(state?: T, delay: number = 0): Subscription; + * } + * ``` + * + * @class Action + */ +export class Action extends Subscription { + constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) { + super(); + } + /** + * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed + * some context object, `state`. May happen at some point in the future, + * according to the `delay` parameter, if specified. + * @param {T} [state] Some contextual data that the `work` function uses when + * called by the Scheduler. + * @param {number} [delay] Time to wait before executing the work, where the + * time unit is implicit and defined by the Scheduler. + * @return {void} + */ + public schedule(state?: T, delay: number = 0): Subscription { + return this; + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts b/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts new file mode 100644 index 0000000..f9c8f8e --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts @@ -0,0 +1,43 @@ +import { AsyncAction } from './AsyncAction'; +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; +import { SchedulerAction } from '../types'; +import { animationFrameProvider } from './animationFrameProvider'; +import { TimerHandle } from './timerHandle'; + +export class AnimationFrameAction extends AsyncAction { + constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) { + super(scheduler, work); + } + + protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { + // If delay is greater than 0, request as an async action. + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + // Push the action to the end of the scheduler queue. + scheduler.actions.push(this); + // If an animation frame has already been requested, don't request another + // one. If an animation frame hasn't been requested yet, request one. Return + // the current animation frame request id. + return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined))); + } + + protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined { + // If delay exists and is greater than 0, or if the delay is null (the + // action wasn't rescheduled) but was originally scheduled as an async + // action, then recycle as an async action. + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + // If the scheduler queue has no remaining actions with the same async id, + // cancel the requested animation frame and set the scheduled flag to + // undefined so the next AnimationFrameAction will request its own. + const { actions } = scheduler; + if (id != null && actions[actions.length - 1]?.id !== id) { + animationFrameProvider.cancelAnimationFrame(id as number); + scheduler._scheduled = undefined; + } + // Return undefined so the action knows to request a new async id if it's rescheduled. + return undefined; + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts new file mode 100644 index 0000000..640afa2 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts @@ -0,0 +1,38 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; + +export class AnimationFrameScheduler extends AsyncScheduler { + public flush(action?: AsyncAction): void { + this._active = true; + // The async id that effects a call to flush is stored in _scheduled. + // Before executing an action, it's necessary to check the action's async + // id to determine whether it's supposed to be executed in the current + // flush. + // Previous implementations of this method used a count to determine this, + // but that was unsound, as actions that are unsubscribed - i.e. cancelled - + // are removed from the actions array and that can shift actions that are + // scheduled to be executed in a subsequent flush into positions at which + // they are executed within the current flush. + const flushId = this._scheduled; + this._scheduled = undefined; + + const { actions } = this; + let error: any; + action = action || actions.shift()!; + + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + + this._active = false; + + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AsapAction.ts b/node_modules/rxjs/src/internal/scheduler/AsapAction.ts new file mode 100644 index 0000000..178f677 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AsapAction.ts @@ -0,0 +1,45 @@ +import { AsyncAction } from './AsyncAction'; +import { AsapScheduler } from './AsapScheduler'; +import { SchedulerAction } from '../types'; +import { immediateProvider } from './immediateProvider'; +import { TimerHandle } from './timerHandle'; + +export class AsapAction extends AsyncAction { + constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction, state?: T) => void) { + super(scheduler, work); + } + + protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { + // If delay is greater than 0, request as an async action. + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + // Push the action to the end of the scheduler queue. + scheduler.actions.push(this); + // If a microtask has already been scheduled, don't schedule another + // one. If a microtask hasn't been scheduled yet, schedule one now. Return + // the current scheduled microtask id. + return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + } + + protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined { + // If delay exists and is greater than 0, or if the delay is null (the + // action wasn't rescheduled) but was originally scheduled as an async + // action, then recycle as an async action. + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + // If the scheduler queue has no remaining actions with the same async id, + // cancel the requested microtask and set the scheduled flag to undefined + // so the next AsapAction will request its own. + const { actions } = scheduler; + if (id != null && actions[actions.length - 1]?.id !== id) { + immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + // Return undefined so the action knows to request a new async id if it's rescheduled. + return undefined; + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts new file mode 100644 index 0000000..95874bd --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts @@ -0,0 +1,38 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; + +export class AsapScheduler extends AsyncScheduler { + public flush(action?: AsyncAction): void { + this._active = true; + // The async id that effects a call to flush is stored in _scheduled. + // Before executing an action, it's necessary to check the action's async + // id to determine whether it's supposed to be executed in the current + // flush. + // Previous implementations of this method used a count to determine this, + // but that was unsound, as actions that are unsubscribed - i.e. cancelled - + // are removed from the actions array and that can shift actions that are + // scheduled to be executed in a subsequent flush into positions at which + // they are executed within the current flush. + const flushId = this._scheduled; + this._scheduled = undefined; + + const { actions } = this; + let error: any; + action = action || actions.shift()!; + + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + + this._active = false; + + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts b/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts new file mode 100644 index 0000000..d7ffe51 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts @@ -0,0 +1,151 @@ +import { Action } from './Action'; +import { SchedulerAction } from '../types'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +import { intervalProvider } from './intervalProvider'; +import { arrRemove } from '../util/arrRemove'; +import { TimerHandle } from './timerHandle'; + +export class AsyncAction extends Action { + public id: TimerHandle | undefined; + public state?: T; + // @ts-ignore: Property has no initializer and is not definitely assigned + public delay: number; + protected pending: boolean = false; + + constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) { + super(scheduler, work); + } + + public schedule(state?: T, delay: number = 0): Subscription { + if (this.closed) { + return this; + } + + // Always replace the current state with the new state. + this.state = state; + + const id = this.id; + const scheduler = this.scheduler; + + // + // Important implementation note: + // + // Actions only execute once by default, unless rescheduled from within the + // scheduled callback. This allows us to implement single and repeat + // actions via the same code path, without adding API surface area, as well + // as mimic traditional recursion but across asynchronous boundaries. + // + // However, JS runtimes and timers distinguish between intervals achieved by + // serial `setTimeout` calls vs. a single `setInterval` call. An interval of + // serial `setTimeout` calls can be individually delayed, which delays + // scheduling the next `setTimeout`, and so on. `setInterval` attempts to + // guarantee the interval callback will be invoked more precisely to the + // interval period, regardless of load. + // + // Therefore, we use `setInterval` to schedule single and repeat actions. + // If the action reschedules itself with the same delay, the interval is not + // canceled. If the action doesn't reschedule, or reschedules with a + // different delay, the interval will be canceled after scheduled callback + // execution. + // + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + + // Set the pending flag indicating that this action has been scheduled, or + // has recursively rescheduled itself. + this.pending = true; + + this.delay = delay; + // If this action has already an async Id, don't request a new one. + this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay); + + return this; + } + + protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle { + return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + } + + protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined { + // If this action is rescheduled with the same delay time, don't clear the interval id. + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + // Otherwise, if the action's delay time is different from the current delay, + // or the action has been rescheduled before it's executed, clear the interval id + if (id != null) { + intervalProvider.clearInterval(id); + } + + return undefined; + } + + /** + * Immediately executes this action and the `work` it contains. + * @return {any} + */ + public execute(state: T, delay: number): any { + if (this.closed) { + return new Error('executing a cancelled action'); + } + + this.pending = false; + const error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + // Dequeue if the action didn't reschedule itself. Don't call + // unsubscribe(), because the action could reschedule later. + // For example: + // ``` + // scheduler.schedule(function doWork(counter) { + // /* ... I'm a busy worker bee ... */ + // var originalAction = this; + // /* wait 100ms before rescheduling the action */ + // setTimeout(function () { + // originalAction.schedule(counter + 1); + // }, 100); + // }, 1000); + // ``` + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + } + + protected _execute(state: T, _delay: number): any { + let errored: boolean = false; + let errorValue: any; + try { + this.work(state); + } catch (e) { + errored = true; + // HACK: Since code elsewhere is relying on the "truthiness" of the + // return here, we can't have it return "" or 0 or false. + // TODO: Clean this up when we refactor schedulers mid-version-8 or so. + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + } + + unsubscribe() { + if (!this.closed) { + const { id, scheduler } = this; + const { actions } = scheduler; + + this.work = this.state = this.scheduler = null!; + this.pending = false; + + arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + + this.delay = null!; + super.unsubscribe(); + } + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts new file mode 100644 index 0000000..fc04d66 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts @@ -0,0 +1,54 @@ +import { Scheduler } from '../Scheduler'; +import { Action } from './Action'; +import { AsyncAction } from './AsyncAction'; +import { TimerHandle } from './timerHandle'; + +export class AsyncScheduler extends Scheduler { + public actions: Array> = []; + /** + * A flag to indicate whether the Scheduler is currently executing a batch of + * queued actions. + * @type {boolean} + * @internal + */ + public _active: boolean = false; + /** + * An internal ID used to track the latest asynchronous task such as those + * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and + * others. + * @type {any} + * @internal + */ + public _scheduled: TimerHandle | undefined; + + constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) { + super(SchedulerAction, now); + } + + public flush(action: AsyncAction): void { + const { actions } = this; + + if (this._active) { + actions.push(action); + return; + } + + let error: any; + this._active = true; + + do { + if ((error = action.execute(action.state, action.delay))) { + break; + } + } while ((action = actions.shift()!)); // exhaust the scheduler queue + + this._active = false; + + if (error) { + while ((action = actions.shift()!)) { + action.unsubscribe(); + } + throw error; + } + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/QueueAction.ts b/node_modules/rxjs/src/internal/scheduler/QueueAction.ts new file mode 100644 index 0000000..9016edb --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/QueueAction.ts @@ -0,0 +1,44 @@ +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { QueueScheduler } from './QueueScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; + +export class QueueAction extends AsyncAction { + constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) { + super(scheduler, work); + } + + public schedule(state?: T, delay: number = 0): Subscription { + if (delay > 0) { + return super.schedule(state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + } + + public execute(state: T, delay: number): any { + return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay); + } + + protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { + // If delay exists and is greater than 0, or if the delay is null (the + // action wasn't rescheduled) but was originally scheduled as an async + // action, then recycle as an async action. + + if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { + return super.requestAsyncId(scheduler, id, delay); + } + + // Otherwise flush the scheduler starting with this action. + scheduler.flush(this); + + // HACK: In the past, this was returning `void`. However, `void` isn't a valid + // `TimerHandle`, and generally the return value here isn't really used. So the + // compromise is to return `0` which is both "falsy" and a valid `TimerHandle`, + // as opposed to refactoring every other instanceo of `requestAsyncId`. + return 0; + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts b/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts new file mode 100644 index 0000000..e9dab3d --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts @@ -0,0 +1,4 @@ +import { AsyncScheduler } from './AsyncScheduler'; + +export class QueueScheduler extends AsyncScheduler { +} diff --git a/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts b/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts new file mode 100644 index 0000000..310ac91 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts @@ -0,0 +1,129 @@ +import { AsyncAction } from './AsyncAction'; +import { Subscription } from '../Subscription'; +import { AsyncScheduler } from './AsyncScheduler'; +import { SchedulerAction } from '../types'; +import { TimerHandle } from './timerHandle'; + +export class VirtualTimeScheduler extends AsyncScheduler { + /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */ + static frameTimeFactor = 10; + + /** + * The current frame for the state of the virtual scheduler instance. The difference + * between two "frames" is synonymous with the passage of "virtual time units". So if + * you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`, + * that means `10` virtual time units have passed. + */ + public frame: number = 0; + + /** + * Used internally to examine the current virtual action index being processed. + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + public index: number = -1; + + /** + * This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of + * this constructor is likely to change in the long run. + * + * @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling. + * @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles. + */ + constructor(schedulerActionCtor: typeof AsyncAction = VirtualAction as any, public maxFrames: number = Infinity) { + super(schedulerActionCtor, () => this.frame); + } + + /** + * Prompt the Scheduler to execute all of its queued actions, therefore + * clearing its queue. + * @return {void} + */ + public flush(): void { + const { actions, maxFrames } = this; + let error: any; + let action: AsyncAction | undefined; + + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + + if ((error = action.execute(action.state, action.delay))) { + break; + } + } + + if (error) { + while ((action = actions.shift())) { + action.unsubscribe(); + } + throw error; + } + } +} + +export class VirtualAction extends AsyncAction { + protected active: boolean = true; + + constructor( + protected scheduler: VirtualTimeScheduler, + protected work: (this: SchedulerAction, state?: T) => void, + protected index: number = (scheduler.index += 1) + ) { + super(scheduler, work); + this.index = scheduler.index = index; + } + + public schedule(state?: T, delay: number = 0): Subscription { + if (Number.isFinite(delay)) { + if (!this.id) { + return super.schedule(state, delay); + } + this.active = false; + // If an action is rescheduled, we save allocations by mutating its state, + // pushing it to the end of the scheduler queue, and recycling the action. + // But since the VirtualTimeScheduler is used for testing, VirtualActions + // must be immutable so they can be inspected later. + const action = new VirtualAction(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } else { + // If someone schedules something with Infinity, it'll never happen. So we + // don't even schedule it. + return Subscription.EMPTY; + } + } + + protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle { + this.delay = scheduler.frame + delay; + const { actions } = scheduler; + actions.push(this); + (actions as Array>).sort(VirtualAction.sortActions); + return 1; + } + + protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle | undefined { + return undefined; + } + + protected _execute(state: T, delay: number): any { + if (this.active === true) { + return super._execute(state, delay); + } + } + + private static sortActions(a: VirtualAction, b: VirtualAction) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } else if (a.index > b.index) { + return 1; + } else { + return -1; + } + } else if (a.delay > b.delay) { + return 1; + } else { + return -1; + } + } +} diff --git a/node_modules/rxjs/src/internal/scheduler/animationFrame.ts b/node_modules/rxjs/src/internal/scheduler/animationFrame.ts new file mode 100644 index 0000000..2ce033d --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/animationFrame.ts @@ -0,0 +1,41 @@ +import { AnimationFrameAction } from './AnimationFrameAction'; +import { AnimationFrameScheduler } from './AnimationFrameScheduler'; + +/** + * + * Animation Frame Scheduler + * + * Perform task when `window.requestAnimationFrame` would fire + * + * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler + * behaviour. + * + * Without delay, `animationFrame` scheduler can be used to create smooth browser animations. + * It makes sure scheduled task will happen just before next browser content repaint, + * thus performing animations as efficiently as possible. + * + * ## Example + * Schedule div height animation + * ```ts + * // html:
+ * import { animationFrameScheduler } from 'rxjs'; + * + * const div = document.querySelector('div'); + * + * animationFrameScheduler.schedule(function(height) { + * div.style.height = height + "px"; + * + * this.schedule(height + 1); // `this` references currently executing Action, + * // which we reschedule with new state + * }, 0, 0); + * + * // You will see a div element growing in height + * ``` + */ + +export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); + +/** + * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8. + */ +export const animationFrame = animationFrameScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts b/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts new file mode 100644 index 0000000..610093b --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts @@ -0,0 +1,44 @@ +import { Subscription } from '../Subscription'; + +interface AnimationFrameProvider { + schedule(callback: FrameRequestCallback): Subscription; + requestAnimationFrame: typeof requestAnimationFrame; + cancelAnimationFrame: typeof cancelAnimationFrame; + delegate: + | { + requestAnimationFrame: typeof requestAnimationFrame; + cancelAnimationFrame: typeof cancelAnimationFrame; + } + | undefined; +} + +export const animationFrameProvider: AnimationFrameProvider = { + // When accessing the delegate, use the variable rather than `this` so that + // the functions can be called without being bound to the provider. + schedule(callback) { + let request = requestAnimationFrame; + let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame; + const { delegate } = animationFrameProvider; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + const handle = request((timestamp) => { + // Clear the cancel function. The request has been fulfilled, so + // attempting to cancel the request upon unsubscription would be + // pointless. + cancel = undefined; + callback(timestamp); + }); + return new Subscription(() => cancel?.(handle)); + }, + requestAnimationFrame(...args) { + const { delegate } = animationFrameProvider; + return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args); + }, + cancelAnimationFrame(...args) { + const { delegate } = animationFrameProvider; + return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/asap.ts b/node_modules/rxjs/src/internal/scheduler/asap.ts new file mode 100644 index 0000000..5be1be4 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/asap.ts @@ -0,0 +1,44 @@ +import { AsapAction } from './AsapAction'; +import { AsapScheduler } from './AsapScheduler'; + +/** + * + * Asap Scheduler + * + * Perform task as fast as it can be performed asynchronously + * + * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task + * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing + * code to end and then it will try to execute given task as fast as possible. + * + * `asap` scheduler will do its best to minimize time between end of currently executing code + * and start of scheduled task. This makes it best candidate for performing so called "deferring". + * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves + * some (although minimal) unwanted delay. + * + * Note that using `asap` scheduler does not necessarily mean that your task will be first to process + * after currently executing code. In particular, if some task was also scheduled with `asap` before, + * that task will execute first. That being said, if you need to schedule task asynchronously, but + * as soon as possible, `asap` scheduler is your best bet. + * + * ## Example + * Compare async and asap scheduler< + * ```ts + * import { asapScheduler, asyncScheduler } from 'rxjs'; + * + * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first... + * asapScheduler.schedule(() => console.log('asap')); + * + * // Logs: + * // "asap" + * // "async" + * // ... but 'asap' goes first! + * ``` + */ + +export const asapScheduler = new AsapScheduler(AsapAction); + +/** + * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8. + */ +export const asap = asapScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/async.ts b/node_modules/rxjs/src/internal/scheduler/async.ts new file mode 100644 index 0000000..76f9dc8 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/async.ts @@ -0,0 +1,56 @@ +import { AsyncAction } from './AsyncAction'; +import { AsyncScheduler } from './AsyncScheduler'; + +/** + * + * Async Scheduler + * + * Schedule task as if you used setTimeout(task, duration) + * + * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript + * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating + * in intervals. + * + * If you just want to "defer" task, that is to perform it right after currently + * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`), + * better choice will be the {@link asapScheduler} scheduler. + * + * ## Examples + * Use async scheduler to delay task + * ```ts + * import { asyncScheduler } from 'rxjs'; + * + * const task = () => console.log('it works!'); + * + * asyncScheduler.schedule(task, 2000); + * + * // After 2 seconds logs: + * // "it works!" + * ``` + * + * Use async scheduler to repeat task in intervals + * ```ts + * import { asyncScheduler } from 'rxjs'; + * + * function task(state) { + * console.log(state); + * this.schedule(state + 1, 1000); // `this` references currently executing Action, + * // which we reschedule with new state and delay + * } + * + * asyncScheduler.schedule(task, 3000, 0); + * + * // Logs: + * // 0 after 3s + * // 1 after 4s + * // 2 after 5s + * // 3 after 6s + * ``` + */ + +export const asyncScheduler = new AsyncScheduler(AsyncAction); + +/** + * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8. + */ +export const async = asyncScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts b/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts new file mode 100644 index 0000000..9e8339d --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts @@ -0,0 +1,14 @@ +import { TimestampProvider } from '../types'; + +interface DateTimestampProvider extends TimestampProvider { + delegate: TimestampProvider | undefined; +} + +export const dateTimestampProvider: DateTimestampProvider = { + now() { + // Use the variable rather than `this` so that the function can be called + // without being bound to the provider. + return (dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts b/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts new file mode 100644 index 0000000..d70fbf3 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts @@ -0,0 +1,31 @@ +import { Immediate } from '../util/Immediate'; +import type { TimerHandle } from './timerHandle'; +const { setImmediate, clearImmediate } = Immediate; + +type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle; +type ClearImmediateFunction = (handle: TimerHandle) => void; + +interface ImmediateProvider { + setImmediate: SetImmediateFunction; + clearImmediate: ClearImmediateFunction; + delegate: + | { + setImmediate: SetImmediateFunction; + clearImmediate: ClearImmediateFunction; + } + | undefined; +} + +export const immediateProvider: ImmediateProvider = { + // When accessing the delegate, use the variable rather than `this` so that + // the functions can be called without being bound to the provider. + setImmediate(...args) { + const { delegate } = immediateProvider; + return (delegate?.setImmediate || setImmediate)(...args); + }, + clearImmediate(handle) { + const { delegate } = immediateProvider; + return (delegate?.clearImmediate || clearImmediate)(handle as any); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts b/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts new file mode 100644 index 0000000..032317d --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts @@ -0,0 +1,31 @@ +import type { TimerHandle } from './timerHandle'; +type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; +type ClearIntervalFunction = (handle: TimerHandle) => void; + +interface IntervalProvider { + setInterval: SetIntervalFunction; + clearInterval: ClearIntervalFunction; + delegate: + | { + setInterval: SetIntervalFunction; + clearInterval: ClearIntervalFunction; + } + | undefined; +} + +export const intervalProvider: IntervalProvider = { + // When accessing the delegate, use the variable rather than `this` so that + // the functions can be called without being bound to the provider. + setInterval(handler: () => void, timeout?: number, ...args) { + const { delegate } = intervalProvider; + if (delegate?.setInterval) { + return delegate.setInterval(handler, timeout, ...args); + } + return setInterval(handler, timeout, ...args); + }, + clearInterval(handle) { + const { delegate } = intervalProvider; + return (delegate?.clearInterval || clearInterval)(handle as any); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts b/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts new file mode 100644 index 0000000..873e71b --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts @@ -0,0 +1,14 @@ +import { TimestampProvider } from '../types'; + +interface PerformanceTimestampProvider extends TimestampProvider { + delegate: TimestampProvider | undefined; +} + +export const performanceTimestampProvider: PerformanceTimestampProvider = { + now() { + // Use the variable rather than `this` so that the function can be called + // without being bound to the provider. + return (performanceTimestampProvider.delegate || performance).now(); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/queue.ts b/node_modules/rxjs/src/internal/scheduler/queue.ts new file mode 100644 index 0000000..df4e216 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/queue.ts @@ -0,0 +1,72 @@ +import { QueueAction } from './QueueAction'; +import { QueueScheduler } from './QueueScheduler'; + +/** + * + * Queue Scheduler + * + * Put every next task on a queue, instead of executing it immediately + * + * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler. + * + * When used without delay, it schedules given task synchronously - executes it right when + * it is scheduled. However when called recursively, that is when inside the scheduled task, + * another task is scheduled with queue scheduler, instead of executing immediately as well, + * that task will be put on a queue and wait for current one to finish. + * + * This means that when you execute task with `queue` scheduler, you are sure it will end + * before any other task scheduled with that scheduler will start. + * + * ## Examples + * Schedule recursively first, then do something + * ```ts + * import { queueScheduler } from 'rxjs'; + * + * queueScheduler.schedule(() => { + * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue + * + * console.log('first'); + * }); + * + * // Logs: + * // "first" + * // "second" + * ``` + * + * Reschedule itself recursively + * ```ts + * import { queueScheduler } from 'rxjs'; + * + * queueScheduler.schedule(function(state) { + * if (state !== 0) { + * console.log('before', state); + * this.schedule(state - 1); // `this` references currently executing Action, + * // which we reschedule with new state + * console.log('after', state); + * } + * }, 0, 3); + * + * // In scheduler that runs recursively, you would expect: + * // "before", 3 + * // "before", 2 + * // "before", 1 + * // "after", 1 + * // "after", 2 + * // "after", 3 + * + * // But with queue it logs: + * // "before", 3 + * // "after", 3 + * // "before", 2 + * // "after", 2 + * // "before", 1 + * // "after", 1 + * ``` + */ + +export const queueScheduler = new QueueScheduler(QueueAction); + +/** + * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8. + */ +export const queue = queueScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts b/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts new file mode 100644 index 0000000..205e016 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts @@ -0,0 +1,31 @@ +import type { TimerHandle } from './timerHandle'; +type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; +type ClearTimeoutFunction = (handle: TimerHandle) => void; + +interface TimeoutProvider { + setTimeout: SetTimeoutFunction; + clearTimeout: ClearTimeoutFunction; + delegate: + | { + setTimeout: SetTimeoutFunction; + clearTimeout: ClearTimeoutFunction; + } + | undefined; +} + +export const timeoutProvider: TimeoutProvider = { + // When accessing the delegate, use the variable rather than `this` so that + // the functions can be called without being bound to the provider. + setTimeout(handler: () => void, timeout?: number, ...args) { + const { delegate } = timeoutProvider; + if (delegate?.setTimeout) { + return delegate.setTimeout(handler, timeout, ...args); + } + return setTimeout(handler, timeout, ...args); + }, + clearTimeout(handle) { + const { delegate } = timeoutProvider; + return (delegate?.clearTimeout || clearTimeout)(handle as any); + }, + delegate: undefined, +}; diff --git a/node_modules/rxjs/src/internal/scheduler/timerHandle.ts b/node_modules/rxjs/src/internal/scheduler/timerHandle.ts new file mode 100644 index 0000000..99c0098 --- /dev/null +++ b/node_modules/rxjs/src/internal/scheduler/timerHandle.ts @@ -0,0 +1 @@ +export type TimerHandle = number | ReturnType; diff --git a/node_modules/rxjs/src/internal/symbol/iterator.ts b/node_modules/rxjs/src/internal/symbol/iterator.ts new file mode 100644 index 0000000..75098ef --- /dev/null +++ b/node_modules/rxjs/src/internal/symbol/iterator.ts @@ -0,0 +1,9 @@ +export function getSymbolIterator(): symbol { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator' as any; + } + + return Symbol.iterator; +} + +export const iterator = getSymbolIterator(); diff --git a/node_modules/rxjs/src/internal/symbol/observable.ts b/node_modules/rxjs/src/internal/symbol/observable.ts new file mode 100644 index 0000000..b133245 --- /dev/null +++ b/node_modules/rxjs/src/internal/symbol/observable.ts @@ -0,0 +1,7 @@ +/** + * Symbol.observable or a string "@@observable". Used for interop + * + * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS. + * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable + */ +export const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')(); diff --git a/node_modules/rxjs/src/internal/testing/ColdObservable.ts b/node_modules/rxjs/src/internal/testing/ColdObservable.ts new file mode 100644 index 0000000..40cbe49 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/ColdObservable.ts @@ -0,0 +1,52 @@ +import { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { Scheduler } from '../Scheduler'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { Subscriber } from '../Subscriber'; +import { observeNotification } from '../Notification'; + +export class ColdObservable extends Observable implements SubscriptionLoggable { + public subscriptions: SubscriptionLog[] = []; + scheduler: Scheduler; + // @ts-ignore: Property has no initializer and is not definitely assigned + logSubscribedFrame: () => number; + // @ts-ignore: Property has no initializer and is not definitely assigned + logUnsubscribedFrame: (index: number) => void; + + constructor(public messages: TestMessage[], scheduler: Scheduler) { + super(function (this: Observable, subscriber: Subscriber) { + const observable: ColdObservable = this as any; + const index = observable.logSubscribedFrame(); + const subscription = new Subscription(); + subscription.add( + new Subscription(() => { + observable.logUnsubscribedFrame(index); + }) + ); + observable.scheduleMessages(subscriber); + return subscription; + }); + this.scheduler = scheduler; + } + + scheduleMessages(subscriber: Subscriber) { + const messagesLength = this.messages.length; + for (let i = 0; i < messagesLength; i++) { + const message = this.messages[i]; + subscriber.add( + this.scheduler.schedule( + (state) => { + const { message: { notification }, subscriber: destination } = state!; + observeNotification(notification, destination); + }, + message.frame, + { message, subscriber } + ) + ); + } + } +} +applyMixins(ColdObservable, [SubscriptionLoggable]); diff --git a/node_modules/rxjs/src/internal/testing/HotObservable.ts b/node_modules/rxjs/src/internal/testing/HotObservable.ts new file mode 100644 index 0000000..c151480 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/HotObservable.ts @@ -0,0 +1,53 @@ +import { Subject } from '../Subject'; +import { Subscriber } from '../Subscriber'; +import { Subscription } from '../Subscription'; +import { Scheduler } from '../Scheduler'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { SubscriptionLoggable } from './SubscriptionLoggable'; +import { applyMixins } from '../util/applyMixins'; +import { observeNotification } from '../Notification'; + +export class HotObservable extends Subject implements SubscriptionLoggable { + public subscriptions: SubscriptionLog[] = []; + scheduler: Scheduler; + // @ts-ignore: Property has no initializer and is not definitely assigned + logSubscribedFrame: () => number; + // @ts-ignore: Property has no initializer and is not definitely assigned + logUnsubscribedFrame: (index: number) => void; + + constructor(public messages: TestMessage[], scheduler: Scheduler) { + super(); + this.scheduler = scheduler; + } + + /** @internal */ + protected _subscribe(subscriber: Subscriber): Subscription { + const subject: HotObservable = this; + const index = subject.logSubscribedFrame(); + const subscription = new Subscription(); + subscription.add( + new Subscription(() => { + subject.logUnsubscribedFrame(index); + }) + ); + subscription.add(super._subscribe(subscriber)); + return subscription; + } + + setup() { + const subject = this; + const messagesLength = subject.messages.length; + /* tslint:disable:no-var-keyword */ + for (let i = 0; i < messagesLength; i++) { + (() => { + const { notification, frame } = subject.messages[i]; + /* tslint:enable */ + subject.scheduler.schedule(() => { + observeNotification(notification, subject); + }, frame); + })(); + } + } +} +applyMixins(HotObservable, [SubscriptionLoggable]); diff --git a/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts b/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts new file mode 100644 index 0000000..367a6d9 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts @@ -0,0 +1,5 @@ +export class SubscriptionLog { + constructor(public subscribedFrame: number, + public unsubscribedFrame: number = Infinity) { + } +} \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts b/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts new file mode 100644 index 0000000..e8def04 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts @@ -0,0 +1,22 @@ +import { Scheduler } from '../Scheduler'; +import { SubscriptionLog } from './SubscriptionLog'; + +export class SubscriptionLoggable { + public subscriptions: SubscriptionLog[] = []; + // @ts-ignore: Property has no initializer and is not definitely assigned + scheduler: Scheduler; + + logSubscribedFrame(): number { + this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); + return this.subscriptions.length - 1; + } + + logUnsubscribedFrame(index: number) { + const subscriptionLogs = this.subscriptions; + const oldSubscriptionLog = subscriptionLogs[index]; + subscriptionLogs[index] = new SubscriptionLog( + oldSubscriptionLog.subscribedFrame, + this.scheduler.now() + ); + } +} diff --git a/node_modules/rxjs/src/internal/testing/TestMessage.ts b/node_modules/rxjs/src/internal/testing/TestMessage.ts new file mode 100644 index 0000000..918b477 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/TestMessage.ts @@ -0,0 +1,7 @@ +import { ObservableNotification } from '../types'; + +export interface TestMessage { + frame: number; + notification: ObservableNotification; + isGhost?: boolean; +} diff --git a/node_modules/rxjs/src/internal/testing/TestScheduler.ts b/node_modules/rxjs/src/internal/testing/TestScheduler.ts new file mode 100644 index 0000000..2ccdbc5 --- /dev/null +++ b/node_modules/rxjs/src/internal/testing/TestScheduler.ts @@ -0,0 +1,693 @@ +import { Observable } from '../Observable'; +import { ColdObservable } from './ColdObservable'; +import { HotObservable } from './HotObservable'; +import { TestMessage } from './TestMessage'; +import { SubscriptionLog } from './SubscriptionLog'; +import { Subscription } from '../Subscription'; +import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; +import { ObservableNotification } from '../types'; +import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; +import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; +import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; +import { animationFrameProvider } from '../scheduler/animationFrameProvider'; +import type { TimerHandle } from '../scheduler/timerHandle'; +import { immediateProvider } from '../scheduler/immediateProvider'; +import { intervalProvider } from '../scheduler/intervalProvider'; +import { timeoutProvider } from '../scheduler/timeoutProvider'; + +const defaultMaxFrame: number = 750; + +export interface RunHelpers { + cold: typeof TestScheduler.prototype.createColdObservable; + hot: typeof TestScheduler.prototype.createHotObservable; + flush: typeof TestScheduler.prototype.flush; + time: typeof TestScheduler.prototype.createTime; + expectObservable: typeof TestScheduler.prototype.expectObservable; + expectSubscriptions: typeof TestScheduler.prototype.expectSubscriptions; + animate: (marbles: string) => void; +} + +interface FlushableTest { + ready: boolean; + actual?: any[]; + expected?: any[]; +} + +export type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void; +export type subscriptionLogsToBeFn = (marbles: string | string[]) => void; + +export class TestScheduler extends VirtualTimeScheduler { + /** + * The number of virtual time units each character in a marble diagram represents. If + * the test scheduler is being used in "run mode", via the `run` method, this is temporarily + * set to `1` for the duration of the `run` block, then set back to whatever value it was. + * @nocollapse + */ + static frameTimeFactor = 10; + + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + public readonly hotObservables: HotObservable[] = []; + + /** + * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. + */ + public readonly coldObservables: ColdObservable[] = []; + + /** + * Test meta data to be processed during `flush()` + */ + private flushTests: FlushableTest[] = []; + + /** + * Indicates whether the TestScheduler instance is operating in "run mode", + * meaning it's processing a call to `run()` + */ + private runMode = false; + + /** + * + * @param assertDeepEqual A function to set up your assertion for your test harness + */ + constructor(public assertDeepEqual: (actual: any, expected: any) => boolean | void) { + super(VirtualAction, defaultMaxFrame); + } + + createTime(marbles: string): number { + const indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); + if (indexOf === -1) { + throw new Error('marble diagram for time should have a completion marker "|"'); + } + return indexOf * TestScheduler.frameTimeFactor; + } + + /** + * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. + * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. + * @param error The error to use for the `#` marble (if present). + */ + createColdObservable(marbles: string, values?: { [marble: string]: T }, error?: any): ColdObservable { + if (marbles.indexOf('^') !== -1) { + throw new Error('cold observable cannot have subscription offset "^"'); + } + if (marbles.indexOf('!') !== -1) { + throw new Error('cold observable cannot have unsubscription marker "!"'); + } + const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const cold = new ColdObservable(messages, this); + this.coldObservables.push(cold); + return cold; + } + + /** + * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. + * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. + * @param error The error to use for the `#` marble (if present). + */ + createHotObservable(marbles: string, values?: { [marble: string]: T }, error?: any): HotObservable { + if (marbles.indexOf('!') !== -1) { + throw new Error('hot observable cannot have unsubscription marker "!"'); + } + const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); + const subject = new HotObservable(messages, this); + this.hotObservables.push(subject); + return subject; + } + + private materializeInnerObservable(observable: Observable, outerFrame: number): TestMessage[] { + const messages: TestMessage[] = []; + observable.subscribe({ + next: (value) => { + messages.push({ frame: this.frame - outerFrame, notification: nextNotification(value) }); + }, + error: (error) => { + messages.push({ frame: this.frame - outerFrame, notification: errorNotification(error) }); + }, + complete: () => { + messages.push({ frame: this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); + }, + }); + return messages; + } + + expectObservable(observable: Observable, subscriptionMarbles: string | null = null) { + const actual: TestMessage[] = []; + const flushTest: FlushableTest = { actual, ready: false }; + const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); + const subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; + const unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; + let subscription: Subscription; + + this.schedule(() => { + subscription = observable.subscribe({ + next: (x) => { + // Support Observable-of-Observables + const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; + actual.push({ frame: this.frame, notification: nextNotification(value) }); + }, + error: (error) => { + actual.push({ frame: this.frame, notification: errorNotification(error) }); + }, + complete: () => { + actual.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + + if (unsubscriptionFrame !== Infinity) { + this.schedule(() => subscription.unsubscribe(), unsubscriptionFrame); + } + + this.flushTests.push(flushTest); + const { runMode } = this; + + return { + toBe(marbles: string, values?: any, errorValue?: any) { + flushTest.ready = true; + flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); + }, + toEqual: (other: Observable) => { + flushTest.ready = true; + flushTest.expected = []; + this.schedule(() => { + subscription = other.subscribe({ + next: (x) => { + // Support Observable-of-Observables + const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; + flushTest.expected!.push({ frame: this.frame, notification: nextNotification(value) }); + }, + error: (error) => { + flushTest.expected!.push({ frame: this.frame, notification: errorNotification(error) }); + }, + complete: () => { + flushTest.expected!.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); + }, + }); + }, subscriptionFrame); + }, + }; + } + + expectSubscriptions(actualSubscriptionLogs: SubscriptionLog[]): { toBe: subscriptionLogsToBeFn } { + const flushTest: FlushableTest = { actual: actualSubscriptionLogs, ready: false }; + this.flushTests.push(flushTest); + const { runMode } = this; + return { + toBe(marblesOrMarblesArray: string | string[]) { + const marblesArray: string[] = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; + flushTest.ready = true; + flushTest.expected = marblesArray + .map((marbles) => TestScheduler.parseMarblesAsSubscriptions(marbles, runMode)) + .filter((marbles) => marbles.subscribedFrame !== Infinity); + }, + }; + } + + flush() { + const hotObservables = this.hotObservables; + while (hotObservables.length > 0) { + hotObservables.shift()!.setup(); + } + + super.flush(); + + this.flushTests = this.flushTests.filter((test) => { + if (test.ready) { + this.assertDeepEqual(test.actual, test.expected); + return false; + } + return true; + }); + } + + /** @nocollapse */ + static parseMarblesAsSubscriptions(marbles: string | null, runMode = false): SubscriptionLog { + if (typeof marbles !== 'string') { + return new SubscriptionLog(Infinity); + } + // Spreading the marbles into an array leverages ES2015's support for emoji + // characters when iterating strings. + const characters = [...marbles]; + const len = characters.length; + let groupStart = -1; + let subscriptionFrame = Infinity; + let unsubscriptionFrame = Infinity; + let frame = 0; + + for (let i = 0; i < len; i++) { + let nextFrame = frame; + const advanceFrameBy = (count: number) => { + nextFrame += count * this.frameTimeFactor; + }; + const c = characters[i]; + switch (c) { + case ' ': + // Whitespace no longer advances time + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '^': + if (subscriptionFrame !== Infinity) { + throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); + } + subscriptionFrame = groupStart > -1 ? groupStart : frame; + advanceFrameBy(1); + break; + case '!': + if (unsubscriptionFrame !== Infinity) { + throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); + } + unsubscriptionFrame = groupStart > -1 ? groupStart : frame; + break; + default: + // time progression syntax + if (runMode && c.match(/^[0-9]$/)) { + // Time progression must be preceded by at least one space + // if it's not at the beginning of the diagram + if (i === 0 || characters[i - 1] === ' ') { + const buffer = characters.slice(i).join(''); + const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + const duration = parseFloat(match[1]); + const unit = match[2]; + let durationInMs: number; + + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + + advanceFrameBy(durationInMs! / this.frameTimeFactor); + break; + } + } + } + + throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); + } + + frame = nextFrame; + } + + if (unsubscriptionFrame < 0) { + return new SubscriptionLog(subscriptionFrame); + } else { + return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); + } + } + + /** @nocollapse */ + static parseMarbles( + marbles: string, + values?: any, + errorValue?: any, + materializeInnerObservables: boolean = false, + runMode = false + ): TestMessage[] { + if (marbles.indexOf('!') !== -1) { + throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); + } + // Spreading the marbles into an array leverages ES2015's support for emoji + // characters when iterating strings. + const characters = [...marbles]; + const len = characters.length; + const testMessages: TestMessage[] = []; + const subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); + let frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; + const getValue = + typeof values !== 'object' + ? (x: any) => x + : (x: any) => { + // Support Observable-of-Observables + if (materializeInnerObservables && values[x] instanceof ColdObservable) { + return values[x].messages; + } + return values[x]; + }; + let groupStart = -1; + + for (let i = 0; i < len; i++) { + let nextFrame = frame; + const advanceFrameBy = (count: number) => { + nextFrame += count * this.frameTimeFactor; + }; + + let notification: ObservableNotification | undefined; + const c = characters[i]; + switch (c) { + case ' ': + // Whitespace no longer advances time + if (!runMode) { + advanceFrameBy(1); + } + break; + case '-': + advanceFrameBy(1); + break; + case '(': + groupStart = frame; + advanceFrameBy(1); + break; + case ')': + groupStart = -1; + advanceFrameBy(1); + break; + case '|': + notification = COMPLETE_NOTIFICATION; + advanceFrameBy(1); + break; + case '^': + advanceFrameBy(1); + break; + case '#': + notification = errorNotification(errorValue || 'error'); + advanceFrameBy(1); + break; + default: + // Might be time progression syntax, or a value literal + if (runMode && c.match(/^[0-9]$/)) { + // Time progression must be preceded by at least one space + // if it's not at the beginning of the diagram + if (i === 0 || characters[i - 1] === ' ') { + const buffer = characters.slice(i).join(''); + const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); + if (match) { + i += match[0].length - 1; + const duration = parseFloat(match[1]); + const unit = match[2]; + let durationInMs: number; + + switch (unit) { + case 'ms': + durationInMs = duration; + break; + case 's': + durationInMs = duration * 1000; + break; + case 'm': + durationInMs = duration * 1000 * 60; + break; + default: + break; + } + + advanceFrameBy(durationInMs! / this.frameTimeFactor); + break; + } + } + } + + notification = nextNotification(getValue(c)); + advanceFrameBy(1); + break; + } + + if (notification) { + testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification }); + } + + frame = nextFrame; + } + return testMessages; + } + + private createAnimator() { + if (!this.runMode) { + throw new Error('animate() must only be used in run mode'); + } + + // The TestScheduler assigns a delegate to the provider that's used for + // requestAnimationFrame (rAF). The delegate works in conjunction with the + // animate run helper to coordinate the invocation of any rAF callbacks, + // that are effected within tests, with the animation frames specified by + // the test's author - in the marbles that are passed to the animate run + // helper. This allows the test's author to write deterministic tests and + // gives the author full control over when - or if - animation frames are + // 'painted'. + + let lastHandle = 0; + let map: Map | undefined; + + const delegate = { + requestAnimationFrame(callback: FrameRequestCallback) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + const handle = ++lastHandle; + map.set(handle, callback); + return handle; + }, + cancelAnimationFrame(handle: number) { + if (!map) { + throw new Error('animate() was not called within run()'); + } + map.delete(handle); + }, + }; + + const animate = (marbles: string) => { + if (map) { + throw new Error('animate() must not be called more than once within run()'); + } + if (/[|#]/.test(marbles)) { + throw new Error('animate() must not complete or error'); + } + map = new Map(); + const messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); + for (const message of messages) { + this.schedule(() => { + const now = this.now(); + // Capture the callbacks within the queue and clear the queue + // before enumerating the callbacks, as callbacks might + // reschedule themselves. (And, yeah, we're using a Map to represent + // the queue, but the values are guaranteed to be returned in + // insertion order, so it's all good. Trust me, I've read the docs.) + const callbacks = Array.from(map!.values()); + map!.clear(); + for (const callback of callbacks) { + callback(now); + } + }, message.frame); + } + }; + + return { animate, delegate }; + } + + private createDelegates() { + // When in run mode, the TestScheduler provides alternate implementations + // of set/clearImmediate and set/clearInterval. These implementations are + // consumed by the scheduler implementations via the providers. This is + // done to effect deterministic asap and async scheduler behavior so that + // all of the schedulers are testable in 'run mode'. Prior to v7, + // delegation occurred at the scheduler level. That is, the asap and + // animation frame schedulers were identical in behavior to the async + // scheduler. Now, when in run mode, asap actions are prioritized over + // async actions and animation frame actions are coordinated using the + // animate run helper. + + let lastHandle = 0; + const scheduleLookup = new Map< + TimerHandle, + { + due: number; + duration: number; + handle: TimerHandle; + handler: () => void; + subscription: Subscription; + type: 'immediate' | 'interval' | 'timeout'; + } + >(); + + const run = () => { + // Whenever a scheduled run is executed, it must run a single immediate + // or interval action - with immediate actions being prioritized over + // interval and timeout actions. + const now = this.now(); + const scheduledRecords = Array.from(scheduleLookup.values()); + const scheduledRecordsDue = scheduledRecords.filter(({ due }) => due <= now); + const dueImmediates = scheduledRecordsDue.filter(({ type }) => type === 'immediate'); + if (dueImmediates.length > 0) { + const { handle, handler } = dueImmediates[0]; + scheduleLookup.delete(handle); + handler(); + return; + } + const dueIntervals = scheduledRecordsDue.filter(({ type }) => type === 'interval'); + if (dueIntervals.length > 0) { + const firstDueInterval = dueIntervals[0]; + const { duration, handler } = firstDueInterval; + firstDueInterval.due = now + duration; + // The interval delegate must behave like setInterval, so run needs to + // be rescheduled. This will continue until the clearInterval delegate + // unsubscribes and deletes the handle from the map. + firstDueInterval.subscription = this.schedule(run, duration); + handler(); + return; + } + const dueTimeouts = scheduledRecordsDue.filter(({ type }) => type === 'timeout'); + if (dueTimeouts.length > 0) { + const { handle, handler } = dueTimeouts[0]; + scheduleLookup.delete(handle); + handler(); + return; + } + throw new Error('Expected a due immediate or interval'); + }; + + // The following objects are the delegates that replace conventional + // runtime implementations with TestScheduler implementations. + // + // The immediate delegate is depended upon by the asapScheduler. + // + // The interval delegate is depended upon by the asyncScheduler. + // + // The timeout delegate is not depended upon by any scheduler, but it's + // included here because the onUnhandledError and onStoppedNotification + // configuration points use setTimeout to avoid producer interference. It's + // inclusion allows for the testing of these configuration points. + + const immediate = { + setImmediate: (handler: () => void) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now(), + duration: 0, + handle, + handler, + subscription: this.schedule(run, 0), + type: 'immediate', + }); + return handle; + }, + clearImmediate: (handle: TimerHandle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + + const interval = { + setInterval: (handler: () => void, duration = 0) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now() + duration, + duration, + handle, + handler, + subscription: this.schedule(run, duration), + type: 'interval', + }); + return handle; + }, + clearInterval: (handle: TimerHandle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + + const timeout = { + setTimeout: (handler: () => void, duration = 0) => { + const handle = ++lastHandle; + scheduleLookup.set(handle, { + due: this.now() + duration, + duration, + handle, + handler, + subscription: this.schedule(run, duration), + type: 'timeout', + }); + return handle; + }, + clearTimeout: (handle: TimerHandle) => { + const value = scheduleLookup.get(handle); + if (value) { + value.subscription.unsubscribe(); + scheduleLookup.delete(handle); + } + }, + }; + + return { immediate, interval, timeout }; + } + + /** + * The `run` method performs the test in 'run mode' - in which schedulers + * used within the test automatically delegate to the `TestScheduler`. That + * is, in 'run mode' there is no need to explicitly pass a `TestScheduler` + * instance to observable creators or operators. + * + * @see {@link /guide/testing/marble-testing} + */ + run(callback: (helpers: RunHelpers) => T): T { + const prevFrameTimeFactor = TestScheduler.frameTimeFactor; + const prevMaxFrames = this.maxFrames; + + TestScheduler.frameTimeFactor = 1; + this.maxFrames = Infinity; + this.runMode = true; + + const animator = this.createAnimator(); + const delegates = this.createDelegates(); + + animationFrameProvider.delegate = animator.delegate; + dateTimestampProvider.delegate = this; + immediateProvider.delegate = delegates.immediate; + intervalProvider.delegate = delegates.interval; + timeoutProvider.delegate = delegates.timeout; + performanceTimestampProvider.delegate = this; + + const helpers: RunHelpers = { + cold: this.createColdObservable.bind(this), + hot: this.createHotObservable.bind(this), + flush: this.flush.bind(this), + time: this.createTime.bind(this), + expectObservable: this.expectObservable.bind(this), + expectSubscriptions: this.expectSubscriptions.bind(this), + animate: animator.animate, + }; + try { + const ret = callback(helpers); + this.flush(); + return ret; + } finally { + TestScheduler.frameTimeFactor = prevFrameTimeFactor; + this.maxFrames = prevMaxFrames; + this.runMode = false; + animationFrameProvider.delegate = undefined; + dateTimestampProvider.delegate = undefined; + immediateProvider.delegate = undefined; + intervalProvider.delegate = undefined; + timeoutProvider.delegate = undefined; + performanceTimestampProvider.delegate = undefined; + } + } +} diff --git a/node_modules/rxjs/src/internal/types.ts b/node_modules/rxjs/src/internal/types.ts new file mode 100644 index 0000000..a28e96a --- /dev/null +++ b/node_modules/rxjs/src/internal/types.ts @@ -0,0 +1,365 @@ +// https://github.com/microsoft/TypeScript/issues/40462#issuecomment-689879308 +/// + +import { Observable } from './Observable'; +import { Subscription } from './Subscription'; + +/** + * Note: This will add Symbol.observable globally for all TypeScript users, + * however, we are no longer polyfilling Symbol.observable + */ +declare global { + interface SymbolConstructor { + readonly observable: symbol; + } +} + +/* OPERATOR INTERFACES */ + +/** + * A function type interface that describes a function that accepts one parameter `T` + * and returns another parameter `R`. + * + * Usually used to describe {@link OperatorFunction} - it always takes a single + * parameter (the source Observable) and returns another Observable. + */ +export interface UnaryFunction { + (source: T): R; +} + +export interface OperatorFunction extends UnaryFunction, Observable> {} + +export type FactoryOrValue = T | (() => T); + +export interface MonoTypeOperatorFunction extends OperatorFunction {} + +/** + * A value and the time at which it was emitted. + * + * Emitted by the `timestamp` operator + * + * @see {@link timestamp} + */ +export interface Timestamp { + value: T; + /** + * The timestamp. By default, this is in epoch milliseconds. + * Could vary based on the timestamp provider passed to the operator. + */ + timestamp: number; +} + +/** + * A value emitted and the amount of time since the last value was emitted. + * + * Emitted by the `timeInterval` operator. + * + * @see {@link timeInterval} + */ +export interface TimeInterval { + value: T; + + /** + * The amount of time between this value's emission and the previous value's emission. + * If this is the first emitted value, then it will be the amount of time since subscription + * started. + */ + interval: number; +} + +/* SUBSCRIPTION INTERFACES */ + +export interface Unsubscribable { + unsubscribe(): void; +} + +export type TeardownLogic = Subscription | Unsubscribable | (() => void) | void; + +export interface SubscriptionLike extends Unsubscribable { + unsubscribe(): void; + readonly closed: boolean; +} + +/** + * @deprecated Do not use. Most likely you want to use `ObservableInput`. Will be removed in v8. + */ +export type SubscribableOrPromise = Subscribable | Subscribable | PromiseLike | InteropObservable; + +/** OBSERVABLE INTERFACES */ + +export interface Subscribable { + subscribe(observer: Partial>): Unsubscribable; +} + +/** + * Valid types that can be converted to observables. + */ +export type ObservableInput = + | Observable + | InteropObservable + | AsyncIterable + | PromiseLike + | ArrayLike + | Iterable + | ReadableStreamLike; + +/** + * @deprecated Renamed to {@link InteropObservable }. Will be removed in v8. + */ +export type ObservableLike = InteropObservable; + +/** + * An object that implements the `Symbol.observable` interface. + */ +export interface InteropObservable { + [Symbol.observable]: () => Subscribable; +} + +/* NOTIFICATIONS */ + +/** + * A notification representing a "next" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface NextNotification { + /** The kind of notification. Always "N" */ + kind: 'N'; + /** The value of the notification. */ + value: T; +} + +/** + * A notification representing an "error" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface ErrorNotification { + /** The kind of notification. Always "E" */ + kind: 'E'; + error: any; +} + +/** + * A notification representing a "completion" from an observable. + * Can be used with {@link dematerialize}. + */ +export interface CompleteNotification { + kind: 'C'; +} + +/** + * Valid observable notification types. + */ +export type ObservableNotification = NextNotification | ErrorNotification | CompleteNotification; + +/* OBSERVER INTERFACES */ + +export interface NextObserver { + closed?: boolean; + next: (value: T) => void; + error?: (err: any) => void; + complete?: () => void; +} + +export interface ErrorObserver { + closed?: boolean; + next?: (value: T) => void; + error: (err: any) => void; + complete?: () => void; +} + +export interface CompletionObserver { + closed?: boolean; + next?: (value: T) => void; + error?: (err: any) => void; + complete: () => void; +} + +export type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; + +/** + * An object interface that defines a set of callback functions a user can use to get + * notified of any set of {@link Observable} + * {@link guide/glossary-and-semantics#notification notification} events. + * + * For more info, please refer to {@link guide/observer this guide}. + */ +export interface Observer { + /** + * A callback function that gets called by the producer during the subscription when + * the producer "has" the `value`. It won't be called if `error` or `complete` callback + * functions have been called, nor after the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#next this guide}. + */ + next: (value: T) => void; + /** + * A callback function that gets called by the producer if and when it encountered a + * problem of any kind. The errored value will be provided through the `err` parameter. + * This callback can't be called more than one time, it can't be called if the + * `complete` callback function have been called previously, nor it can't be called if + * the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#error this guide}. + */ + error: (err: any) => void; + /** + * A callback function that gets called by the producer if and when it has no more + * values to provide (by calling `next` callback function). This means that no error + * has happened. This callback can't be called more than one time, it can't be called + * if the `error` callback function have been called previously, nor it can't be called + * if the consumer has unsubscribed. + * + * For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}. + */ + complete: () => void; +} + +export interface SubjectLike extends Observer, Subscribable {} + +/* SCHEDULER INTERFACES */ + +export interface SchedulerLike extends TimestampProvider { + schedule(work: (this: SchedulerAction, state: T) => void, delay: number, state: T): Subscription; + schedule(work: (this: SchedulerAction, state?: T) => void, delay: number, state?: T): Subscription; + schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; +} + +export interface SchedulerAction extends Subscription { + schedule(state?: T, delay?: number): Subscription; +} + +/** + * This is a type that provides a method to allow RxJS to create a numeric timestamp + */ +export interface TimestampProvider { + /** + * Returns a timestamp as a number. + * + * This is used by types like `ReplaySubject` or operators like `timestamp` to calculate + * the amount of time passed between events. + */ + now(): number; +} + +/** + * Extracts the type from an `ObservableInput`. If you have + * `O extends ObservableInput` and you pass in `Observable`, or + * `Promise`, etc, it will type as `number`. + */ +export type ObservedValueOf = O extends ObservableInput ? T : never; + +/** + * Extracts a union of element types from an `ObservableInput[]`. + * If you have `O extends ObservableInput[]` and you pass in + * `Observable[]` or `Promise[]` you would get + * back a type of `string`. + * If you pass in `[Observable, Observable]` you would + * get back a type of `string | number`. + */ +export type ObservedValueUnionFromArray = X extends Array> ? T : never; + +/** + * @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8. + */ +export type ObservedValuesFromArray = ObservedValueUnionFromArray; + +/** + * Extracts a tuple of element types from an `ObservableInput[]`. + * If you have `O extends ObservableInput[]` and you pass in + * `[Observable, Observable]` you would get back a type + * of `[string, number]`. + */ +export type ObservedValueTupleFromArray = { [K in keyof X]: ObservedValueOf }; + +/** + * Used to infer types from arguments to functions like {@link forkJoin}. + * So that you can have `forkJoin([Observable
, PromiseLike]): Observable<[A, B]>` + * et al. + */ +export type ObservableInputTuple = { + [K in keyof T]: ObservableInput; +}; + +/** + * Constructs a new tuple with the specified type at the head. + * If you declare `Cons` you will get back `[A, B, C]`. + */ +export type Cons = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never; + +/** + * Extracts the head of a tuple. + * If you declare `Head<[A, B, C]>` you will get back `A`. + */ +export type Head = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never; + +/** + * Extracts the tail of a tuple. + * If you declare `Tail<[A, B, C]>` you will get back `[B, C]`. + */ +export type Tail = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never; + +/** + * Extracts the generic value from an Array type. + * If you have `T extends Array`, and pass a `string[]` to it, + * `ValueFromArray` will return the actual type of `string`. + */ +export type ValueFromArray = A extends Array ? T : never; + +/** + * Gets the value type from an {@link ObservableNotification}, if possible. + */ +export type ValueFromNotification = T extends { kind: 'N' | 'E' | 'C' } + ? T extends NextNotification + ? T extends { value: infer V } + ? V + : undefined + : never + : never; + +/** + * A simple type to represent a gamut of "falsy" values... with a notable exception: + * `NaN` is "falsy" however, it is not and cannot be typed via TypeScript. See + * comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417 + */ +export type Falsy = null | undefined | false | 0 | -0 | 0n | ''; + +export type TruthyTypesOf = T extends Falsy ? never : T; + +// We shouldn't rely on this type definition being available globally yet since it's +// not necessarily available in every TS environment. +interface ReadableStreamDefaultReaderLike { + // HACK: As of TS 4.2.2, The provided types for the iterator results of a `ReadableStreamDefaultReader` + // are significantly different enough from `IteratorResult` as to cause compilation errors. + // The type at the time is `ReadableStreamDefaultReadResult`. + read(): PromiseLike< + | { + done: false; + value: T; + } + | { done: true; value?: undefined } + >; + releaseLock(): void; +} + +/** + * The base signature RxJS will look for to identify and use + * a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) + * as an {@link ObservableInput} source. + */ +export interface ReadableStreamLike { + getReader(): ReadableStreamDefaultReaderLike; +} + +/** + * An observable with a `connect` method that is used to create a subscription + * to an underlying source, connecting it with all consumers via a multicast. + */ +export interface Connectable extends Observable { + /** + * (Idempotent) Calling this method will connect the underlying source observable to all subscribed consumers + * through an underlying {@link Subject}. + * @returns A subscription, that when unsubscribed, will "disconnect" the source from the connector subject, + * severing notifications to all consumers. + */ + connect(): Subscription; +} diff --git a/node_modules/rxjs/src/internal/umd.ts b/node_modules/rxjs/src/internal/umd.ts new file mode 100644 index 0000000..e81c574 --- /dev/null +++ b/node_modules/rxjs/src/internal/umd.ts @@ -0,0 +1,26 @@ +/* + NOTE: This is the global export file for rxjs v6 and higher. + */ + +/* rxjs */ +export * from '../index'; + +/* rxjs.operators */ +import * as _operators from '../operators/index'; +export const operators = _operators; + +/* rxjs.testing */ +import * as _testing from '../testing/index'; +export const testing = _testing; + +/* rxjs.ajax */ +import * as _ajax from '../ajax/index'; +export const ajax = _ajax; + +/* rxjs.webSocket */ +import * as _webSocket from '../webSocket/index'; +export const webSocket = _webSocket; + +/* rxjs.fetch */ +import * as _fetch from '../fetch/index'; +export const fetch = _fetch; diff --git a/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts b/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts new file mode 100644 index 0000000..bd528ba --- /dev/null +++ b/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts @@ -0,0 +1,30 @@ +import { createErrorClass } from './createErrorClass'; + +export interface ArgumentOutOfRangeError extends Error {} + +export interface ArgumentOutOfRangeErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): ArgumentOutOfRangeError; +} + +/** + * An error thrown when an element was queried at a certain index of an + * Observable, but no such index or position exists in that sequence. + * + * @see {@link elementAt} + * @see {@link take} + * @see {@link takeLast} + * + * @class ArgumentOutOfRangeError + */ +export const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor = createErrorClass( + (_super) => + function ArgumentOutOfRangeErrorImpl(this: any) { + _super(this); + this.name = 'ArgumentOutOfRangeError'; + this.message = 'argument out of range'; + } +); diff --git a/node_modules/rxjs/src/internal/util/EmptyError.ts b/node_modules/rxjs/src/internal/util/EmptyError.ts new file mode 100644 index 0000000..e2cbb9c --- /dev/null +++ b/node_modules/rxjs/src/internal/util/EmptyError.ts @@ -0,0 +1,29 @@ +import { createErrorClass } from './createErrorClass'; + +export interface EmptyError extends Error {} + +export interface EmptyErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): EmptyError; +} + +/** + * An error thrown when an Observable or a sequence was queried but has no + * elements. + * + * @see {@link first} + * @see {@link last} + * @see {@link single} + * @see {@link firstValueFrom} + * @see {@link lastValueFrom} + * + * @class EmptyError + */ +export const EmptyError: EmptyErrorCtor = createErrorClass((_super) => function EmptyErrorImpl(this: any) { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}); diff --git a/node_modules/rxjs/src/internal/util/Immediate.ts b/node_modules/rxjs/src/internal/util/Immediate.ts new file mode 100644 index 0000000..f01f546 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/Immediate.ts @@ -0,0 +1,45 @@ +let nextHandle = 1; +// The promise needs to be created lazily otherwise it won't be patched by Zones +let resolved: Promise; +const activeHandles: { [key: number]: any } = {}; + +/** + * Finds the handle in the list of active handles, and removes it. + * Returns `true` if found, `false` otherwise. Used both to clear + * Immediate scheduled tasks, and to identify if a task should be scheduled. + */ +function findAndClearHandle(handle: number): boolean { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} + +/** + * Helper functions to schedule and unschedule microtasks. + */ +export const Immediate = { + setImmediate(cb: () => void): number { + const handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(() => findAndClearHandle(handle) && cb()); + return handle; + }, + + clearImmediate(handle: number): void { + findAndClearHandle(handle); + }, +}; + +/** + * Used for internal testing purposes only. Do not export from library. + */ +export const TestTools = { + pending() { + return Object.keys(activeHandles).length; + } +}; diff --git a/node_modules/rxjs/src/internal/util/NotFoundError.ts b/node_modules/rxjs/src/internal/util/NotFoundError.ts new file mode 100644 index 0000000..8880b53 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/NotFoundError.ts @@ -0,0 +1,28 @@ +import { createErrorClass } from './createErrorClass'; + +export interface NotFoundError extends Error {} + +export interface NotFoundErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string): NotFoundError; +} + +/** + * An error thrown when a value or values are missing from an + * observable sequence. + * + * @see {@link operators/single} + * + * @class NotFoundError + */ +export const NotFoundError: NotFoundErrorCtor = createErrorClass( + (_super) => + function NotFoundErrorImpl(this: any, message: string) { + _super(this); + this.name = 'NotFoundError'; + this.message = message; + } +); diff --git a/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts b/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts new file mode 100644 index 0000000..5e833f9 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts @@ -0,0 +1,29 @@ +import { createErrorClass } from './createErrorClass'; + +export interface ObjectUnsubscribedError extends Error {} + +export interface ObjectUnsubscribedErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (): ObjectUnsubscribedError; +} + +/** + * An error thrown when an action is invalid because the object has been + * unsubscribed. + * + * @see {@link Subject} + * @see {@link BehaviorSubject} + * + * @class ObjectUnsubscribedError + */ +export const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass( + (_super) => + function ObjectUnsubscribedErrorImpl(this: any) { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; + } +); diff --git a/node_modules/rxjs/src/internal/util/SequenceError.ts b/node_modules/rxjs/src/internal/util/SequenceError.ts new file mode 100644 index 0000000..e959557 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/SequenceError.ts @@ -0,0 +1,28 @@ +import { createErrorClass } from './createErrorClass'; + +export interface SequenceError extends Error {} + +export interface SequenceErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (message: string): SequenceError; +} + +/** + * An error thrown when something is wrong with the sequence of + * values arriving on the observable. + * + * @see {@link operators/single} + * + * @class SequenceError + */ +export const SequenceError: SequenceErrorCtor = createErrorClass( + (_super) => + function SequenceErrorImpl(this: any, message: string) { + _super(this); + this.name = 'SequenceError'; + this.message = message; + } +); diff --git a/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts b/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts new file mode 100644 index 0000000..cd7d09f --- /dev/null +++ b/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts @@ -0,0 +1,30 @@ +import { createErrorClass } from './createErrorClass'; + +export interface UnsubscriptionError extends Error { + readonly errors: any[]; +} + +export interface UnsubscriptionErrorCtor { + /** + * @deprecated Internal implementation detail. Do not construct error instances. + * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 + */ + new (errors: any[]): UnsubscriptionError; +} + +/** + * An error thrown when one or more errors have occurred during the + * `unsubscribe` of a {@link Subscription}. + */ +export const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass( + (_super) => + function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) { + _super(this); + this.message = errors + ? `${errors.length} errors occurred during unsubscription: +${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` + : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + } +); diff --git a/node_modules/rxjs/src/internal/util/applyMixins.ts b/node_modules/rxjs/src/internal/util/applyMixins.ts new file mode 100644 index 0000000..7c1ed24 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/applyMixins.ts @@ -0,0 +1,10 @@ +export function applyMixins(derivedCtor: any, baseCtors: any[]) { + for (let i = 0, len = baseCtors.length; i < len; i++) { + const baseCtor = baseCtors[i]; + const propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); + for (let j = 0, len2 = propertyKeys.length; j < len2; j++) { + const name = propertyKeys[j]; + derivedCtor.prototype[name] = baseCtor.prototype[name]; + } + } +} \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/util/args.ts b/node_modules/rxjs/src/internal/util/args.ts new file mode 100644 index 0000000..0ce104b --- /dev/null +++ b/node_modules/rxjs/src/internal/util/args.ts @@ -0,0 +1,19 @@ +import { SchedulerLike } from '../types'; +import { isFunction } from './isFunction'; +import { isScheduler } from './isScheduler'; + +function last(arr: T[]): T | undefined { + return arr[arr.length - 1]; +} + +export function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined { + return isFunction(last(args)) ? args.pop() : undefined; +} + +export function popScheduler(args: any[]): SchedulerLike | undefined { + return isScheduler(last(args)) ? args.pop() : undefined; +} + +export function popNumber(args: any[], defaultValue: number): number { + return typeof last(args) === 'number' ? args.pop()! : defaultValue; +} diff --git a/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts b/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts new file mode 100644 index 0000000..483bef9 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts @@ -0,0 +1,30 @@ +const { isArray } = Array; +const { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object; + +/** + * Used in functions where either a list of arguments, a single array of arguments, or a + * dictionary of arguments can be returned. Returns an object with an `args` property with + * the arguments in an array, if it is a dictionary, it will also return the `keys` in another + * property. + */ +export function argsArgArrayOrObject>(args: T[] | [O] | [T[]]): { args: T[]; keys: string[] | null } { + if (args.length === 1) { + const first = args[0]; + if (isArray(first)) { + return { args: first, keys: null }; + } + if (isPOJO(first)) { + const keys = getKeys(first); + return { + args: keys.map((key) => first[key]), + keys, + }; + } + } + + return { args: args as T[], keys: null }; +} + +function isPOJO(obj: any): obj is object { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} diff --git a/node_modules/rxjs/src/internal/util/argsOrArgArray.ts b/node_modules/rxjs/src/internal/util/argsOrArgArray.ts new file mode 100644 index 0000000..b0096ce --- /dev/null +++ b/node_modules/rxjs/src/internal/util/argsOrArgArray.ts @@ -0,0 +1,9 @@ +const { isArray } = Array; + +/** + * Used in operators and functions that accept either a list of arguments, or an array of arguments + * as a single argument. + */ +export function argsOrArgArray(args: (T | T[])[]): T[] { + return args.length === 1 && isArray(args[0]) ? args[0] : (args as T[]); +} diff --git a/node_modules/rxjs/src/internal/util/arrRemove.ts b/node_modules/rxjs/src/internal/util/arrRemove.ts new file mode 100644 index 0000000..51a76cd --- /dev/null +++ b/node_modules/rxjs/src/internal/util/arrRemove.ts @@ -0,0 +1,11 @@ +/** + * Removes an item from an array, mutating it. + * @param arr The array to remove the item from + * @param item The item to remove + */ +export function arrRemove(arr: T[] | undefined | null, item: T) { + if (arr) { + const index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} diff --git a/node_modules/rxjs/src/internal/util/createErrorClass.ts b/node_modules/rxjs/src/internal/util/createErrorClass.ts new file mode 100644 index 0000000..e354fd3 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/createErrorClass.ts @@ -0,0 +1,20 @@ +/** + * Used to create Error subclasses until the community moves away from ES5. + * + * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors + * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123 + * + * @param createImpl A factory function to create the actual constructor implementation. The returned + * function should be a named function that calls `_super` internally. + */ +export function createErrorClass(createImpl: (_super: any) => any): T { + const _super = (instance: any) => { + Error.call(instance); + instance.stack = new Error().stack; + }; + + const ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} diff --git a/node_modules/rxjs/src/internal/util/createObject.ts b/node_modules/rxjs/src/internal/util/createObject.ts new file mode 100644 index 0000000..0f79f92 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/createObject.ts @@ -0,0 +1,3 @@ +export function createObject(keys: string[], values: any[]) { + return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {} as any); +} diff --git a/node_modules/rxjs/src/internal/util/errorContext.ts b/node_modules/rxjs/src/internal/util/errorContext.ts new file mode 100644 index 0000000..6c4ffb1 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/errorContext.ts @@ -0,0 +1,42 @@ +import { config } from '../config'; + +let context: { errorThrown: boolean; error: any } | null = null; + +/** + * Handles dealing with errors for super-gross mode. Creates a context, in which + * any synchronously thrown errors will be passed to {@link captureError}. Which + * will record the error such that it will be rethrown after the call back is complete. + * TODO: Remove in v8 + * @param cb An immediately executed function. + */ +export function errorContext(cb: () => void) { + if (config.useDeprecatedSynchronousErrorHandling) { + const isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + const { errorThrown, error } = context!; + context = null; + if (errorThrown) { + throw error; + } + } + } else { + // This is the general non-deprecated path for everyone that + // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling) + cb(); + } +} + +/** + * Captures errors only in super-gross mode. + * @param err the error to capture + */ +export function captureError(err: any) { + if (config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} diff --git a/node_modules/rxjs/src/internal/util/executeSchedule.ts b/node_modules/rxjs/src/internal/util/executeSchedule.ts new file mode 100644 index 0000000..1bcb990 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/executeSchedule.ts @@ -0,0 +1,44 @@ +import { Subscription } from '../Subscription'; +import { SchedulerAction, SchedulerLike } from '../types'; + +export function executeSchedule( + parentSubscription: Subscription, + scheduler: SchedulerLike, + work: () => void, + delay: number, + repeat: true +): void; +export function executeSchedule( + parentSubscription: Subscription, + scheduler: SchedulerLike, + work: () => void, + delay?: number, + repeat?: false +): Subscription; + +export function executeSchedule( + parentSubscription: Subscription, + scheduler: SchedulerLike, + work: () => void, + delay = 0, + repeat = false +): Subscription | void { + const scheduleSubscription = scheduler.schedule(function (this: SchedulerAction) { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } else { + this.unsubscribe(); + } + }, delay); + + parentSubscription.add(scheduleSubscription); + + if (!repeat) { + // Because user-land scheduler implementations are unlikely to properly reuse + // Actions for repeat scheduling, we can't trust that the returned subscription + // will control repeat subscription scenarios. So we're trying to avoid using them + // incorrectly within this library. + return scheduleSubscription; + } +} diff --git a/node_modules/rxjs/src/internal/util/identity.ts b/node_modules/rxjs/src/internal/util/identity.ts new file mode 100644 index 0000000..0b07958 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/identity.ts @@ -0,0 +1,45 @@ +/** + * This function takes one parameter and just returns it. Simply put, + * this is like `(x: T): T => x`. + * + * ## Examples + * + * This is useful in some cases when using things like `mergeMap` + * + * ```ts + * import { interval, take, map, range, mergeMap, identity } from 'rxjs'; + * + * const source$ = interval(1000).pipe(take(5)); + * + * const result$ = source$.pipe( + * map(i => range(i)), + * mergeMap(identity) // same as mergeMap(x => x) + * ); + * + * result$.subscribe({ + * next: console.log + * }); + * ``` + * + * Or when you want to selectively apply an operator + * + * ```ts + * import { interval, take, identity } from 'rxjs'; + * + * const shouldLimit = () => Math.random() < 0.5; + * + * const source$ = interval(1000); + * + * const result$ = source$.pipe(shouldLimit() ? take(5) : identity); + * + * result$.subscribe({ + * next: console.log + * }); + * ``` + * + * @param x Any value that is returned by this function + * @returns The value passed as the first parameter to this function + */ +export function identity(x: T): T { + return x; +} diff --git a/node_modules/rxjs/src/internal/util/isArrayLike.ts b/node_modules/rxjs/src/internal/util/isArrayLike.ts new file mode 100644 index 0000000..6f634d4 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isArrayLike.ts @@ -0,0 +1 @@ +export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function'); \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/util/isAsyncIterable.ts b/node_modules/rxjs/src/internal/util/isAsyncIterable.ts new file mode 100644 index 0000000..d419dc3 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isAsyncIterable.ts @@ -0,0 +1,5 @@ +import { isFunction } from './isFunction'; + +export function isAsyncIterable(obj: any): obj is AsyncIterable { + return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]); +} diff --git a/node_modules/rxjs/src/internal/util/isDate.ts b/node_modules/rxjs/src/internal/util/isDate.ts new file mode 100644 index 0000000..ed09ffb --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isDate.ts @@ -0,0 +1,10 @@ +/** + * Checks to see if a value is not only a `Date` object, + * but a *valid* `Date` object that can be converted to a + * number. For example, `new Date('blah')` is indeed an + * `instanceof Date`, however it cannot be converted to a + * number. + */ +export function isValidDate(value: any): value is Date { + return value instanceof Date && !isNaN(value as any); +} diff --git a/node_modules/rxjs/src/internal/util/isFunction.ts b/node_modules/rxjs/src/internal/util/isFunction.ts new file mode 100644 index 0000000..2715f07 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isFunction.ts @@ -0,0 +1,7 @@ +/** + * Returns true if the object is a function. + * @param value The value to check + */ +export function isFunction(value: any): value is (...args: any[]) => any { + return typeof value === 'function'; +} diff --git a/node_modules/rxjs/src/internal/util/isInteropObservable.ts b/node_modules/rxjs/src/internal/util/isInteropObservable.ts new file mode 100644 index 0000000..e709b8a --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isInteropObservable.ts @@ -0,0 +1,8 @@ +import { InteropObservable } from '../types'; +import { observable as Symbol_observable } from '../symbol/observable'; +import { isFunction } from './isFunction'; + +/** Identifies an input as being Observable (but not necessary an Rx Observable) */ +export function isInteropObservable(input: any): input is InteropObservable { + return isFunction(input[Symbol_observable]); +} diff --git a/node_modules/rxjs/src/internal/util/isIterable.ts b/node_modules/rxjs/src/internal/util/isIterable.ts new file mode 100644 index 0000000..9b492b3 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isIterable.ts @@ -0,0 +1,7 @@ +import { iterator as Symbol_iterator } from '../symbol/iterator'; +import { isFunction } from './isFunction'; + +/** Identifies an input as being an Iterable */ +export function isIterable(input: any): input is Iterable { + return isFunction(input?.[Symbol_iterator]); +} diff --git a/node_modules/rxjs/src/internal/util/isObservable.ts b/node_modules/rxjs/src/internal/util/isObservable.ts new file mode 100644 index 0000000..8df8f32 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isObservable.ts @@ -0,0 +1,13 @@ +/** prettier */ +import { Observable } from '../Observable'; +import { isFunction } from './isFunction'; + +/** + * Tests to see if the object is an RxJS {@link Observable} + * @param obj the object to test + */ +export function isObservable(obj: any): obj is Observable { + // The !! is to ensure that this publicly exposed function returns + // `false` if something like `null` or `0` is passed. + return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); +} diff --git a/node_modules/rxjs/src/internal/util/isPromise.ts b/node_modules/rxjs/src/internal/util/isPromise.ts new file mode 100644 index 0000000..0baef64 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isPromise.ts @@ -0,0 +1,9 @@ +import { isFunction } from "./isFunction"; + +/** + * Tests to see if the object is "thennable". + * @param value the object to test + */ +export function isPromise(value: any): value is PromiseLike { + return isFunction(value?.then); +} diff --git a/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts b/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts new file mode 100644 index 0000000..87b9c15 --- /dev/null +++ b/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts @@ -0,0 +1,23 @@ +import { ReadableStreamLike } from '../types'; +import { isFunction } from './isFunction'; + +export async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator { + const reader = readableStream.getReader(); + try { + while (true) { + const { value, done } = await reader.read(); + if (done) { + return; + } + yield value!; + } + } finally { + reader.releaseLock(); + } +} + +export function isReadableStreamLike(obj: any): obj is ReadableStreamLike { + // We don't want to use instanceof checks because they would return + // false for instances from another Realm, like an